/* =============================================================================
   OCU GAME JAM — Shared Stylesheet
   All pages share this file. Cartridge CSS lives in showcase.html.
============================================================================= */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #FFB81C;
  --gold-dim: #c98f00;
  --navy: #002147;
  --bg: #080c14;
  --surface: #0f1626;
  --surface2: #161f35;
  --border: rgba(255, 184, 28, 0.15);
  --text: #e8eaf0;
  --text-muted: #7a849e;
  --pixel: 'Press Start 2P', monospace;
  --body: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  min-height: 100vh;
}

p { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.95rem; }


/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}
.nav-logo {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-tag {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
#nav-user-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.btn-sign-out {
  font-family: var(--pixel);
  font-size: 0.45rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: color 0.2s, border-color 0.2s;
}
.btn-sign-out:hover { color: var(--gold); border-color: rgba(255,184,28,0.4); }


/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.6rem;
  background: var(--gold);
  color: var(--navy);
  padding: 1rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: #ffc844; transform: translateY(-2px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.6rem;
  background: transparent;
  color: var(--gold);
  padding: 1rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.05em;
  border: 1px solid var(--gold);
  margin-left: 1rem;
  transition: background 0.2s, transform 0.1s;
}
.btn-secondary:hover { background: rgba(255,184,28,0.1); transform: translateY(-2px); }

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: var(--body);
  transition: color 0.2s;
}
.btn-link:hover { color: var(--gold); }

.btn-ghost {
  font-family: var(--pixel);
  font-size: 0.5rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--gold); border-color: rgba(255,184,28,0.4); }


/* ── SECTIONS (shared layout) ── */
section {
  padding: 5rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}
.section-label {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  opacity: 0.8;
}
.section-title {
  font-family: var(--pixel);
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  line-height: 1.8;
  color: #fff;
  margin-bottom: 1.5rem;
}
.section-divider {
  width: 48px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 2rem;
}


/* ── HERO GRID (shared background pattern) ── */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,184,28,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,184,28,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}


/* ── FORMS ── */
.form-group { margin-bottom: 1.2rem; }
.form-label {
  display: block;
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.form-label em { color: var(--text-muted); font-style: normal; font-size: 0.4rem; }
.form-input, .form-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: var(--body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus { border-color: rgba(255,184,28,0.5); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; align-items: center; }


/* ── AUTH CARD ── */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
}
.auth-card.top-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 8px 8px 0 0;
}
/* admin.html uses ::before directly on .auth-card without a class */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 8px 8px 0 0;
}
.auth-tag {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.auth-title {
  font-family: var(--pixel);
  font-size: clamp(0.65rem, 2vw, 0.85rem);
  line-height: 1.8;
  color: #fff;
  margin-bottom: 0.5rem;
}
.auth-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.domain-chips { margin-bottom: 1.25rem; }
.domain-chip {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.45rem;
  background: rgba(255,184,28,0.08);
  border: 1px solid var(--border);
  color: var(--gold);
  padding: 0.35rem 0.65rem;
  border-radius: 3px;
  margin: 0 0.25rem 0.25rem 0;
  letter-spacing: 0.05em;
}
.error-box {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #fca5a5;
  margin-top: 1rem;
  display: none;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}
.user-name { font-weight: 600; font-size: 0.9rem; }
.user-email { font-size: 0.78rem; color: var(--text-muted); }

.badge-registered {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--pixel);
  font-size: 0.45rem;
  background: rgba(34,197,94,0.1);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.25);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}
.badge-registered::before {
  content: '';
  width: 6px; height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: blink 1.5s infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.submission-preview {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.submission-preview h3 {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--gold);
  line-height: 1.8;
  margin-bottom: 0.4rem;
}
.submission-preview a {
  font-size: 0.82rem;
  color: var(--gold);
  word-break: break-all;
  text-decoration: none;
}
.submission-preview a:hover { text-decoration: underline; }
.submission-preview p { font-size: 0.82rem; margin-top: 0.4rem; }


/* ── SPINNER ── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
  display: block;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ── EMPTY STATE ── */
.empty-state { width: 100%; text-align: center; padding: 4rem 1rem; }
.empty-icon { font-size: 3rem; opacity: 0.4; margin-bottom: 1rem; }
.empty-state p {
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: var(--text-muted);
  line-height: 2.2;
}


/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
footer span { color: var(--gold); }


/* =============================================================================
   INDEX — Landing page
============================================================================= */

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
}
.hero .hero-grid {
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
}
.hero-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(255,184,28,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--gold);
  border: 1px solid var(--border);
  background: rgba(255,184,28,0.07);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
}
.hero h1 {
  font-family: var(--pixel);
  font-size: clamp(1.2rem, 4vw, 2.2rem);
  line-height: 1.6;
  color: #fff;
  margin-bottom: 0.5rem;
}
.hero h1 span { color: var(--gold); }
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 1.5rem auto 2.5rem;
}
.hero-dates {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.date-chip {
  font-family: var(--pixel);
  font-size: 0.55rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--gold);
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* Winners */
#winners { border-top: 1px solid var(--border); }
.winners-intro { max-width: 560px; margin-bottom: 0.5rem; }
.winners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  align-items: end;
}
.winner-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.winner-card:hover { transform: translateY(-3px); }
.winner-card.first {
  border-color: rgba(255,184,28,0.5);
  padding-top: 2.5rem;
}
.winner-card.first::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 8px 8px 0 0;
}
.winner-place {
  font-family: var(--pixel);
  font-size: 0.45rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  display: inline-block;
}
.winner-card.first .winner-place {
  background: rgba(255,184,28,0.12);
  color: var(--gold);
  border: 1px solid rgba(255,184,28,0.4);
}
.winner-card.second .winner-place {
  background: rgba(148,163,184,0.1);
  color: #94a3b8;
  border: 1px solid rgba(148,163,184,0.3);
}
.winner-card.third .winner-place {
  background: rgba(180,120,70,0.1);
  color: #cd9a6a;
  border: 1px solid rgba(180,120,70,0.3);
}
.winner-trophy { font-size: 1.75rem; margin-bottom: 0.75rem; }
.winner-title {
  font-family: var(--pixel);
  font-size: clamp(0.55rem, 1.5vw, 0.8rem);
  line-height: 1.8;
  color: #fff;
  margin-bottom: 0.75rem;
}
.winner-team { font-size: 0.85rem; color: var(--text-muted); }
.winner-credits { margin-top: 0.6rem; }
.credits-label {
  font-family: var(--pixel);
  font-size: 0.38rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}
.winner-credits a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.winner-credits a:hover { color: var(--gold); }

/* About */
#about { border-top: 1px solid var(--border); }
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.about-card:hover { border-color: rgba(255,184,28,0.4); transform: translateY(-3px); }
.card-icon { font-size: 1.75rem; margin-bottom: 1rem; }
.card-title {
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: var(--gold);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}
.card-text { font-size: 0.85rem; }

/* Events */
#events { border-top: 1px solid var(--border); }
.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.event-card:hover { border-color: rgba(255,184,28,0.4); }
.event-card.featured { border-color: rgba(255,184,28,0.5); }
.event-card.featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.event-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.event-year {
  font-family: var(--pixel);
  font-size: 0.5rem;
  background: rgba(255,184,28,0.12);
  color: var(--gold);
  border: 1px solid rgba(255,184,28,0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
}
.event-status-live {
  font-family: var(--pixel);
  font-size: 0.45rem;
  background: rgba(34,197,94,0.12);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.event-status-live::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.event-status-upcoming {
  font-family: var(--pixel);
  font-size: 0.45rem;
  background: rgba(148,163,184,0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148,163,184,0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
}
.event-title {
  font-family: var(--pixel);
  font-size: clamp(0.7rem, 2vw, 0.95rem);
  line-height: 1.8;
  color: #fff;
  margin-bottom: 0.75rem;
}
.event-dates {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

/* Schedule — first section after hero, no border-top needed */
.schedule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.meta-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 1rem;
}
.meta-chip strong { color: var(--text); }
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.day-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.day-col:hover { border-color: rgba(255,184,28,0.3); }
.day-header {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
}
.day-name {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--gold);
  line-height: 1.8;
}
.day-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; margin-bottom: 0; }
.day-events { padding: 1.25rem; }
.sched-event {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.sched-event:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.sched-time {
  font-family: var(--pixel);
  font-size: 0.42rem;
  color: var(--gold);
  background: rgba(255,184,28,0.1);
  border: 1px solid rgba(255,184,28,0.2);
  border-radius: 3px;
  padding: 0.3rem 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.6;
  margin-top: 0.1rem;
}
.sched-name {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: #fff;
  line-height: 1.8;
}
.sched-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; margin-bottom: 0; line-height: 1.5; }
.sched-deadline .sched-name { color: #f87171; }
.sched-deadline .sched-time { color: #f87171; background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.25); }

/* FAQ */
#faq { border-top: 1px solid var(--border); }
.faq-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}
.faq-q {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--gold);
  line-height: 1.8;
  margin-bottom: 0.6rem;
}
.faq-a { font-size: 0.875rem; margin-bottom: 0; }


/* =============================================================================
   SHOWCASE — Game gallery page
============================================================================= */

.showcase-hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.showcase-hero .hero-grid {
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 20%, transparent 100%);
}
.showcase-hero h1 {
  font-family: var(--pixel);
  font-size: clamp(0.9rem, 3vw, 1.5rem);
  line-height: 1.8;
  color: #fff;
  position: relative;
  margin-bottom: 0.75rem;
}
.showcase-hero h1 span { color: var(--gold); }
.showcase-hero p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  font-size: 0.95rem;
}

#auth-section {
  max-width: 580px;
  margin: 3rem auto;
  padding: 0 2rem;
}

#games-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  border-top: 1px solid var(--border);
}
.games-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-tag {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}
.game-count {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--text-muted);
}
#game-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}


/* =============================================================================
   ADMIN — Dashboard page
============================================================================= */

/* Gate (sign-in / access-denied screens) */
.gate {
  max-width: 500px;
  margin: 5rem auto;
  padding: 0 2rem;
  text-align: center;
}
.gate-icon { font-size: 2.5rem; margin-bottom: 1.25rem; opacity: 0.6; }
.gate-title {
  font-family: var(--pixel);
  font-size: clamp(0.65rem, 2vw, 0.85rem);
  line-height: 1.8;
  color: #fff;
  margin-bottom: 0.75rem;
}
.gate-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.denied-card {
  background: var(--surface);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 2rem;
  text-align: left;
  margin-top: 1.5rem;
}
.denied-card h3 {
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: #f87171;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}
.denied-card p { font-size: 0.875rem; margin-bottom: 0.75rem; }
.code-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--gold);
  word-break: break-all;
  margin: 0.5rem 0 1rem;
}

/* Dashboard layout */
#dashboard { display: none; max-width: 1100px; margin: 0 auto; padding: 2.5rem 2rem 5rem; }

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.dash-title {
  font-family: var(--pixel);
  font-size: clamp(0.65rem, 2vw, 0.85rem);
  line-height: 1.8;
  color: #fff;
}
.dash-title span { color: var(--gold); }
.year-badge {
  font-family: var(--pixel);
  font-size: 0.45rem;
  background: rgba(255,184,28,0.1);
  border: 1px solid var(--border);
  color: var(--gold);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}
.stat-number {
  font-family: var(--pixel);
  font-size: clamp(1.2rem, 4vw, 2rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.stat-label {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  line-height: 1.8;
}

/* Data sections */
.data-section { margin-bottom: 3rem; }
.data-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.data-section-title {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: #fff;
  line-height: 1.8;
}
.data-count { font-family: var(--pixel); font-size: 0.45rem; color: var(--text-muted); }
.btn-export {
  font-family: var(--pixel);
  font-size: 0.45rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: color 0.2s, border-color 0.2s;
}
.btn-export:hover { color: var(--gold); border-color: rgba(255,184,28,0.4); }

/* Tables */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; min-width: 500px; }
thead { background: var(--surface2); }
th {
  font-family: var(--pixel);
  font-size: 0.42rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  padding: 0.9rem 1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,184,28,0.03); }
td.cell-primary { color: var(--text); font-weight: 500; }
td.cell-gold { color: var(--gold); }
td a { color: var(--gold); text-decoration: none; word-break: break-all; }
td a:hover { text-decoration: underline; }
.no-data {
  padding: 3rem;
  text-align: center;
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--text-muted);
  line-height: 2;
}

/* Action buttons */
.btn-action {
  font-family: var(--pixel);
  font-size: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.05em;
  border: 1px solid;
  transition: all 0.2s;
  white-space: nowrap;
  background: transparent;
}
.btn-edit  { color: var(--text-muted); border-color: var(--border); }
.btn-edit:hover  { color: var(--gold); border-color: rgba(255,184,28,0.4); }
.btn-del   { color: var(--text-muted); border-color: var(--border); }
.btn-del:hover   { color: #f87171; border-color: rgba(248,113,113,0.4); }
td.actions-cell { white-space: nowrap; }
td.actions-cell .btn-action + .btn-action { margin-left: 0.4rem; }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4,7,14,0.88);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 8px 8px 0 0;
}
.modal-card.danger::before {
  background: linear-gradient(90deg, transparent, #f87171, transparent);
}
.modal-tag {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.modal-tag.danger { color: #f87171; }
.modal-title {
  font-family: var(--pixel);
  font-size: 0.75rem;
  line-height: 1.8;
  color: #fff;
  margin-bottom: 1.25rem;
}
.modal-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-info strong { color: var(--text); }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.btn-modal-save {
  font-family: var(--pixel);
  font-size: 0.55rem;
  background: var(--gold);
  color: var(--navy);
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  flex: 1;
}
.btn-modal-save:hover { background: #ffc844; }
.btn-modal-save:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-modal-cancel {
  font-family: var(--pixel);
  font-size: 0.5rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: color 0.2s, border-color 0.2s;
}
.btn-modal-cancel:hover { color: var(--gold); border-color: rgba(255,184,28,0.4); }
.btn-modal-delete {
  font-family: var(--pixel);
  font-size: 0.55rem;
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.4);
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s;
  flex: 1;
}
.btn-modal-delete:hover { background: rgba(239,68,68,0.22); }
.btn-modal-delete:disabled { opacity: 0.6; cursor: not-allowed; }
.modal-err {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 4px;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  color: #fca5a5;
  margin-top: 0.75rem;
  display: none;
}


/* =============================================================================
   404 — Error page
============================================================================= */

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,184,28,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,184,28,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
}
.content { position: relative; z-index: 1; max-width: 480px; }
.error-code {
  font-family: var(--pixel);
  font-size: clamp(3rem, 15vw, 6rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 40px rgba(255, 184, 28, 0.3);
}
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: '404';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.glitch::before {
  color: #00eeff;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translateX(-3px);
  animation: glitch-top 3s infinite;
}
.glitch::after {
  color: #ff003c;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translateX(3px);
  animation: glitch-bottom 3s infinite;
}
@keyframes glitch-top {
  0%, 90%, 100% { transform: translateX(0); opacity: 0; }
  92% { transform: translateX(-4px); opacity: 0.8; }
  94% { transform: translateX(4px); opacity: 0.8; }
  96% { transform: translateX(-2px); opacity: 0.8; }
}
@keyframes glitch-bottom {
  0%, 90%, 100% { transform: translateX(0); opacity: 0; }
  92% { transform: translateX(4px); opacity: 0.8; }
  94% { transform: translateX(-4px); opacity: 0.8; }
  96% { transform: translateX(2px); opacity: 0.8; }
}
.error-title {
  font-family: var(--pixel);
  font-size: clamp(0.6rem, 2vw, 0.85rem);
  color: #fff;
  line-height: 2;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}
.error-message {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.btn-home {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.6rem;
  background: var(--gold);
  color: var(--navy);
  padding: 1rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.1s;
}
.btn-home:hover { background: #ffc844; transform: translateY(-2px); }
.footer-note {
  position: fixed;
  bottom: 1.5rem;
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: rgba(255,184,28,0.3);
  letter-spacing: 0.1em;
}


/* =============================================================================
   RESPONSIVE
============================================================================= */

@media (max-width: 700px) {
  .nav-links { display: none; }
  .btn-secondary { display: none; }
  .hero h1 { font-size: 1rem; }
  section { padding: 3.5rem 1.25rem; }
  .schedule-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .winners-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stats-row .stat-card:last-child { grid-column: 1 / -1; }
  #game-list { justify-content: center; }
  .form-actions { flex-direction: column; }
  .form-actions .btn-primary { width: 100%; }
}
