/* Bytenook — casual games portal. Light theme. */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #1b2230;
  --muted: #6b7280;
  --border: #e7e9f0;
  --accent: #6c5ce7;
  --accent-soft: #efedfd;
  --accent-2: #ff7a59;
  --success: #22c55e;
  --shadow: 0 6px 24px rgba(27, 34, 48, .07);
  --shadow-hover: 0 12px 32px rgba(108, 92, 231, .16);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-name { font-family: 'Baloo 2', 'Inter', sans-serif; font-weight: 700; line-height: 1.2; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-size: 20px; color: var(--text); }
.brand-name b { color: var(--accent); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--text); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; margin-left: auto; }

/* Hero */
.hero { padding: 56px 0 32px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 12px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 auto; }
.hero .accent { color: var(--accent); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 28px 0 8px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 500;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Game grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; margin: 28px 0 64px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); text-decoration: none; }
.card-thumb { aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; font-size: 56px; }
.card-body { padding: 16px 18px 20px; }
.card-body h3 { margin: 0 0 6px; font-size: 18px; color: var(--text); }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .03em;
  padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  margin-bottom: 10px; text-transform: uppercase;
}
.badge.new { background: #e7f9ee; color: var(--success); }

/* Game page */
.game-stage { padding: 32px 0 64px; }
.game-stage h1 { margin: 0 0 6px; }
.game-stage .meta { color: var(--muted); margin: 0 0 20px; }
.frame-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; max-width: 720px; margin: 0 auto;
}
.frame-wrap iframe { width: 100%; height: 640px; border: 0; display: block; }
.game-info { max-width: 720px; margin: 28px auto 0; }
.game-info h2 { font-size: 20px; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); }

/* Content pages */
.content { padding: 48px 0 72px; }
.content .container { max-width: 760px; }
.content h1 { font-size: 34px; margin: 0 0 8px; }
.content h2 { font-size: 22px; margin: 32px 0 10px; }
.content p, .content li { color: #38415a; }
.content .lead { font-size: 18px; color: var(--muted); }

/* Contact */
.contact-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); margin-top: 24px;
}
.contact-box label { display: block; font-weight: 600; margin: 14px 0 6px; }
.contact-box input, .contact-box textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; background: #fbfbfe;
}
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 12px 22px; font: inherit; font-weight: 600; cursor: pointer; margin-top: 18px;
  transition: background .15s ease;
}
.btn:hover { background: #5b4bd6; text-decoration: none; }
.btn.coral { background: var(--accent-2); }
.btn.coral:hover { background: #f0623f; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 36px 0; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; }
.site-footer .brand-name { font-size: 18px; }
.footer-links { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 14px; }
.copyright { width: 100%; color: var(--muted); font-size: 13px; margin-top: 8px; }

@media (max-width: 640px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .nav.open {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 20px 16px;
  }
  .nav.open a { padding: 10px 0; }
  .frame-wrap iframe { height: 70vh; }
}
