/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg-900: #0a1e5e;
  --bg-800: #0d2d8a;
  --bg-700: #1a4fa3;
  --bg-600: #2563eb;
  --bg-500: #3b82f6;
  --bg-grad: linear-gradient(160deg, #0a1e5e 0%, #1a4fa3 55%, #2980d4 100%);

  --green-tile: #34d399;
  --green-tile-border: #10b981;
  --gold: #fbbf24;
  --gold-dark: #d97706;
  --gold-grad: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fde68a 100%);

  --tile-normal-bg: #e8f0fe;
  --tile-normal-border: #c7d8f8;
  --tile-normal-shadow: rgba(30, 60, 160, 0.2);

  --text-white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.75);
  --text-faint: rgba(255, 255, 255, 0.5);

  --radius-tile: 14px;
  --radius-card: 20px;
  --radius-btn: 50px;

  --font-main: 'Nunito', sans-serif;
}

/* ─── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-grad);
  min-height: 100dvh;
  color: var(--text-white);
  overflow-x: hidden;
}

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

/* ─── Nav ───────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 30, 94, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.3px;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-brand span {
  background: linear-gradient(90deg, #fbbf24, #60a5fa, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-white); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-white);
  border-radius: 2px;
  transition: all 0.25s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  gap: 4px;
}

.nav-mobile a {
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}

.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--text-white); }
.nav-mobile.open { display: flex; }

/* ─── Game tile component ───────────────────────────────────── */
.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-tile);
  font-family: var(--font-main);
  font-weight: 900;
  line-height: 1;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.tile-normal {
  background: var(--tile-normal-bg);
  border: 2px solid var(--tile-normal-border);
  color: #1e3a8a;
  box-shadow: 0 4px 0 var(--tile-normal-shadow), 0 6px 16px rgba(0,0,0,0.15);
}

.tile-green {
  background: var(--green-tile);
  border: 2px solid var(--green-tile-border);
  color: #fff;
  box-shadow: 0 4px 0 #059669, 0 6px 16px rgba(52, 211, 153, 0.3);
}

.tile-gold {
  background: var(--gold-grad);
  border: 2px solid var(--gold-dark);
  color: #7c2d12;
  box-shadow: 0 4px 0 #b45309, 0 6px 16px rgba(251, 191, 36, 0.35);
}

.tile-red {
  background: linear-gradient(135deg, #f87171, #ef4444);
  border: 2px solid #dc2626;
  color: #fff;
  box-shadow: 0 4px 0 #b91c1c, 0 6px 16px rgba(239, 68, 68, 0.3);
}

.tile-blue {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  border: 2px solid #2563eb;
  color: #fff;
  box-shadow: 0 4px 0 #1d4ed8, 0 6px 16px rgba(59, 130, 246, 0.35);
}

.tile-purple {
  background: linear-gradient(135deg, #c084fc, #a855f7);
  border: 2px solid #9333ea;
  color: #fff;
  box-shadow: 0 4px 0 #7e22ce, 0 6px 16px rgba(168, 85, 247, 0.3);
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  min-height: 52px;
}

.btn:active { transform: translateY(2px); }

.btn-gold {
  background: var(--gold-grad);
  color: #78350f;
  box-shadow: 0 4px 0 #b45309, 0 8px 24px rgba(251,191,36,0.4);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.btn-gold:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 0 #b45309, 0 12px 30px rgba(251,191,36,0.5);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255,255,255,0.1);
  color: var(--text-white);
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-1px);
}

/* ─── Section helpers ───────────────────────────────────────── */
.section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-full {
  padding: 80px 24px;
}

.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 48px;
}

/* ─── Glass card ────────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero-bg-tiles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg-tile {
  position: absolute;
  border-radius: 12px;
  font-family: var(--font-main);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.18;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%       { transform: translateY(-14px) rotate(var(--rot, 0deg)); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-tile);
  box-shadow: 0 0 8px var(--green-tile);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.hero-logo {
  width: min(340px, 80vw);
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.5));
  margin-bottom: 8px;
}

.hero-tiles-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 8px 0 20px;
}

.hero-tiles-row .tile {
  animation: float 3s ease-in-out infinite;
}

.hero-tagline {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ─── Feature cards ─────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-tile {
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
  border-radius: 14px;
  flex-shrink: 0;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Screenshots ───────────────────────────────────────────── */
.screenshots-wrap {
  background: rgba(0,0,0,0.15);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.screenshot-frame {
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: transform 0.25s, box-shadow 0.25s;
}

.screenshot-frame:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.screenshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── About ─────────────────────────────────────────────────── */
.about-card {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 40px;
  text-align: center;
}

.about-card p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 24px;
}

.about-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  transition: background 0.2s;
}

.about-contact:hover { background: rgba(255,255,255,0.14); }

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 48px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand-name {
  font-size: 1.2rem;
  font-weight: 900;
  background: linear-gradient(90deg, #fbbf24, #60a5fa, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--text-white); }

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 0.8rem;
  color: var(--text-faint);
  text-align: center;
}

/* ─── Legal pages ───────────────────────────────────────────── */
.legal-hero {
  padding: 120px 24px 48px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.legal-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.legal-date {
  font-size: 0.85rem;
  color: var(--text-faint);
  font-weight: 600;
}

.legal-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.legal-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
  padding: 32px;
  border-radius: var(--radius-card);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}

.legal-intro p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.legal-section {
  margin-bottom: 36px;
  padding: 28px 32px;
  border-radius: var(--radius-card);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.legal-section h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: var(--gold-grad);
  border-radius: 2px;
  flex-shrink: 0;
}

.legal-section p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 12px;
  padding-left: 8px;
}

.legal-section ul li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-tile);
}

.legal-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  margin-top: 8px;
  transition: background 0.2s;
}

.legal-contact:hover { background: rgba(251,191,36,0.2); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 0;
  transition: color 0.2s;
}

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

.back-link svg { transition: transform 0.2s; }
.back-link:hover svg { transform: translateX(-3px); }

/* ─── Star decoration ───────────────────────────────────────── */
.star {
  display: inline-block;
  color: var(--gold);
  animation: spin-star 8s linear infinite;
}

@keyframes spin-star {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .section { padding: 60px 20px; }
  .section-full { padding: 60px 20px; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand { grid-column: 1 / -1; }

  .about-card { padding: 32px 24px; }

  .legal-section { padding: 22px 20px; }
  .legal-intro { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; }

  .footer-inner { grid-template-columns: 1fr; }

  .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-900); }
::-webkit-scrollbar-thumb { background: var(--bg-600); border-radius: 3px; }
