/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0e0e12;
  --bg-card: #1a1a24;
  --bg-card-hover: #24243a;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --accent: #7c5cff;
  --accent-glow: #9b7dff;
  --gotd: #ffd369;
  --radius: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-glow); }

/* === Nav === */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid #222;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-links a {
  color: var(--text-muted);
  margin-left: 1.5rem;
  font-size: 0.9rem;
}
.nav-links a:hover { color: var(--text); }

/* === Main & Footer === */
main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid #222;
  margin-top: 3rem;
}

/* === Hero === */
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero h1 { font-size: 2rem; font-weight: 700; }
.hero-date { color: var(--text-muted); margin-top: 0.5rem; }

/* === Game of the Day === */
.game-of-the-day, .gotd-highlight { margin: 2rem 0; }
.game-of-the-day h2, .gotd-highlight h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gotd);
  margin-bottom: 1rem;
}
.gotd-card {
  background: var(--bg-card);
  border: 1px solid #333;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.gotd-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }

/* === Game Frame === */
.game-frame-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 1rem;
}
.game-frame-large {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-glow); color: #fff; }
.btn-secondary { background: var(--bg-card); border: 1px solid #444; }
.btn-secondary:hover { background: var(--bg-card-hover); }

/* === Game Grid === */
.day-games, .day-page { margin-top: 3rem; }
.day-games h2, .day-page h2 { margin-bottom: 1rem; font-size: 1.2rem; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid #333;
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  min-height: 100px;
}
.game-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--text);
}
.game-card.gotd { border-color: var(--gotd); }
.game-card-title { font-weight: 600; font-size: 1rem; }
.badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--gotd);
  color: #000;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  font-weight: 700;
}

/* === Archive === */
.archive h1 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.day-list { display: flex; flex-direction: column; gap: 0.75rem; }
.day-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid #333;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.day-card:hover { background: var(--bg-card-hover); border-color: var(--accent); color: var(--text); }
.day-card-date { font-weight: 600; }
.day-card-info { display: flex; align-items: center; gap: 1rem; }
.day-card-gotd { color: var(--gotd); font-weight: 600; }
.day-card-count { color: var(--text-muted); font-size: 0.85rem; }

/* === CTA === */
.cta { text-align: center; margin-top: 2rem; }

/* === Full-screen Game Page === */
.game-page-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.game-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}
.back-link { color: var(--text-muted); font-size: 0.9rem; }
.back-link:hover { color: var(--text); }
.game-topbar-title { font-weight: 600; font-size: 1rem; }
.game-frame-full {
  flex: 1;
  width: 100%;
  border: none;
}

/* === Responsive === */
@media (max-width: 600px) {
  .site-nav { padding: 0.75rem 1rem; }
  main { padding: 1.5rem 1rem; }
  .hero h1 { font-size: 1.4rem; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .day-card { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
