/* ============================================================
   LEGACY.CSS — "별이 진 자리, 새로운 별들이 뜨다"
   ============================================================ */

/* ── 로컬 변수 ── */
:root {
  --lg-bg: #05060f;
  --lg-gold: #c8a96e;
  --lg-gold-dim: rgba(200,169,110,0.4);
  --lg-text: #e8e8e8;
  --lg-text-muted: #888;
  --lg-text-dim: #444;
  --lg-border: rgba(200,169,110,0.2);
  --lg-modal-bg: rgba(8,10,22,0.97);
}

/* ── 전체 바디 ── */
.legacy-body {
  background: var(--lg-bg);
  color: var(--lg-text);
  overflow-x: hidden;
}

/* ── 공통 씬 ── */
.scene {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* ════════════════════════════════════════
   SCENE 1 — The Ripple Effect
════════════════════════════════════════ */
.scene1 {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #0d0f1e 0%, #05060f 70%);
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scene1-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 20px;
  pointer-events: none;
}

.scene1-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--lg-gold);
  margin: 0 0 20px;
  text-transform: uppercase;
  opacity: 0.8;
}

.scene1-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--lg-text);
  line-height: 1.25;
  margin: 0 0 32px;
  letter-spacing: -0.02em;
}

.scene1-quote {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-style: italic;
  color: var(--lg-gold);
  line-height: 1.7;
  margin: 0 0 16px;
  border: none;
  padding: 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.scene1-sub {
  font-size: 0.82rem;
  color: var(--lg-text-muted);
  letter-spacing: 0.1em;
  margin: 0 0 60px;
}

/* 스크롤 힌트 */
.scene1-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.scroll-hint-text {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--lg-text-dim);
  text-transform: uppercase;
}

.scroll-hint-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--lg-gold-dim), transparent);
  animation: scrollHintPulse 2s ease-in-out infinite;
}

@keyframes scrollHintPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ════════════════════════════════════════
   SCENE 2 — The Constellation of Tributes
════════════════════════════════════════ */
.scene2 {
  height: 100vh;
  min-height: 600px;
  background: radial-gradient(ellipse at 60% 40%, #0a0c1e 0%, #05060f 60%);
}

#tribute-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: default;
}

.scene2-header {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}

.scene2-label {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--lg-gold);
  margin: 0 0 8px;
  opacity: 0.7;
}

.scene2-title {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 600;
  color: var(--lg-text);
  margin: 0 0 8px;
}

.scene2-desc {
  font-size: 0.8rem;
  color: var(--lg-text-muted);
  margin: 0;
}

/* 툴팁 */
.tribute-tooltip {
  position: fixed;
  z-index: 100;
  background: rgba(8,10,22,0.92);
  border: 1px solid var(--lg-border);
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  max-width: 240px;
  backdrop-filter: blur(8px);
}

.tribute-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-cover {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  background: #1a1a2a;
}

.tooltip-info { min-width: 0; }

.tooltip-album {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lg-text);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tooltip-artist {
  font-size: 0.72rem;
  color: var(--lg-gold);
  margin: 0 0 2px;
}

.tooltip-year {
  font-size: 0.68rem;
  color: var(--lg-text-muted);
  margin: 0;
}

/* ════════════════════════════════════════
   SCENE 3 — Leave Your Light
════════════════════════════════════════ */
.scene3 {
  min-height: 100vh;
  background: radial-gradient(ellipse at 40% 60%, #080a1a 0%, #05060f 60%);
  display: flex;
  align-items: center;
  justify-content: center;
}

#fan-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.scene3-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 20px;
  max-width: 560px;
  width: 100%;
}

.scene3-label {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--lg-gold);
  margin: 0 0 16px;
  opacity: 0.7;
}

.scene3-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--lg-text);
  margin: 0 0 12px;
}

.scene3-desc {
  font-size: 0.88rem;
  color: var(--lg-text-muted);
  line-height: 1.7;
  margin: 0 0 40px;
}

/* ── 폼 ── */
.light-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  transition: opacity 0.4s;
}

/* 색상 팔레트 */
.color-palette {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.palette-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--lg-text-muted);
}

.palette-options {
  display: flex;
  gap: 10px;
}

.color-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  padding: 0;
}

.color-btn:hover {
  transform: scale(1.2);
}

.color-btn.active {
  border-color: #fff;
  transform: scale(1.25);
  box-shadow: 0 0 8px currentColor;
}

/* 메시지 입력 */
.message-input-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.fan-message-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(200,169,110,0.3);
  border-radius: 4px;
  color: var(--lg-text);
  font-size: 0.9rem;
  padding: 14px 52px 14px 16px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}

.fan-message-input::placeholder {
  color: var(--lg-text-dim);
  font-style: italic;
}

.fan-message-input:focus {
  border-color: var(--lg-gold);
  background: rgba(200,169,110,0.05);
}

.char-count {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--lg-text-dim);
  pointer-events: none;
  font-family: 'Courier New', monospace;
}

/* 제출 버튼 */
.submit-light-btn {
  background: transparent;
  border: 1px solid var(--lg-gold);
  color: var(--lg-gold);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  padding: 12px 32px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  font-family: inherit;
}

.submit-light-btn:hover {
  background: var(--lg-gold);
  color: #000;
}

.submit-light-btn:active {
  transform: scale(0.97);
}

/* 확인 메시지 */
.submit-confirm {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  white-space: nowrap;
}

.submit-confirm.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.confirm-text {
  font-size: 0.9rem;
  color: var(--lg-gold);
  margin: 0;
  letter-spacing: 0.05em;
}

/* 팬 별 카운트 */
.fan-star-count {
  font-size: 0.75rem;
  color: var(--lg-text-dim);
  margin: 40px 0 0;
  letter-spacing: 0.05em;
}

/* 팬 별 툴팁 */
.fan-tooltip {
  position: fixed;
  z-index: 100;
  background: rgba(8,10,22,0.9);
  border: 1px solid var(--lg-border);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--lg-text);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  max-width: 220px;
  word-break: break-word;
  backdrop-filter: blur(8px);
}

.fan-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════
   모달
════════════════════════════════════════ */
.tribute-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.tribute-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.tribute-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
}

.tribute-modal-box {
  position: relative;
  z-index: 1;
  background: var(--lg-modal-bg);
  border: 1px solid var(--lg-border);
  border-radius: 6px;
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.tribute-modal.open .tribute-modal-box {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--lg-text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
  line-height: 1;
}

.modal-close-btn:hover { color: var(--lg-text); }

/* 모달 상단 */
.modal-top {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.modal-cover {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: #1a1a2a;
}

.modal-top-info { flex: 1; min-width: 0; }

.modal-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(200,169,110,0.12);
  color: var(--lg-gold);
  padding: 3px 8px;
  border-radius: 2px;
  margin: 0 0 8px;
}

.modal-album-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--lg-text);
  margin: 0 0 4px;
  line-height: 1.3;
}

.modal-artist {
  font-size: 0.88rem;
  color: var(--lg-gold);
  margin: 0 0 2px;
}

.modal-year-label {
  font-size: 0.78rem;
  color: var(--lg-text-muted);
  margin: 0 0 12px;
}

.modal-desc {
  font-size: 0.84rem;
  color: var(--lg-text-muted);
  line-height: 1.7;
  margin: 0;
}

/* 모달 하단 */
.modal-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  border-top: 1px solid rgba(200,169,110,0.1);
  padding-top: 24px;
}

.modal-section-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lg-gold);
  margin: 0 0 12px;
  opacity: 0.7;
}

/* 트랙리스트 */
.modal-tracks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
}

.modal-track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.82rem;
  color: var(--lg-text-muted);
}

.modal-track-item:hover {
  background: rgba(200,169,110,0.08);
  color: var(--lg-text);
}

.modal-track-item.active {
  background: rgba(200,169,110,0.12);
  color: var(--lg-gold);
}

.track-num {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: var(--lg-text-dim);
  flex-shrink: 0;
  width: 20px;
}

.track-name { flex: 1; }

/* Spotify */
.modal-spotify-wrap {
  min-height: 80px;
  display: flex;
  align-items: flex-start;
}

.spotify-placeholder {
  font-size: 0.78rem;
  color: var(--lg-text-dim);
  font-style: italic;
  margin: 0;
  line-height: 1.6;
}

/* ── 반응형 ── */
@media (max-width: 700px) {
  .modal-bottom {
    grid-template-columns: 1fr;
  }
  .modal-top {
    flex-direction: column;
  }
  .modal-cover {
    width: 80px;
    height: 80px;
  }
  .tribute-modal-box {
    padding: 20px 16px;
  }
  .scene2-header {
    white-space: normal;
    text-align: center;
    width: 90%;
    left: 5%;
    transform: none;
  }
}

@media (max-width: 480px) {
  .scene1-title { font-size: 1.8rem; }
  .scene1-quote { font-size: 0.95rem; }
  .palette-options { gap: 8px; }
  .color-btn { width: 20px; height: 20px; }
}

/* ════════════════════════════════════════
   LEGACY NAV — 메뉴 중앙 정렬 + BGM ON/OFF
════════════════════════════════════════ */

/* Legacy 페이지 전용 Nav: 로고 좌 / 메뉴 중앙 / BGM 우 */
.site-nav--legacy {
  justify-content: space-between;
}

.site-nav--legacy .nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 32px;
  list-style: none;
}

/* ── BGM ON/OFF 컨트롤 ── */
.bgm-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* BGM 토글 버튼 */
.bgm-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(5, 6, 15, 0.5);
  border: 1px solid rgba(200, 169, 110, 0.3);
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  line-height: 1;
}

.bgm-toggle:hover {
  border-color: rgba(200, 169, 110, 0.7);
  background: rgba(200, 169, 110, 0.08);
}

.bgm-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: rgba(200, 169, 110, 0.55);
  font-family: inherit;
  text-transform: uppercase;
}

.bgm-status {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: rgba(200, 169, 110, 0.4);
  font-family: inherit;
  text-transform: uppercase;
  transition: color 0.25s;
}

/* ON 상태 */
.bgm-ctrl.is-on .bgm-toggle {
  border-color: rgba(200, 169, 110, 0.6);
  background: rgba(200, 169, 110, 0.1);
}

.bgm-ctrl.is-on .bgm-label {
  color: #c8a96e;
}

.bgm-ctrl.is-on .bgm-status {
  color: #c8a96e;
}

/* 볼륨 영역 */
.bgm-vol-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bgm-vol-icon {
  width: 14px;
  height: 14px;
  color: rgba(200, 169, 110, 0.5);
  flex-shrink: 0;
  transition: color 0.25s;
}

.bgm-ctrl.is-on .bgm-vol-icon {
  color: rgba(200, 169, 110, 0.85);
}

/* 볼륨 슬라이더 */
.bgm-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 64px;
  height: 2px;
  background: rgba(200, 169, 110, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: background 0.25s;
}

.bgm-ctrl.is-on .bgm-volume {
  background: rgba(200, 169, 110, 0.35);
}

.bgm-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c8a96e;
  cursor: pointer;
  transition: transform 0.15s;
}

.bgm-volume::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.bgm-volume::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c8a96e;
  border: none;
  cursor: pointer;
}

/* 모바일: 볼륨 숨김 */
@media (max-width: 600px) {
  .bgm-vol-wrap { display: none; }
  .site-nav--legacy .nav-links { display: none; }
}

/* ════════════════════════════════════════
   모달 내 HTML5 미니 플레이어
════════════════════════════════════════ */

/* 트랙 아이템 재생 아이콘 */
.track-play-icon {
  font-size: 0.6rem;
  color: var(--lg-text-dim);
  flex-shrink: 0;
  transition: color 0.15s;
}

.modal-track-item:hover .track-play-icon {
  color: var(--lg-gold);
}

.modal-track-item.playing .track-play-icon {
  color: var(--lg-gold);
  animation: playIconPulse 1s ease-in-out infinite;
}

@keyframes playIconPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* 미니 플레이어 컨테이너 */
.mini-player {
  width: 100%;
  background: rgba(200,169,110,0.06);
  border: 1px solid rgba(200,169,110,0.18);
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-player--idle,
.mini-player--error {
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.mini-player__hint {
  font-size: 0.78rem;
  color: var(--lg-text-dim);
  font-style: italic;
  margin: 0;
  text-align: center;
  line-height: 1.6;
}

.mini-player--error .mini-player__hint {
  color: #c06060;
}

.mini-player--error code {
  font-size: 0.72rem;
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-top: 4px;
}

/* 트랙 정보 */
.mini-player__info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-player__cover {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: #1a1a2a;
}

.mini-player__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mini-player__track {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player__album {
  font-size: 0.72rem;
  color: var(--lg-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

/* 컨트롤 영역 */
.mini-player__controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-player__btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(200,169,110,0.4);
  background: rgba(200,169,110,0.1);
  color: var(--lg-gold);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
  line-height: 1;
}

.mini-player__btn:hover {
  background: rgba(200,169,110,0.2);
  border-color: rgba(200,169,110,0.7);
}

.mini-player__btn:active {
  transform: scale(0.93);
}

/* 진행 바 + 시간 */
.mini-player__progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mini-player__progress-bar {
  height: 3px;
  background: rgba(200,169,110,0.15);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.mini-player__progress-fill {
  height: 100%;
  background: var(--lg-gold);
  border-radius: 2px;
  transition: width 0.25s linear;
}

.mini-player__time {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--lg-text-dim);
  font-family: 'Courier New', monospace;
}

/* 볼륨 슬라이더 (미니 플레이어) */
.mini-player__volume {
  -webkit-appearance: none;
  appearance: none;
  width: 56px;
  height: 2px;
  background: rgba(200,169,110,0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}

.mini-player__volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lg-gold);
  cursor: pointer;
}

.mini-player__volume::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lg-gold);
  border: none;
  cursor: pointer;
}

/* 재생 중인 트랙 아이템 */
.modal-track-item.playing {
  background: rgba(200,169,110,0.15);
  color: var(--lg-gold);
}

/* 모달 스포티파이 영역 → 플레이어 영역으로 재활용 */
.modal-spotify-wrap {
  min-height: 80px;
  display: flex;
  align-items: flex-start;
  width: 100%;
}
