/* 2026-06-01: forum-music FAB (port tu /home/styles.css) */
.yjj-music-fab {
  position: fixed;
  z-index: 60;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}
.yjj-music-fab[data-position="top-right"]    { top: 104px; right: 18px; }
.yjj-music-fab[data-position="top-left"]     { top: 104px; left: 18px; align-items: flex-start; }
.yjj-music-fab[data-position="bottom-right"] { bottom: 18px; right: 18px; }
.yjj-music-fab[data-position="bottom-left"]  { bottom: 18px; left: 18px; align-items: flex-start; }

.yjj-music-fab > * { pointer-events: auto; }

.yjj-music-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 196, 64, 0.55);
  background: linear-gradient(135deg, rgba(40, 25, 12, 0.92), rgba(20, 12, 6, 0.92));
  color: #ffd57a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.4);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.yjj-music-btn:hover,
.yjj-music-btn:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 10px 24px rgba(255, 196, 64, 0.35), 0 0 0 2px rgba(255, 196, 64, 0.4);
  outline: none;
}
.yjj-music-btn .yjj-music-icon       { display: inline-flex; }
.yjj-music-btn .yjj-music-icon-mute   { display: none; }
.yjj-music-fab.is-muted .yjj-music-btn .yjj-music-icon       { display: none; }
.yjj-music-fab.is-muted .yjj-music-btn .yjj-music-icon-mute   { display: inline-flex; }

@keyframes yjj-music-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(255, 196, 64, 0.55); }
  50%      { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 10px rgba(255, 196, 64, 0); }
}
.yjj-music-fab.yjj-music-fab--pulse .yjj-music-btn {
  animation: yjj-music-pulse 1.6s ease-out infinite;
}
@keyframes yjj-music-spin {
  to { transform: rotate(360deg); }
}
.yjj-music-fab.is-playing .yjj-music-icon svg {
  animation: yjj-music-spin 4.5s linear infinite;
  transform-origin: center;
}

.yjj-music-panel {
  width: 260px;
  max-width: calc(100vw - 36px);
  padding: 12px 14px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 196, 64, 0.45);
  background: linear-gradient(180deg, rgba(28, 18, 8, 0.96), rgba(15, 10, 6, 0.98));
  color: #f8e8c2;
  font-size: 12.5px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.yjj-music-fab:hover .yjj-music-panel,
.yjj-music-fab:focus-within .yjj-music-panel,
.yjj-music-fab.yjj-music-panel-open .yjj-music-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.yjj-music-controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.yjj-music-empty-hint {
  list-style: none;
  padding: 8px;
  margin: 0;
  border-radius: 8px;
  background: rgba(255, 196, 64, 0.08);
  color: rgba(248, 232, 194, 0.85);
  font-size: 12px;
  line-height: 1.45;
}

.yjj-music-panel-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 196, 64, 0.18);
  margin-bottom: 8px;
}
.yjj-music-now {
  font-size: 14px;
  color: #ffd57a;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.yjj-music-state { font-size: 11px; color: rgba(255, 213, 122, 0.55); }
.yjj-music-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}
.yjj-music-controls button {
  flex: 1;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255, 196, 64, 0.3);
  background: rgba(255, 196, 64, 0.1);
  color: #ffd57a;
  cursor: pointer;
  font-size: 14px;
  transition: background 180ms ease;
}
.yjj-music-controls button:hover { background: rgba(255, 196, 64, 0.22); }
.yjj-music-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
}
.yjj-music-item {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  color: rgba(248, 232, 194, 0.78);
  line-height: 1.35;
}
.yjj-music-item:hover { background: rgba(255, 196, 64, 0.08); }
.yjj-music-item.is-active {
  background: rgba(255, 196, 64, 0.18);
  color: #ffd57a;
  font-weight: 600;
}
.yjj-music-num { color: rgba(255, 196, 64, 0.55); }

@media (max-width: 640px) {
  .yjj-music-fab[data-position="top-right"]    { top: 96px; right: 12px; }
  .yjj-music-fab[data-position="top-left"]     { top: 96px; left: 12px; }
  .yjj-music-btn { width: 40px; height: 40px; }
}
