:root {
  --bg: #0e0d0c;
  --bg-2: #1a1816;
  --surface: #221f1c;
  --text: #f5efe6;
  --muted: #9b9388;
  --accent: #d4a574;
  --accent-2: #b8845a;
  --danger: #d4685a;
  --success: #7ab87a;
  --border: rgba(245, 239, 230, 0.1);
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.15; font-weight: 700; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(14, 13, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--accent); }
.logo.white { color: var(--text); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent); color: var(--bg) !important;
  padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.nav-cta:hover { background: var(--accent-2); }

/* Hero */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 100px 24px 60px; text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(212, 165, 116, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(184, 132, 90, 0.15), transparent 55%),
    url('https://images.unsplash.com/photo-1511671782779-c97d3d27a1d4?w=1600&q=80') center/cover;
  filter: brightness(0.35) contrast(1.1);
  z-index: -1;
}
.hero-content { max-width: 900px; animation: fadeInUp 1s ease-out; }
.tagline {
  display: inline-block; padding: 6px 16px;
  background: rgba(212, 165, 116, 0.15);
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 100px; color: var(--accent);
  font-size: 13px; font-weight: 500; letter-spacing: 0.5px;
  text-transform: uppercase; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(40px, 7vw, 76px); margin-bottom: 20px; letter-spacing: -1px; }
.accent { color: var(--accent); font-style: italic; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 640px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }

.btn {
  padding: 14px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212, 165, 116, 0.3); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.stats { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; }
.stat { text-align: center; }
.stat strong { display: block; font-family: 'Playfair Display'; font-size: 36px; color: var(--accent); }
.stat span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  color: var(--muted); animation: bounce 2s infinite;
}

/* Sections */
.top-section { padding: 100px 0; background: var(--bg-2); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.eyebrow {
  display: inline-block; color: var(--accent);
  font-size: 13px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(32px, 5vw, 50px); margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* Tracks grid */
.tracks-grid { display: flex; flex-direction: column; gap: 16px; }
.loading { text-align: center; color: var(--muted); padding: 60px 20px; }

.track-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: grid; grid-template-columns: 60px 80px 1fr auto auto;
  gap: 20px; align-items: center;
  transition: all 0.3s; opacity: 0; transform: translateY(20px);
  animation: fadeInUp 0.5s ease-out forwards;
}
.track-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.track-rank {
  font-family: 'Playfair Display'; font-size: 42px; font-weight: 900;
  color: var(--accent); line-height: 1; text-align: center;
}
.track-rank.top1 { color: #ffd700; }
.track-rank.top2 { color: #c0c0c0; }
.track-rank.top3 { color: #cd7f32; }
.track-cover {
  width: 80px; height: 80px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--bg);
}
.track-info h3 {
  font-family: 'Inter'; font-size: 17px; font-weight: 600;
  margin-bottom: 4px;
}
.track-info .artist { color: var(--accent); font-size: 14px; font-weight: 500; }
.track-info .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.track-votes {
  display: flex; flex-direction: column; align-items: center;
  min-width: 70px;
}
.track-votes strong {
  font-family: 'Playfair Display'; font-size: 26px; color: var(--text);
}
.track-votes span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.track-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.icon-btn:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.icon-btn.voted { background: var(--success); color: var(--bg); border-color: var(--success); }
.icon-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* About */
.about { padding: 100px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-grid h2 { font-size: clamp(28px, 4vw, 42px); margin: 12px 0 20px; }
.about-grid p { color: var(--muted); margin-bottom: 16px; font-size: 16px; }
.feature-list { list-style: none; margin-top: 24px; }
.feature-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; color: var(--text);
}
.feature-list svg { color: var(--accent); flex-shrink: 0; }
.about-visual { display: flex; justify-content: center; }
.vinyl {
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, #1a1816 30%, #0e0d0c 31%, #1a1816 32%, #0e0d0c 33%, #1a1816 34%, #0e0d0c 35%, #1a1816 36%);
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: spin 12s linear infinite;
}
.vinyl-inner {
  position: absolute; inset: 50%; transform: translate(-50%, -50%);
  width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent), var(--accent-2));
  top: 50%; left: 50%; margin: -50px 0 0 -50px;
  box-shadow: inset 0 0 0 4px var(--bg);
}

/* Footer */
.footer {
  background: var(--bg-2); padding: 70px 0 30px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 60px; margin-bottom: 50px;
}
.footer-inner p { color: var(--muted); margin-top: 16px; max-width: 360px; font-size: 14px; }
.footer h4 { font-family: 'Inter'; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; color: var(--accent); }
.footer a { display: block; color: var(--muted); padding: 4px 0; font-size: 14px; transition: color 0.2s; }
.footer a:hover { color: var(--accent); }
.copyright {
  text-align: center; padding-top: 30px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
}

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); }
.modal-content {
  position: relative; background: var(--surface);
  border-radius: var(--radius); padding: 32px;
  max-width: 720px; width: 100%;
  border: 1px solid var(--border);
  max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--accent); color: var(--bg); }
#player-body iframe { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-sm); border: 0; margin-bottom: 20px; }
#player-body h3 { font-size: 24px; margin-bottom: 6px; }
#player-body .modal-artist { color: var(--accent); margin-bottom: 16px; }
#player-body .modal-desc { color: var(--muted); }

/* Toast */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border);
  padding: 14px 24px; border-radius: var(--radius-sm);
  font-size: 14px; z-index: 300;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
}
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--danger); color: var(--danger); }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .stats { gap: 28px; }
  .stat strong { font-size: 28px; }
  .track-card {
    grid-template-columns: 40px 60px 1fr;
    grid-template-rows: auto auto;
    gap: 12px; padding: 14px;
  }
  .track-cover { width: 60px; height: 60px; }
  .track-rank { font-size: 30px; }
  .track-votes, .track-actions {
    grid-column: 1 / -1;
    flex-direction: row; justify-content: space-between;
    border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px;
  }
  .track-votes { flex-direction: row; gap: 8px; align-items: baseline; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .vinyl { width: 240px; height: 240px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}
