/* ==========================================================================
   Global styles — Mini Games
   Modern, polished, responsive. Shared across the whole site.
   ========================================================================== */

:root {
  /* Palette */
  --bg: #0f172a;              /* slate-900 */
  --bg-soft: #1e293b;         /* slate-800 */
  --surface: #ffffff;
  --surface-soft: #f1f5f9;    /* slate-100 */
  --border: #e2e8f0;          /* slate-200 */
  --text: #0f172a;            /* slate-900 */
  --text-soft: #475569;       /* slate-600 */
  --text-invert: #f8fafc;     /* slate-50  */
  --primary: #6366f1;         /* indigo-500 */
  --primary-dark: #4f46e5;    /* indigo-600 */
  --accent: #14b8a6;          /* teal-500  */
  --accent-2: #ec4899;        /* pink-500  */
  --danger: #ef4444;          /* red-500   */
  --warning: #f59e0b;         /* amber-500 */
  --success: #22c55e;         /* green-500 */

  /* Signature gradient reused across the UI */
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #14b8a6 100%);
  --grad-warm: linear-gradient(135deg, #6366f1, #ec4899);

  /* Layout */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -12px rgba(30, 27, 75, 0.28);
  --shadow-sm: 0 4px 14px rgba(2, 6, 23, 0.08);
  --shadow-glow: 0 10px 30px -8px rgba(99, 102, 241, 0.5);
  --max-width: 1120px;
  --header-h: 66px;

  /* Type */
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(139, 92, 246, 0.20), transparent 60%),
    radial-gradient(900px 500px at 108% 4%, rgba(20, 184, 166, 0.18), transparent 55%),
    radial-gradient(700px 500px at 50% 120%, rgba(236, 72, 153, 0.12), transparent 60%),
    #eef2f7;
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.site-header .wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 1.16rem;
}

.brand .logo {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--grad);
  color: #fff;
  font-size: 1.12rem;
  box-shadow: var(--shadow-glow);
  transition: transform 0.25s ease;
}
.brand:hover .logo { transform: rotate(-8deg) scale(1.05); }

.nav-links { display: flex; gap: 6px; align-items: center; }

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.nav-links a:hover { transform: translateY(-1px); }
.nav-links a:hover,
.nav-links a.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-dark);
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 30px 0 56px; }

/* --------------------------------------------------------------------------
   Hero (homepage)
   -------------------------------------------------------------------------- */
.hero {
  text-align: center;
  padding: 60px 0 8px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  animation: floaty 3.5s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.3rem);
  line-height: 1.08;
  margin: 0 0 16px;
  font-weight: 900;
  letter-spacing: -0.8px;
}

.hero h1 .grad {
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 5s linear infinite;
}
@keyframes shine {
  to { background-position: 200% center; }
}

.hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-soft);
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Game cards grid
   -------------------------------------------------------------------------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 38px;
}

.game-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s cubic-bezier(.2,.8,.2,1), box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 13px;
  overflow: hidden;
  isolation: isolate;
}

/* animated top accent bar */
.game-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--grad);
  background-size: 200% auto;
  transition: background-position 0.5s ease;
}
/* soft radial glow that fades in on hover */
.game-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(320px 200px at 50% -20%, rgba(99, 102, 241, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(99, 102, 241, 0.35);
}
.game-card:hover::before { background-position: 100% center; }
.game-card:hover::after { opacity: 1; }

.game-card .icon {
  width: 66px; height: 66px;
  border-radius: 18px;
  display: grid; place-items: center;
  font-size: 2.05rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(20,184,166,0.12));
  border: 1px solid rgba(99, 102, 241, 0.12);
  transition: transform 0.25s ease;
}
.game-card:hover .icon { transform: translateY(-2px) scale(1.06) rotate(-4deg); }

.game-card h3 {
  margin: 4px 0 0;
  font-size: 1.32rem;
  font-weight: 800;
}

.game-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.96rem;
  flex: 1;
}

.game-card .tags { display: flex; gap: 7px; flex-wrap: wrap; }
.game-card .tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.game-card .play {
  align-self: flex-start;
  margin-top: 4px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  background: var(--grad-warm);
  box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.6);
  transition: filter 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.game-card:hover .play { transform: translateX(3px); box-shadow: var(--shadow-glow); }
.game-card .play:hover { filter: brightness(1.07); }

/* --------------------------------------------------------------------------
   Buttons (shared)
   -------------------------------------------------------------------------- */
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 9px 17px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.btn:hover { background: var(--surface-soft); border-color: #cbd5e1; transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn.primary {
  color: #fff;
  border-color: transparent;
  background: var(--grad-warm);
  box-shadow: 0 6px 16px -7px rgba(99, 102, 241, 0.7);
}
.btn.primary:hover {
  filter: brightness(1.07);
  background: var(--grad-warm);
  box-shadow: var(--shadow-glow);
}

.btn.ghost { background: transparent; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  margin-top: 24px;
}
.site-footer .wrap {
  padding: 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
}
.footer-links a {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--text-soft);
  transition: background 0.15s ease, color 0.15s ease;
}
.footer-links a:hover { background: rgba(99, 102, 241, 0.1); color: var(--primary-dark); }

/* --------------------------------------------------------------------------
   Content pages (About / Contact / Privacy / Terms / Disclaimer / articles)
   -------------------------------------------------------------------------- */
.content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(24px, 5vw, 48px);
  margin: 30px auto 40px;
  max-width: 820px;
}
.content .kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: rgba(99, 102, 241, 0.1);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.content h1 {
  font-size: clamp(1.8rem, 4.4vw, 2.6rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.6px;
  margin: 0 0 10px;
}
.content .meta {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin: 0 0 26px;
}
.content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 34px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.content h2::before {
  content: "";
  width: 5px; height: 20px;
  border-radius: 3px;
  background: var(--grad-warm);
  flex: none;
}
.content h3 { font-size: 1.1rem; font-weight: 800; margin: 24px 0 8px; }
.content p,
.content li { color: var(--text-soft); font-size: 1rem; }
.content p { margin: 0 0 14px; }
.content ul, .content ol { margin: 0 0 16px; padding-left: 24px; }
.content li { margin: 6px 0; }
.content a { color: var(--primary-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.content a:hover { color: var(--primary); }
.content strong { color: var(--text); }
.content .lead { font-size: 1.12rem; color: var(--text); }
.content .callout {
  background: rgba(99, 102, 241, 0.07);
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 0 0 18px;
}
.content .callout p:last-child { margin-bottom: 0; }
.content hr { border: none; border-top: 1px solid var(--border); margin: 30px 0; }

/* Blog listing */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 34px;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s cubic-bezier(.2,.8,.2,1), box-shadow 0.22s ease, border-color 0.22s ease;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(99, 102, 241, 0.35);
}
.post-card .tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(99, 102, 241, 0.1);
}
.post-card h3 { margin: 0; font-size: 1.18rem; font-weight: 800; }
.post-card p { margin: 0; color: var(--text-soft); font-size: 0.95rem; flex: 1; }
.post-card .read { font-weight: 700; color: var(--primary-dark); font-size: 0.9rem; }

/* Homepage "why" / purpose section */
.purpose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(24px, 4vw, 40px);
  margin-top: 40px;
}
.purpose h2 { font-size: 1.5rem; font-weight: 800; margin: 0 0 10px; }
.purpose p { color: var(--text-soft); margin: 0 0 12px; max-width: 760px; }
.purpose p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Responsive: homepage grid
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .games-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 7px 10px; font-size: 0.85rem; }
  .hero { padding: 38px 0 4px; }
  .site-footer .wrap { justify-content: center; text-align: center; }
}
