/* ============================================
   音乐比赛门户 — 全局样式
   ============================================ */

/* --- Reset & Variables --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink: #0F0F0F;
  --cinnabar: #D6483A;
  --cinnabar-dark: #AA392F;
  --silver: #DCDDDD;
  --ivory: #F7F8F8;

  --cinnabar-alpha-06: rgba(214, 72, 58, 0.06);
  --cinnabar-alpha-12: rgba(214, 72, 58, 0.12);
  --cinnabar-alpha-30: rgba(214, 72, 58, 0.3);
  --cinnabar-alpha-50: rgba(214, 72, 58, 0.5);
  --ink-alpha-06: rgba(15, 15, 15, 0.06);
  --ink-alpha-12: rgba(15, 15, 15, 0.12);
  --ink-alpha-20: rgba(15, 15, 15, 0.2);
  --ink-alpha-40: rgba(15, 15, 15, 0.4);
  --ink-alpha-60: rgba(15, 15, 15, 0.6);
  --ink-alpha-85: rgba(15, 15, 15, 0.85);

  --serif: "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Roboto Mono", "Menlo", monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px var(--ink-alpha-06);
  --shadow-md: 0 8px 24px var(--ink-alpha-12);
  --shadow-lg: 0 16px 48px var(--ink-alpha-20);
  --shadow-cinnabar: 0 4px 20px var(--cinnabar-alpha-30);

  --container: 1200px;
  --header-h: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Dark page theme — one continuous background */
body.theme-dark {
  background: linear-gradient(180deg, #0F0F0F, #141428, #0F0F0F);
  color: rgba(255,255,255,0.85);
}

body.theme-dark .site-footer {
  background: transparent;
  text-align: left;
}

/* Dark theme overrides for form/content pages */
body.theme-dark .text-caption,
body.theme-dark .text-micro {
  color: rgba(255,255,255,0.4);
}

body.theme-dark .breadcrumb {
  color: rgba(255,255,255,0.5);
}

body.theme-dark .step-num {
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.4);
}

body.theme-dark .step-label {
  color: rgba(255,255,255,0.4);
}

body.theme-dark .step-connector {
  background: rgba(255,255,255,0.12);
}

body.theme-dark .form-label {
  color: rgba(255,255,255,0.85);
}

body.theme-dark .form-input,
body.theme-dark .form-textarea {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--ivory);
}

body.theme-dark .form-input::placeholder,
body.theme-dark .form-textarea::placeholder {
  color: rgba(255,255,255,0.25);
}

body.theme-dark .form-input:focus,
body.theme-dark .form-textarea:focus {
  border-color: var(--cinnabar);
  box-shadow: 0 0 0 3px rgba(214,72,58,0.2);
}

body.theme-dark .char-count {
  color: rgba(255,255,255,0.3);
}

body.theme-dark .upload-zone {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}

body.theme-dark .upload-zone:hover,
body.theme-dark .upload-zone.dragover {
  background: rgba(214,72,58,0.08);
  border-color: var(--cinnabar);
}

body.theme-dark .upload-preview {
  background: rgba(255,255,255,0.06);
}

body.theme-dark .upload-remove {
  color: rgba(255,255,255,0.4);
}

body.theme-dark .upload-remove:hover {
  color: var(--cinnabar);
}

body.theme-dark .btn-secondary {
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
}

body.theme-dark .btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}

body.theme-dark .my-work-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

body.theme-dark .my-work-title {
  color: var(--ivory);
}

body.theme-dark .my-work-time {
  color: rgba(255,255,255,0.4);
}

body.theme-dark .my-work-reason {
  color: var(--cinnabar);
}

body.theme-dark .checkbox-group label {
  color: rgba(255,255,255,0.7);
}

body.theme-dark .work-upload-header h4 {
  color: var(--ivory);
}

body.theme-dark .work-upload-item {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

body.theme-dark .lyrics-type-btn {
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
}

body.theme-dark .lyrics-type-btn.active {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: var(--ivory);
}

body.theme-dark .badge {
  color: var(--ivory);
}

body.theme-dark .confirm-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  color: rgba(255,255,255,0.8);
}

body.theme-dark .confirm-notice {
  background: rgba(214,72,58,0.08);
  border-color: rgba(214,72,58,0.2);
  font-size: 0.875rem;
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* --- Typography --- */
.font-serif { font-family: var(--serif); }
.font-sans  { font-family: var(--sans); }

.text-display { font-family: var(--serif); font-size: 3rem; font-weight: 700; line-height: 1.2; }
.text-h1      { font-family: var(--serif); font-size: 2.25rem; font-weight: 700; line-height: 1.3; }
.text-h2      { font-family: var(--serif); font-size: 1.75rem; font-weight: 600; line-height: 1.3; }
.text-h3      { font-size: 1.25rem; font-weight: 600; }
.text-body    { font-size: 1rem; font-weight: 400; }
.text-caption { font-size: 0.875rem; color: var(--ink); opacity: 0.6; }
.text-micro   { font-size: 0.75rem; color: var(--ink); opacity: 0.5; }
.text-cinnabar { color: var(--cinnabar); }
.text-center  { text-align: center; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 64px 0;
}

.section-title {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--cinnabar);
  margin: 12px auto 0;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--ink-alpha-85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ivory);
  letter-spacing: 0.05em;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.logo .logo-accent {
  color: var(--cinnabar);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--ivory);
  font-size: 0.9375rem;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cinnabar);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cinnabar);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ivory);
  transition: all 0.3s;
}

/* Mobile drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--ink);
  z-index: 200;
  padding: 80px 32px 32px;
  transition: right 0.35s var(--ease-out);
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--ink-alpha-60);
  z-index: 199;
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-drawer-overlay.open {
  opacity: 1;
}

.mobile-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-drawer nav a {
  color: var(--ivory);
  font-size: 1.125rem;
  font-family: var(--serif);
  transition: color 0.3s;
}

.mobile-drawer nav a:hover {
  color: var(--cinnabar);
}

.drawer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--ivory);
  font-size: 1.5rem;
  padding: 8px;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: calc(100dvh);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: transparent;
  padding-top: var(--header-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(214, 72, 58, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(170, 57, 47, 0.06) 0%, transparent 60%);
  animation: heroPulse 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroPulse {
  0%   { opacity: 0.2; }
  100% { opacity: 0.6; }
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-particle {
  position: absolute;
  color: var(--cinnabar);
  font-size: 1.25rem;
  animation: particleRise 8s ease-out infinite;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(214, 72, 58, 0.6));
  will-change: transform, opacity;
}

.hero-particle:nth-child(1) { left: 8%;  bottom: 5%;  animation-delay: 0s;   animation-duration: 6s;   font-size: 1.5rem; }
.hero-particle:nth-child(2) { left: 25%; bottom: 2%;  animation-delay: 2.2s; animation-duration: 7.5s; font-size: 1rem; }
.hero-particle:nth-child(3) { left: 42%; bottom: 8%;  animation-delay: 4s;   animation-duration: 6.5s; font-size: 1.75rem; }
.hero-particle:nth-child(4) { left: 58%; bottom: 3%;  animation-delay: 1s;   animation-duration: 8s;   font-size: 1.25rem; }
.hero-particle:nth-child(5) { left: 75%; bottom: 6%;  animation-delay: 3.5s; animation-duration: 7s;   font-size: 1rem; }
.hero-particle:nth-child(6) { left: 90%; bottom: 1%;  animation-delay: 5.2s; animation-duration: 6s;   font-size: 1.5rem; }
.hero-particle:nth-child(7) { left: 35%; bottom: 0%;  animation-delay: 1.8s; animation-duration: 7.5s; font-size: 1.25rem; }
.hero-particle:nth-child(8) { left: 68%; bottom: 4%;  animation-delay: 4.5s; animation-duration: 8s;   font-size: 1rem; }

@keyframes particleRise {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0.5);
  }
  5% {
    opacity: 0.35;
    transform: translateY(-20vh) translateX(2px) scale(0.8);
  }
  15% {
    opacity: 0.6;
    transform: translateY(-25vh) translateX(5px) scale(1);
  }
  30% {
    opacity: 0.7;
    transform: translateY(-30vh) translateX(-3px) scale(1);
  }
  50% {
    opacity: 0.55;
    transform: translateY(-38vh) translateX(7px) scale(0.9);
  }
  70% {
    opacity: 0.3;
    transform: translateY(-55vh) translateX(-5px) scale(0.75);
  }
  85% {
    opacity: 0.1;
    transform: translateY(-72vh) translateX(3px) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translateY(-90vh) translateX(-2px) scale(0.2);
  }
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.2; }
  25%      { transform: translateY(-30px) translateX(10px); opacity: 0.5; }
  50%      { transform: translateY(-50px) translateX(-10px); opacity: 0.3; }
  75%      { transform: translateY(-20px) translateX(15px); opacity: 0.5; }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
}

.hero-subtitle {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--cinnabar);
  letter-spacing: 0.3em;
  opacity: 0;
  animation: fadeInUp 0.8s 0.2s var(--ease-out) forwards;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--ivory);
  line-height: 1.2;
}

.hero-desc {
  font-size: 0.8rem;
  color: var(--ivory);
  opacity: 0.4;
  max-width: 560px;
  margin: 0 auto 20px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s 0.8s var(--ease-out) forwards;
}

.hero-tagline {
  font-family: var(--serif);
  font-size: 0.875rem;
  color: var(--ivory);
  opacity: 0;
  letter-spacing: 0.2em;
  margin-top: 28px;
  animation: fadeInUp 0.8s 1s var(--ease-out) forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-line {
  position: absolute;
  bottom: 60px;
  left: 0;
  right:0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  animation: fadeInUp 0.8s 1.2s var(--ease-out) forwards;
}

.hero-line span {
  font-size: 0.75rem;
  color: var(--ivory);
  opacity: 0.4;
  letter-spacing: 0.1em;
}

.hero-line-mouse {
  width: 20px;
  height: 32px;
  border: 2px solid var(--ivory);
  border-radius: 10px;
  opacity: 0.4;
  position: relative;
}

.hero-line-mouse::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 6px;
  background: var(--ivory);
  border-radius: 3px;
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50%      { transform: translateX(-50%) translateY(8px); opacity: 0.3; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn.block {
  width: 100%;
}

.btn-primary {
  background: var(--cinnabar);
  color: var(--ivory);
}

.btn-primary:hover {
  background: var(--cinnabar-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-cinnabar);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: var(--silver);
  color: var(--ink-alpha-40);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  border: 1px solid var(--silver);
  color: var(--ink);
  background: transparent;
}

.btn-secondary:hover {
  background: var(--ivory);
  border-color: var(--ink);
}

.btn-hero-primary {
  background: var(--cinnabar);
  color: var(--ivory);
  padding: 14px 40px;
  font-size: 1rem;
  box-shadow: var(--shadow-cinnabar);
  animation: breathe 3s ease-in-out infinite;
}

.btn-hero-primary:hover {
  background: var(--cinnabar-dark);
  transform: translateY(-2px);
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 4px 20px rgba(214,72,58,0.3); }
  50%      { box-shadow: 0 4px 40px rgba(214,72,58,0.5); }
}

.btn-hero-secondary {
  border: 1px solid rgba(247,248,248,0.4);
  color: var(--ivory);
  padding: 14px 40px;
  font-size: 1rem;
}

.btn-hero-secondary:hover {
  border-color: var(--ivory);
  background: rgba(247,248,248,0.08);
}

.btn-vote {
  background: var(--cinnabar);
  color: var(--ivory);
  padding: 12px 36px;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-vote:hover {
  background: var(--cinnabar-dark);
  transform: scale(1.05);
}

.btn-vote.voted {
  background: var(--silver);
  color: var(--ink-alpha-40);
  cursor: default;
  transform: none;
}

.btn-vote.disabled {
  background: var(--silver);
  color: var(--ink-alpha-40);
  cursor: not-allowed;
  transform: none;
}

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--silver);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-cover {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
}

.card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-cover img {
  transform: scale(1.05);
}

.card-cover-overlay {
  position: absolute;
  inset: 0;
  background: var(--ink-alpha-20);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover .card-cover-overlay {
  opacity: 1;
}

.card-cover-overlay .play-icon {
  width: 48px;
  height: 48px;
  background: var(--cinnabar);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-cinnabar);
}

.card-cover-overlay .play-icon::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent var(--ivory);
  margin-left: 3px;
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 15px;
  margin-left: 10px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--ink);
  opacity: 0.5;
}

.card-meta .votes {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-meta .votes::before {
  content: '♥';
  color: var(--cinnabar);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-ongoing {
  background: var(--cinnabar-alpha-12);
  color: var(--cinnabar);
}

.badge-ended {
  background: rgba(220, 221, 221, 0.5);
  color: var(--ink);
  opacity: 0.6;
}

.badge-pending {
  background: rgba(220, 221, 221, 0.5);
  color: var(--ink);
  opacity: 0.6;
}

.badge-approved {
  background: var(--cinnabar-alpha-12);
  color: var(--cinnabar);
}

.badge-rejected {
  background: rgba(170, 57, 47, 0.12);
  color: var(--cinnabar-dark);
}

/* --- Player Page --- */
.player-page {
  position: relative;
  padding-top: var(--header-h);
  min-height: 100vh;
  color: var(--ivory);
  overflow: hidden;
  background: #0F0F0F;
}

/* Full-screen blurred background */
.player-bg-blur {
  position: fixed;
  top: -80px;
  left: -80px;
  right: -80px;
  bottom: -80px;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(60px) brightness(0.3) saturate(1.2);
  pointer-events: none;
}

/* Subtle overlay for readability */
.player-bg-blur::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15,15,15,0.15), rgba(15,15,15,0.35));
}

.player-page > .container {
  position: relative;
  z-index: 1;
}

/* Lyrics stage */
/* Stage tabs */
.stage-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 12px;
  max-width: 640px;
}

.tab-btn {
  padding: 6px 24px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.25s;
}

.tab-btn.active {
  color: var(--ivory);
  background: var(--cinnabar);
  border-color: var(--cinnabar);
}

.tab-btn:hover:not(.active) {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.1);
}

/* Stage: horizontal snap container */
.player-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42vh;
  padding-top: 16px;
  margin-bottom: 0;
  overflow: hidden;
}

.stage-panels {
  display: flex;
  width: 100%;
  max-width: 640px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.stage-panels::-webkit-scrollbar {
  display: none;
}

.stage-panel {
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-height: 42vh;
}

/* Bio panel */
.bio-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bio-inner {
  padding: 24px 32px;
  max-width: 520px;
}

.bio-inner h4 {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ivory);
  margin-bottom: 8px;
  opacity: 0.9;
}

.bio-inner h4:not(:first-child) {
  margin-top: 24px;
}

.bio-inner p {
  font-size: 0.875rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0;
}

.player-lyrics-wrap {
  width: 100%;
  height: 42vh;
  min-height: 280px;
}

.lyrics-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  position: relative;
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  scrollbar-width: none;
}

.lyrics-container::-webkit-scrollbar {
  display: none;
}

.lyrics-line {
  padding: 10px 16px;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--ivory);
  opacity: 0.15;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1.6;
  font-family: var(--serif);
}

.lyrics-line.near {
  opacity: 0.3;
}

.lyrics-line.adjacent {
  opacity: 0.55;
}

.lyrics-line.active {
  opacity: 1;
  color: var(--cinnabar);
  font-size: 1.0625rem;
  font-weight: 600;
}

.lyrics-back-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(15,15,15,0.6);
  color: var(--ivory);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 5;
  backdrop-filter: blur(4px);
}

.lyrics-back-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Player info bar (title + bar row) */
.player-info-bar {
  max-width: 640px;
  margin: 0 auto 24px;
  text-align: center;
  padding: 0;
}

.player-song-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.player-artist {
  font-size: 0.9375rem;
  opacity: 0.4;
  margin-bottom: 20px;
}

/* Progress + Vote in one row */
.player-bar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto;
}

.player-bar-row .player-progress {
  flex: 1;
}

/* Progress bar */
.player-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ivory);
  opacity: 0.4;
  min-width: 38px;
}

.progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(247,248,248,0.15);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.progress-bar:hover {
  height: 5px;
}

.progress-filled {
  height: 100%;
  background: var(--cinnabar);
  border-radius: 2px;
  width: 0%;
  position: relative;
  transition: width 0.1s linear;
}

.progress-handle {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--cinnabar);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.progress-bar:hover .progress-handle {
  opacity: 1;
}

/* Vote button (inline in bar row) */
.btn-vote-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--cinnabar);
  color: var(--ivory);
  white-space: nowrap;
  transition: all 0.3s;
  flex-shrink: 0;
}

.btn-vote-inline:hover {
  background: var(--cinnabar-dark);
}

.btn-vote-inline.voted {
  background: rgba(247,248,248,0.15);
  color: var(--ivory);
  opacity: 0.5;
  cursor: default;
}

.vote-hint {
  font-size: 0.6875rem;
  color: var(--ivory);
  opacity: 0.25;
  margin-top: 8px;
  text-align: center;
}

/* Swipe hint */
.swipe-hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  padding: 10px 28px;
  border-radius: var(--radius-full);
  background: rgba(15,15,15,0.8);
  color: var(--ivory);
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
}

.swipe-hint.top {
  top: 80px;
}

.swipe-hint.bottom {
  bottom: 72px;
}

.swipe-hint.show {
  opacity: 1;
}

/* First-load auto-flash */
@keyframes hintFlash {
  0%   { opacity: 0; transform: translateX(-50%) translateY(8px); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  85%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-4px); }
}

.swipe-hint.flash {
  animation: hintFlash 2s ease forwards;
}

/* Dark overrides for player page elements */
.player-page .breadcrumb {
  color: var(--ivory);
}

.player-page .bio-toggle {
  color: var(--ivory);
  opacity: 0.4;
  border-color: rgba(247,248,248,0.12);
}

.player-page .bio-toggle:hover {
  color: var(--cinnabar);
  opacity: 0.7;
}

.player-page .bio-content h4 {
  color: var(--ivory);
  opacity: 0.8;
}

.player-page .bio-content p {
  color: var(--ivory);
  opacity: 0.45;
}

.player-page .site-footer {
  background: transparent;
}

@keyframes voteBump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Vote +1 float animation */
.vote-float {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cinnabar);
  pointer-events: none;
  animation: voteFloat 0.8s ease-out forwards;
}

@keyframes voteFloat {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-32px); }
}

/* --- Collapsible Bio Section --- */
/* --- Bio Panel (in horizontal tab) --- */
/* styles moved to .bio-inner above */

/* --- Rule Sections (competition / about pages) --- */
.rule-section {
  margin-bottom: 40px;
}

.rule-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ivory);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.rule-section p {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.55);
  text-indent: 2em;
}

.rule-section ul {
  list-style: none;
  padding: 0;
}

.rule-section li {
  position: relative;
  padding: 8px 0 8px 20px;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.55);
}

.rule-section li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--cinnabar);
  font-weight: bold;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: rgba(255,255,255,0.1);
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cinnabar);
  border: 2px solid rgba(255,255,255,0.15);
}

.timeline-content h4 {
  font-family: var(--serif);
  font-size: 0.9375rem;
  color: var(--ivory);
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}

/* About org */
.about-org {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-org-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
}

.about-org-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
}

.about-org-name {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ivory);
}

/* --- Track Cards (Seven Themes) --- */
.track-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.track-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.track-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.track-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cinnabar);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}

.track-name {
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: var(--ivory);
  font-weight: 600;
}

.track-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.track-keyword {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(214,72,58,0.12);
  color: var(--cinnabar);
  font-size: 0.75rem;
}

.track-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  text-indent: 2em;
}

/* --- Highlight Cards --- */
.highlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.highlight-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.highlight-card h4 {
  font-family: var(--serif);
  color: var(--ivory);
  font-size: 1rem;
  margin-bottom: 8px;
}

.highlight-card p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  text-indent: 2em;
}

/* --- Phase Cards --- */
.phase-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.phase-card h4 {
  font-family: var(--serif);
  color: var(--ivory);
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.phase-card .phase-time {
  font-size: 0.8125rem;
  color: var(--cinnabar);
  margin-bottom: 12px;
}

.phase-card ul {
  padding-left: 0;
  list-style: none;
}

.phase-card li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
}

.phase-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}

@media (max-width: 640px) {
  .highlight-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Register Methods --- */
.register-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.register-method {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.register-method h4 {
  font-family: var(--serif);
  color: var(--ivory);
  font-size: 1rem;
  margin-bottom: 8px;
}

.register-method p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  text-indent: 2em;
}

/* --- Notice Box --- */
.notice-box {
  background: rgba(214,72,58,0.08);
  border: 1px solid rgba(214,72,58,0.2);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.notice-box ul {
  padding-left: 0;
  list-style: none;
}

.notice-box li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
}

.notice-box li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cinnabar);
}

/* --- Guide Banner (upload page) --- */
.guide-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(214,72,58,0.08);
  border: 1px solid rgba(214,72,58,0.2);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  margin-bottom: 32px;
}
.guide-banner h4 {
  font-size: 0.9375rem;
  color: var(--cinnabar);
  margin-bottom: 4px;
}
.guide-banner p {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
}
@media (max-width: 640px) {
  .guide-banner { flex-direction: column; align-items: flex-start; }
}

/* --- Overview Grid (index) --- */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}
.overview-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.overview-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
.overview-value {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}
@media (max-width: 640px) {
  .overview-grid { grid-template-columns: 1fr; }
}

/* --- Call-to-action Block --- */
.cta-block {
  text-align: center;
  padding: 40px 24px;
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.cta-block p {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
}

.cta-block .cta-slogan {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ivory);
  margin-bottom: 16px;
}

/* --- Parallax Cover --- */
.parallax-cover {
  position: relative;
  height: 400px;
  margin-top: var(--header-h);
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #0F0F0F 100%);
  display: flex;
  align-items: flex-end;
}

.parallax-cover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(to bottom, transparent, rgba(15,15,15,0.85));
}

.parallax-content {
  position: relative;
  z-index: 2;
  padding: 40px 0;
  width: 100%;
}

.parallax-title {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ivory);
  margin-bottom: 12px;
}

.parallax-meta {
  display: flex;
  gap: 24px;
  font-size: 0.875rem;
  color: var(--ivory);
  opacity: 0.6;
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 24px;
}

.filter-bar select {
  padding: 8px 16px;
  border: 1px solid var(--silver);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.filter-sort {
  display: flex;
  gap: 8px;
}

.sort-btn {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
  transition: all 0.2s;
}

.sort-btn.active,
.sort-btn:hover {
  border-color: var(--cinnabar);
  color: #fff;
  background: var(--cinnabar-alpha-30);
}

/* --- Floating CTA --- */
.floating-cta {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 50;
}

.floating-cta .btn {
  box-shadow: var(--shadow-md);
  animation: floatPulse 3s ease-in-out infinite;
}

@keyframes floatPulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* --- Upload / Form --- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 48px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid var(--silver);
  color: var(--ink);
  opacity: 0.4;
  transition: all 0.3s;
}

.step-item.active .step-num {
  border-color: var(--cinnabar);
  background: var(--cinnabar);
  color: var(--ivory);
  opacity: 1;
}

.step-item.done .step-num {
  border-color: var(--cinnabar);
  background: var(--cinnabar);
  color: var(--ivory);
  opacity: 1;
}

.step-label {
  font-size: 0.875rem;
  color: var(--ink);
  opacity: 0.4;
}

.step-item.active .step-label,
.step-item.done .step-label {
  opacity: 1;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: var(--silver);
  margin: 0 8px;
}

.step-item.done + .step-connector,
.step-connector.done {
  background: var(--cinnabar);
}

/* Form elements */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--cinnabar);
  margin-left: 2px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--silver);
  border-radius: var(--radius-sm);
  background: var(--ivory);
  font-size: 1rem;
  transition: all 0.2s;
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--cinnabar);
  box-shadow: 0 0 0 3px rgba(214,72,58,0.15);
}

.form-input.error,
.form-textarea.error {
  border-color: var(--cinnabar-dark);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--cinnabar-dark);
  margin-top: 4px;
  display: none;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--ink);
  opacity: 0.4;
  margin-top: 4px;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--silver);
  border-radius: var(--radius-md);
  background: var(--ivory);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 24px;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--cinnabar);
  background: rgba(214,72,58,0.03);
}

.upload-zone-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.3;
}

.upload-zone-text {
  font-size: 0.875rem;
  opacity: 0.5;
}

.upload-progress {
  width: 100%;
  height: 4px;
  background: var(--silver);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background: var(--cinnabar);
  width: 0%;
  transition: width 0.3s;
}

.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  background: var(--ivory);
  border-radius: var(--radius-sm);
}

.upload-preview-cover {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
  overflow: hidden;
}

.upload-preview-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-info {
  flex: 1;
  font-size: 0.875rem;
}

.upload-preview-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.upload-preview-size {
  opacity: 0.5;
  font-size: 0.75rem;
}

.upload-remove {
  color: var(--ink);
  opacity: 0.4;
  font-size: 1.25rem;
  padding: 4px;
  transition: opacity 0.2s;
}

.upload-remove:hover {
  opacity: 1;
  color: var(--cinnabar-dark);
}

/* Steps visibility */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.4s var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--ink-alpha-60);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

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

.modal {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s var(--ease-out);
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-header {
  padding: 24px 24px 0;
}

.modal-header h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--ink);
  opacity: 0.7;
}

.modal-body h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 8px;
  opacity: 1;
}

.modal-body ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.modal-body li {
  margin-bottom: 4px;
}

.modal-footer {
  padding: 0 24px 24px;
  border-top: 1px solid var(--silver);
  padding-top: 20px;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--cinnabar);
  margin-top: 2px;
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  opacity: 0.5;
  padding: 16px 0;
}

.breadcrumb a:hover {
  color: var(--cinnabar);
}

.breadcrumb .sep {
  opacity: 0.4;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.2;
}

.empty-state h3 {
  font-family: var(--serif);
  margin-bottom: 8px;
}

.empty-state p {
  opacity: 0.5;
  margin-bottom: 24px;
}

/* --- My Works --- */
.my-work-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--silver);
  margin-bottom: 12px;
  transition: box-shadow 0.3s;
}

.my-work-card:hover {
  box-shadow: var(--shadow-sm);
}

.my-work-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
  flex-shrink: 0;
  overflow: hidden;
}

.my-work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-work-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.my-work-info .badge {
  align-self: flex-start;
}

.my-work-title {
  font-weight: 600;
}

.my-work-time {
  font-size: 0.8125rem;
  opacity: 0.4;
}

.my-work-reason {
  font-size: 0.8125rem;
  color: var(--cinnabar-dark);
  margin-top: 4px;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 32px 0;
}

.pagination button {
  min-width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
}

.pagination button:hover {
  border-color: var(--cinnabar);
  color: #fff;
}

.pagination button.active {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: var(--ivory);
}

/* --- List Page: Enhanced Visual --- */
.list-hero {
  position: relative;
  padding: 80px 0 60px;
  background: transparent;
  overflow: hidden;
  text-align: center;
}

.list-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, var(--cinnabar-alpha-06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 50%, rgba(170,57,47,0.05) 0%, transparent 50%);
}

.list-hero-content {
  position: relative;
  z-index: 2;
}

.list-hero h1 {
  font-family: var(--serif);
  font-size: 2.25rem;
  color: var(--ivory);
  margin-bottom: 8px;
}

.list-hero p {
  color: var(--ivory);
  opacity: 0.4;
  font-size: 0.9375rem;
}

.list-hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 32px;
}

.list-hero-stat {
  text-align: center;
}

.list-hero-stat-num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cinnabar);
}

.list-hero-stat-label {
  font-size: 0.8125rem;
  color: var(--ivory);
  opacity: 0.4;
  margin-top: 4px;
}

/* ===== List Page: Dark Cards ===== */

/* Card base */
.grid > .card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s;
}

.grid > .card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Cover */
.grid > .card .card-cover {
  position: relative;
  flex-shrink: 0;
}

.grid > .card .card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.grid > .card:hover .card-cover img {
  transform: scale(1.05);
}

/* Cover overlay — hover */
.grid > .card .card-cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,15,15,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.grid > .card:hover .card-cover-overlay {
  opacity: 1;
}

/* Votes badge on cover top-right */
.card-cover-votes {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 0.875rem;
  font-weight: 600;
}

.card-cover-votes::before {
  content: '♥';
  color: var(--cinnabar);
  font-size: 0.8125rem;
}

/* Card body */
.grid > .card .card-body {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

/* Title row */
.card-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-title-row .card-title {
  margin-bottom: 0;
}

/* Rank clef */
.rank-clef {
  position: relative;
  font-size: 4rem;
  line-height: 1;
  flex-shrink: 0;
}

.rank-clef .clef-author {
  position: absolute;
  top: 12px;
  right: -30px;
  font-size: 0.625rem;
  white-space: nowrap;
  color: rgba(255,255,255,0.4);
}

.rank-clef.rank-1 { color: #FFD970; text-shadow: 0 0 8px rgba(255,217,112,0.9), 0 0 20px rgba(255,217,112,0.7), 0 0 40px rgba(201,168,76,0.5), 0 0 80px rgba(201,168,76,0.3); }
.rank-clef.rank-2 { color: #E0E0E0; text-shadow: 0 0 8px rgba(224,224,224,0.8), 0 0 20px rgba(224,224,224,0.6), 0 0 40px rgba(160,160,160,0.4), 0 0 80px rgba(160,160,160,0.2); }
.rank-clef.rank-3 { color: #E8A060; text-shadow: 0 0 8px rgba(232,160,96,0.8), 0 0 20px rgba(232,160,96,0.6), 0 0 40px rgba(184,115,51,0.4), 0 0 80px rgba(184,115,51,0.2); }

.grid > .card .card-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: bold;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0;
}

.grid > .card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Footer --- */
.site-footer {
  background: var(--ink);
  color: var(--ivory);
  padding: 48px 0;
  text-align: center;
}

.site-footer .footer-text {
  opacity: 0.4;
  font-size: 0.8125rem;
  line-height: 2;
}

/* --- Mobile Tab Bar --- */
.mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  z-index: 100;
  padding: 8px 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.mobile-tabbar-inner {
  display: flex;
  justify-content: space-around;
}

.mobile-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ivory);
  opacity: 0.5;
  font-size: 0.625rem;
  padding: 4px 12px;
  transition: opacity 0.2s;
}

.mobile-tabbar a.active {
  opacity: 1;
  color: var(--cinnabar);
}

.mobile-tabbar svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* --- Scroll animations --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* --- Horizontal scroller --- */
.h-scroller {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 16px;
  scrollbar-width: none;
}

.h-scroller::-webkit-scrollbar {
  display: none;
}

.h-scroller .card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
}

.h-scroller .card:hover {
  background: rgba(255,255,255,0.07);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Glowing gold clef for index cards */
.h-scroller .rank-clef {
  font-size: 4rem;
  color: #F0D060;
  text-shadow:
    0 0 6px rgba(240,208,96,0.8),
    0 0 16px rgba(240,208,96,0.5),
    0 0 40px rgba(240,208,96,0.25);
}

.h-scroller .card-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: bold;
  color: rgba(255,255,255,0.9);
}

.h-scroller .card-title-row {
  gap: 16px;
}

.h-scroller .clef-author {
  font-size: 0.625rem;
}

/* Scroller pagination dots */
.h-scroller-pagination {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.h-scroller-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: width 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}

.h-scroller-dot:hover {
  background: rgba(255,255,255,0.35);
}

.h-scroller-dot.active {
  width: 32px;
  background: rgba(255,255,255,0.15);
}

.h-scroller-dot.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--cinnabar);
  border-radius: 9999px;
  animation: dotProgress 4s linear forwards;
}

@keyframes dotProgress {
  0%   { width: 0; }
  100% { width: 100%; }
}

@media (min-width: 769px) {
  .h-scroller-pagination {
    display: flex;
  }
}

@media (max-width: 768px) {
  .h-scroller {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    max-height: none;
  }

  .h-scroller .card {
    flex: none;
    width: 100%;
    scroll-snap-align: start;
  }
}

/* --- Page top padding for fixed header --- */
.page-with-header {
  padding-top: calc(var(--header-h) + 48px);
  flex: 1 0 auto;
}

/* Sticky footer layout */
body.sticky-footer {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.sticky-footer .site-footer {
  flex-shrink: 0;
  text-align: left;
}

/* --- Lyrics type toggle --- */
.lyrics-type-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.lyrics-type-btn {
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  border: 1px solid var(--silver);
  transition: all 0.2s;
}

.lyrics-type-btn.active {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
  background: var(--cinnabar-alpha-12);
}

/* --- Work item in upload --- */
.work-upload-item {
  border: 1px solid var(--silver);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  background: #fff;
}

.work-upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.work-upload-header h4 {
  font-family: var(--serif);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }

  .player-stage { min-height: 36vh; }
  .stage-panel { min-height: 36vh; }
  .player-lyrics-wrap { height: 36vh; min-height: 240px; }
}

@media (max-width: 768px) {
  :root {
    --header-h: 56px;
  }

  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .mobile-drawer { display: block; }
  .mobile-drawer-overlay { display: block; pointer-events: none; }
  .mobile-drawer-overlay.open { pointer-events: auto; }
  .mobile-tabbar { display: block; }

  .text-display { font-size: 2rem; }
  .text-h1 { font-size: 1.75rem; }
  .text-h2 { font-size: 1.5rem; }

  .section { padding: 48px 0; }
  .section-title { font-size: 1.5rem; margin-bottom: 42px; }

  .grid-4,
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }

  .hero { min-height: calc(100dvh - var(--header-h)); }
  .hero-line { display: none; }

  .player-stage { min-height: 34vh; }
  .stage-panel { min-height: 34vh; }
  .player-lyrics-wrap { height: 34vh; min-height: 220px; }

  .parallax-cover { height: 280px; }
  .parallax-title { font-size: 1.75rem; }

  .filter-bar { flex-direction: column; gap: 12px; align-items: stretch; }

  .floating-cta { bottom: 80px; right: 16px; }

  body { padding-bottom: 60px; }

  .step-indicator {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 32px;
  }
  .step-item { gap: 10px; }
  .step-connector {
    width: 2px;
    height: 16px;
    margin: 4px 0 4px 15px;
  }

  .list-hero h1 { font-size: 1.75rem; }
  .list-hero-stats { gap: 24px; }
  .list-hero-stat-num { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  .hero-title { font-size: 1.5rem; }

  .player-stage { min-height: 30vh; }
  .stage-panel { min-height: 30vh; }
  .player-lyrics-wrap { height: 30vh; min-height: 200px; }
  .bio-inner { padding: 16px 20px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.1ms !important;
  }
}
