/* ==========================================================================
   CIRCLE WORLD - YEAR 6 INTERACTIVE MATHEMATICS
   Styles & Animations
   ========================================================================== */

:root {
  --primary-color: #4A90E2;
  --primary-dark: #2C68C4;
  --secondary-color: #FF6B6B;
  --accent-yellow: #FFD166;
  --accent-green: #06D6A0;
  --accent-purple: #8338EC;
  --accent-orange: #FF9F1C;
  --bg-gradient: linear-gradient(135deg, #E0F7FA 0%, #FFF9C4 50%, #F3E5F5 100%);
  --card-bg: #FFFFFF;
  --text-dark: #2B2D42;
  --text-muted: #6C757D;
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 10px;
  --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  --box-shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
  --transition-fast: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

h1, h2, h3, h4, .site-title, .nav-btn, .btn {
  font-family: 'Fredoka', cursive, 'Nunito', sans-serif;
}

/* --------------------------------------------------------------------------
   Background Floating Decorations
   -------------------------------------------------------------------------- */
.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.25;
  animation: float 12s infinite ease-in-out;
}

.shape-1 { width: 120px; height: 120px; background: #FF6B6B; top: 10%; left: 5%; animation-delay: 0s; }
.shape-2 { width: 180px; height: 180px; background: #4A90E2; top: 60%; right: 5%; animation-delay: -3s; }
.shape-3 { width: 90px; height: 90px; background: #FFD166; top: 75%; left: 12%; animation-delay: -6s; }
.shape-4 { width: 150px; height: 150px; background: #06D6A0; top: 20%; right: 15%; animation-delay: -9s; }

.cloud { position: absolute; font-size: 3rem; opacity: 0.6; animation: floatCloud 25s infinite linear; }
.cloud-1 { top: 8%; left: -50px; }
.cloud-2 { top: 45%; left: -50px; animation-delay: -12s; }

.star { position: absolute; font-size: 2rem; animation: pulse 3s infinite ease-in-out; }
.star-1 { top: 15%; right: 8%; }
.star-2 { top: 80%; left: 80%; animation-delay: 1.5s; }

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

@keyframes floatCloud {
  from { transform: translateX(-100px); }
  to { transform: translateX(calc(100vw + 100px)); }
}

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

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 4px solid var(--accent-yellow);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo-coco-small {
  width: 50px;
  height: 50px;
}

.site-title {
  font-size: 1.8rem;
  color: var(--primary-color);
  letter-spacing: 1px;
  line-height: 1;
  text-shadow: 2px 2px 0px var(--accent-yellow);
}

.site-tagline {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-purple);
}

.nav-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-btn {
  padding: 10px 18px;
  border-radius: 50px;
  border: 2px solid transparent;
  background: #F0F4F8;
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-btn:hover {
  background: #E2E8F0;
  transform: translateY(-2px);
}

.nav-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.35);
}

.nav-btn.highlight {
  background: linear-gradient(135deg, var(--accent-orange), var(--secondary-color));
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  animation: bounceSoft 2s infinite;
}

@keyframes bounceSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* --------------------------------------------------------------------------
   Layout & Sections
   -------------------------------------------------------------------------- */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px 40px 16px;
}

.page-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.page-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Buttons & UI Controls
   -------------------------------------------------------------------------- */
.btn {
  padding: 12px 24px;
  border-radius: 50px;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary { background: var(--primary-color); color: white; }
.btn-secondary { background: #6C757D; color: white; }
.btn-game { background: linear-gradient(135deg, #FF9F1C, #FF6B6B); color: white; }
.btn-small { padding: 8px 16px; font-size: 0.95rem; }
.btn-game-card { background: var(--accent-purple); color: white; }
.btn-learn-review { background: var(--accent-green); color: white; }

/* --------------------------------------------------------------------------
   Section 0: HOME PAGE
   -------------------------------------------------------------------------- */
.hero-banner {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
  border: 3px solid #E2E8F0;
}

.welcome-badge {
  background: var(--accent-yellow);
  color: #8D5B00;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.hero-text h2 {
  font-size: 2.3rem;
  color: var(--primary-color);
  margin: 10px 0;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-character {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 200px;
}

.coco-avatar-wrapper {
  width: 170px;
  height: 170px;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.12));
}

.speech-bubble {
  background: #FFF;
  border: 3px solid var(--primary-color);
  border-radius: 18px;
  padding: 12px 16px;
  font-size: 0.95rem;
  text-align: center;
  margin-top: 10px;
  position: relative;
  max-width: 220px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 10px 12px 10px;
  border-style: solid;
  border-color: transparent transparent var(--primary-color) transparent;
}

.nav-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.nav-card {
  background: white;
  border-radius: var(--border-radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--box-shadow);
  border: 3px solid transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.nav-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-hover);
}

.card-explore { border-color: var(--primary-color); }
.card-learn { border-color: var(--accent-green); }
.card-practise { border-color: var(--accent-yellow); }
.card-game { border-color: var(--secondary-color); background: #FFF5F5; }

.card-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.nav-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.nav-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.learning-goals-box {
  background: white;
  border-radius: var(--border-radius-md);
  padding: 28px;
  box-shadow: var(--box-shadow);
  border-left: 8px solid var(--accent-purple);
}

.goals-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.goals-icon { font-size: 2rem; }

.goals-subtitle {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.goals-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.goals-list li {
  background: #F8F9FA;
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
}

.check-icon { font-size: 1.1rem; }

/* --------------------------------------------------------------------------
   Section Header (Common)
   -------------------------------------------------------------------------- */
.section-header {
  background: white;
  border-radius: var(--border-radius-md);
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--box-shadow);
  margin-bottom: 24px;
}

.section-title-wrapper h2 {
  font-size: 2rem;
  color: var(--primary-color);
}

.section-title-wrapper p {
  color: var(--text-muted);
}

.coco-mini-wrapper {
  width: 80px;
  height: 80px;
}

/* --------------------------------------------------------------------------
   Section 1: EXPLORE
   -------------------------------------------------------------------------- */
.explore-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.explore-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.explore-btn {
  padding: 12px 24px;
  border-radius: 50px;
  border: 3px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
}

.explore-btn:hover, .explore-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 6px 15px rgba(74, 144, 226, 0.3);
}

.explore-display {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  box-shadow: var(--box-shadow);
}

.explore-svg-container {
  width: 100%;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8FAFC;
  border-radius: var(--border-radius-md);
  padding: 10px;
}

.explore-info-card {
  background: #EBF8FF;
  border-radius: var(--border-radius-md);
  padding: 24px;
  border-left: 6px solid var(--primary-color);
}

.explore-info-card h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.explore-info-card p {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: #2D3748;
}

.explore-formula-badge {
  background: var(--accent-yellow);
  color: #744210;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: var(--border-radius-sm);
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Section 2: LEARN
   -------------------------------------------------------------------------- */
.learn-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.learn-card {
  background: white;
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--box-shadow);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.learn-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #EDF2F7;
  color: #4A5568;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
}

.learn-card h3 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.learn-card-visual {
  height: 160px;
  background: #F7FAFC;
  border-radius: var(--border-radius-sm);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fun-fact {
  background: #F0FFF4;
  border: 1px solid #C6F6D5;
  color: #22543D;
  font-size: 0.9rem;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  margin-top: 12px;
}

.highlight-card { border: 3px solid var(--accent-orange); }
.formula-box {
  background: #FFFAF0;
  border: 2px dashed var(--accent-orange);
  padding: 10px;
  text-align: center;
  border-radius: var(--border-radius-sm);
  margin-top: 12px;
  font-size: 1.1rem;
}

.turn-card { border: 3px solid var(--accent-purple); }

/* Animation Visual for 360 Card */
.animation-visual {
  flex-direction: column;
  gap: 10px;
}

.rotator-circle {
  width: 90px;
  height: 90px;
  border: 4px solid var(--accent-purple);
  border-radius: 50%;
  position: relative;
  background: white;
}

.rotator-hand {
  width: 4px;
  height: 40px;
  background: var(--secondary-color);
  position: absolute;
  top: 5px;
  left: calc(50% - 2px);
  transform-origin: bottom center;
}

.rotator-hand.spinning {
  animation: spin360 2s ease-in-out;
}

@keyframes spin360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rotator-center {
  width: 10px;
  height: 10px;
  background: var(--accent-purple);
  border-radius: 50%;
  position: absolute;
  top: calc(50% - 5px);
  left: calc(50% - 5px);
}

.degree-display {
  font-family: 'Fredoka', cursive;
  font-size: 1.3rem;
  color: var(--accent-purple);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Section 3: PRACTISE
   -------------------------------------------------------------------------- */
.practise-container {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 32px;
  box-shadow: var(--box-shadow);
}

.practise-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-weight: 800;
  color: var(--primary-color);
}

.progress-bar-bg {
  flex: 1;
  height: 14px;
  background: #E2E8F0;
  border-radius: 20px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-green));
  transition: width 0.3s ease;
}

.practise-question-card h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.practise-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.opt-btn {
  padding: 16px 20px;
  border: 2px solid #CBD5E0;
  border-radius: var(--border-radius-sm);
  background: white;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.opt-btn:hover {
  background: #EDF2F7;
  border-color: var(--primary-color);
}

.opt-btn.selected-correct {
  background: #C6F6D5;
  border-color: #38A169;
  color: #22543D;
}

.opt-btn.selected-incorrect {
  background: #FED7D7;
  border-color: #E53E3E;
  color: #742A2A;
}

.feedback-alert {
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.feedback-alert.correct {
  background: #C6F6D5;
  color: #22543D;
}

.feedback-alert.incorrect {
  background: #FED7D7;
  color: #742A2A;
}

/* --------------------------------------------------------------------------
   Section 4: PLAY GAME & STAGES
   -------------------------------------------------------------------------- */
.game-screen {
  display: none;
}

.game-screen.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

/* Start Screen */
.game-start-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--box-shadow);
}

.coco-large-wrapper {
  width: 180px;
  height: 180px;
  margin: 0 auto 20px auto;
}

.game-start-card h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.game-intro-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

#name-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

#name-form label {
  font-size: 1.2rem;
  font-weight: 800;
}

#player-name-input {
  width: 100%;
  max-width: 320px;
  padding: 14px 20px;
  border: 3px solid var(--primary-color);
  border-radius: 50px;
  font-size: 1.2rem;
  text-align: center;
  font-weight: 700;
  outline: none;
}

#player-name-input:focus {
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.3);
}

.btn-game-start {
  padding: 16px 36px;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--accent-orange), var(--secondary-color));
  color: white;
}

/* HUD */
.game-hud {
  background: #2D3748;
  color: white;
  border-radius: 50px;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--box-shadow);
}

.hud-stage {
  color: var(--accent-yellow);
}

.hud-score span {
  color: var(--accent-green);
  font-size: 1.3rem;
}

.stage-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 32px;
  box-shadow: var(--box-shadow);
}

.stage-header {
  border-bottom: 2px solid #E2E8F0;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.stage-header h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.interactive-diagram-area {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #F7FAFC;
  border-radius: var(--border-radius-md);
  padding: 20px;
  margin: 20px 0;
  min-height: 280px;
}

.game-feedback-box {
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 16px 0;
  text-align: center;
}

.game-feedback-box.correct {
  background: #C6F6D5;
  color: #22543D;
  border: 2px solid #38A169;
}

.game-feedback-box.incorrect {
  background: #FED7D7;
  color: #742A2A;
  border: 2px solid #E53E3E;
}

/* Stage 3 - Canvas & Drawing */
.drawing-workspace {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ruler-guide-box {
  width: 100%;
  max-width: 500px;
  background: #FFFBEB;
  border: 2px solid var(--accent-yellow);
  border-radius: var(--border-radius-sm);
  padding: 10px 16px;
}

.ruler-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #B7791F;
  margin-bottom: 6px;
}

.ruler-scale {
  position: relative;
  height: 24px;
  border-bottom: 2px solid #B7791F;
}

.ruler-tick {
  position: absolute;
  bottom: 0;
  height: 12px;
  border-left: 2px solid #B7791F;
}

.ruler-tick span {
  position: absolute;
  top: -18px;
  left: -12px;
  font-size: 0.75rem;
  font-weight: 800;
}

.ruler-tick.highlight {
  border-left-color: var(--secondary-color);
}
.ruler-tick.highlight span {
  color: var(--secondary-color);
}

.canvas-wrapper {
  position: relative;
  background: #F8FAFC;
  border: 3px dashed var(--primary-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

canvas {
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.canvas-overlay-stats {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 800;
  pointer-events: none;
}

.drawing-controls {
  display: flex;
  gap: 16px;
}

.labeling-section {
  width: 100%;
  margin-top: 20px;
  background: #F7FAFC;
  padding: 20px;
  border-radius: var(--border-radius-md);
  text-align: center;
}

.section-divider {
  border: 0;
  height: 2px;
  background: #E2E8F0;
  margin: 16px 0;
}

.label-bank {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.draggable-label {
  background: var(--accent-purple);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 1rem;
  cursor: grab;
  user-select: none;
  box-shadow: 0 4px 10px rgba(131, 56, 236, 0.3);
  transition: var(--transition-fast);
}

.draggable-label:hover {
  transform: scale(1.05);
}

.draggable-label.selected-active {
  ring: 4px solid var(--accent-yellow);
  transform: scale(1.1);
}

.draggable-label.placed {
  opacity: 0.5;
  cursor: not-allowed;
}

.label-diagram-container {
  max-width: 450px;
  margin: 16px auto;
  background: white;
  padding: 16px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--box-shadow);
}

/* --------------------------------------------------------------------------
   Section 5: RESULTS & REVIEW
   -------------------------------------------------------------------------- */
.results-container {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--box-shadow);
  max-width: 900px;
  margin: 0 auto;
}

.results-title {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.results-player-greeting {
  font-size: 1.5rem;
  color: var(--accent-purple);
  margin-bottom: 24px;
}

.score-card {
  background: #F7FAFC;
  border-radius: var(--border-radius-md);
  padding: 28px;
  margin-bottom: 30px;
  border: 3px solid #E2E8F0;
}

.score-stars-display {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.score-big-number {
  font-size: 3.5rem;
  font-family: 'Fredoka', cursive;
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 16px;
}

.score-denom {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.score-breakdown-pills {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pill {
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 800;
}

.correct-pill { background: #C6F6D5; color: #22543D; }
.incorrect-pill { background: #FED7D7; color: #742A2A; }

.review-section-box {
  text-align: left;
  background: #FFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--border-radius-md);
  padding: 24px;
  margin-bottom: 30px;
}

.review-section-box h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.review-subtitle {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.review-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-item {
  border-radius: var(--border-radius-sm);
  padding: 16px;
  border-left: 6px solid #CBD5E0;
  background: #F8FAFC;
}

.review-item.is-correct {
  border-left-color: #38A169;
  background: #F0FFF4;
}

.review-item.is-incorrect {
  border-left-color: #E53E3E;
  background: #FFF5F5;
}

.review-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.review-q-text {
  font-weight: 700;
  margin-bottom: 8px;
}

.review-ans-row {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.review-explanation {
  font-size: 0.9rem;
  background: rgba(255,255,255,0.7);
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 8px;
  color: #4A5568;
}

.learning-remedy-box {
  background: #EBF8FF;
  border-radius: var(--border-radius-md);
  padding: 24px;
  margin-bottom: 30px;
  text-align: left;
}

.learning-remedy-box h3 {
  color: var(--primary-color);
  margin-bottom: 16px;
}

.remedy-topics-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.remedy-item {
  background: white;
  padding: 12px 18px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.remedy-item.pass { color: #2B6CB0; }
.remedy-item.review-needed { color: #C05621; border: 1px solid #FEEBC8; background: #FFFAF0; }

.results-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.main-footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-sub {
  font-size: 0.8rem;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .nav-bar {
    justify-content: center;
    width: 100%;
  }

  .nav-btn {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .hero-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .hero-actions {
    justify-content: center;
  }

  .explore-display {
    grid-template-columns: 1fr;
  }

  canvas {
    width: 100% !important;
    height: auto !important;
  }
}
