/* Default = dark theme variables */
:root {
  --bg: #0a0f24;
  --panel: #050a18;
  --muted: #c8c8c8;
  --text: #ffffff;
  --accent: #ffc94d;
  --gold: #f9c642;
  --btn-primary-bg: #2563eb;
  --btn-yellow: #ffcc33;
  --hero-overlay: rgba(5, 9, 32, 0.75);
  --stats-overlay: rgba(9, 34, 78, 0.75);
  --card-bg: #0b1120;
  --card-border: #1d2539;
}

/* Light theme overrides */
:root.light {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --muted: #596273;
  --text: #0b1220;
  --accent: #b8862b;
  --gold: #b8862b;
  --btn-primary-bg: #1f6feb;
  --btn-yellow: #f6c84a;
  --hero-overlay: rgba(255, 255, 255, 0.65);
  --stats-overlay: rgba(10, 20, 40, 0.05);
  --card-bg: #ffffff;
  --card-border: #e6eaf2;
}

/* -----------------------
   General Styling
   ----------------------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 90px;
}

/* -----------------------
   Navbar
   ----------------------- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 30px;
  background-color: var(--panel);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  gap: 12px;
  flex-wrap: wrap;
  min-height: 73px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo {
  width: 55px;
  height: auto;
}

.brand h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.brand p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
  color: var(--muted);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 14px;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: 0.2s;
  padding: 6px 8px;
  border-radius: 6px;
}

.nav-links a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.02);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dark-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 18px;
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.enroll-btn {
  background: var(--btn-primary-bg);
  padding: 8px 18px;
  border-radius: 6px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

/* -----------------------
   Hero Section
   ----------------------- */
 .hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 110px;
  padding-bottom: 120px;
}

.hero-content {
  position: relative;
  max-width: 900px;
  padding: 20px;
  z-index: 2;
}

.hero-logo {
  width: 240px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: 60px;
  margin: 10px 0;
  color: var(--text);
}

.hero h2 {
  font-size: 35px;
  color: var(--accent);
  margin-bottom: 20px;
  font-family: "Playfair Display", serif;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.6;
  font-size: 18px;
  color: var(--muted);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.btn-yellow {
  background: var(--btn-yellow);
  padding: 12px 26px;
  border-radius: 8px;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 6px 0 rgba(0, 0, 0, 0.06) inset;
  border: none;
}

.btn-outline {
  padding: 12px 26px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);
}

/* thin divider under hero buttons */
.hero-divider {
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  margin: 36px auto 18px;
  border-radius: 2px;
  opacity: 0.85;
  position: relative;
}

/* -----------------------
   Stats Section
   ----------------------- */
.bg-kids {
  background: url("assets/kids.png") center/cover no-repeat;
  background-size: cover;
  background-position: center;
  width: 100%;
  position: relative;
}

/* unified overlay covering both hero and stats when they share the same background */
.bg-kids::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  z-index: 1;
}

.stats-section {
  padding: 90px 0;
  position: relative;
}


.stats-container {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 100px;
  text-align: center;
  color: var(--text);
  z-index: 2;
}

/* when stats are placed inside hero, add spacing so they sit below hero content */
.hero .stats-container {
  padding: 30px 0 60px;
}

.stats-container .stat-box {
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
}

.stat-box h2 {
  font-size: 64px;
  line-height: 1;
}

.stat-box h2 {
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
}

.stat-box p {
  font-size: 18px;
  color: var(--muted);
}

/* -----------------------
   Learning Section
   ----------------------- */
.learning-section {
  background: var(--panel);
  padding: 40px 40px;
  text-align: center;
  color: var(--text);
}

.section-title {
  font-size: 42px;
  color: var(--text);
  margin-bottom: 10px;
  font-family: 'Playfair Display', serif;
}

.section-subtitle {
  color: var(--muted);
  max-width: 650px;
  margin: auto;
  line-height: 1.6;
  margin-bottom: 50px;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.learning-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  transition: 0.3s ease;
  color: var(--text);
}

.learning-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
}

.learning-card .icon {
  height: 60px;
  width: 60px;
  background: var(--gold);
  border-radius: 50%;
  margin: 0 auto 15px;
}

.learning-card h3 {
  color: var(--gold);
  font-size: 22px;
  margin-bottom: 6px;
}

.learning-card p {
  color: var(--muted);
}

/* -----------------------
   Daily Puzzle Challenge
   ----------------------- */
.puzzle-section {
  background: var(--panel);
  padding: 44px 20px;
  text-align: center;
  color: var(--text);
  border-top: 1px solid rgba(255,255,255,0.03);
}
.puzzle-section .puzzle-title {
  font-family: 'Playfair Display', serif;
  font-size: 56px;
  margin: 0;
  color: #f6f1d6;
  line-height: 1;
}
.puzzle-section .puzzle-sub {
  color: var(--muted);
  max-width: 980px;
  margin: 12px auto 0;
  font-size: 18px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .puzzle-section .puzzle-title {
    font-size: 40px;
  }
  .puzzle-section .puzzle-sub {
    font-size: 16px;
  }
}

/* -----------------------
   Responsive
   ----------------------- */
@media (max-width: 980px) {
  .learning-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-container {
    gap: 60px;
  }
  .hero h1 {
    font-size: 44px;
  }
  .hero h2 {
    font-size: 26px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .learning-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-bottom: 120px;
    min-height: 100vh;
  }
  .btn-yellow,
  .btn-outline {
    padding: 10px 18px;
    font-size: 15px;
  }
}

/* Puzzle layout */
.puzzle-inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
  padding: 28px 0;
}
.puzzle-board {
  display: flex;
  justify-content: center;
}
.puzzle-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 22px;
  border-radius: 12px;
  color: var(--text);
}
.puzzle-panel .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.puzzle-panel h3 { font-family: 'Playfair Display', serif; margin: 0; font-size: 28px; }
.badge.easy { background: #ffc94d; color: #072; padding: 6px 10px; border-radius: 10px; font-weight:700; }
.puzzle-instr { color: var(--muted); margin: 14px 0 18px; }
.panel-btn { display:block; width:100%; padding:12px 14px; border-radius:8px; background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.04); color:var(--text); margin-bottom:12px; cursor:pointer; }
.panel-btn.secondary { background: transparent; border:1px solid rgba(255,255,255,0.06); }
.hint-text { display:none; color: var(--muted); background: rgba(255,255,255,0.02); padding:10px; border-radius:8px; margin-bottom:12px; }

@media (max-width: 900px) {
  .puzzle-inner { grid-template-columns: 1fr; }
  .puzzle-panel { order: 2; }
}

/* ---------- Program Section ---------- */
.program-section {
  padding: 80px 60px;
  text-align: left;
  background: var(--bg);
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 35px;
  margin-top: 40px;
}

/* ensure grid items stretch to same height for aligned content */
.program-grid {
  align-items: stretch;
}

.program-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 28px 26px;
  color: var(--text);
  transition: 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1 1 0;
}

.program-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
}

.icon-circle {
  width: 70px;
  height: 70px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}

.icon-circle img {
  width: 40px;
  height: 40px;
}

.program-card h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  font-family: "Playfair Display", serif;
}

.program-card .age {
  color: var(--muted);
  margin-bottom: 15px;
  font-size: 16px;
}

.program-card .desc {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  /* allow description to grow so cards align */
  flex: 1 1 auto;
}

.badges {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.badge {
  background: var(--gold);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #000;
}

.badge.outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

.price {
  font-size: 34px;
  color: var(--gold);
  font-weight: 800;
  margin-top: 12px;
}

.price span {
  display: block;
  font-size: 16px;
  color: var(--muted);
}

.program-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text);
    cursor: pointer;
    transition: 0.3s;
  padding: 12px 0;
  border-radius: 8px;
  width: 100%;
  margin-top: 14px;
}
.program-btn:hover {
    background: var(--btn-primary-bg);
    border-color: var(--btn-primary-bg);
    color: #fff;
}


.program-btn:hover {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  color: #fff;
}
.program-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
}
.icon-circle {
    background: rgba(184, 134, 43, 0.85); /* slightly lighter gold */
}
@media (max-width: 650px) {
    .program-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Testimonials / Success Stories ---------- */
.testimonials-section {
  padding: 80px 60px;
  background: var(--panel);
  color: var(--text);
  text-align: center;
}
.testimonials-section .container {
  max-width: 1200px;
  margin: 0 auto;
}
.testimonials-title {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  color: var(--text);
  margin-bottom: 8px;
}
.testimonials-sub {
  color: var(--muted);
  margin-bottom: 36px;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ensure every grid row is equal height so cards align */
.testimonials-grid {
  grid-auto-rows: 1fr;
}
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
  align-self: stretch;
  height: 100%;
}
.quote-mark {
  font-size: 40px;
  color: rgba(255,255,255,0.12);
}
.testimonial-body { flex: 1 1 auto; display:flex; flex-direction:column; }

/* ensure grid items all stretch to same height */
.testimonials-grid { align-items: stretch; }

/* author avatar sizing and alignment fix */
.testimonial-author { display:flex; gap:12px; align-items:center; margin-top:auto; border-top:1px solid rgba(255,255,255,0.03); padding-top:12px; }
.testimonial-author .avatar { width:52px; height:52px; border-radius:50%; object-fit:cover; flex:0 0 52px; }
.testimonial-text {
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
}
.testimonial-stat {
  background: rgba(10,16,24,0.25);
  padding: 14px;
  border-radius: 8px;
}
.testimonial-stat .stat-highlight {
  color: #38c172; /* green */
  font-weight: 700;
  margin-bottom: 6px;
}
.testimonial-stat.small .stat-highlight.small { color: var(--gold); font-weight:700; }
.stat-row { display:flex; justify-content:space-between; color:var(--muted); font-size:13px; }
.testimonial-badge { background: var(--gold); color:#111; padding:8px 14px; border-radius:8px; width:max-content; margin-top:8px; }
.testimonial-author { display:flex; gap:12px; align-items:center; margin-top:6px; border-top:1px solid rgba(255,255,255,0.03); padding-top:12px; }
.testimonial-author .avatar { width:48px; height:48px; border-radius:50%; object-fit:cover; }
.author-name { font-weight:700; color:var(--text); }
.author-role { color:var(--muted); font-size:13px; }

@media (max-width: 980px) {
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonials-title { font-size: 36px; }
}

/* ---------- News / Updates ---------- */
.news-section {
  padding: 80px 60px;
  background: var(--panel);
  color: var(--text);
}
.news-inner { max-width:1200px; margin:0 auto; text-align:center; }
.news-title { font-family:'Playfair Display', serif; font-size:48px; margin-bottom:8px; }
.news-sub { color:var(--muted); margin-bottom:36px; }
.news-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:28px; }
.news-card { background:var(--card-bg); border:1px solid var(--card-border); border-radius:12px; padding:28px; text-align:left; display:flex; flex-direction:column; gap:12px; }
.news-badge { display:inline-block; background:var(--gold); color:#111; padding:6px 12px; border-radius:8px; font-weight:700; width:max-content; }
.news-meta { color:var(--muted); font-size:13px; }
.news-head { font-family:'Playfair Display', serif; font-size:22px; margin:8px 0 6px; color:var(--text); }
.news-excerpt { color:var(--muted); line-height:1.6; }
.news-read { margin-top:auto; color:var(--text); text-decoration:none; font-weight:600; display:inline-block; padding-top:12px; }

@media (max-width: 980px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-title { font-size:36px }
}

/* ---------- About Section ---------- */
.about-section {
  padding: 80px 60px;
  background: var(--panel);
  color: var(--text);
}
.about-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.about-image img { width: 100%; border-radius: 10px; display:block; }
.about-title { font-family: 'Playfair Display', serif; font-size:64px; margin:0 0 18px; color:var(--text); }
.about-text p { color:var(--muted); line-height:1.8; font-size:18px; margin-bottom:16px; }
.highlight { color:var(--gold); font-weight:700; }

@media (max-width: 980px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-title { font-size:40px; text-align:left; }
}

/* ---------- Features / Highlights ---------- */
.features-section { padding: 60px 60px; background: var(--panel); color:var(--text); }
.features-inner { max-width:1200px; margin:0 auto; display:grid; grid-template-columns: 1fr 520px; gap:28px; align-items:start; }
.features-left img { width:100%; border-radius:10px; display:block; }
.features-right { display:grid; grid-template-columns: repeat(2,1fr); gap:20px; }
.feature-card { background:var(--card-bg); border:1px solid var(--card-border); border-radius:12px; padding:20px; display:flex; gap:12px; align-items:flex-start; }
.feature-icon { width:48px; height:48px; background:rgba(184,134,43,0.12); color:var(--gold); border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; flex:0 0 48px; }
.feature-card h4 { margin:0 0 6px; color:var(--text); font-size:18px; }
.feature-card p { margin:0; color:var(--muted); font-size:15px; line-height:1.6; }

body {
  margin: 0;
  background: #020617;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #e5e7eb;
  padding: 20px;
  min-height: 100vh;
  box-sizing: border-box;
}

.container {
  display: flex;
  gap: 20px;
  max-width: 100%;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

/* Board */
.board {
  display: grid;
  grid-template-columns: repeat(8, 60px);
  grid-template-rows: repeat(8, 60px);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  min-height: 480px; /* Ensures visibility even empty */
  border: 2px solid #facc15;
}

.square {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-family: 'Segoe UI Symbol', 'Noto Sans Chess', sans-serif; /* Chess Unicode fallback */
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.light { background: #f0d9b5 !important; } /* Brighter for visibility */
.dark { background: #b58863 !important; }

.selected {
  outline: 4px solid #facc15;
  box-shadow: 0 0 20px #facc15;
}

/* Rest of CSS unchanged from previous... */
.panel {
  width: 320px;
  max-width: 100%;
  padding: 20px;
  background: #020617;
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.panel h2 {
  color: #facc15;
  margin: 0;
  font-size: 24px;
}

.difficulty {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
}

.easy { background: #22c55e; color: black; }
.medium { background: #eab308; color: black; }
.hard { background: #f97316; color: black; }
.expert { background: #f43f5e; color: white; }

.desc {
  margin: 15px 0;
  line-height: 1.5;
}

.solution {
  background: #2a2a24;
  border: 1px solid #facc15;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.hidden {
  display: none;
}

button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: #1e3a8a;
  border: none;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background: #1e40af;
}

button:last-of-type {
  background: #020617;
  border: 1px solid #334155;
}

button:last-of-type:hover {
  background: #1e293b;
}

.result {
  margin-top: 15px;
  font-weight: bold;
  font-size: 18px;
  text-align: center;
}

.solved {
  color: #22c55e;
}

.icon-btn {
  background: transparent;
  border: 1px solid #334155;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.icon-btn:hover {
  background: #1e293b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  display: flex;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  justify-content: center;
  flex-wrap: wrap;
}

.rankings-panel {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 24px 24px;
  width: 100%;
  max-width: 650px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 255, 100, 0.2);
  border: 1px solid rgba(0, 255, 100, 0.3);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #00ff66;
}

.live-indicator {
  width: 8px;
  height: 8px;
  background: #00ff66;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.rankings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.rank-item.top-3 {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.3);
}

.rank-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.rank-badge:not(.gold, .silver, .bronze) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gold { background: linear-gradient(135deg, #ffd700, #ffed4e); color: #000; }
.silver { background: linear-gradient(135deg, #c0c0c0, #e5e5e5); color: #000; }
.bronze { background: linear-gradient(135deg, #cd7f32, #d4a76a); color: #000; }

.player-info {
  flex: 1;
  min-width: 0;
}

.name {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wins {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.rating {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 80px;
  text-align: right;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 20px;
  }
  
.ranking* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0f;
  min-height: 100vh;
  padding: 40px 20px;
}

.container {
  display: flex;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.rankings-panel {
  flex: 1;
  background: rgba(20, 20, 30, 0.8);
  backdrop-filter: blur(30px);
  border-radius: 28px;
  padding: 36px 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  max-width: 680px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
}

.header h1 {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #f4d03f 0%, #f39c12 50%, #e67e22 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  color: #22c55e;
}

.live-indicator {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

.rankings-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.rank-item.top {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.25);
}

.rank-circle {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.rank-circle.gold {
  background: linear-gradient(135deg, #facc15 0%, #fbbf24 100%);
  color: #000;
  box-shadow: 0 12px 32px rgba(250, 204, 21, 0.5);
  font-size: 24px;
}

.rank-circle.silver {
  background: linear-gradient(135deg, #d1d5db 0%, #e5e7eb 100%);
  color: #000;
  box-shadow: 0 12px 32px rgba(209, 213, 219, 0.5);
  font-size: 24px;
}

.rank-circle.bronze {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5);
  font-size: 24px;
}

.player-info {
  flex: 1;
  min-width: 0;
}

.name {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.wins {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
}

.rating {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 100px;
  text-align: right;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 24px;
  }
  
  .rankings-panel {
    padding: 28px 24px;
  }
  
  .header h1 {
    font-size: 26px;
  }
  
  .rank-item {
    padding: 20px;
    gap: 20px;
  }
}
-panel {
    padding: 24px;
  }
  
  .header h1 {
    font-size: 24px;
  }
  
  .rank-item {
    padding: 16px;
    gap: 16px;
  }
  
  .rank-badge {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* ===== STATS SECTION ONLY ===== */
/* ================= STATS SECTION ================= */
.stats-section {
  width: 100%;
  margin-top: 90px;
  padding: 80px 0;

  /* Dark blue background */
  background: linear-gradient(
    180deg,
    #0b1224 0%,
    #0f1b3d 50%,
    #0b1224 100%
  );
}

/* ================= FLEX CONTAINER ================= */
.stats-container {
  width: 90%;
  max-width: 1000px;
  margin: auto;

  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 36px;
}

/* ================= STAT CARD ================= */
.stats-card {
  flex: 1;
  min-width: 220px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);

  border-radius: 18px;
  padding: 28px 36px;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;

  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-6px);
  border-color: #facc15;
}

/* ================= TEXT ================= */
.stats-value {
  font-size: 36px;
  font-weight: 700;
  color: #f8fafc;
}

.stats-value.highlight {
  color: #facc15;
}

.stats-label {
  font-size: 14px;
  color: #94a3b8;
}

/* ===== GRID FOR RANKINGS ===== */
.rankings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* Make rank item fill grid nicely */
.rank-item {
  width: 100%;
}

/* ===== SECTION ===== */
.academy-section {
  background: #050a18;
  padding: 80px 60px;
}

/* ===== MAIN LAYOUT ===== */
.academy-container {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* ===== IMAGE ===== */
.academy-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

/* ===== RIGHT CONTENT ===== */
.academy-content {
  color: #ffffff;
}

.academy-subtitle {
  color: #c8c8c8;
  font-size: 16px;
  margin-bottom: 28px;
}

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ===== FEATURE CARD ===== */
.feature-box {
  background: #0b1120;
  border: 1px solid #1d2539;
  border-radius: 18px;
  padding: 30px;
  transition: 0.3s ease;
}

.feature-box:hover {
  transform: translateY(-6px);
  border-color: #f9c642;
}

/* ===== ICON ===== */
.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(249, 198, 66, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #f9c642;
  margin-bottom: 16px;
}

/* ===== TEXT ===== */
.feature-box h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-box p {
  font-size: 15px;
  line-height: 1.6;
  color: #c8c8c8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .academy-container {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== GLOBAL ===== */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: #050a18;
  color: #ffffff;
}

/* ===== SECTION ===== */
.enroll-section {
  padding: 80px 20px;
  display: flex;
  justify-content: center;
}

/* ===== CARD ===== */
.enroll-card {
  width: 100%;
  max-width: 800px;
  background: linear-gradient(180deg, #0b1120, #070c18);
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

/* ===== HEADINGS ===== */
.enroll-card h2 {
  color: #f9c642;
  font-size: 28px;
  margin-bottom: 8px;
}

.subtitle {
  color: #b8b8b8;
  margin-bottom: 32px;
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

/* ===== INPUTS ===== */
input,
select,
textarea {
  width: 100%;
  background: #050a18;
  border: 1px solid #24304d;
  border-radius: 10px;
  padding: 14px 16px;
  color: #ffffff;
  font-size: 15px;
}

input::placeholder,
textarea::placeholder {
  color: #8c94a6;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Focus */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #f9c642;
}

/* ===== BUTTON ===== */
.submit-btn {
  margin-top: 20px;
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  color: #ffffff;
  background: #2c4f9e;
  transition: 0.3s ease;
}

.submit-btn:hover {
  background: #3b63c4;
}
/* FOOTER BASE – SAME AS PREVIOUS */
.footer {
  background-color: #0f172a;
  color: #e5e7eb;
  padding: 60px 80px 20px;
  font-family: Inter, sans-serif;
}

/* GRID ALIGNMENT */
.footer-inner {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 70px;
  align-items: flex-start;
}

/* HEADINGS */
.footer h3 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 18px;
}

/* TEXT */
.footer p,
.footer li,
.contact-item {
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5f5;
}

/* LINKS */
.footer a {
  color: #cbd5f5;
  text-decoration: none;
}

.footer a:hover {
  color: #ffffff;
}

/* SOCIAL ICONS */
.social-icons {
  margin-top: 18px;
}

.social-icons a {
  color: #e5e7eb;
  font-size: 18px;
  margin-right: 20px;
}

.social-icons a:hover {
  color: #38bdf8;
}

/* NEWSLETTER */
.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-form input {
  flex: 1;
  padding: 11px 12px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
}

.newsletter-form button {
  padding: 11px 16px;
  background: #38bdf8;
  color: #020617;
  border: none;
  border-radius: 6px;
  font-weight: 600;
}

/* ===== FOOTER BOTTOM (ONE LINE) ===== */
.footer-bottom{
    margin-top: 45px;
    padding: 18px 30px;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.footer-bottom{
    display: flex;
    justify-content: center; /* horizontal center */
    align-items: center;     /* vertical center */
    padding: 18px 30px;
    border-top: 1px solid #334155;
}

.copyright{
    text-align: center;
    white-space: nowrap; /* keep in one line */
}


.bottom-links {
  display: flex;
  gap: 18px;
}

.bottom-links a {
  font-size: 13px;
  color: #cbd5f5;
}

.bottom-links a:hover {
  color: #ffffff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 500px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}
.footer-bottom{
    margin-top: 45px;
    padding: 18px 30px;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
/* FOOTER BASE */
.footer {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none;
  padding: 60px 80px 20px;
  color: #e5e7eb;
  font-family: Inter, sans-serif;
}

/* REMOVE ANY OVERLAY */
.footer::before,
.footer::after {
  display: none !important;
  content: none;
}

/* INNER GRID */
.footer-inner {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px;
}

/* TEXT COLOR MAINTAIN */
.footer h3,
.footer p,
.footer a,
.footer span {
  color: #e5e7eb;
}

/* NEWSLETTER INPUT */
.footer input {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}

/* SUBSCRIBE BUTTON */
.footer button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
}

/* BOTTOM COPYRIGHT */
.footer-bottom {
  margin-top: 40px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  background: transparent;
}

@media (max-width: 480px) {
  .footer {
    padding: 40px 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}


/*coach*/
/* ================== COACH SECTION (SCOPED) ================== */

.coach-section {
  padding: 80px 0;
  background: transparent;
}

.coach-wrapper {
  display: flex;
  justify-content: center;
}

/* CARD */
.coach-card {
  width: 320px;
  background: #020617;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,0.6);
}

/* HEADER */
.coach-card-header {
  height: 200px;
  position: relative;
}

.coach-card-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coach-card-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
}

.coach-header-title {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1;
}

/* PROFILE STRIP */
.coach-profile-strip {
  background: linear-gradient(180deg, #1e3a8a, #1e40af);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.coach-avatar {
  width: 48px;
  height: 48px;
  background: #facc15;
  border-radius: 50%;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
}

.coach-profile-info h2 {
  font-size: 18px;
  line-height: 1.2;
}

/* BADGE */
.coach-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #facc15;
  color: #111;
  font-weight: 600;
}

/* CONTENT */
.coach-card-content {
  padding: 16px;
}

.coach-rating {
  font-size: 14px;
  margin-bottom: 10px;
}

.coach-card-content h4 {
  font-size: 14px;
  margin: 10px 0 4px;
}

.coach-card-content p {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.5;
}

/* BUTTON */
.coach-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: transparent;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.coach-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
}


/* Mobile */
@media (max-width: 900px) {
  .rankings-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .stats-container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .stats-card {
    flex: 1 1 45%;
  }
}

@media (max-width: 500px) {
  .stats-card {
    flex: 1 1 100%;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .stats-container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .stats-card {
    flex: 1 1 45%;
  }
}

@media (max-width: 500px) {
  .stats-card {
    flex: 1 1 100%;
  }
}


@media (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
  }
  .board {
    grid-template-columns: repeat(8, 50px);
    grid-template-rows: repeat(8, 50px);
  }
  .square {
    font-size: 28px;
  }
  .panel {
    width: 100%;
    max-width: 400px;
  }
}



@media (max-width:1100px) {
  .features-inner { grid-template-columns: 1fr; }
  .features-right { grid-template-columns: repeat(2,1fr); }
}

@media (max-width:700px) {
  .features-right { grid-template-columns: 1fr; }
}


@media (max-width: 1100px) {
  .program-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .program-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= COACH SECTION RESPONSIVE ================= */

/* Tablets */
@media (max-width: 900px) {
  .coach-section {
    padding: 60px 20px;
  }

  .coach-card {
    width: 300px;
  }

  .coach-card-header {
    height: 180px;
  }

  .coach-profile-strip {
    padding: 12px;
    gap: 10px;
  }

  .coach-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .coach-profile-info h2 {
    font-size: 17px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .coach-wrapper {
    padding: 0 12px;
  }

  .coach-card {
    width: 100%;
    max-width: 340px;
  }

  .coach-card-header {
    height: 160px;
  }

  .coach-card-content {
    padding: 14px;
  }

  .coach-card-content h4 {
    font-size: 13px;
  }

  .coach-card-content p {
    font-size: 12.5px;
  }

  .coach-btn {
    padding: 9px;
    font-size: 14px;
  }
}

/* Small Phones */
@media (max-width: 400px) {
  .coach-card-header {
    height: 140px;
  }

  .coach-profile-info h2 {
    font-size: 16px;
  }

  .coach-badge {
    font-size: 10px;
    padding: 3px 8px;
  }
}
@media (max-width: 992px) {
  .container,
  .news-inner,
  .academy-container,
  .footer-inner {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  p  { font-size: 0.95rem; }
}

@media (max-width: 992px) {
  .nav-links {
    display: none;
  }

  .navbar {
    padding: 14px 20px;
  }

  .brand h2 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .brand p {
    display: none;
  }

  .enroll-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 992px) {
  .hero-content {
    max-width: 100%;
    padding: 40px 20px;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.4rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .stats-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .program-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .program-grid {
    grid-template-columns: 1fr;
  }

  .program-card {
    padding: 20px;
  }
}

@media (max-width: 992px) {
  .container {
    flex-direction: column;
    gap: 24px;
  }

  #board {
    width: 100%;
    max-width: 360px;
  }
}

@media (max-width: 768px) {
  .rankings-panel {
    width: 100%;
  }

  .rank-item {
    grid-template-columns: 40px 1fr auto;
  }
}

@media (max-width: 768px) {
  .coach-card {
    width: 100%;
    max-width: 360px;
  }

  .coach-card-content p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .coach-card-header {
    height: 140px;
  }

  .coach-badge {
    font-size: 10px;
  }
}

@media (max-width: 992px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}
    @media (max-width: 992px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .academy-container {
    flex-direction: column;
  }

  .academy-image img {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  .enroll-card {
    padding: 24px;
  }
}

@media (max-width: 992px) {
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 375px) {

  /* GLOBAL */
  body {
    font-size: 14px;
  }

  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }
  p  { font-size: 0.9rem; }

  /* NAVBAR */
  .navbar {
    padding: 10px 14px;
  }

  .brand h2 {
    font-size: 14px;
  }

  .brand p,
  .nav-links {
    display: none;
  }

  .enroll-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* HERO */
  .hero-content {
    padding: 30px 14px;
  }

  .hero-logo {
    width: 50px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  /* STATS */
  .stats-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* LEARNING PATHS */
  .program-grid {
    grid-template-columns: 1fr;
  }

  .program-card {
    padding: 16px;
  }

  /* DAILY PUZZLE */
  #board {
    width: 100%;
    max-width: 300px;
  }

  .panel {
    padding: 14px;
  }

  /* LEADERBOARD */
  .rank-item {
    grid-template-columns: 36px 1fr auto;
  }

  /* COACH CARD */
  .coach-card {
    width: 100%;
  }

  .coach-card-header {
    height: 130px;
  }

  .coach-card-content p {
    font-size: 12.5px;
  }

  /* TESTIMONIALS */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* NEWS */
  .news-grid {
    grid-template-columns: 1fr;
  }

  /* ACADEMY */
  .academy-container {
    flex-direction: column;
  }

  /* ENROLL FORM */
  .form-row {
    flex-direction: column;
  }

  /* FOOTER */
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .footer-bottom {
    font-size: 12px;
  }
}

@media (max-width: 375px) {

  /* FOOTER BASE */
  .footer {
    padding: 40px 16px 20px;
  }

  .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
  }

  /* BRAND */
  .footer-col.brand {
    align-items: center;
  }

  .footer-col.brand .logo {
    width: 70px;
    margin-bottom: 10px;
  }

  .brand-text {
    font-size: 13px;
    line-height: 1.5;
  }

  /* SOCIAL ICONS */
  .social-icons {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 12px;
  }

  .social-icons a {
    font-size: 16px;
  }

  /* QUICK LINKS */
  .footer-col h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .footer-col ul {
    padding: 0;
  }

  .footer-col ul li {
    margin-bottom: 6px;
  }

  .footer-col ul li a {
    font-size: 14px;
  }

  /* CONTACT */
  .contact-info p {
    font-size: 13px;
    line-height: 1.6;
  }

  /* NEWSLETTER */
  .newsletter {
    width: 100%;
  }

  .newsletter h2 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .newsletter p {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .newsletter .form {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .newsletter input {
    width: 100%;
    padding: 10px;
    font-size: 14px;
  }

  .newsletter button {
    width: 100%;
    padding: 10px;
    font-size: 14px;
  }

  /* FOOTER BOTTOM */
  .footer-bottom {
    margin-top: 24px;
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
  }
}

  /* Brand text smaller */
  .brand h2 {
    font-size: 16px;
  }

  .brand p {
    font-size: 12px;
  }

  /* Hide desktop links */
  .nav-links {
    display: none;
  }

  /* Keep right items aligned */
  .nav-right {
    gap: 10px;
  }

  .enroll-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .dark-toggle {
    font-size: 16px;
  }

  

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer {
  background: radial-gradient(circle at top, #0f172a, #020617);
  color: #cbd5e1;
  padding: 70px 80px 30px;
  font-family: Inter, sans-serif;
}

.footer-inner {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.2fr;
  gap: 60px;
}

.footer h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 18px;
}

.footer-logo {
  width: 90px;
  margin-bottom: 15px;
}

.brand-text {
  line-height: 1.6;
  margin-bottom: 12px;
}

.brand-tagline {
  font-weight: 500;
  color: #e5e7eb;
}

.social-icons {
  margin-top: 20px;
  display: flex;
  gap: 14px;
}

.social-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #020617;
  border: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: #facc15;
  color: #020617;
  transform: translateY(-3px);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #facc15;
}

.contact p {
  margin-bottom: 12px;
}

.contact i {
  color: #facc15;
  margin-right: 8px;
}

.newsletter p {
  margin-bottom: 14px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-form input {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e5e7eb;
}

.newsletter-form button {
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #facc15, #fde047);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.newsletter-form button:hover {
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 60px;
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #94a3b8;
}

/* RESPONSIVE */


/* ===============================
   FIX: TOURNAMENT RANKINGS VISIBILITY
   =============================== */

/* Force dark background so text is visible */
.rankings-panel {
  background: #020617 !important;
  border-radius: 16px;
  padding: 28px;
}

/* Fix each row alignment */
.rank-item {
  display: grid !important;
  grid-template-columns: 56px 1fr 90px;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.06) !important;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
}

/* FIX: PLAYER NAME NOT VISIBLE */
.rankings-panel .player-info .name {
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
}

/* Subtext */
.rankings-panel .player-info .wins {
  color: #cbd5f5 !important;
  font-size: 0.85rem;
}

/* Rating alignment */
.rankings-panel .rating {
  text-align: right;
  font-size: 1.6rem;
  font-weight: 700;
  color: #22d3ee;
}

/* Rank circle visibility */
.rank-circle {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  font-weight: 600;
}

/* Medal colors stay intact */
.rank-circle.gold   { background: linear-gradient(135deg,#facc15,#f59e0b) !important; }
.rank-circle.silver { background: linear-gradient(135deg,#e5e7eb,#9ca3af) !important; }
.rank-circle.bronze { background: linear-gradient(135deg,#fdba74,#ea580c) !important; }

/* Header text fix */
.rankings-panel h1 {
  color: #ffffff !important;
}

/* Live status text */
.rankings-panel .status span {
  color: #a7f3d0 !important;
}

/* ===============================
FIX: ENROLLMENT FORM VISIBILITY
   =============================== */

/* Card background */
.enroll-card {
  background: #020617 !important;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Labels */
.enroll-card label {
  color: #e5e7eb !important;
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

/* Inputs, selects, textarea */
.enroll-card input,
.enroll-card select,
.enroll-card textarea {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: #ffffff !important;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
}

/* Placeholder text */
.enroll-card input::placeholder,
.enroll-card textarea::placeholder {
  color: #9ca3af !important;
}

/* Select dropdown arrow visibility */
.enroll-card select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='white' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
}

/* Focus state */
.enroll-card input:focus,
.enroll-card select:focus,
.enroll-card textarea:focus {
  outline: none;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56,189,248,0.25);
}

/* Submit button */
.submit-btn {
  background: linear-gradient(135deg,#2563eb,#1d4ed8) !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 14px;
  border-radius: 14px;
  border: none;
  margin-top: 10px;
  cursor: pointer;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(37,99,235,0.35);
}

/* ===============================
   FIX: FOOTER TEXT VISIBILITY
   =============================== */

.footer {
  background: #020617 !important; /* deep navy */
  color: #e5e7eb !important;
}

/* Footer columns text */
.footer p,
.footer a,
.footer li,
.footer span {
  color: #cbd5f5 !important;
  opacity: 1 !important;
}

/* Footer headings */
.footer h3 {
  color: #ffffff !important;
  font-weight: 600;
  margin-bottom: 14px;
}

/* Brand text */
.footer .brand-text,
.footer .brand-tagline {
  color: #dbeafe !important;
}

/* Quick links hover */
.footer a:hover {
  color: #facc15 !important;
}

/* Contact icons */
.footer .contact i {
  color: #facc15 !important;
  margin-right: 8px;
}

/* Social icons */
.footer .social-icons a {
  background: rgba(255,255,255,0.08);
  color: #ffffff !important;
}

.footer .social-icons a:hover {
  background: #facc15;
  color: #020617 !important;
}

/* Newsletter input */
.footer .newsletter input {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.15);
  color: #ffffff !important;
}

/* Newsletter placeholder */
.footer .newsletter input::placeholder {
  color: #9ca3af !important;
}

/* Subscribe button */
.footer .newsletter button {
  background: linear-gradient(135deg,#facc15,#f59e0b) !important;
  color: #020617 !important;
  font-weight: 600;
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  color: #9ca3af !important;
  text-align: center;
}
/* Desktop default (no media query) */
/* > 1024px */

/* Tablets & small laptops */
@media (max-width: 1024px) {}

/* Tablets */
@media (max-width: 768px) {}

/* Mobile */
@media (max-width: 480px) {}

/* iPhone SE & very small phones */
@media (max-width: 375px) {}

@media (max-width: 1024px) {
  .navbar {
    padding: 14px 20px;
  }

  .program-grid,
  .learning-grid,
  .testimonials-grid,
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {

  /* Navbar */
  .nav-links {
    display: none;
  }

  /* Hero */
  .hero-buttons {
    flex-direction: column;
  }

  /* Grids → single column */
  .program-grid,
  .learning-grid,
  .testimonials-grid,
  .news-grid,
  .rankings-grid {
    grid-template-columns: 1fr;
  }

  /* Stats */
  .stats-container {
    flex-direction: column;
    align-items: center;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 480px) {

  body {
    font-size: 14px;
  }

  .navbar {
    padding: 12px 14px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .program-card,
  .learning-card,
  .testimonial-card {
    padding: 18px;
  }

  .board {
    grid-template-columns: repeat(8, 42px);
    grid-template-rows: repeat(8, 42px);
  }
}

@media (max-width: 375px) {

  /* Navbar */
  .brand p {
    display: none;
  }

  .brand h2 {
    font-size: 14px;
  }

  .enroll-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Hero */
  .hero {
    padding: 70px 16px 40px;
    text-align: center;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero h2 {
    font-size: 1.1rem;
  }

  /* Cards */
  .program-card,
  .coach-card {
    width: 100%;
    padding: 16px;
  }

  /* Footer */
  .footer {
    padding: 40px 16px 20px;
  }

  .footer-bottom {
    font-size: 12px;
    text-align: center;
  }
}

.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* allow content to wrap */
  padding: 0.5rem;
}

.player-info {
  flex: 1 1 auto; /* allow it to grow and shrink */
  min-width: 0;   /* prevents overflow issues with text */
  margin-left: 0.5rem;
  color: #ffffff; /* make sure text is visible on dark bg */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-info .name {
  color: #ffffff; /* or a light color */
  font-size: 0.9rem;
}

@media (max-width: 400px) {
  .rank-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .rank-circle {
    margin-bottom: 0.25rem;
  }

  .player-info {
    margin-left: 0;
  }

  .rating {
    margin-top: 0.25rem;
  }
}
/* ==========================
   MEDIA QUERIES
========================== */

/* Large desktops / wide screens */
@media (min-width: 1200px) {
  .hero h1 { font-size: 70px; }
  .hero h2 { font-size: 40px; }
  .stats-card { padding: 36px 48px; }
  .btn-yellow, .btn-outline { font-size: 18px; padding: 14px 28px; }
}

/* Standard desktops / laptops */
@media (max-width: 1199px) and (min-width: 980px) {
  .hero h1 { font-size: 60px; }
  .hero h2 { font-size: 35px; }
  .stats-container { gap: 36px; }
  .btn-yellow, .btn-outline { font-size: 17px; padding: 12px 26px; }
}

/* Tablets / small laptops */
@media (max-width: 979px) and (min-width: 641px) {
  .learning-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 48px; }
  .hero h2 { font-size: 28px; }
  .stats-container { flex-direction: column; gap: 28px; }
  .btn-yellow, .btn-outline { font-size: 16px; padding: 12px 22px; }
  .hero-buttons { flex-direction: column; gap: 12px; }
}

/* Large mobiles / small tablets */
@media (max-width: 640px) and (min-width: 481px) {
  .nav-links { display: none; }
  .learning-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .hero h2 { font-size: 24px; }
  .stats-container { flex-direction: column; gap: 24px; }
  .btn-yellow, .btn-outline { font-size: 15px; padding: 10px 20px; }
  .hero-buttons { flex-direction: column; gap: 10px; }
  .hero { padding-top: 100px; padding-bottom: 100px; }
}

/* Standard mobiles / portrait */
@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  .hero h2 { font-size: 20px; }
  .stats-card { padding: 20px 24px; }
  .btn-yellow, .btn-outline { font-size: 14px; padding: 8px 18px; }
  .hero-buttons { flex-direction: column; gap: 8px; }
  .navbar { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 16px; }
  .hero { padding-top: 80px; padding-bottom: 80px; }
}

/* Extra small devices / small mobiles */
@media (max-width: 360px) {
  .hero h1 { font-size: 28px; }
  .hero h2 { font-size: 18px; }
  .stats-card { padding: 16px 18px; }
  .btn-yellow, .btn-outline { font-size: 13px; padding: 6px 14px; }
  .hero-buttons { gap: 6px; }
  .navbar { padding: 10px 12px; }
}

/* Wrap your table in a container */
.fide-ranking-container {
  overflow-x: auto;   /* Enables horizontal scroll on small screens */
  -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

.fide-ranking-table {
  width: 100%;       /* Full width of container */
  min-width: 600px;  /* Minimum width to prevent squeezing names */
  border-collapse: collapse;
}

.fide-ranking-table th,
.fide-ranking-table td {
  padding: 8px 12px;
  text-align: left;
  white-space: nowrap; /* Prevent line breaks in names */
}
@media (max-width: 480px) {
  .fide-ranking-table th,
  .fide-ranking-table td {
    font-size: 12px;   /* Reduce font size */
    padding: 6px 8px;
  }
}
@media (max-width: 360px) {
  .fide-ranking-table,
  .fide-ranking-table thead,
  .fide-ranking-table tbody,
  .fide-ranking-table th,
  .fide-ranking-table td,
  .fide-ranking-table tr {
    display: block;
  }

  .fide-ranking-table tr {
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
  }

  .fide-ranking-table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }

  .fide-ranking-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    width: 45%;
    font-weight: bold;
    text-align: left;
  }

  .fide-ranking-table th {
    display: none;
  }
}

/* ===================== Media Queries ===================== */

/* Extra Small Devices (SE Mobiles: up to 360px) */
@media (max-width: 360px) {
  /* General body adjustments */
  body {
    font-size: 12px;
  }

  /* Hero Section */
  .hero {
    padding: 1rem;
    font-size: 14px;
  }

  .hero h1 {
    font-size: 20px;
  }

  /* Panels */
  .panel {
    padding: 8px;
    margin: 6px 0;
  }

  /* Buttons */
  button,
  .btn {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* FIDE Ranking Table */
  .fide-ranking-container {
    overflow-x: auto;
  }

  .fide-ranking-table th,
  .fide-ranking-table td {
    font-size: 12px;
    padding: 6px 8px;
    white-space: nowrap;
  }

  /* Forms */
  form input,
  form select,
  form textarea {
    font-size: 12px;
    padding: 6px 8px;
  }

  /* Nav Menu */
  nav {
    font-size: 12px;
  }
}

/* Small Devices (Smartphones: 361px - 480px) */
@media (min-width: 361px) and (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .panel {
    padding: 10px;
  }

  button,
  .btn {
    font-size: 13px;
    padding: 7px 12px;
  }

  .fide-ranking-table th,
  .fide-ranking-table td {
    font-size: 13px;
    padding: 7px 10px;
  }

  form input,
  form select,
  form textarea {
    font-size: 13px;
    padding: 7px 10px;
  }
}

/* Medium Devices (Tablets: 481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .panel {
    padding: 12px;
  }

  button,
  .btn {
    font-size: 14px;
    padding: 8px 14px;
  }

  .fide-ranking-table th,
  .fide-ranking-table td {
    font-size: 14px;
    padding: 8px 12px;
  }

  form input,
  form select,
  form textarea {
    font-size: 14px;
    padding: 8px 12px;
  }
}

/* Large Devices (Small Laptops: 769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  body {
    font-size: 15px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .panel {
    padding: 14px;
  }

  button,
  .btn {
    font-size: 15px;
    padding: 9px 16px;
  }

  .fide-ranking-table th,
  .fide-ranking-table td {
    font-size: 15px;
    padding: 9px 14px;
  }

  form input,
  form select,
  form textarea {
    font-size: 15px;
    padding: 9px 14px;
  }
}

/* Extra Large Devices (Desktops: 1025px and above) */
@media (min-width: 1025px) {
  body {
    font-size: 16px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .panel {
    padding: 16px;
  }

  button,
  .btn {
    font-size: 16px;
    padding: 10px 18px;
  }

  .fide-ranking-table th,
  .fide-ranking-table td {
    font-size: 16px;
    padding: 10px 16px;
  }

  form input,
  form select,
  form textarea {
    font-size: 16px;
    padding: 10px 16px;
  }
}

@media (max-width: 360px) {
  .fide-ranking-table,
  .fide-ranking-table thead {
    display: none;  /* hide standard table header */
  }

  .fide-ranking-table tbody tr {
    display: block;
    margin-bottom: 10px;
    border: 1px solid var(--muted);
    border-radius: 8px;
    padding: 8px;
  }

  .fide-ranking-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
    word-break: break-word;
  }

  .fide-ranking-table tbody td::before {
    content: attr(data-label); /* You need to add data-label="Name", "Rank" etc in HTML */
    font-weight: bold;
    margin-right: 6px;
  }
}

/* Small devices: smartphones, SE devices (~320px-360px) */
@media (max-width: 360px) {

  .rankings-list {
    gap: 12px; /* smaller spacing between items */
  }

  .rank-item {
    flex-direction: column;       /* stack content vertically */
    align-items: flex-start;      /* left align content */
    gap: 6px;
    padding: 12px;                /* reduce padding */
  }

  .rank-circle {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin-bottom: 4px;
  }

  .player-info {
    width: 100%;                  /* take full width */
  }

  .name {
    white-space: normal;           /* allow wrapping */
    overflow: visible;             /* show full name */
    font-size: 14px;               /* slightly smaller for small screen */
  }

  .rating {
    font-size: 18px;
    width: 100%;
    text-align: left;             /* align rating left for vertical layout */
    background: none;             /* remove gradient if needed for readability */
  }
}

/* Base styles (Mobile First) */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* Example section styling */
section {
  padding: 60px 20px;
  text-align: center;
}

/* Media Queries */

/* Small devices (phones, 480px and up) */
@media only screen and (min-width: 480px) {
  section {
    padding: 70px 30px;
    font-size: 1.1rem;
  }
}

/* Medium devices (tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  section {
    padding: 80px 40px;
    font-size: 1.2rem;
  }
}

/* Large devices (desktops, 1024px and up) */
@media only screen and (min-width: 1024px) {
  section {
    padding: 100px 60px;
    font-size: 1.3rem;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
  section {
    padding: 120px 80px;
    font-size: 1.4rem;
  }
}

/* Ultra wide screens (1600px and up) */
@media only screen and (min-width: 1600px) {
  section {
    padding: 140px 100px;
    font-size: 1.5rem;
  }
}
/* Base Footer Styles (Static at bottom) */
html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; /* takes remaining space so footer stays at bottom */
}

footer {
  background-color: #050a18; /* dark footer */
  color: #fff;
  text-align: center;
  padding: 40px 20px;
  flex-shrink: 0; /* don't shrink */
}

footer a {
  color: #ffc94d;
  text-decoration: none;
  margin: 0 10px;
  display: inline-block;
}

footer .footer-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

/* Small devices (phones, 480px and up) */
@media only screen and (min-width: 480px) {
  footer {
    padding: 50px 30px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  footer {
    padding: 60px 40px;
  }

  footer .footer-content {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
  }
}

/* Large devices (desktops, 1024px and up) */
@media only screen and (min-width: 1024px) {
  footer {
    padding: 70px 60px;
  }
}

/* Extra large devices (1200px and up) */
@media only screen and (min-width: 1200px) {
  footer {
    padding: 80px 80px;
  }
}
/* Base Chessboard Styles (Mobile First) */
.chessboard {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 90vw;   /* width relative to viewport */
  max-width: 400px; /* max size on small screens */
  aspect-ratio: 1 / 1; /* keep it square */
  margin: 20px auto;
  border: 2px solid #333;
}

.chessboard .cell {
  width: 100%;
  height: 100%;
}

.chessboard .cell:nth-child(even) {
  background-color: #f0d9b5;
}

.chessboard .cell:nth-child(odd) {
  background-color: #b58863;
}

/* Small devices (phones, 480px and up) */
@media only screen and (min-width: 480px) {
  .chessboard {
    width: 350px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  .chessboard {
    width: 450px;
  }
}

/* Large devices (desktops, 1024px and up) */
@media only screen and (min-width: 1024px) {
  .chessboard {
    width: 550px;
  }
}

/* Extra large devices (1200px and up) */
@media only screen and (min-width: 1200px) {
  .chessboard {
    width: 650px;
  }
}

/* Ultra wide screens (1600px and up) */
@media only screen and (min-width: 1600px) {
  .chessboard {
    width: 750px;
  }
}
/* Container for cards */
.card-container {
  display: grid;
  grid-template-columns: 1fr; /* default: 1 per row (mobile first) */
  gap: 20px;
  padding: 20px;
}

/* Individual card */
.card {
  background-color: #050a18;
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  text-align: center;
}

/* Small devices (480px and up) */
@media only screen and (min-width: 480px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
  }
}

/* Medium devices (tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr); /* still 2 per row */
    gap: 25px;
  }
}

/* Large devices (desktops, 1024px and up) */
@media only screen and (min-width: 1024px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .footer-bottom {
    font-size: 13px;
    padding: 12px;
    text-align: center;
  }
}
@media (max-width: 768px) {
  .footer-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 40px 20px;
    text-align: center;
  }

  .footer-col {
    width: 100%;
  }

  .footer-logo {
    margin: 0 auto 12px;
  }

  .social-icons {
    justify-content: center;
  }

  .footer-links {
    padding: 0;
  }

  .footer-links li {
    margin-bottom: 8px;
  }

  .newsletter-form {
    flex-direction: column;
    gap: 10px;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }
}
@media (max-width: 768px) {
  .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;              /* ONE source of spacing */
    padding: 32px 20px;
    text-align: center;
  }

  .footer-col {
    width: 100%;
    margin: 0;              /* kill uneven margins */
  }

  .footer-col h3 {
    margin: 0 0 12px;       /* controlled heading spacing */
  }

  .footer-col p,
  .footer-col li {
    margin: 0 0 8px;        /* uniform text spacing */
  }

  .footer-links {
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .footer-links li:last-child,
  .footer-col p:last-child {
    margin-bottom: 0;       /* no extra tail gap */
  }

  .footer-logo {
    margin: 0 auto 10px;
  }

  .social-icons {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
  }

  .newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
    margin: 0;
  }
}

/* ===============================
   REMOVE RIGHT GAP (MOBILE)
================================ */

/* Global safety */
html, body {
  width: 100%;
  overflow-x: hidden;
}

/* Container fix */
.container {
  max-width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

/* Testimonials grid */
.testimonials-grid {
  width: 100%;
  margin: 0;
}

/* Card must NOT exceed screen width */
@media (max-width: 640px) {
  .testimonial-card {
    min-width: 0;        /* 🔥 THIS removes the gap */
    width: 100%;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}
/* =====================================
   FORCE CONTENT INSIDE TESTIMONIAL CARD
===================================== */

/* 1. Box sizing fix (CRITICAL) */
.testimonial-card,
.testimonial-card * {
  box-sizing: border-box;
}

/* 2. Card width clamp */
.testimonial-card {
  width: 100%;
  max-width: 100%;
  overflow: hidden;      /* keeps content inside */
}

/* 3. Text wrapping fix */
.testimonial-text {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 4. Stat row wrapping on mobile */
.stat-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;       /* 🔥 prevents overflow */
}

/* 5. Badge containment */
.testimonial-badge {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

/* 6. Mobile safety */
@media (max-width: 640px) {
  .testimonial-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .stat-row small {
    font-size: 12px;
  }
}
/* =====================================
   TOURNAMENT RANKINGS – MOBILE FIX
===================================== */

/* Make sure row can wrap */
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

/* Player info must be allowed to grow */
.player-info {
  flex: 1;                 /* 🔥 CRITICAL */
  min-width: 0;            /* allows text to render */
}

/* Ensure name is visible */
.player-info .name {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  white-space: normal;     /* allow wrap */
  word-break: break-word;
}

/* Mobile-specific tightening */
@media (max-width: 640px) {
  .rank-item {
    padding: 12px;
  }

  .rank-circle {
    flex-shrink: 0;        /* medal stays visible */
  }

  .rating {
    font-size: 13px;
    margin-left: 8px;
    flex-shrink: 0;
  }
}
/* =====================================
   FORCE VISIBILITY – TOURNAMENT NAMES
===================================== */

/* Card must grow with content */
.rank-item {
  height: auto !important;
  min-height: unset !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
}

/* Text container MUST be allowed to exist */
.player-info,
.rank-details,
.rank-text {
  flex: 1 !important;
  min-width: 0 !important;
  overflow: visible !important;
}

/* Player name hard-force visible */
.player-name,
.player-info span,
.player-info p,
.rank-name {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  font-size: 14px !important;
  white-space: normal !important;
  word-break: break-word !important;
}

/* Mobile-specific safety */
@media (max-width: 640px) {
  .rank-item {
    padding: 14px !important;
  }

  .rank-circle {
    flex-shrink: 0 !important;
  }
}
/* ===============================
   INCREASE PROGRAM CARD SIZE
================================ */

.program-card {
  max-width: 420px;   /* ⬅️ was probably ~360px */
  padding: 24px;      /* more breathing room */
}

/* Tablet */
@media (min-width: 641px) {
  .program-card {
    max-width: 460px;
    padding: 28px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .program-card {
    max-width: 480px;
  }
}
/* =====================================
   FIX CARD CLIPPING (KEEP SAME SIZE)
===================================== */

/* Parent containers must not clip */
.programs-section,
.programs-container,
.programs-grid {
  overflow: visible !important;
  max-width: 100%;
}

/* Keep card size EXACTLY same, just center it */
.program-card {
  margin-left: auto;
  margin-right: auto;
  transform: translateX(0); /* cancel any offset */
}

/* Prevent viewport math issues */
@media (max-width: 640px) {
  .programs-section {
    padding-left: 16px;
    padding-right: 16px;
  }
}
/* ===============================
   NAVBAR – SCROLL SAFE
================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: #0b1220; /* keep your navbar bg */
}
/* Push content below navbar */
.page-content,
main {
  padding-top: 64px;   /* match navbar height */
}
@media (max-width: 640px) {
  .navbar {
    height: 56px;
  }

  main,
  .page-content {
    padding-top: 56px;
  }
}
/* ================================
   ACADEMY SECTION – BASE STYLES
================================ */
.academy-section {
  padding: 80px 24px;
  background: #0b0f1a;
}

.academy-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* IMAGE */
.academy-image img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
}

/* FEATURES GRID */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-box {
  background: linear-gradient(180deg, #12172a, #0e1324);
  border-radius: 18px;
  padding: 26px 22px;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 14px;
  background: rgba(255, 215, 0, 0.12);
}

.feature-box h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-box p {
  font-size: 14.5px;
  line-height: 1.6;
  opacity: 0.85;
}
/* ======================================
   SMALL DEVICES (iPhone SE / 320px)
====================================== */
@media (max-width: 375px) {

  .academy-section {
    padding: 48px 14px;
  }

  .academy-container {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* IMAGE FIRST */
  .academy-image img {
    border-radius: 14px;
    max-height: 240px;
  }

  /* FEATURES STACKED */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-box {
    padding: 20px 18px;
    border-radius: 16px;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
    border-radius: 12px;
  }

  .feature-box h3 {
    font-size: 16px;
  }

  .feature-box p {
    font-size: 13.5px;
    line-height: 1.55;
  }
}

.news-section {
  background: radial-gradient(circle at top, #0f1629, #070b16);
  padding: 90px 24px;
  color: #fff;
}

.news-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.news-title {
  font-family: 'Playfair Display', serif;
  font-size: 56px;
  font-weight: 700;
  margin-bottom: 16px;
}

.news-sub {
  font-size: 18px;
  max-width: 760px;
  margin: 0 auto 56px;
  opacity: 0.85;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  background: linear-gradient(180deg, #0e152a, #090e1c);
  border-radius: 22px;
  padding: 30px;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.news-badge {
  display: inline-block;
  background: #ffcc3d;
  color: #111;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 18px;
}

.news-meta {
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: 18px;
}

.news-head {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  line-height: 1.25;
  margin-bottom: 16px;
}

.news-excerpt {
  font-size: 15.5px;
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 18px;
}

.news-read {
  color: #ffcc3d;
  font-weight: 500;
  text-decoration: none;
}

/* =====================================
   iPHONE SE / SMALL DEVICES
===================================== */
@media (max-width: 375px) {

  .news-section {
    padding: 56px 14px;
  }

  .news-title {
    font-size: 34px;
    line-height: 1.15;
  }

  .news-sub {
    font-size: 14.5px;
    margin-bottom: 36px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .news-card {
    padding: 22px 20px;
    border-radius: 18px;
  }

  .news-badge {
    font-size: 12.5px;
    padding: 6px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
  }

  .news-meta {
    font-size: 12.5px;
    margin-bottom: 14px;
  }

  .news-head {
    font-size: 20px;
    line-height: 1.25;
    margin-bottom: 12px;
  }

  .news-excerpt {
    font-size: 13.8px;
    line-height: 1.55;
    margin-bottom: 14px;
  }

  .news-read {
    font-size: 14px;
  }
}

/* ==============================
   LEARNING PATHS – BASE
============================== */

.learning-section {
  background: linear-gradient(180deg, #0b1020, #070b16);
  padding: 100px 24px;
  color: #fff;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 52px;
  text-align: center;
  margin-bottom: 14px;
}

.section-subtitle {
  max-width: 820px;
  margin: 0 auto 70px;
  text-align: center;
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.85;
}

/* GRID */
.program-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

/* CARD */
.program-card {
  background: radial-gradient(circle at top, #0f172d, #080c19);
  border-radius: 22px;
  padding: 34px 28px;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

/* ICON */
.icon-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #b4892f;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
}

/* TITLE */
.program-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  margin-bottom: 8px;
}

/* AGE */
.program-card .age {
  font-size: 14.5px;
  opacity: 0.7;
  margin-bottom: 14px;
}

/* DESCRIPTION */
.program-card .desc {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 20px;
}

/* BADGES */
.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  background: #ffcc3d;
  color: #111;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 10px;
  font-weight: 600;
}

.badge.outline {
  background: transparent;
  color: #ffcc3d;
  border: 1px solid rgba(255,204,61,0.4);
}

/* =====================================
   iPHONE SE / SMALL DEVICES (320px)
===================================== */
@media (max-width: 375px) {

  .learning-section {
    padding: 60px 14px;
  }

  .section-title {
    font-size: 34px;
    line-height: 1.15;
  }

  .section-subtitle {
    font-size: 14.5px;
    margin-bottom: 44px;
  }

  /* STACK CARDS */
  .program-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .program-card {
    padding: 26px 22px;
    border-radius: 18px;
  }

  .icon-circle {
    width: 54px;
    height: 54px;
    margin-bottom: 18px;
  }

  .program-card h3 {
    font-size: 22px;
    line-height: 1.2;
  }

  .program-card .age {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .program-card .desc {
    font-size: 13.8px;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  .badge {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 9px;
  }
}

/* =====================================
   iPHONE SE – FORCE FULL CHESS BOARD
===================================== */
@media (max-width: 375px) {

  /* RESET ANY WIDTH CONSTRAINTS */
  .puzzle-layout,
  .chess-board-wrapper,
  .chess-board {
    max-width: none !important;
  }

  /* CENTER STACK */
  .puzzle-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* CHESS BOARD WRAPPER = VIEWPORT BASED */
  .chess-board-wrapper {
    width: calc(100vw - 24px); /* FULL WIDTH */
    max-width: 320px;
    aspect-ratio: 1 / 1;
    padding: 0;
    margin: 0 auto;
  }

  /* ACTUAL BOARD */
  .chess-board {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
  }

  /* ENSURE BOARD CONTENT FILLS */
  .chess-board img,
  .chess-board canvas,
  .chess-board svg {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
  }
}
/*board*/
/* ===============================
   CHESS BOARD — RESPONSIVE & SAFE
================================ */

#board {
  width: min(92vw, 360px);
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  margin: 0 auto;
  border: 3px solid #f5c542;
  border-radius: 12px;
  overflow: hidden;
}

/* Individual squares */
.square {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 6vw, 36px);
  cursor: pointer;
  user-select: none;
}

/* Board colors */
.square.light {
  background: #f0d9b5;
}

.square.dark {
  background: #b58863;
}

/* Selected square */
.square.selected {
  outline: 3px solid #ff9800;
  outline-offset: -3px;
}


.square {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 5vw, 34px);
  user-select: none;
}

.square.light {
  background-color: #f0d9b5;
}

.square.dark {
  background-color: #b58863;
}

.white-piece {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.black-piece {
  color: #111111;
}
@media (max-width: 375px) {
  #board {
    width: 96vw;
  }
}

.profile-card {
  background: #0b1220;
  border-radius: 18px;
  overflow: hidden;
  max-width: 380px;
  margin: auto;
  color: #fff;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.profile-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.profile-header {
  background: #1e3a8a;
  padding: 16px;
  text-align: center;
}

.profile-header h2 {
  margin: 0;
  font-size: 22px;
}

.profile-role {
  display: inline-block;
  margin-top: 6px;
  background: #facc15;
  color: #000;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.profile-rating {
  text-align: center;
  padding: 14px;
  font-size: 18px;
  color: #facc15;
}

.profile-desc {
  padding: 0 18px;
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5f5;
}

.profile-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  justify-content: center;
}

.profile-achievements span {
  background: rgba(255,255,255,0.08);
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

/* Responsive */
@media (max-width: 1024px) {
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

body {
  background: #0b0f1a;
  font-family: 'Inter', sans-serif;
}

/* GRID */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: auto;
  padding: 40px 20px;
}

/* CARD */
.profile-card {
  background: linear-gradient(180deg, #0f1b3d, #070b18);
  border-radius: 18px;
  overflow: hidden;
  text-align: center;
  color: #fff;
  transition: transform 0.3s ease;
}

.profile-card:hover {
  transform: translateY(-6px);
}

/* IMAGE */
.profile-image img {
  width: 100%;
  height: 200px;   /* reduced size */
  object-fit: cover;
}

/* HEADER */
.profile-header {
  background: #1e3a8a;
  padding: 14px 12px;
}

.profile-header h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.profile-role {
  background: #facc15;
  color: #000;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  display: inline-block;
}

/* RATING */
.profile-rating {
  margin: 14px 0 6px;
  font-weight: 600;
  font-size: 15px;
  color: #facc15;
}

/* DESCRIPTION */
.profile-desc {
  font-size: 14px;
  line-height: 1.5;
  padding: 0 16px 18px;
  color: #d1d5db;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1320px;   /* INCREASED */
  margin: auto;
  padding: 50px 24px;
}

.profile-card {
  background: linear-gradient(180deg, #0f1b3d, #070b18);
  border-radius: 22px;
  overflow: hidden;
  text-align: center;
  color: #fff;
  transition: transform 0.3s ease;
  min-height: 520px;   /* ADDED */
}
.profile-image img {
  width: 100%;
  height: 260px;   /* INCREASED */
  object-fit: cover;
}
.profile-header {
  background: #1e3a8a;
  padding: 18px 16px;
}

.profile-header h2 {
  font-size: 24px;    /* INCREASED */
  margin-bottom: 8px;
}

.profile-role {
  background: #facc15;
  color: #000;
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
}
.profile-rating {
  margin: 18px 0 10px;
  font-weight: 700;
  font-size: 17px;
  color: #facc15;
}
.profile-desc {
  font-size: 15px;
  line-height: 1.65;
  padding: 0 20px 24px;
  color: #e5e7eb;
}
.profile-card:hover {
  transform: translateY(-10px) scale(1.02);
}
@media (max-width: 1024px) {
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   iOS DEVICES (iPhone & iPad)
   ========================= */
@supports (-webkit-touch-callout: none) {

  /* -------- GENERAL FIXES -------- */
  body {
    overflow-x: hidden;
  }

  section {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* =========================
     LEARNING PATHS
     ========================= */
  .program-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .program-card {
    width: 100%;
    padding: 20px;
  }

  .program-card h3 {
    font-size: 1.2rem;
    text-align: center;
  }

  .program-card .desc {
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
  }

  .program-btn {
    width: 100%;
  }

  /* =========================
     ABOUT SECTION
     ========================= */
  .academy-container {
    flex-direction: column;
    gap: 24px;
  }

  .academy-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
  }

  .academy-content {
    padding: 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-box {
    text-align: center;
    padding: 18px;
  }

  .feature-box h3 {
    font-size: 1.1rem;
  }

  .feature-box p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* =========================
     LATEST NEWS & UPDATES
     ========================= */
  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-card {
    padding: 20px;
  }

  .news-head {
    font-size: 1.1rem;
    line-height: 1.4;
  }

  .news-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .news-read {
    display: inline-block;
    margin-top: 10px;
  }
}

@media screen and (max-width: 480px) {

  .section-title {
    font-size: 1.5rem;
    text-align: center;
  }

  .section-subtitle {
    font-size: 0.95rem;
    text-align: center;
  }

  .news-title {
    font-size: 1.6rem;
    text-align: center;
  }

}

/* ==================================================
   iPHONE SE MASTER FIX (320px–375px)
   Fixes ALL sections: navbar, cards, grids, news,
   leaderboard, learning paths, about, stats, footer
   ================================================== */
@media screen and (max-width: 375px) {

  /* ---------- GLOBAL RESET ---------- */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html, body {
    width: 100%;
    overflow-x: hidden !important;
  }

  section,
  .container,
  .news-inner,
  .academy-container,
  .learning-section {
    width: 100%;
    max-width: 100%;
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: hidden;
  }

  /* ---------- NAVBAR ---------- */
  .navbar {
    padding: 10px 12px;
  }

  .nav-links {
    display: none; /* prevent overflow on SE */
  }

  .brand h2 {
    font-size: 0.95rem;
  }

  .enroll-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  /* ---------- HERO ---------- */
  .hero h1 {
    font-size: 1.6rem;
    text-align: center;
  }

  .hero p {
    font-size: 0.95rem;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  /* ---------- STATS ---------- */
  .stats-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* ---------- LEARNING PATHS ---------- */
  .program-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    width: 100%;
    gap: 16px;
  }

  .program-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    padding: 16px;
    margin: 0 auto;
  }

  .program-card h3,
  .program-card .age,
  .program-card .desc {
    text-align: center;
  }

  .badges {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .program-btn {
    width: 100%;
  }

  /* ---------- DAILY PUZZLE ---------- */
  #board {
    width: 100% !important;
    max-width: 100%;
    height: auto;
  }

  .panel {
    width: 100%;
    margin-top: 16px;
  }

  /* ---------- LEADERBOARD ---------- */
  .rankings-panel {
    width: 100%;
    overflow-x: hidden;
  }

  .rank-item {
    flex-wrap: wrap;
    gap: 6px;
  }

  .player-info .name {
    font-size: 0.85rem;
    word-break: break-word;
  }

  .rating {
    font-size: 0.85rem;
  }

  /* ---------- ABOUT SECTION ---------- */
  .academy-container {
    flex-direction: column;
    gap: 20px;
  }

  .academy-image img {
    width: 100%;
    height: auto;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-box {
    padding: 14px;
    text-align: center;
  }

  /* ---------- SUCCESS STORIES ---------- */
  .profile-card {
    width: 100%;
    padding: 16px;
  }

  .profile-image img {
    width: 100%;
    height: auto;
  }

  /* ---------- LATEST NEWS ---------- */
  .news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .news-card {
    width: 100%;
    padding: 16px;
  }

  .news-head {
    font-size: 1rem;
  }

  /* ---------- FORM ---------- */
  .enroll-card {
    width: 100%;
    padding: 16px;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  input,
  select,
  textarea {
    width: 100%;
  }

  /* ---------- FOOTER ---------- */
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .footer-col {
    align-items: center;
  }
}

/* ======================================
   LATEST NEWS & UPDATES – SMALL DEVICES
   (iPhone SE, ≤375px)
   ====================================== */
@media screen and (max-width: 375px) {

  /* section wrapper */
  .news-section {
    padding: 24px 12px;
    overflow-x: hidden;
  }

  .news-inner {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  /* grid fix */
  .news-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* card fix */
  .news-card {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border-radius: 16px;
    box-sizing: border-box;
  }

  /* text scaling */
  .news-title {
    font-size: 1.5rem;
    text-align: center;
  }

  .news-sub {
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.5;
  }

  .news-head {
    font-size: 1rem;
    line-height: 1.4;
  }

  .news-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .news-meta {
    font-size: 0.75rem;
  }

  .news-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .news-read {
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 8px;
  }
}
/* =========================================
   LATEST NEWS – iPhone SE (ONE CARD ONLY)
   ========================================= */
@media (max-width: 375px) {

  /* Kill horizontal page scroll */
  html, body {
    overflow-x: hidden;
  }

  /* Let title stay padded */
  .news-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Break grid OUT of container */
  .news-grid {
    margin-left: -16px;
    margin-right: -16px;

    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  /* EXACTLY one card per screen */
  .news-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    scroll-snap-align: start;

    margin: 0 16px;
    box-sizing: border-box;
  }

  /* Hide scrollbar (iOS) */
  .news-grid::-webkit-scrollbar {
    display: none;
  }
}
/* =====================================
   SUCCESS STORIES – iPhone SE CARD VIEW
   ===================================== */
@media (max-width: 375px) {

  html, body {
    overflow-x: hidden;
  }

  /* container alignment */
  .learning-section .container {
    padding: 0 14px;
  }

  /* ONE card per screen */
  .profile-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 24px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, #0a1228, #020617);
  }

  /* IMAGE ON TOP */
  .profile-image {
    width: 100%;
    height: 260px;
    overflow: hidden;
  }

  .profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* NAME STRIP */
  .profile-header {
    background: #1e3a8a;
    text-align: center;
    padding: 14px 10px;
  }

  .profile-header h2 {
    font-size: 22px;
    margin: 0;
    color: #fff;
  }

  /* YELLOW BADGE */
  .profile-role {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background: #facc15;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    border-radius: 999px;
  }

  /* RATING */
  .profile-rating {
    text-align: center;
    margin: 16px 0;
    font-size: 18px;
    color: #facc15;
  }

  /* DESCRIPTION */
  .profile-desc {
    font-size: 15px;
    line-height: 1.6;
    padding: 0 18px;
    text-align: center;
    color: #e5e7eb;
  }

  /* ACHIEVEMENTS */
  .profile-achievements {
    margin: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #cbd5f5;
    text-align: center;
  }
}
/* =====================================
   NEWS – Swipeable Cards (iPhone SE)
===================================== */
@media (max-width: 420px) {

  .news-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }

  /* Hide scrollbar (iOS + Chrome) */
  .news-grid::-webkit-scrollbar {
    display: none;
  }

  .news-grid {
    scrollbar-width: none;
  }

  .news-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    padding: 24px;
    border-radius: 16px;
  }

  .news-head {
    font-size: 20px;
  }

  .news-excerpt {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* =====================================
   LEARNING PATH – Swipeable (iPhone SE)
===================================== */
@media (max-width: 420px) {

  .learning-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }

  /* Hide scrollbar */
  .learning-grid::-webkit-scrollbar {
    display: none;
  }

  .learning-grid {
    scrollbar-width: none;
  }

  .learning-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    border-radius: 16px;
    padding: 24px;
  }

  .learning-card h3 {
    font-size: 20px;
  }

  .learning-card p {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* ==================================================
   LEARNING PATHS – SWIPE (iPhone SE & Small Phones)
   Section: .program-grid / .program-card
================================================== */
@media (max-width: 430px) {

  /* Kill grid completely */
  .program-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;

    overflow-x: auto !important;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    gap: 16px;
    padding: 12px 0 20px;
  }

  /* Hide scrollbar */
  .program-grid::-webkit-scrollbar {
    display: none;
  }
  .program-grid {
    scrollbar-width: none;
  }

  /* ONE CARD PER SCREEN */
  .program-card {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;

    scroll-snap-align: center;

    box-sizing: border-box;
    border-radius: 16px;
  }
}

/* =========================================
   ABOUT SECTION – One Card Per Row (Mobile)
========================================= */
@media (max-width: 430px) {

  .academy-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  /* Image full width */
  .academy-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
  }

  /* Stack feature cards vertically */
  .features-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px;
  }

  /* Each card = full width */
  .feature-box {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    border-radius: 16px;
  }

  .feature-box h3 {
    font-size: 18px;
  }

  .feature-box p {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* =========================================
   DAILY PUZZLE – Fully Visible (Mobile)
========================================= */
@media (max-width: 430px) {

  /* Stop horizontal cut */
  html, body {
    overflow-x: hidden;
  }

  #learning-section .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 20px;
    padding: 0 12px;
  }

  /* Chessboard full width */
  #board {
    width: 100% !important;
    max-width: 340px;
    aspect-ratio: 1 / 1;
  }

  /* Chessboard squares */
  .board {
    width: 100% !important;
  }

  /* Right panel becomes bottom panel */
  .panel {
    width: 100% !important;
    max-width: 100%;
    padding: 16px;
    box-sizing: border-box;
  }

  .panel h2 {
    font-size: 18px;
  }

  .panel .desc {
    font-size: 14px;
    line-height: 1.6;
  }

  .panel button {
    width: 100%;
    margin-top: 8px;
  }
}

/* Small phones (iPhone SE) */
@media (max-width: 375px) {}

/* Regular phones */
@media (max-width: 430px) {}

/* Large phones / small tablets */
@media (max-width: 768px) {}

select {
  background-color: #0f172a;   /* dark bg */
  color: #ffffff;
  border: 2px solid #38bdf8;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
}

/* IMPORTANT: dropdown options */
select option {
  background-color: #ffffff;   /* white dropdown */
  color: #000000;              /* black text */
  font-size: 15px;
}

/* ===== THEMED SELECT ===== */
select {
  width: 100%;
  background: linear-gradient(180deg, #0b1224, #0a1020);
  color: #e5e7eb;
  border: 2px solid #1e3a8a;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
}

/* Focus state */
select:focus {
  border-color: #facc15; /* gold */
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

/* Dropdown options */
select option {
  background-color: #0b1224; /* dark navy */
  color: #e5e7eb;
  padding: 10px;
}

/* Placeholder option */
select option[value=""] {
  color: #9ca3af;
}

@media (max-width: 430px) {
  select {
    font-size: 16px;
    border-radius: 12px;
  }
}

/* ASUS Zenbook Fold / Foldable large screens */
@media (min-width: 1700px) and (max-width: 2000px) {

  @media (min-width: 1700px) and (max-width: 2000px) {
  .container,
  .section {
    max-width: 1400px;
    margin: 0 auto;
  }
}

@media (min-width: 1700px) and (max-width: 2000px) {
  .program-grid,
  .news-grid,
  .about-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}
@media (min-width: 1700px) and (max-width: 2000px) {
  input,
  select,
  textarea {
    max-width: 720px;
    font-size: 16px;
  }
}

@media (min-width: 1700px) and (max-width: 2000px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }
  p  { font-size: 1.05rem; }
}

@media (min-width: 1700px) and (max-width: 2000px) {
  .navbar {
    padding: 18px 40px;
  }
}

@media (min-width: 1700px) and (max-width: 2000px) {
  .program-grid,
  .news-grid,
  .about-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}
}
@media (max-width: 360px) {

  /* Navbar */
  .navbar {
    flex-direction: column;
    padding: 10px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .nav-links li a {
    font-size: 13px;
  }

  /* Hero */
  .hero h1 {
    font-size: 22px;
  }

  .hero h2 {
    font-size: 14px;
  }

  .hero p {
    font-size: 13px;
  }

  /* Learning Cards */
  .program-grid {
    grid-template-columns: 1fr;
  }

  .program-card {
    padding: 16px;
  }

  /* Rankings */
  .rank-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .player-info .name {
    font-size: 13px;
  }

  /* Chess Board */
  #board {
    width: 100%;
    max-width: 280px;
    margin: auto;
  }
}

@media (max-width: 480px) {

  /* Navbar */
  .navbar {
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Hero */
  .hero-content {
    padding: 20px;
    text-align: center;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero h2 {
    font-size: 16px;
  }

  /* Stats */
  .stats-container {
    flex-direction: column;
    gap: 15px;
  }

  /* Learning Paths */
  .program-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Puzzle Section */
  .container {
    flex-direction: column;
  }

  .panel {
    width: 100%;
  }

  /* Leaderboard names visibility fix */
  .player-info .name {
    font-size: 14px;
    white-space: normal;
  }

  /* Testimonials */
  .profile-card {
    margin-bottom: 20px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }
}

@media (max-width: 768px) {

  /* Navbar */
  .nav-links {
    gap: 15px;
  }

  /* Learning cards */
  .program-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Rankings panel */
  .rankings-panel {
    width: 100%;
  }

  /* Coach card */
  .coach-wrapper {
    flex-direction: column;
    align-items: center;
  }

  /* About section */
  .academy-container {
    flex-direction: column;
  }

  .academy-image img {
    width: 100%;
    height: auto;
  }
}

@media (max-height: 450px) and (orientation: landscape) {

  .hero {
    min-height: auto;
    padding: 40px 20px;
  }

  .stats-container {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-links {
    flex-wrap: wrap;
  }
}

.container {
  height: auto;
  align-items: flex-start;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
}

#board {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
}

#board {
  height: auto !important;
}

/* Wrapper controls border & rounding */
.board-wrapper {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border: 3px solid #f4c430;
  border-radius: 16px;
  overflow: hidden;   /* 🔥 KEY FIX */
  background: #000;
}

/* Board itself — no height tricks */
#board {
  width: 100% !important;
  height: 100% !important;
}

/* Prevent chessboard-js row overflow */
.chessboard,
.board-b72b1 {
  height: 100% !important;
}

@media (max-width: 480px) {
  .board-wrapper {
    max-width: 300px;
  }
}

/* ==== CHESSBOARD FIX ==== */

/* Wrapper controls everything visual */
.board-wrapper {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  margin: auto;

  border: 3px solid #f4c430;
  border-radius: 16px;
  overflow: hidden;        /* 🔥 removes extra line */
  background: #000;

  display: flex;
}

/* Board must fully fill wrapper */
#board {
  width: 100% !important;
  height: 100% !important;
}

/* chessboard.js internals */
.board-b72b1,
.chessboard {
  width: 100% !important;
  height: 100% !important;
}

/* Force each rank to be exact */
.board-b72b1 .row-5277c {
  height: 12.5% !important;
}

/* Safety for Android rounding bug */
.board-b72b1 > div:last-child {
  display: none !important;
}

/* Mobile fine-tuning */
@media (max-width: 480px) {
  .board-wrapper {
    max-width: 300px;
  }
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {

  .hero,
  .stats-section {
    min-height: auto !important;
    padding: 60px 16px !important;
    text-align: center;
    background-size: cover;
    background-position: center;
  }

  .stats-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .stats-container h1,
  .stats-container h2 {
    font-size: 1.8rem !important;
  }

  .stats-container .number {
    font-size: 2.4rem !important;
  }
}

@media (max-width: 768px) {

  section {
    min-height: auto !important;
    height: auto !important;
  }

  .overlay,
  .bg-overlay {
    position: absolute;
    inset: 0;
    height: 100%;
  }
}

@media (max-width: 768px) {

  .daily-puzzle,
  .puzzle-section {
    padding: 50px 16px;
    margin: 0;
    text-align: center;
  }

  .daily-puzzle h2 {
    font-size: 1.6rem;
  }

  .daily-puzzle p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

:root {
  --vh: 1vh;
}

.hero,
.full-height {
  min-height: calc(var(--vh, 1vh) * 100);
}

html, body {
  width: 100%;
  overflow-x: hidden;
  height: auto !important;
}

section,
.hero,
.bg-kids,
.stats-section,
.learning-section,
.news-section,
.academy-section,
.coach-section {
  height: auto !important;
  min-height: auto !important;
}

.bg-kids {
  padding-bottom: 48px;
  display: block;
}

section {
  display: block;
  padding: 64px 0;
}

.container,
.stats-container,
.news-inner,
.academy-container,
.coach-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

#learning-section .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.board {
  width: 320px;
  max-width: 90vw;
  aspect-ratio: 1 / 1;
  height: auto;
}

@media screen and (max-width: 768px) {
  section {
    padding: 48px 0;
  }

  h1, h2 {
    text-align: center;
  }

  p {
    text-align: center;
  }
}

@supports (height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}

html, body {
  height: auto !important;
  overflow-x: hidden;
}

section,
.hero,
.bg-kids,
.stats-section,
.learning-section,
.news-section,
.academy-section,
.coach-section,
.enroll-section,
.footer {
  height: auto !important;
  min-height: auto !important;
}

.bg-kids {
  display: block !important;
  padding-bottom: 56px;
}

section {
  display: block;
  padding: 64px 0;
}

.container,
.stats-container,
.news-inner,
.academy-container,
.coach-wrapper,
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.board {
  width: 320px;
  max-width: 90vw;
  aspect-ratio: 1 / 1;
  height: auto !important;
  overflow: hidden;
}

@media screen and (max-width: 430px) {
  section {
    padding: 48px 0;
  }

  h1, h2 {
    text-align: center;
  }

  p {
    text-align: center;
  }

  .nav-links {
    flex-direction: column;
  }
}

@media screen and (max-width: 768px) {
  * {
    max-width: 100%;
  }
}


.puzzle-wrapper {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  justify-content: center;
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

.chessboard-container {
  flex: 0 0 auto;
}

#chessboard {
  width: 360px;
  height: 360px;
}

.puzzle-info {
  flex: 1;
  max-width: 420px;
}

@media (max-width: 768px) {

  .puzzle-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  #chessboard {
    width: 90vw;
    max-width: 360px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .puzzle-info {
    width: 100%;
    max-width: 420px;
    text-align: center;
  }
}

/* ===============================
   PUZZLE LAYOUT
   =============================== */

.puzzle-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 32px;
  max-width: 1100px;
  margin: auto;
}

/* Chess board already fixed earlier */
#board {
  flex-shrink: 0;
}

/* Right panel */
.puzzle-panel {
  width: 380px;
  max-width: 100%;
  padding-top: 10px;
}

@media (max-width: 900px) {
  .puzzle-layout {
    flex-direction: column;
    align-items: center;
  }

  .puzzle-panel {
    width: 100%;
    max-width: 480px;
    text-align: center;
  }
}

.square.correct {
  background: #7fff7f !important;
}

.square.wrong {
  background: #ff6b6b !important;
}

.square.selected {
  outline: 3px solid gold;
}

#result {
  margin-top: 10px;
  font-weight: bold;
}

#result.solved {
  color: #2ecc71;
}

#result.wrong {
  color: #e74c3c;
}

.square {
  font-size: 2.2rem;
  font-weight: 600;
}

/* White pieces */
.white-piece {
  color: #ffffff;          /* pure white */
  text-shadow: 0 0 2px #000; /* outline so it’s visible */
}

/* Black pieces */
.black-piece {
  color: #000000;          /* pure black */
  text-shadow: 0 0 2px #fff; /* outline so it’s visible */
}

.puzzle-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

/* Chessboard */
.chessboard {
    width: 420px;
}

/* Right panel */
.puzzle-panel {
    width: 320px;
    background: #050b1a;
    padding: 24px;
    border-radius: 14px;
    color: #fff;
}

/* Buttons */
.puzzle-panel .btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #2a2f45;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.puzzle-panel .btn:hover {
    background: #0b122a;
}

/* Wrong move text */
.wrong {
    margin-top: 16px;
    color: #ff4d4d;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 768px) {
    .puzzle-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .puzzle-panel {
        width: 100%;
        max-width: 420px;
    }
}

.hero-content {
    transform: translateY(-80px); /* adjust value as needed */
}

.ranking-card {
    height: auto;       /* ✅ allow content */
    min-height: 140px;  /* optional */
    overflow: visible;  /* ✅ show rating */
}

@media (max-width: 480px) {
    .ranking-card {
        padding: 16px;
    }

    .rating {
        font-size: 13px;
    }
}

.ranking-card {
    justify-content: flex-start;
    padding-top: 20px;
}

.square.correct {
  background: rgba(0,200,0,0.6) !important;
  box-shadow: inset 0 0 12px rgba(0,255,0,0.9);
}

.square.wrong {
  background: rgba(220,0,0,0.6) !important;
  box-shadow: inset 0 0 12px rgba(255,0,0,0.9);
}

.square.selected {
  outline: 3px solid #ffcc00;
}

.result.solved {
  color: #00c853;
  font-weight: bold;
}

.result.wrong {
  color: #ff1744;
  font-weight: bold;
}

/* ===== FIXED / STATIC NAVBAR ===== */
.navbar {
  position: fixed;      /* stays on screen */
  top: 0;
  left: 0;
  width:100%;
  z-index: 9999;        /* stays above all content */
  
  background: var(bg); /* or your theme color */
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.hero {
  padding-top: 50px;   /* pushes everything below navbar */
}

.hero-logo {
  margin-top: 110px;     /* fine-tunes logo position */
}
.hero-logo1 {
  margin-top: 110px; 
  width: 240px;
      /* fine-tunes logo position */
}
/* liches chess board*/
/* Layout */
.puzzle-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Puzzle Card */
.puzzle-card {
  background: #000;
  padding: 14px;
  border-radius: 16px;
  width: 420px;
  box-shadow: 0 20px 40px rgba(0,0,0,.7);
}

.puzzle-title {
  text-align: center;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

/* Iframe wrapper */
.frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 11;
  border-radius: 12px;
  overflow: hidden;
}

.frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer click blocker (keeps board interactive) */
.footer-shield {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  pointer-events: auto;
  background: transparent;
}

/* Right panel tweaks */
.panel {
  max-width: 360px;
}

.note {
  font-size: 14px;
  opacity: 0.85;
  margin: 16px 0;
}

/* Mobile responsiveness */
@media (max-width: 900px) {
  .puzzle-layout {
    flex-direction: column;
    align-items: center;
  }
}
/* NAVBAR CONTAINER */

