/* ===== Golboom Games – dark gaming theme ===== */
:root {
  --bg: #0f0f1a;
  --bg-elev: #181828;
  --bg-card: #1f1f33;
  --border: #2c2c47;
  --text: #ececf5;
  --text-dim: #9a9ab5;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  flex: 1;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 15, 26, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.logo-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: .85rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  margin-right: 4px;
}
.logo-accent { color: var(--accent-2); }

.search-wrap { flex: 1 1 220px; max-width: 420px; }
.search-input {
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .25);
}

.categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-left: auto;
}
.categories::-webkit-scrollbar { display: none; }

.cat-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.cat-btn:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }
.cat-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
}

/* ===== Hero ===== */
.hero { padding: 24px 0 8px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 8px; }
.hero p { color: var(--text-dim); margin: 0; }
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Section head ===== */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 32px 0 16px;
}
.section-head h2 { margin: 0; font-size: 1.35rem; }
.result-count { color: var(--text-dim); font-size: .9rem; }

/* ===== Game grid & cards ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  will-change: transform;
}
.card:hover, .card:focus-visible {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow), 0 0 0 2px var(--accent);
  border-color: transparent;
  outline: none;
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2a2a4a, #1a1a2e);
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .card-thumb img { transform: scale(1.08); }

.card-thumb::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #fff;
  background: rgba(15, 15, 26, .45);
  opacity: 0;
  transition: opacity .25s;
}
.card:hover .card-thumb::after { opacity: 1; }

.card-body { padding: 12px 14px 14px; }
.card-title { margin: 0 0 4px; font-size: 1rem; font-weight: 700; }
.card-cat { font-size: .8rem; color: var(--accent-2); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* Skeleton loader */
.skeleton {
  aspect-ratio: 16 / 12;
  background: linear-gradient(90deg, var(--bg-card) 25%, #2a2a44 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state, .error-state {
  text-align: center;
  color: var(--text-dim);
  padding: 48px 16px;
}

/* ===== Game page ===== */
.player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.player-ratio { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.player-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
.player-wrap:fullscreen { border-radius: 0; border: 0; display: grid; place-items: center; }
.player-wrap:fullscreen .player-ratio { aspect-ratio: auto; height: 100vh; }

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.game-title { margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2.1rem); }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent-2);
  background: rgba(0, 212, 255, .1);
  border: 1px solid rgba(0, 212, 255, .3);
  transition: background .2s;
}
.badge:hover { background: rgba(0, 212, 255, .2); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px rgba(124, 92, 255, .35);
  transition: transform .15s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(124, 92, 255, .5); }
.btn-primary:active { transform: translateY(0); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.info-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.info-card h2 { margin: 0 0 8px; font-size: 1.1rem; }
.info-card p { margin: 0; color: var(--text-dim); }
.game-description p + p { margin-top: 12px; }

.howto-list { list-style: none; margin: 0; padding: 0; }
.howto-list li {
  position: relative;
  padding: 10px 0 10px 28px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}
.howto-list li:first-child { border-top: 0; padding-top: 0; }
.howto-list li::before {
  content: "▸";
  position: absolute;
  left: 6px;
  color: var(--accent-2);
  font-weight: 700;
}
.howto-list li:first-child::before { top: 0; }
.howto-list strong { color: var(--text); }
.howto-list .tip strong { color: #facc15; }

.not-found { text-align: center; padding: 80px 16px; }
.not-found p { color: var(--text-dim); margin-bottom: 24px; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: .9rem;
}
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--accent-2); }

.footer-links a[aria-current="page"] { color: var(--accent-2); font-weight: 600; }

/* ===== Static pages (About, Privacy, Terms, Contact) ===== */
.page-hero { padding: 24px 0 8px; max-width: 820px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 8px; }
.page-hero p { color: var(--text-dim); margin: 0; }

.prose {
  max-width: 820px;
  margin-top: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 40px);
}
.prose h2 { font-size: 1.2rem; margin: 32px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-dim); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--text); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform .2s, border-color .2s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--accent); }
.feature-icon { font-size: 1.6rem; }
.feature h3 { margin: 6px 0 4px; font-size: 1rem; }
.feature p { margin: 0; font-size: .92rem; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  margin-top: 24px;
  align-items: start;
}
.contact-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.contact-card h2 { margin: 0 0 8px; font-size: 1.15rem; }
.contact-card p { color: var(--text-dim); margin: 0 0 16px; }
.email-link {
  display: inline-block;
  font-weight: 700;
  color: var(--accent-2);
  word-break: break-all;
  margin-bottom: 20px;
}
.email-link:hover { text-decoration: underline; }
.topic-list { list-style: none; padding: 0; margin: 0; }
.topic-list li { color: var(--text-dim); padding: 8px 0; border-top: 1px solid var(--border); }

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-weight: 600; font-size: .92rem; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-row textarea { min-height: 140px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .25);
}
.form-note { font-size: .85rem; color: var(--text-dim); margin: 12px 0 0; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .nav-inner { gap: 10px; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: none; }
  .categories { order: 4; flex-basis: 100%; margin-left: 0; }
  .logo { order: 1; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .card-body { padding: 10px; }
  .card-title { font-size: .92rem; }
  .game-header .btn-primary { width: 100%; justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
