/* ===== PASS — stage & spotlight visual identity =====
   This is a talent-submission/voting platform, so the whole design
   leans into a "stage at night" feeling: near-black curtain
   backdrop, a warm spotlight gold for the thing being judged, and a
   velvet red for stakes/voting. Ranked numbers are used ONLY on the
   leaderboard, because that's the one place order is real information.
*/

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0B0B10;
  --surface: #15151D;
  --surface-raised: #1D1D28;
  --line: #2A2A38;
  --text: #F5F3EE;
  --text-muted: #9A97A6;
  --gold: #FFC145;
  --gold-dim: #7A6122;
  --velvet: #C81E3A;
  --velvet-dim: #4A0F1A;
  --radius: 14px;
  --font-display: 'Anton', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 193, 69, 0.08), transparent);
  background-repeat: no-repeat;
}

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

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

/* ---- Layout shell ---- */
main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.container-narrow {
  max-width: 620px;
  margin: 0 auto;
}

/* ---- Nav ---- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(11, 11, 16, 0.9);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--gold);
  white-space: nowrap;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-cta {
  background: var(--velvet);
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: #a9142f; }

/* Hamburger button */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.hamburger-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Slide-down menu panel */
.nav-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(78vw, 300px);
  background: var(--surface);
  border-left: 1px solid var(--line);
  padding: 90px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 49;
}
.nav-menu.open { transform: translateX(0); }

.nav-menu a {
  padding: 14px 4px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}
.nav-menu a:hover, .nav-menu a.active { color: var(--gold); }

.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 48;
}
.nav-scrim.open { opacity: 1; pointer-events: auto; }

/* ---- Hero ---- */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0 0 14px;
  color: var(--text);
  text-shadow: 0 0 40px rgba(255, 193, 69, 0.25);
}

.hero h1 span { color: var(--gold); }

.hero p {
  max-width: 480px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--gold); color: #1a1305; }
.btn-primary:hover { background: #ffcf72; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-block { width: 100%; }
.btn-danger { background: var(--velvet); color: #fff; }

/* ---- Section headers ---- */
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  margin: 56px 0 4px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 24px;
}

/* ---- Sample video strip ---- */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.sample-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.sample-card video {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  background: #000;
}

.sample-card .caption {
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- Leaderboard (the signature element) ----
   Rank drives size: #1 reads loudest, #5 quietest — the visual
   hierarchy IS the vote count, not a decoration on top of it. */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}
.rank-row:hover { border-color: var(--gold-dim); }

.rank-row[data-rank="1"] {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(255,193,69,0.10), var(--surface) 60%);
  padding: 20px 16px;
}
.rank-row[data-rank="1"] .rank-num { font-size: 2.1rem; color: var(--gold); }
.rank-row[data-rank="2"] .rank-num { font-size: 1.7rem; color: #D9D6E0; }
.rank-row[data-rank="3"] .rank-num { font-size: 1.5rem; color: #C08A4E; }

.rank-num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-muted);
  text-align: center;
}

.rank-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-raised);
}

.rank-name {
  font-weight: 600;
  font-size: 0.98rem;
}
.rank-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.vote-count {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  white-space: nowrap;
}

/* ---- Forms ---- */
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

input[type="text"], input[type="email"], input[type="password"], textarea, select, input[type="file"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
textarea { resize: vertical; min-height: 100px; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}

.type-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.type-toggle button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}
.type-toggle button.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255,193,69,0.08);
}

.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-raised);
  overflow: hidden;
  margin-top: 10px;
  display: none;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.2s ease;
}

.status-msg {
  font-size: 0.88rem;
  margin-top: 10px;
  color: var(--text-muted);
}
.status-msg.error { color: #ff6b6b; }
.status-msg.success { color: #6bffa0; }

/* ---- Entry detail / comments ---- */
.entry-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 18px;
}
.entry-media video { width: 100%; max-height: 70vh; }
.entry-text-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 1.05rem;
  line-height: 1.6;
}

.vote-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 18px 0;
}
.vote-panel .count {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}
.comment {
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.comment .author {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--gold);
}
.comment .body { font-size: 0.92rem; margin-top: 4px; line-height: 1.45; }
.comment .time { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ---- Auth ---- */
.auth-card {
  max-width: 400px;
  margin: 60px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 6px;
}
.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.auth-switch a { color: var(--gold); font-weight: 600; }

/* ---- Footer (every page) ---- */
.site-footer {
  text-align: center;
  padding: 28px 20px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer a {
  color: var(--gold);
  font-weight: 600;
}
.site-footer a:hover { text-decoration: underline; }

/* ---- Utility ---- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 640px) {
  .rank-row { grid-template-columns: 32px 44px 1fr auto; padding: 12px; }
}
