/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  background: #000000;
  color: #1e293b;
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  color: white;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.3rem;
}
.subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

/* Quick Nav Pills */
.quick-nav {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.nav-pill {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,0.3);
  transition: all 0.25s;
}
.nav-pill:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-2px);
}

/* ===== Sections ===== */
.section {
  padding: 3rem 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-alt { background: #f8faff; }
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}
.section-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.3rem;
}
.section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #4338ca;
}
.section-desc {
  color: #64748b;
  font-size: 1.05rem;
  margin-top: 0.3rem;
}

/* ===== Cards Grid ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.3rem;
}

/* ===== Formula Card ===== */
.formula-card {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border-left: 5px solid;
  transition: transform 0.2s, box-shadow 0.2s;
}
.formula-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}

.card-badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.formula-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  padding-right: 70px;
}

.formula-display {
  text-align: center;
  padding: 0.7rem 0;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 0.6rem;
  overflow-x: auto;
}

.example {
  background: #faf5ff;
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
.example-label {
  font-weight: 700;
  color: #7c3aed;
}
.example-text { margin-left: 0.3rem; }

.tip {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #6366f1;
  font-weight: 600;
}

/* Color accents */
.accent-blue   { border-left-color: #3b82f6; }
.accent-purple { border-left-color: #9333ea; }
.accent-green  { border-left-color: #16a34a; }
.accent-orange { border-left-color: #f97316; }
.accent-red    { border-left-color: #dc2626; }
.accent-teal   { border-left-color: #14b8a6; }

.accent-blue   .card-badge { background: #dbeafe; color: #2563eb; }
.accent-purple .card-badge { background: #f3e8ff; color: #7c3aed; }
.accent-green  .card-badge { background: #dcfce7; color: #16a34a; }
.accent-orange .card-badge { background: #fff7ed; color: #ea580c; }
.accent-red    .card-badge { background: #fef2f2; color: #dc2626; }
.accent-teal   .card-badge { background: #ccfbf1; color: #0d9488; }

/* Geo cards */
.geo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.geo-card h3 { padding-right: 0; }
.geo-shape {
  margin-bottom: 0.5rem;
  animation: gentlePulse 4s ease-in-out infinite;
}
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ===== Practice / Quiz ===== */
.practice-container {
  max-width: 700px;
  margin: 0 auto;
}
.practice-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 0.5rem 1.3rem;
  border: 2px solid #c7d2fe;
  border-radius: 999px;
  background: white;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: #4338ca;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn:hover { border-color: #6366f1; }
.tab-btn.active {
  background: #6366f1;
  color: white;
  border-color: #6366f1;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.quiz-box {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  text-align: center;
}
.quiz-question {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  min-height: 2.5rem;
}
.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.quiz-option {
  padding: 0.7rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.quiz-option:hover:not(:disabled) {
  border-color: #6366f1;
  background: #eef2ff;
}
.quiz-option.correct {
  border-color: #16a34a;
  background: #dcfce7;
  color: #15803d;
}
.quiz-option.wrong {
  border-color: #dc2626;
  background: #fef2f2;
  color: #dc2626;
}
.quiz-option:disabled { cursor: default; opacity: 0.85; }

.quiz-feedback {
  min-height: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  font-size: 1rem;
}
.quiz-feedback.correct { color: #16a34a; }
.quiz-feedback.wrong { color: #dc2626; }

.btn-next {
  padding: 0.6rem 2rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}

.score-bar {
  margin-top: 1rem;
  text-align: center;
  font-size: 1rem;
  color: #475569;
  font-weight: 600;
}
.score-bar strong { color: #16a34a; font-size: 1.2rem; }

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #94a3b8;
  font-size: 0.95rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 2rem;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .quiz-options {
    grid-template-columns: 1fr;
  }
  .hero { padding: 2rem 1rem 1.8rem; }
  .section { padding: 2rem 1rem 1.5rem; }
}

/* ===== Animations ===== */
.formula-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s forwards;
}
.formula-card:nth-child(1) { animation-delay: 0.05s; }
.formula-card:nth-child(2) { animation-delay: 0.1s; }
.formula-card:nth-child(3) { animation-delay: 0.15s; }
.formula-card:nth-child(4) { animation-delay: 0.2s; }
.formula-card:nth-child(5) { animation-delay: 0.25s; }
.formula-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
