/* =====================================================
   MINDBLOX — Global Stylesheet
   Blue & Yellow Theme | Fun & Playful | No External Deps
   ===================================================== */

//* ── Fonts (Self-Hosted — No External CDN) ────────────── */
@font-face {
  font-family: 'Fredoka One';
  src: url('../fonts/fredoka_one_400.woff2') format('woff2'),
       url('../fonts/FredokaOne-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito_400.woff2') format('woff2'),
       url('../fonts/Nunito-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito_700.woff2') format('woff2'),
       url('../fonts/Nunito-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito_800.woff2') format('woff2'),
       url('../fonts/Nunito-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  background: #f0f4ff;
  color: #1a2a4a;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: #1E90FF; text-decoration: none; transition: color 0.2s; }
a:hover { color: #FFD700; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── CSS Variables ──────────────────────────────────── */
:root {
  --primary: #1E90FF;
  --primary-dark: #0066CC;
  --accent: #FFD700;
  --accent-dark: #E6B800;
  --accent-glow: rgba(255,215,0,0.35);
  --bg: #f0f4ff;
  --bg2: #e4ecff;
  --bg-dark: #0a1428;
  --bg-dark2: #0d1a36;
  --card: #ffffff;
  --card-border: rgba(30,144,255,0.15);
  --text: #1a2a4a;
  --text-muted: #5a7a9a;
  --radius: 16px;
  --shadow: 0 4px 32px rgba(30,144,255,0.15);
}

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

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 68px;
  background: rgba(10,20,40,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(255,215,0,0.15);
  transition: background 0.3s;
}
.navbar.scrolled {
  background: rgba(10,20,40,0.98);
  border-bottom-color: rgba(255,215,0,0.3);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem; color: #fff; text-decoration: none;
}
.brand-icon { width: 36px; height: 36px; }
.brand-accent { color: var(--accent); }
.navbar-nav {
  display: flex; align-items: center; gap: 0.2rem;
}
.navbar-nav a {
  color: rgba(255,255,255,0.8); font-weight: 700;
  font-size: 0.88rem; padding: 7px 14px; border-radius: 8px;
  transition: all 0.2s; text-decoration: none;
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: #fff; background: rgba(255,215,0,0.12);
}
.nav-cta {
  background: var(--accent) !important;
  color: #0a1428 !important;
  border-radius: 10px !important;
  padding: 8px 18px !important;
  font-weight: 800 !important;
  display: flex; align-items: center; gap: 6px;
  margin-left: 8px;
}
.nav-cta:hover { background: #ffe033 !important; transform: translateY(-1px); }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 2px; transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a1428 0%, #0d1a36 50%, #0a2050 100%);
  display: flex; align-items: center;
  padding: 100px 2rem 60px;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.08;
}
.hero-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(10,20,40,0.92) 0%, rgba(10,20,40,0.7) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,215,0,0.1); border: 1px solid rgba(255,215,0,0.3);
  color: var(--accent); font-size: 0.78rem; font-weight: 800;
  padding: 6px 14px; border-radius: 50px; margin-bottom: 1.2rem;
  text-transform: uppercase; letter-spacing: 1px;
}
.hero-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1; color: #fff; margin-bottom: 1rem;
}
.hero-title span { color: var(--accent); }
.hero-desc {
  color: rgba(255,255,255,0.7); font-size: 1rem;
  line-height: 1.7; margin-bottom: 2rem; max-width: 480px;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #0a1428;
  font-family: 'Fredoka One', cursive; font-size: 1rem;
  padding: 13px 28px; border-radius: 12px; border: none;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
  font-weight: 400;
}
.btn-primary:hover { background: #ffe033; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(255,215,0,0.4); color: #0a1428; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: #fff;
  font-family: 'Fredoka One', cursive; font-size: 1rem;
  padding: 13px 28px; border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.25);
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.hero-stats {
  display: flex; gap: 2rem; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-family: 'Fredoka One', cursive; font-size: 1.8rem;
  color: var(--accent); line-height: 1;
}
.hero-stat .lbl { color: rgba(255,255,255,0.5); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.hero-visual {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.hero-img-wrap {
  position: relative; border-radius: 20px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(30,144,255,0.3), 0 0 0 2px rgba(255,215,0,0.2);
  max-width: 420px; width: 100%;
}
.hero-img-wrap img { width: 100%; height: auto; display: block; }
.hero-img-badge {
  position: absolute; bottom: 16px; left: 16px;
  background: rgba(10,20,40,0.9); border: 1px solid rgba(255,215,0,0.3);
  border-radius: 10px; padding: 8px 14px;
  color: var(--accent); font-family: 'Fredoka One', cursive; font-size: 0.9rem;
}
.hero-divider {
  position: absolute; bottom: -1px; left: 0; right: 0; z-index: 3;
  line-height: 0;
}
.hero-divider svg { display: block; width: 100%; }

/* ── Stats Banner ────────────────────────────────────── */
.stats-banner {
  background: linear-gradient(90deg, #1E90FF, #0066CC);
  padding: 40px 2rem;
  width: 100%;
}
.stats-banner-inner {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; text-align: center;
}
.stats-banner .num {
  font-family: 'Fredoka One', cursive; font-size: 2rem; color: var(--accent); line-height: 1;
}
.stats-banner .lbl { color: rgba(255,255,255,0.8); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ── Section ─────────────────────────────────────────── */
.section-wrap { width: 100%; }
.section-wrap-light { background: #fff; }
.section-wrap-soft { background: #f0f4ff; }
.section-wrap-dark { background: linear-gradient(135deg, #0a1428, #0d1a36); }
.section-wrap-blue { background: linear-gradient(90deg, #1E90FF, #0066CC); }
.section {
  padding: 90px 2rem;
  max-width: 1200px; margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 3rem; }
.section-badge {
  display: inline-block;
  background: rgba(30,144,255,0.1); border: 1px solid rgba(30,144,255,0.25);
  color: var(--primary); font-size: 0.72rem; font-weight: 800;
  padding: 5px 14px; border-radius: 50px; margin-bottom: 1rem;
  text-transform: uppercase; letter-spacing: 1.5px;
}
.section-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: #1a2a4a; line-height: 1.2; margin-bottom: 0.8rem;
}
.section-title span { color: var(--primary); }
.section-desc { color: var(--text-muted); font-size: 1rem; max-width: 560px; margin: 0 auto; line-height: 1.7; }

/* ── Features Grid ───────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.feature-card {
  background: #fff; border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 2rem;
  transition: all 0.3s; box-shadow: 0 2px 12px rgba(30,144,255,0.06);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(30,144,255,0.15);
  border-color: rgba(30,144,255,0.3);
}
.feature-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, rgba(30,144,255,0.1), rgba(255,215,0,0.1));
  border: 1px solid rgba(30,144,255,0.2);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem; color: var(--primary);
}
.feature-card h3 {
  font-family: 'Fredoka One', cursive; font-size: 1.1rem;
  color: #1a2a4a; margin-bottom: 0.5rem;
}
.feature-card p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

/* ── How to Play ─────────────────────────────────────── */
.steps-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.step-card {
  background: #fff; border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center;
  transition: all 0.3s; position: relative;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-family: 'Fredoka One', cursive; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.step-card h3 { font-family: 'Fredoka One', cursive; font-size: 1rem; color: #1a2a4a; margin-bottom: 0.5rem; }
.step-card p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }

/* ── Image Feature Section ───────────────────────────── */
.img-feature-wrap {
  width: 100%;
  padding: 80px 2rem;
}
.img-feature-wrap-light { background: #fff; }
.img-feature-wrap-soft { background: #f0f4ff; }
.img-feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  max-width: 1200px; margin: 0 auto;
}
.img-feature.reverse { direction: rtl; }
.img-feature.reverse > * { direction: ltr; }
.img-feature-img {
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(30,144,255,0.18);
  background: #0a1628;
  display: flex; align-items: center; justify-content: center;
  min-height: 280px;
}
.img-feature-img img {
  width: 100%; height: auto; min-height: 280px;
  object-fit: contain; display: block;
  border-radius: 20px;
}
.img-feature-img svg { width: 100%; display: block; border-radius: 20px; }
.img-feature-text h2 {
  font-family: 'Fredoka One', cursive; font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: #1a2a4a; margin-bottom: 1rem; line-height: 1.2;
}
.img-feature-text h2 span { color: var(--primary); }
.img-feature-text p { color: var(--text-muted); line-height: 1.7; margin-bottom: 1.5rem; }
.check-list { display: flex; flex-direction: column; gap: 0.7rem; }
.check-list li {
  display: flex; align-items: flex-start; gap: 10px;
  color: #1a2a4a; font-size: 0.9rem; font-weight: 700;
}
.check-list li svg { flex-shrink: 0; margin-top: 2px; color: var(--primary); }

/* ── Page Hero ───────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, #0a1428, #0d1a36);
  padding: 130px 2rem 80px;
  text-align: center; position: relative; overflow: hidden;
  width: 100%;
}
.page-hero-bg { position: absolute; inset: 0; z-index: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.07; }
.page-hero-overlay { position: absolute; inset: 0; background: rgba(10,20,40,0.88); }
.page-hero-content { position: relative; z-index: 2; }
.page-hero-content h1 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #fff; margin-bottom: 0.8rem;
}
.page-hero-content h1 span { color: var(--accent); }
.page-hero-content p { color: rgba(255,255,255,0.6); font-size: 1rem; max-width: 500px; margin: 0 auto; }
.page-hero-divider { position: absolute; bottom: -1px; left: 0; right: 0; line-height: 0; z-index: 3; }
.page-hero-divider svg { display: block; width: 100%; }

/* ── Play Page ───────────────────────────────────────── */
.play-layout {
  display: grid; grid-template-columns: 1fr 280px; gap: 2rem;
  max-width: 1100px; margin: 0 auto; padding: 100px 2rem 60px;
  align-items: start;
}
.game-canvas-wrap {
  background: #0a1428; border-radius: 20px;
  overflow: hidden; position: relative;
  box-shadow: 0 16px 48px rgba(30,144,255,0.25);
  border: 2px solid rgba(255,215,0,0.15);
  aspect-ratio: 7/6;
}
#gameCanvas { display: block; width: 100%; height: 100%; cursor: grab; }
#gameCanvas:active { cursor: grabbing; }
.game-sidebar { display: flex; flex-direction: column; gap: 1.2rem; }
.sidebar-card {
  background: #fff; border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.4rem;
  box-shadow: 0 2px 12px rgba(30,144,255,0.06);
}
.sidebar-card h3 {
  font-family: 'Fredoka One', cursive; font-size: 1rem;
  color: #1a2a4a; margin-bottom: 0.8rem;
  display: flex; align-items: center; gap: 8px;
}
.sidebar-card h3 svg { color: var(--primary); }
.sidebar-card p, .sidebar-card li {
  color: var(--text-muted); font-size: 0.84rem; line-height: 1.6;
}
.sidebar-card ul { display: flex; flex-direction: column; gap: 0.4rem; }
.sidebar-card ul li { display: flex; align-items: center; gap: 8px; }
.key-badge {
  display: inline-block; background: #f0f4ff; border: 1px solid #c0d0e8;
  border-radius: 5px; padding: 2px 8px; font-size: 0.78rem;
  font-weight: 800; color: var(--primary); font-family: monospace;
}

/* ── CTA Section ─────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, #1E90FF, #0052cc);
  padding: 90px 2rem; text-align: center; position: relative;
  width: 100%;
}
.cta-section h2 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff; margin-bottom: 1rem;
}
.cta-section h2 span { color: var(--accent); }
.cta-section p { color: rgba(255,255,255,0.8); margin-bottom: 2rem; font-size: 1rem; }
.cta-inner { max-width: 700px; margin: 0 auto; position: relative; z-index: 2; }

/* ── Legal Content ───────────────────────────────────── */
.legal-content h2 {
  font-family: 'Fredoka One', cursive; font-size: 1.3rem;
  color: #1a2a4a; margin: 2rem 0 0.7rem;
}
.legal-content p { color: var(--text-muted); line-height: 1.8; margin-bottom: 0.8rem; font-size: 0.92rem; }
.legal-content ul { padding-left: 1.2rem; margin-bottom: 0.8rem; }
.legal-content ul li { color: var(--text-muted); line-height: 1.8; font-size: 0.92rem; list-style: disc; }
.legal-content strong { color: #1a2a4a; }
.legal-content a { color: var(--primary); }

/* ── Footer ─────────────────────────────────────────── */
.footer {
  background: #0a1428;
  padding: 60px 2rem 30px;
  border-top: 2px solid rgba(255,215,0,0.12);
  width: 100%;
}
.footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand .brand-name {
  font-family: 'Fredoka One', cursive; font-size: 1.4rem;
  color: #fff; margin-bottom: 0.8rem;
  display: flex; align-items: center; gap: 8px;
}
.footer-brand p { color: rgba(255,255,255,0.45); font-size: 0.84rem; line-height: 1.7; max-width: 260px; }
.footer-col h4 {
  font-family: 'Fredoka One', cursive; color: var(--accent);
  font-size: 0.95rem; margin-bottom: 1rem; letter-spacing: 0.5px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a {
  color: rgba(255,255,255,0.5); font-size: 0.84rem;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.2s; text-decoration: none;
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin-bottom: 1.5rem; }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom p { color: rgba(255,255,255,0.35); font-size: 0.8rem; }
.footer-address { color: rgba(255,255,255,0.28) !important; font-size: 0.76rem !important; text-align: right; max-width: 380px; }

/* ── Scroll reveal ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible, .reveal.revealed { opacity: 1 !important; transform: none !important; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* ── Illustration Sections ──────────────────────────── */
.illus-section {
  padding: 80px 2rem;
  width: 100%;
}
.illus-section-soft { background: #f0f4ff; }
.illus-section-white { background: #fff; }
.illus-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: center; max-width: 1100px; margin: 0 auto;
}
.illus-grid.reverse { direction: rtl; }
.illus-grid.reverse > * { direction: ltr; }
.illus-img {
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(30,144,255,0.15);
  background: linear-gradient(135deg, #0a1428, #0d1a36);
}
.illus-img img, .illus-img svg { width: 100%; display: block; }
.illus-text h2 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #1a2a4a; margin-bottom: 1rem; line-height: 1.2;
}
.illus-text h2 span { color: var(--primary); }
.illus-text p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.75; margin-bottom: 1rem; }
@media(max-width:900px){
  .illus-grid { grid-template-columns: 1fr; gap: 2rem; }
  .illus-grid.reverse { direction: ltr; }
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .img-feature { grid-template-columns: 1fr; gap: 2rem; }
  .img-feature.reverse { direction: ltr; }
  .stats-banner-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .play-layout { grid-template-columns: 1fr; }
  .game-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .navbar { padding: 0 1rem; }
  .navbar-nav { display: none; position: fixed; top: 68px; left: 0; right: 0; background: rgba(10,20,40,0.98); flex-direction: column; padding: 1.5rem; gap: 0.5rem; border-bottom: 2px solid rgba(255,215,0,0.15); }
  .navbar-nav.open { display: flex; }
  .hamburger { display: flex; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .stats-banner-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .footer-address { text-align: left !important; }
  .game-sidebar { grid-template-columns: 1fr; }
}
