/* =============================================
   ONE BUCKS GAME — Design System
   Dark gold theme: #0a0a0f bg, #f59e0b accent
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg:        #0a0a0f;
  --bg2:       #111118;
  --bg3:       #1a1a24;
  --border:    rgba(255,255,255,0.08);
  --border-hi: rgba(245,158,11,0.3);
  --accent:    #f59e0b;
  --accent-dim:#b45309;
  --text:      #e8e8f0;
  --text-muted:#7a7a9a;
  --text-dim:  #4a4a6a;
  --card-bg:   rgba(255,255,255,0.04);
  --card-hover:rgba(245,158,11,0.06);
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 24px rgba(0,0,0,0.5);
  --shadow-accent: 0 0 40px rgba(245,158,11,0.15);
  --font:      'Inter', system-ui, sans-serif;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.accent { color: var(--accent); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
}
.btn-primary:hover:not(:disabled) {
  background: #fbbf24;
  box-shadow: 0 0 20px rgba(245,158,11,0.4);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: none; }
.btn-primary:disabled {
  background: var(--bg3);
  color: var(--text-muted);
  cursor: not-allowed;
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
}

.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #0a0a0f;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  flex-shrink: 0;
}

.logo-text {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
  line-height: 1.2;
}

.logo-sm .logo-text { font-size: 0.7rem; }

.header-nav {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-email {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-toggle {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
  letter-spacing: 0.05em;
}
.lang-toggle:hover {
  color: var(--accent);
  border-color: var(--border-hi);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.mobile-nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.mobile-nav-actions { display: flex; gap: 8px; margin-top: 8px; }
.mobile-nav-actions .btn { flex: 1; }

/* --- Hero --- */
.hero {
  position: relative;
  /* subtract the 64px sticky header so hero fills exactly one screen */
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px);
  display: flex;
  align-items: center;
  padding: 56px 0 56px;
  overflow: hidden;
}

/* anchor targets shouldn't hide under the sticky header */
#games, #how { scroll-margin-top: 72px; }

/* pub art as hero background via a real <img> (reliable on iOS Safari),
   darkened so the logo + text stay readable */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
}
.hero-pub::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,15,0.70), rgba(10,10,15,0.80) 60%, rgba(10,10,15,0.95));
  z-index: 1;
}
.hero-pub .hero-inner { position: relative; z-index: 2; }

.hero-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stars-layer {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1px 1px at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.6) 0%, transparent 100%);
  background-size: 200px 200px;
}

/* CSS-generated stars via repeating pattern */
.s1 {
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 40%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 10%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 60%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 90%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 80%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 30%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 55%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 45%, rgba(255,255,255,0.5) 0%, transparent 100%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
.s2 {
  background-image:
    radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 20% 15%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 85%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 45%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 25%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 35%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 75%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 95% 15%, rgba(255,255,255,0.4) 0%, transparent 100%);
  animation: twinkle 6s ease-in-out infinite alternate-reverse;
}
.s3 {
  background-image:
    radial-gradient(2px 2px at 22% 38%, rgba(245,158,11,0.2) 0%, transparent 100%),
    radial-gradient(2px 2px at 68% 22%, rgba(245,158,11,0.15) 0%, transparent 100%),
    radial-gradient(2px 2px at 88% 78%, rgba(245,158,11,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 48% 68%, rgba(255,255,255,0.5) 0%, transparent 100%);
  animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

.hero-glow {
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: 100vw;
  height: 300px;
  background: radial-gradient(ellipse, rgba(245,158,11,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-hi);
  background: rgba(245,158,11,0.08);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-logo-wrap { margin: 0; }
.hero-logo {
  width: clamp(240px, 46vw, 400px);
  height: auto;
  /* transparent PNG — clean on any background */
  filter: drop-shadow(0 10px 40px rgba(245,158,11,0.3));
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.85);
  max-width: 480px;
  line-height: 1.7;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat { text-align: center; }
.stat-value { display: block; font-size: 2rem; font-weight: 900; color: var(--accent); line-height: 1; }
.stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* --- Section Common --- */
.section-header { text-align: center; margin-bottom: 48px; }
.section-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; }
.section-sub { margin-top: 12px; color: var(--text-muted); font-size: 1rem; }

/* --- Games Section --- */
.games-section { padding: 80px 0; background: var(--bg2); }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 380px));
  justify-content: center;
  gap: 24px;
}

.promo-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 32px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.promo-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.promo-input {
  flex: 1;
  min-width: 140px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  text-transform: uppercase;
  outline: none;
}
.promo-input:focus { border-color: var(--accent); }
.promo-bar .btn { padding: 9px 18px; font-size: 0.85rem; }
.promo-msg { font-size: 0.82rem; width: 100%; }
.promo-msg.ok { color: #4ade80; }
.promo-msg.err { color: #f87171; }

.games-group { margin-bottom: 48px; }
.games-group:last-child { margin-bottom: 0; }
.games-group-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.games-group-title::before {
  content: '';
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--accent);
}
.games-group-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.wip-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(59,130,246,0.2);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.35);
}

.game-details-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity var(--transition);
}
.game-details-link:hover { opacity: 0.75; }

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.game-card:hover {
  border-color: var(--border-hi);
  background: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--shadow-accent);
}
.card-featured {
  border-color: rgba(245,158,11,0.2);
  background: rgba(245,158,11,0.04);
  position: relative;
}

/* Game preview area */
.game-preview {
  position: relative;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.game-card:hover .preview-img { transform: scale(1.05); }

.battleship-preview {
  background: linear-gradient(135deg, #0a1628 0%, #0d1f3c 100%);
}

.preview-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.pgrid-inner {
  display: grid;
  grid-template-columns: repeat(5, 32px);
  grid-template-rows: repeat(5, 32px);
  gap: 3px;
}

.cell {
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.cell.ship { background: rgba(59,130,246,0.3); border-color: rgba(59,130,246,0.4); }
.cell.hit  { background: rgba(239,68,68,0.5);  border-color: rgba(239,68,68,0.6); }
.cell.miss { background: rgba(255,255,255,0.15); }

.jjk-preview {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1060 100%);
}

.gods-preview {
  background: linear-gradient(135deg, #0b1d40 0%, #0a1226 100%);
}

.card-fan {
  position: relative;
  width: 120px;
  height: 140px;
}
.fan-card {
  position: absolute;
  width: 70px;
  height: 100px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transform-origin: bottom center;
  transition: transform 0.2s;
}

.jjk-preview .fan-card { background: linear-gradient(135deg, #3b0764 0%, #6d28d9 100%); }
.gods-preview .fan-card { background: linear-gradient(135deg, #1a3a5c 0%, #0d6efd22 100%); }
.fan-card.gold { background: linear-gradient(135deg, #1a2e4a 0%, #2a4a6a 100%); border-color: rgba(245,158,11,0.3); }

.fc1 { transform: rotate(-15deg) translate(-35px, 0); z-index: 1; }
.fc2 { transform: rotate(-5deg) translate(-10px, -5px); z-index: 2; }
.fc3 { transform: rotate(5deg) translate(10px, -5px); z-index: 3; }
.fc4 { transform: rotate(15deg) translate(30px, 0); z-index: 2; }

.game-card:hover .fc1 { transform: rotate(-20deg) translate(-40px, -5px); }
.game-card:hover .fc4 { transform: rotate(20deg) translate(35px, -5px); }

.suit { color: rgba(255,255,255,0.7); }
.gold .suit { color: var(--accent); }

.game-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-strategy { background: rgba(59,130,246,0.2); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-card     { background: rgba(139,92,246,0.2); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }

.featured-label {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent);
  color: #0a0a0f;
  letter-spacing: 0.04em;
}

/* Game info */
.game-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.game-title { font-size: 1.1rem; font-weight: 700; }
.game-desc  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

.game-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.meta-tag {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.game-price {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
}

.btn-buy { padding: 8px 20px; font-size: 0.8rem; }
.btn-buy.btn-play {
  background: #22c55e;
  color: #04140a;
}
.btn-buy.btn-play:hover:not(:disabled) {
  background: #4ade80;
  box-shadow: 0 0 20px rgba(34,197,94,0.4);
}

.owned-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(34,197,94,0.2);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.35);
}

/* --- How it works --- */
.how-section { padding: 80px 0; }

.steps {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 48px;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.step:hover {
  border-color: var(--border-hi);
  background: var(--card-hover);
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(245,158,11,0.1);
  border: 1px solid var(--border-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.step-num {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.step-title { font-size: 1rem; font-weight: 700; }
.step-desc  { font-size: 0.85rem; color: var(--text-muted); }

.step-arrow {
  font-size: 1.5rem;
  color: var(--text-dim);
  padding-top: 48px;
  flex-shrink: 0;
}

.promise-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(245,158,11,0.06);
  border: 1px solid var(--border-hi);
}

.promise-icon { font-size: 2rem; flex-shrink: 0; }
.promise-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
.promise-text strong { color: var(--text); }

/* --- Community banner --- */
.community-section { padding: 0 0 80px; }
.community-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.community-banner img {
  width: 100%;
  height: auto;
  display: block;
}
.community-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 48px 28px 24px;
  background: linear-gradient(to top, rgba(6,6,10,0.92) 0%, rgba(6,6,10,0.6) 50%, transparent 100%);
}
.community-cap h2 {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.community-cap p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-tagline { font-size: 0.75rem; color: var(--text-dim); }

.footer-links { display: flex; gap: 20px; margin-left: auto; }
.footer-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-link:hover { color: var(--accent); }

.footer-right { display: flex; align-items: center; gap: 16px; }
.footer-copy { font-size: 0.75rem; color: var(--text-dim); }

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  padding: 32px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: none; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text); }

.modal-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 24px;
}
.modal-tab {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}
.modal-tab.active {
  background: var(--bg3);
  color: var(--text);
}

.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }

.modal-pane { display: none; }
.modal-pane.active { display: block; }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.form-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: var(--font);
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--accent); }

.form-error {
  font-size: 0.8rem;
  color: #f87171;
  margin-bottom: 8px;
  min-height: 16px;
}

.modal-note {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.5;
}

/* --- Game page --- */
.game-page { padding: 40px 0 80px; min-height: 60vh; }

.gp-loading { display: flex; justify-content: center; padding: 80px 0; }
.gp-spin {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: gp-rot 0.8s linear infinite;
}
@keyframes gp-rot { to { transform: rotate(360deg); } }

.back-link { color: var(--text-muted); }
.back-link:hover { color: var(--text); }

.gp-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 56px;
}

.gp-banner {
  position: relative;
  border-radius: var(--radius-lg);
  min-height: 260px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.gp-banner-img {
  background-size: cover;
  background-position: center;
}
.gp-status-badge {
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.gp-status-badge.ready { background: rgba(139,92,246,0.2); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.gp-status-badge.wip   { background: rgba(59,130,246,0.2); color: #60a5fa; border: 1px solid rgba(59,130,246,0.35); }

.gp-info { display: flex; flex-direction: column; gap: 16px; }
.gp-title { font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; }
.gp-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.gp-desc { color: var(--text-muted); line-height: 1.8; }
.gp-actions { display: flex; align-items: center; gap: 20px; margin-top: auto; }
.gp-price { font-size: 1.75rem; font-weight: 900; color: var(--accent); }

/* Comments */
.gp-comments { max-width: 760px; }
.gp-comments-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 24px; }

.gp-compose {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.gp-kind-toggle {
  display: inline-flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 12px;
}
.gp-kind {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}
.gp-kind.active { background: var(--bg3); color: var(--text); }

.gp-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}
.gp-textarea:focus { border-color: var(--accent); }

.gp-compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.gp-counter { font-size: 0.75rem; color: var(--text-dim); }

.gp-compose-hint {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.gp-filter { display: flex; gap: 8px; margin-bottom: 20px; }
.gp-filter-btn {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.gp-filter-btn.active { color: var(--accent); border-color: var(--border-hi); background: rgba(245,158,11,0.08); }

.gp-list { display: flex; flex-direction: column; gap: 12px; }
.gp-comment {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.gp-comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.gp-author { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.gp-kind-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(34,197,94,0.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
}
.gp-date { font-size: 0.72rem; color: var(--text-dim); }
.gp-del {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 6px;
  transition: all var(--transition);
}
.gp-del:hover { color: #f87171; background: rgba(248,113,113,0.1); }
.gp-comment-body { font-size: 0.9rem; line-height: 1.6; color: var(--text); word-break: break-word; white-space: pre-wrap; }

.gp-empty { text-align: center; color: var(--text-dim); padding: 32px 0; }

@media (max-width: 768px) {
  .gp-hero { grid-template-columns: 1fr; }
  .gp-banner { min-height: 220px; }
}

/* --- Responsive --- */
/* tablets: force exactly 2 columns (auto-fill can't fit 2×380 in ~728px) */
@media (min-width: 600px) and (max-width: 1023px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .header-nav, .header-actions { display: none; }
  .burger { display: flex; }

  .hero { padding: 60px 0 28px; }
  .hero-inner { gap: 16px; }
  .hero-logo { width: clamp(180px, 46vw, 260px); }
  .hero-stats { gap: 16px; margin-top: 4px; padding-top: 16px; }

  .games-grid { grid-template-columns: 1fr; }

  .steps {
    flex-direction: column;
    align-items: stretch;
  }
  .step-arrow { display: none; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-links { margin-left: 0; }
}

@media (max-width: 400px) {
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
