:root {
  --bg: #050505;
  --bg-card: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.1);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent2: #818cf8;
  --success: #34d399;
  --warn: #fbbf24;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Pretendard Variable', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(56,189,248,0.05), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(129,140,248,0.05), transparent 25%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 100;
  background: rgba(5,5,5,0.85);
}
.logo { font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { color: var(--muted); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--accent); }
.site-footer { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 60px; }
.page-content { max-width: 720px; margin: 0 auto; padding: 48px 24px; }
.page-content h1 { font-size: 2rem; margin-bottom: 1rem; }
.page-content h2 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; color: var(--accent); }
.page-content p, .page-content li { color: #cbd5e1; margin-bottom: 0.75rem; }
.muted { color: var(--muted); }
.about-list { padding-left: 1.2rem; margin: 1rem 0; }
.btn-primary {
  display: inline-block; padding: 12px 24px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 700; text-decoration: none; border: none; cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; }
.btn-secondary {
  display: inline-block; padding: 10px 20px; border-radius: 10px;
  background: rgba(255,255,255,0.08); color: var(--text); font-weight: 600;
  border: 1px solid var(--border); cursor: pointer; text-decoration: none;
}
.hero-games { text-align: center; padding: 60px 24px 32px; max-width: 800px; margin: 0 auto; }
.hero-games h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 0.75rem; }
.hero-games p { color: var(--muted); max-width: 560px; margin: 0 auto 1.5rem; }
.free-badge {
  display: inline-block; padding: 6px 14px; border-radius: 20px;
  background: rgba(52,211,153,0.15); border: 1px solid rgba(52,211,153,0.35);
  color: var(--success); font-size: 0.85rem; font-weight: 600;
}
.game-grid {
  max-width: 1100px; margin: 0 auto; padding: 0 24px 80px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.game-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
  padding: 1.5rem; transition: transform 0.25s, border-color 0.25s; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(56,189,248,0.4); text-decoration: none; }
.game-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.game-card h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.game-card p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.game-card .play { margin-top: 1rem; font-weight: 700; color: var(--accent); }
.game-shell { max-width: 640px; margin: 0 auto; padding: 24px; }
.game-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.game-top h1 { font-size: 1.5rem; }
.game-stats { display: flex; gap: 16px; font-size: 0.9rem; color: var(--muted); }
.game-stats strong { color: var(--accent); }
.game-board {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px; margin-bottom: 16px;
}
.game-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.ad-banner-slot {
  max-width: 728px; margin: 24px auto; min-height: 90px; text-align: center;
  background: rgba(255,255,255,0.02); border: 1px dashed var(--border); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.8rem;
}
.ad-gate-overlay {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(8px);
}
.ad-gate-overlay.hidden { display: none; }
.ad-gate-modal {
  background: #111; border: 1px solid var(--border); border-radius: 24px;
  max-width: 420px; width: 100%; padding: 28px; text-align: center;
}
.ad-gate-modal h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.ad-gate-modal p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.ad-gate-slot { min-height: 250px; margin: 16px 0; background: rgba(255,255,255,0.03); border-radius: 12px; overflow: hidden; }
.ad-gate-progress { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin: 12px 0; overflow: hidden; }
.ad-gate-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 0.3s; }
.ad-gate-continue {
  width: 100%; padding: 14px; border: none; border-radius: 12px; font-weight: 700;
  font-size: 1rem; cursor: pointer; margin-top: 8px;
}
.ad-gate-continue:disabled { opacity: 0.4; cursor: not-allowed; background: #334155; color: #94a3b8; }
.ad-gate-continue:not(:disabled) { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.ad-gate-hint { font-size: 0.75rem; color: #64748b; margin-top: 10px; }
@media (max-width: 600px) { .game-grid { grid-template-columns: 1fr; } }
