/* =====================================================
   Popular Awards — "Gala Stage" theme (Roboto edition)
   Palette: near-black stage, royal purple, foil gold
   ===================================================== */
:root {
  --black:        #0b0812;
  --black-soft:   #120d1e;
  --charcoal:     #1b1428;
  --charcoal-2:   #241a35;
  --purple-deep:  #2f1065;
  --purple:       #5b21b6;
  --purple-light: #9061f9;
  --gold:         #d4af37;
  --gold-light:   #f3d17b;
  --gold-deep:    #a3781f;
  --ivory:        #f5f1e8;
  --muted:        #b6acce;
  --success:      #7fd99a;
  --success-bg:   rgba(127, 217, 154, .12);
  --error:        #ff8a8a;
  --error-bg:     rgba(255, 90, 90, .12);
  --info:         #b7a6ff;
  --info-bg:      rgba(144, 97, 249, .14);
  --radius: 16px;
  --font-display: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--black);
  color: var(--ivory);
  line-height: 1.6;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

a { color: var(--gold-light); }

/* ---------------- Header ---------------- */
.site-header {
  background: linear-gradient(180deg, var(--black-soft) 0%, var(--black) 100%);
  border-bottom: 1px solid rgba(212, 175, 55, .25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.header-left { display: flex; align-items: center; gap: 16px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .2px;
  text-decoration: none;
  color: var(--gold-light);
}
.brand-mark { display: inline-flex; color: var(--gold); }
.brand-text { white-space: nowrap; }
.btn-main-site {
  display: inline-block;
  color: var(--ivory) !important;
  text-decoration: none;
  font-weight: 500;
  font-size: .82rem;
  padding: 8px 16px;
  border: 1px solid rgba(212, 175, 55, .5);
  border-radius: 999px;
  white-space: nowrap;
}
.btn-main-site:hover { background: rgba(212, 175, 55, .12); border-color: var(--gold); }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.site-header nav a:hover { color: var(--gold-light); }

/* ---------------- Hero / spotlight ---------------- */
.hero {
  position: relative;
  padding: 52px 0 32px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -140px; left: 50%;
  width: 900px; height: 480px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 30% 30%, rgba(91, 33, 182, .5), transparent 60%),
    radial-gradient(circle at 70% 20%, rgba(212, 175, 55, .25), transparent 55%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: .2px;
  margin-bottom: 8px;
  color: var(--gold-light);
}
.hero p { color: var(--muted); font-size: 1rem; }
.hero-divider {
  width: 110px; height: 2px; margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------------- Breadcrumb / lead ---------------- */
.breadcrumb { color: var(--muted); font-size: .85rem; margin-top: 26px; letter-spacing: .1px; }
.breadcrumb a { color: var(--gold-light); text-decoration: none; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; }
.lead { color: var(--muted); }

/* ---------------- Leaderboard-style category list ---------------- */
.leaderboard { display: flex; flex-direction: column; gap: 12px; padding: 26px 0 56px; }
.leaderboard-row {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(160deg, var(--charcoal), var(--charcoal-2));
  border: 1px solid rgba(212, 175, 55, .18);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--ivory);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.leaderboard-row:hover {
  transform: translateX(4px);
  box-shadow: 0 10px 26px rgba(91, 33, 182, .3), 0 0 0 1px rgba(212, 175, 55, .3);
  border-left-color: var(--gold-light);
}
.lb-rank {
  font-weight: 700; font-size: 1.1rem; color: var(--gold);
  min-width: 34px; text-align: center;
}
.lb-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lb-title { font-weight: 700; font-size: 1.05rem; }
.lb-desc { color: var(--muted); font-size: .85rem; }
.lb-meta { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.lb-arrow { color: var(--gold-light); font-weight: 700; }

/* ---------------- Cards / grid ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  padding: 26px 0 56px;
}

.card {
  background: linear-gradient(160deg, var(--charcoal), var(--charcoal-2));
  border: 1px solid rgba(212, 175, 55, .18);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ivory);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(91, 33, 182, .35), 0 0 0 1px rgba(212, 175, 55, .35);
  border-left-color: var(--gold-light);
}
.card h2, .card h3 { margin: 0; font-family: var(--font-display); font-weight: 700; }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }
.card-cta {
  margin-top: auto;
  color: var(--gold-light);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .3px;
  text-transform: uppercase;
}

/* ---------------- Contestants ---------------- */
.contestants-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.contestant-card { align-items: center; text-align: center; border-left: none; border-top: 3px solid var(--gold); }
.contestant-photo {
  width: 140px; height: 140px; border-radius: 50%;
  object-fit: cover; background: #2a2138;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, .18);
}
.contestant-photo.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .8rem;
}
.contestant-card h3 { margin-bottom: 0; }
.work-title {
  color: var(--gold-light);
  font-size: .82rem;
  font-style: italic;
  margin: 0;
}
.bio { color: var(--muted); font-size: .92rem; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: var(--black) !important;
  text-decoration: none;
  padding: 11px 26px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .2px;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  font-family: var(--font-body);
  box-shadow: 0 6px 18px rgba(212, 175, 55, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(212, 175, 55, .35); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-vote { margin-top: 8px; }

/* ---------------- Alerts ---------------- */
.alert { padding: 14px 18px; border-radius: 10px; margin: 16px 0; border: 1px solid transparent; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(127,217,154,.3); }
.alert-error   { background: var(--error-bg);   color: var(--error);   border-color: rgba(255,90,90,.3); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border-color: rgba(144,97,249,.3); }
.alert h1 { margin-top: 0; font-size: 1.3rem; }

/* ---------------- Voter session banner ---------------- */
.voter-banner {
  background: rgba(212, 175, 55, .1);
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: .85rem;
  color: var(--ivory);
  margin-top: 16px;
}
.voter-banner a { color: var(--gold-light); font-weight: 600; }

/* ---------------- Vote modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(4, 2, 10, .72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative;
  width: 100%; max-width: 420px;
  background: linear-gradient(160deg, var(--charcoal), var(--charcoal-2));
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  max-height: 90vh; overflow-y: auto;
}
.modal h2 { margin-top: 0; margin-bottom: 6px; font-size: 1.25rem; color: var(--gold-light); }
.modal-sub { color: var(--muted); font-size: .88rem; margin-bottom: 4px; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--muted);
  font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px;
}
.modal-close:hover { color: var(--gold-light); }
.modal-step form { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.modal-step label { font-weight: 600; font-size: .82rem; margin-top: 10px; color: var(--muted); }
.modal-step input {
  padding: 11px 13px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--ivory);
  font-family: var(--font-body);
}
.modal-step input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .18); }
.modal-step .btn { margin-top: 18px; width: 100%; text-align: center; }
.fine-print { color: var(--muted); font-size: .8rem; margin-top: 16px; text-align: center; }
.fine-print a { color: var(--gold-light); }

/* ---------------- Footer ---------------- */
.site-footer {
  padding: 26px 0; color: var(--muted); font-size: .82rem; text-align: center;
  border-top: 1px solid rgba(212, 175, 55, .15);
}

@media (max-width: 720px) {
  .hero h1 { font-size: 1.5rem; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .leaderboard-row { flex-wrap: wrap; }
}

/* ---------------- Focus visibility (accessibility) ---------------- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

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