:root {
  --bg: #f3f7f4;
  --bg-alt: #e7f0ea;
  --surface: #ffffff;
  --ink: #12241c;
  --muted: #4d6358;
  --brand: #0b3d2e;
  --brand-2: #14664b;
  --gold: #c99212;
  --gold-soft: #f3e2b0;
  --line: #c9d9cf;
  --danger: #b42318;
  --ok: #067647;
  --shadow: 0 12px 40px rgba(11, 61, 46, 0.08);
  --radius: 18px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Syne", "Outfit", sans-serif;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d8efe3 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #f7e7b8 0%, transparent 45%),
    var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--gold); }
.container { width: min(100% - 1.5rem, var(--max)); margin-inline: auto; }
.sr-only, .skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus {
  left: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .5rem 1rem; border-radius: 8px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(243, 247, 244, 0.88);
  border-bottom: 1px solid rgba(201, 217, 207, 0.8);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 44px; width: auto; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav a { color: var(--ink); font-weight: 600; font-size: .95rem; }
.nav-cta {
  background: var(--brand) !important; color: #fff !important;
  padding: .55rem 1rem; border-radius: 999px;
}
.nav-cta:hover { background: var(--brand-2) !important; color: #fff !important; }
.nav-toggle {
  display: none; background: none; border: 0; width: 42px; height: 42px;
  flex-direction: column; justify-content: center; gap: 5px; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px; background: var(--brand); margin-inline: auto;
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  min-height: min(88vh, 720px);
  display: grid; align-items: end;
  padding: 4.5rem 0 3.5rem;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(160deg, rgba(11,61,46,.92) 0%, rgba(11,61,46,.72) 42%, rgba(11,61,46,.35) 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 12px, transparent 12px 24px),
    radial-gradient(circle at 80% 30%, #e8b923 0%, transparent 28%);
  animation: heroPulse 10s ease-in-out infinite alternate;
}
@keyframes heroPulse {
  from { filter: saturate(1); }
  to { filter: saturate(1.15); }
}
.hero-content { position: relative; z-index: 1; color: #fff; max-width: 720px; }
.brand-mark {
  font-family: var(--display); font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gold-soft); margin: 0 0 .6rem;
  font-size: .85rem; animation: fadeUp .7s ease both;
}
.hero h1 {
  font-family: var(--display); font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.08; margin: 0 0 1rem; animation: fadeUp .8s .1s ease both;
}
.hero-lead {
  font-size: 1.08rem; color: rgba(255,255,255,.88); max-width: 38rem;
  margin: 0 0 1.5rem; animation: fadeUp .8s .2s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; animation: fadeUp .8s .3s ease both; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; border: 0; cursor: pointer; font-weight: 700;
  font-family: inherit; border-radius: 999px; padding: .75rem 1.25rem;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: #1a1405; }
.btn-primary:hover { background: #e0a61a; color: #1a1405; }
.btn-secondary { background: var(--brand); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }

.page-hero {
  padding: 2.5rem 0 1.5rem;
  background: linear-gradient(180deg, rgba(11,61,46,.08), transparent);
}
.page-hero h1 {
  font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .5rem;
}
.page-hero p { color: var(--muted); margin: 0; max-width: 40rem; }

.section { padding: 3rem 0; }
.section-alt { background: rgba(255,255,255,.55); }
.section-head { margin-bottom: 1.5rem; }
.section-head h2 {
  font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 .35rem;
}
.section-head p { margin: 0; color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 2rem; }
.mb { margin-bottom: 1.25rem; }
.narrow { max-width: 760px; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.game-card {
  display: flex; gap: .9rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem;
  color: inherit; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.game-card:hover {
  transform: translateY(-3px); border-color: #9fc2b1; color: inherit;
}
.game-card img {
  width: 72px; height: 72px; border-radius: 16px; object-fit: cover;
  background: var(--bg-alt); flex-shrink: 0;
}
.game-card h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.meta, .muted { color: var(--muted); font-size: .88rem; margin: 0; }
.rating { color: var(--gold); font-size: .9rem; margin: .25rem 0 0; }

.cat-row { display: flex; flex-wrap: wrap; gap: .55rem; }
.cat-chip {
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); padding: .45rem .9rem; border-radius: 999px; font-weight: 600;
}
.cat-chip:hover, .cat-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.prose h2, .prose h3 { font-family: var(--display); line-height: 1.25; }
.prose p, .prose li { color: #243830; }
.seo-block { padding-bottom: 3.5rem; }
.note {
  background: var(--gold-soft); border-left: 4px solid var(--gold);
  padding: .85rem 1rem; border-radius: 8px;
}

.game-top {
  background: linear-gradient(135deg, #0b3d2e, #14664b);
  color: #fff; padding: 2.2rem 0;
}
.game-top-inner { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.game-icon-lg {
  width: 96px; height: 96px; border-radius: 22px; object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); background: #fff;
}
.game-top .eyebrow { margin: 0 0 .35rem; }
.game-top .eyebrow a { color: var(--gold-soft); font-weight: 700; }
.game-top h1 { font-family: var(--display); margin: 0 0 .5rem; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.game-top .lead { margin: 0 0 1rem; color: rgba(255,255,255,.88); max-width: 40rem; }
.game-stats-row { display: flex; flex-wrap: wrap; gap: .75rem 1.1rem; margin-bottom: 1.1rem; font-size: .92rem; }
.game-layout {
  display: grid; grid-template-columns: 1.6fr .9fr; gap: 2rem; align-items: start;
}
.aside-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow);
  position: sticky; top: 90px;
}
.aside-box h3 { margin-top: 0; font-family: var(--display); }
.info-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.info-list li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem;
}
.info-list span { color: var(--muted); }

.review-form, .contact-form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1.5rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-weight: 600; margin-bottom: .85rem; font-size: .92rem; }
input, select, textarea {
  width: 100%; margin-top: .35rem; padding: .7rem .85rem;
  border: 1px solid var(--line); border-radius: 12px; font: inherit; background: #fff;
}
.reviews-list { display: grid; gap: .9rem; }
.review-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 1rem;
}
.review-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.review-item time { color: var(--muted); font-size: .8rem; }

.search-bar {
  display: flex; gap: .6rem; margin-top: 1.2rem; max-width: 520px;
}
.search-bar input { margin: 0; }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start;
}
.sitemap-cols {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.link-list { padding-left: 1.1rem; }
.link-list li { margin: .35rem 0; }

.alert {
  padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 600;
}
.alert-success { background: #e8f8ef; color: var(--ok); }
.alert-error { background: #fdecec; color: var(--danger); }
.empty { color: var(--muted); padding: 2rem 0; }

.site-footer {
  background: #0a2f24; color: rgba(255,255,255,.82); padding: 3rem 0 1.5rem; margin-top: 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem;
}
.footer-brand p { margin-top: .8rem; max-width: 28rem; }
.site-footer h3 { color: #fff; font-family: var(--display); margin: 0 0 .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35rem 0; }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: var(--gold-soft); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; font-size: .9rem;
}

/* Admin */
.admin-body { background: #edf3ef; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--brand); color: #fff; padding: 1.25rem;
}
.admin-side a { color: rgba(255,255,255,.88); display: block; padding: .55rem .7rem; border-radius: 10px; font-weight: 600; }
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,.12); color: #fff; }
.admin-main { padding: 1.25rem; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; gap: 1rem; flex-wrap: wrap; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: #fff; border-radius: 14px; padding: 1rem; border: 1px solid var(--line);
}
.stat-card span { display: block; color: var(--muted); font-size: .85rem; }
.stat-card strong { font-size: 1.5rem; font-family: var(--display); }
.table-wrap { overflow: auto; background: #fff; border-radius: 14px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem .9rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .92rem; }
th { background: #f7faf8; }
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1rem;
}
.login-card {
  width: min(100%, 400px); background: #fff; padding: 1.5rem; border-radius: 18px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.admin-form {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem;
  display: grid; gap: .2rem; max-width: 860px;
}
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.badge {
  display: inline-block; padding: .15rem .5rem; border-radius: 999px;
  background: var(--bg-alt); font-size: .75rem; font-weight: 700;
}

@media (max-width: 900px) {
  .game-layout, .contact-grid, .sitemap-cols, .footer-grid, .admin-shell {
    grid-template-columns: 1fr;
  }
  .aside-box { position: static; }
  .admin-side { display: flex; flex-wrap: wrap; gap: .35rem; }
  .admin-side a { padding: .4rem .65rem; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 1rem; border-bottom: 1px solid var(--line); gap: .4rem;
  }
  .site-nav.open { display: flex; }
  .form-row, .search-bar { grid-template-columns: 1fr; flex-direction: column; }
  .hero { min-height: auto; padding-top: 3rem; }
  .brand-logo { height: 38px; }
}
