/* ==========================================================================
   VotedByYou — shared theme
   Used by index.php, playlists.php, playlist.php, artist.php
   ========================================================================== */

:root{
  --bg: #0d0f0c;
  --bg-raised: #17190f;
  --bg-raised-2: #1d2016;
  --ink: #f2f0e6;
  --ink-muted: #8b8f7f;
  --border: #2b2e21;
  --green: #1ed760;
  --green-dim: #16a34d;
  --yellow: #f2c14e;

  --display: 'Anton', 'Arial Narrow', sans-serif;
  --body: 'Work Sans', system-ui, sans-serif;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.wrap{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- NAV ---------- */
header.site-nav{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(13,15,12,0.82);
  border-bottom: 1px solid var(--border);
}
.nav-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}
.wordmark{
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.wordmark span{ color: var(--green); }
.nav-links{
  display: flex;
  gap: 1.75rem;
  align-items: center;
  font-size: 0.92rem;
}
.nav-links a{
  color: var(--ink-muted);
  font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover{ color: var(--ink); }
.nav-links .nav-hello{
  color: var(--ink-muted);
  font-size: 0.88rem;
}
.nav-links .login{
  color: var(--bg);
  background: var(--green);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}
.nav-links .login:hover{ background: #24e56b; }
.nav-toggle{ display: none; }

@media (max-width: 720px){
  .nav-links{
    position: fixed;
    top: 62px; left: 0; right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
    display: none;
  }
  .nav-links.open{ display: flex; }
  .nav-toggle{
    display: block;
    background: none;
    border: 1px solid var(--border);
    color: var(--ink);
    font-size: 1.1rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
  }
}

/* ---------- HERO (index) ---------- */
.hero{ padding: 4.5rem 0 5rem; }
.hero-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.hero h1{
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
}
.hero h1 .accent{ color: var(--green); }
.hero p.lede{
  color: var(--ink-muted);
  font-size: 1.08rem;
  max-width: 46ch;
  margin: 0 0 2rem;
}
.hero-actions{
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.btn-primary{
  display: inline-block;
  background: var(--green);
  color: var(--bg);
  font-weight: 700;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-size: 1rem;
  transition: transform .15s ease, background .15s ease;
}
.btn-primary:hover{ background: #24e56b; transform: translateY(-1px); }

.vote-stat{ display: flex; flex-direction: column; line-height: 1; }
.vote-stat .num{ font-family: var(--display); font-size: 2.1rem; color: var(--ink); }
.vote-stat .label{ font-size: 0.85rem; color: var(--ink-muted); margin-top: 0.35rem; }

.flyer-stack{
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flyer{
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 6px;
  box-shadow: 0 18px 34px rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  transition: transform .25s ease;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-raised-2);
}
.flyer:hover{ transform: translateY(-6px) rotate(0deg) !important; z-index: 10; }

/* ---------- PAGE / SUB-PAGE HEROES ---------- */
.page-hero{ padding: 3rem 0 2.5rem; }
.page-hero h1{
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.page-hero p{ color: var(--ink-muted); max-width: 60ch; }

.playlist-hero{
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 0 1.25rem;
  flex-wrap: wrap;
}
.playlist-hero img{
  width: 140px; height: 140px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.playlist-hero h1{
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  line-height: 1;
}
.playlist-hero h1 a{ color: var(--ink); }
.playlist-hero h1 a:hover{ color: var(--green); }

.spotify-prompt{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--green);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}
.spotify-prompt img{
  width: 1.1em; height: 1.1em;
  border-radius: 0; box-shadow: none; border: none;
  display: block;
}
.spotify-prompt:hover{ color: #32ff84; }

.artist-hero{ padding: 3rem 0 0.5rem; }
.artist-hero h1{
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  color: var(--green);
}
.artist-hero .tagline{ color: var(--ink-muted); font-size: 1.05rem; }

.community-box{
  background: var(--bg-raised);
  border: 1px solid rgba(30,215,96,0.25);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2.5rem;
}
.community-box strong{ color: var(--green); }
.community-box p{ color: var(--ink-muted); margin: 0.35rem 0; }
.community-box a{ color: var(--green); font-weight: 600; }
.community-box a:hover{ color: #32ff84; }

/* ---------- SECTION HEADERS ---------- */
section{ padding: 3.5rem 0; border-top: 1px solid var(--border); }
section:first-of-type{ border-top: none; }
.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.section-head h2{
  font-family: var(--display);
  font-size: 1.9rem;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 0.01em;
}
.section-head .view-all{ font-size: 0.9rem; color: var(--green); font-weight: 600; }

/* ---------- STICKER GRID (playlist tiles) ---------- */
.sticker-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.25rem 1.5rem;
}
.sticker{ text-align: center; display: block; }
.sticker-art{
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.06);
  transform: rotate(var(--rot, -2deg));
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
  background-color: var(--bg-raised-2);
}
.sticker-art img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.sticker:hover .sticker-art{ transform: rotate(0deg) scale(1.02); box-shadow: 0 16px 30px rgba(0,0,0,0.6); }
.sticker-title{ margin-top: 0.75rem; font-weight: 600; font-size: 0.95rem; }

/* ---------- CHART LIST (song rows: index, playlist, artist) ---------- */
.chart-list{ display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.chart-row{
  display: grid;
  grid-template-columns: 3.2rem 56px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s ease;
}
.chart-row:hover{ background: rgba(255,255,255,0.02); }
.chart-rank{ font-family: var(--display); font-size: 1.9rem; color: var(--ink-muted); }
.chart-list .chart-row:first-child .chart-rank{ color: var(--yellow); }
.chart-art{ width: 56px; height: 56px; border-radius: 6px; overflow: hidden; background-color: var(--bg-raised-2); }
.chart-art img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.chart-meta{ min-width: 0; }
.chart-meta .song{ font-weight: 600; display: inline-block; color: var(--ink); }
a.chart-meta-link.song:hover, .chart-meta .song:hover{ color: var(--green); }
.chart-meta .artist{ color: var(--ink-muted); font-size: 0.9rem; margin-top: 0.15rem; }
.chart-meta .artist a{ color: inherit; }
.chart-meta .artist a:hover{ color: var(--ink); text-decoration: underline; }
.chart-meta .badge{ display: inline-block; margin-top: 0.25rem; font-size: 0.78rem; color: var(--green); font-weight: 600; }
.chart-meta .sub{ color: var(--ink-muted); font-size: 0.82rem; margin-top: 0.2rem; }
.chart-score{ font-family: var(--display); color: var(--ink-muted); font-size: 1.05rem; text-align: right; min-width: 4.5rem; }

.vote-controls{ display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.vote-count{ font-family: var(--display); font-size: 1.1rem; color: var(--ink); }
.vote-btn{
  font-weight: 700;
  background: var(--green);
  color: var(--bg);
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background .15s ease, transform .15s ease;
}
.vote-btn:hover{ background: #24e56b; transform: translateY(-1px); }
.vote-btn:disabled{ opacity: 0.5; cursor: not-allowed; }
.vote-login-link{ font-size: 0.78rem; color: var(--green); font-weight: 600; }
.vote-login-link:hover{ color: #32ff84; }

/* ---------- TICKET STUBS (how it works) ---------- */
.ticket-row{ display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.25rem; }
.ticket{ background: var(--bg-raised); border: 1px dashed var(--border); border-radius: 10px; padding: 1.5rem 1.35rem; position: relative; }
.ticket .step-num{ font-family: var(--display); font-size: 2.4rem; color: var(--green); line-height: 1; margin-bottom: 0.5rem; display: block; }
.ticket h3{ margin: 0 0 0.4rem; font-size: 1.05rem; }
.ticket p{ margin: 0; color: var(--ink-muted); font-size: 0.92rem; }

/* ---------- RULES ---------- */
.rules-list{ list-style: none; margin: 0; padding: 0; max-width: 60ch; }
.rules-list li{ padding: 0.8rem 0; border-bottom: 1px solid var(--border); display: flex; gap: 0.85rem; align-items: flex-start; color: var(--ink); }
.rules-list li::before{ content: ''; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-top: 0.5rem; }

/* ---------- MISC ---------- */
.submit-box{
  text-align: center;
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--ink-muted);
}
.submit-box a{ color: var(--green); font-weight: 600; }
.submit-box a:hover{ color: #32ff84; }

.empty-state{ color: var(--ink-muted); text-align: center; padding: 2.5rem 0; }

.note{ color: var(--ink-muted); font-size: 0.9rem; }

/* ---------- PROSE (privacy / static text pages) ---------- */
.prose{ max-width: 700px; margin: 0 auto; }
.prose section{ padding: 0 0 2rem; border-top: none; }
.prose section:first-of-type{ padding-top: 0; }
.prose h2{
  font-family: var(--display);
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 0.75rem;
}
.prose p{ color: var(--ink-muted); margin: 0 0 0.85rem; }
.prose p:last-child{ margin-bottom: 0; }
.prose a{ color: var(--green); font-weight: 600; }
.prose a:hover{ color: #32ff84; text-decoration: underline; }

/* ---------- FOOTER ---------- */
footer{ border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; color: var(--ink-muted); font-size: 0.88rem; }
.footer-row{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; align-items: center; }
footer a{ color: var(--ink-muted); }
footer a:hover{ color: var(--green); }

@media (max-width: 860px){
  .hero-grid{ grid-template-columns: 1fr; }
  .flyer-stack{ height: 220px; margin-top: 1rem; }
  .sticker-grid{ grid-template-columns: repeat(2, 1fr); }
  .chart-row{ grid-template-columns: 2.4rem 44px 1fr auto; }
  .playlist-hero{ gap: 1rem; }
  .playlist-hero img{ width: 100px; height: 100px; }
}
