:root {
  --bg: #0d1117;
  --bg-elevated: #121922;
  --panel: #151d2a;
  --panel-alt: #101923;
  --card: #121a27;
  --border: rgba(255,255,255,0.08);
  --text: #edf3ff;
  --muted: #a7b4c9;
  --accent: #8ec5ff;
  --accent-soft: rgba(142, 197, 255, 0.12);
  --success: #7adcb8;
  --warning: #f5c98a;
  --danger: #f18c8c;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(13,17,23,0.8);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  font-size: 1.2rem;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  font-size: 1.1rem;
  border-radius: 10px;
  background: rgba(142, 197, 255, 0.14);
  color: var(--accent);
  border: 1px solid rgba(142, 197, 255, 0.18);
}

.main-nav, .header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.main-nav a, .header-actions a, .mobile-nav a, .footer-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.main-nav a:hover, .header-actions a:hover, .mobile-nav a:hover, .footer-links a:hover,
.main-nav a.active { color: var(--text); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.82rem 1.2rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.button--small { padding: 0.55rem 0.9rem; font-size: 0.84rem; }
.button--large { padding: 1rem 1.5rem; font-size: 1rem; }
.button--primary {
  background: var(--accent);
  color: #071019 !important;
  box-shadow: 0 12px 24px rgba(142,197,255,0.18);
}
.header-actions .button--primary,
.header-actions .button {
  color: #071019 !important;
}
.button--secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.page { padding: 48px 0 64px; }
.hero {
  padding: 54px 0 18px;
}
.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
}
.hero h1, .section-header h1, .game-detail h1, .empty-state h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}
.subheading {
  margin-top: 16px;
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 24px;
  padding-top: 24px;
}

.game-card {
  background: linear-gradient(180deg, rgba(18,25,35,0.92), rgba(18,25,35,0.7));
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.game-card__image-wrap { display: block; }
.game-card__image-wrap img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  background: #0a0f17;
}

.game-card__body {
  padding: 18px 18px 16px;
}

.game-card__meta {
  margin-bottom: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(142, 197, 255, 0.18);
}

.game-card h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}
.game-card p {
  margin: 0 0 14px;
  color: var(--muted);
}
.game-card__rating {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}
.game-card__actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 18px;
}

.stars {
  position: relative;
  display: inline-block;
  color: rgba(255,255,255,0.12);
  letter-spacing: 0.12em;
  font-size: 0.92rem;
}
.stars > span {
  position: absolute;
  inset: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #f7d56b;
}

.game-detail {
  padding-top: 12px;
}
.game-detail__intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.headline {
  margin: 0 0 24px;
  font-size: 1.2rem;
  color: var(--muted);
}
.detail-hero {
  border: 1px solid var(--border);
  background: var(--panel-alt);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 28px;
}
.detail-hero img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr);
  gap: 28px;
  align-items: start;
}
.detail-section {
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}
.detail-section h2, .panel h2, .form-panel h1 {
  margin-top: 0;
  letter-spacing: -0.05em;
}
.detail-sidebar {
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}
.fact-list {
  margin: 0;
}
.fact-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.fact-list div:last-child { border-bottom: none; }
.fact-list dt {
  color: var(--muted);
}
.fact-list dd { margin:0; font-weight:600; }
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.play-row {
  margin-top: 24px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 28px 0;
}
.gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.rating-panel {
  margin-top: 28px;
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}
.rating-scale-text {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
}
.rating-readout {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 14px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  font-size: 0.95rem;
}
.rating-readout strong {
  font-size: 1.05rem;
  color: #f7d56b;
}
.rating-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
}
.star-picker {
  display: flex;
  gap: 0.5rem;
  margin: 10px 0 18px;
  direction: ltr;
}
.star-picker label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
}
.star-picker input { display: none; }
.star-picker span {
  font-size: 2rem;
  color: rgba(255,255,255,0.2);
}
.star-picker label.is-active span,
.star-picker label.is-hovered span,
.star-picker input:checked + span {
  color: #f7d56b;
}

.form-panel, .panel {
  background: rgba(17,23,31,0.94);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.form-panel--small { max-width: 680px; margin: 0 auto; }
.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(13,17,23,0.72);
  color: var(--text);
  padding: 0.82rem 0.9rem;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(142, 197, 255, 0.4);
  border-color: rgba(142, 197, 255, 0.4);
}
textarea { resize: vertical; min-height: 100px; }
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: capitalize;
  border: 1px solid var(--border);
}
.status-badge--pending { color: var(--warning); background: rgba(245, 201, 138, 0.08); }
.status-badge--approved { color: var(--success); background: rgba(122,220,184,0.08); }
.status-badge--rejected { color: var(--danger); background: rgba(241,140,140,0.08); }
.small-link { margin: 0; color: var(--muted); }
.reset-box {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.empty-state {
  padding: 80px 0 60px;
  text-align: center;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
th {
  color: var(--muted);
  font-weight: 600;
}

.inline-form { display: inline-block; margin-right: 8px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.stat-box {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
.stat-box span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-box strong {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.06em;
}

.flash {
  margin-top: 18px;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
}
.flash--success { background: rgba(122,220,184,0.09); color: var(--success); }
.flash--error { background: rgba(241,140,140,0.09); color: var(--danger); }
.flash--info { background: rgba(142,197,255,0.08); color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.brand--footer {
  margin-bottom: 8px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.8rem;
  padding: 16px 20px 20px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 860px) {
  .main-nav, .header-actions {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-nav.open { display: flex; }
  .game-detail__intro, .detail-layout, .footer-inner, .section-header {
    grid-template-columns: 1fr;
    display: block;
  }
  .game-detail__intro { display: flex; flex-direction: column; align-items: flex-start; }
  .stats-grid, .form-grid {
    grid-template-columns: 1fr;
  }
  .page { padding-top: 26px; }
}

@media (max-width: 520px) {
  .header-inner {
    min-height: 68px;
  }
  .hero { padding-top: 28px; }
  .brand-word { font-size: 1rem; }
  .game-card__body { padding: 14px; }
  .detail-section, .detail-sidebar, .rating-panel, .panel, .form-panel { padding: 18px; }
}
