/* ============================================================
   CAMBRIDGE FLYERS - ANA CSS DOSYASI
   Çocuk dostu, renkli, modern tasarım
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Fredoka+One&display=swap');

/* --- CSS Variables --- */
:root {
  --font-main: 'Nunito', sans-serif;
  --font-display: 'Fredoka One', cursive;

  /* Brand Colors */
  --primary: #6C63FF;
  --primary-light: #a59ef7;
  --primary-dark: #4c46b8;

  /* Section Colors */
  --listening-color: #6C63FF;
  --listening-light: #f0eeff;
  --reading-color: #00B894;
  --reading-light: #e0fff8;
  --speaking-color: #FF7675;
  --speaking-light: #fff0ee;
  --progress-color: #FDCB6E;
  --progress-light: #fffde0;

  /* Neutrals */
  --white: #ffffff;
  --bg: #F8F9FF;
  --card-bg: #ffffff;
  --text-dark: #2d3436;
  --text-medium: #636e72;
  --text-light: #b2bec3;
  --border: #e9ecef;

  /* Success / Error */
  --success: #00b894;
  --success-light: #d4f7ef;
  --error: #e17055;
  --error-light: #fde8e2;
  --warning: #fdcb6e;
  --warning-light: #fff9e6;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-color: 0 4px 16px rgba(108,99,255,0.18);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: var(--radius-full); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(108,99,255,0.35);
}

.navbar-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.navbar-title span {
  color: var(--text-medium);
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 600;
  display: block;
  line-height: 1;
  letter-spacing: 0;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar-nav li a, .navbar-nav li button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-main);
  text-decoration: none;
  color: var(--text-medium);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.navbar-nav li a:hover, .navbar-nav li button:hover {
  background: var(--bg);
  color: var(--primary);
}

.navbar-nav li a.active {
  background: var(--listening-light);
  color: var(--primary);
}

.nav-btn-teacher {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-radius: var(--radius-full) !important;
}

.nav-btn-teacher:hover {
  background: var(--primary-dark) !important;
  color: var(--white) !important;
}

/* Mobile menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================================
   PAGE SYSTEM - Show/Hide
   ============================================================ */
.page { display: none; }
.page.active { display: block; }

/* ============================================================
   HOME PAGE
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #6C63FF 0%, #a59ef7 50%, #c8c5ff 100%);
  padding: 72px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 280px; height: 280px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  color: white;
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero p {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,0.88);
  max-width: 560px;
  margin: 0 auto 32px;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
  position: relative;
  z-index: 1;
}

.hero-stat {
  text-align: center;
  color: white;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
}

.hero-stat-label {
  font-size: 13px;
  opacity: 0.8;
  font-weight: 600;
  margin-top: 4px;
}

/* ============================================================
   SECTION CARDS (Home)
   ============================================================ */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 48px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--transition-slow);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.section-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.section-card.listening::before { background: var(--listening-color); }
.section-card.reading::before { background: var(--reading-color); }
.section-card.speaking::before { background: var(--speaking-color); }
.section-card.progress::before { background: var(--progress-color); }
.section-card.teacher::before { background: linear-gradient(90deg, var(--primary), var(--speaking-color)); }

.section-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.section-card.listening:hover { border-color: var(--listening-color); }
.section-card.reading:hover { border-color: var(--reading-color); }
.section-card.speaking:hover { border-color: var(--speaking-color); }
.section-card.progress:hover { border-color: var(--progress-color); }

.section-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin: 0 auto 18px;
}

.section-card.listening .section-icon { background: var(--listening-light); }
.section-card.reading .section-icon { background: var(--reading-light); }
.section-card.speaking .section-icon { background: var(--speaking-light); }
.section-card.progress .section-icon { background: var(--progress-light); }
.section-card.teacher .section-icon { background: linear-gradient(135deg, var(--listening-light), var(--speaking-light)); }

.section-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 8px;
}

.section-card.listening h3 { color: var(--listening-color); }
.section-card.reading h3 { color: var(--reading-color); }
.section-card.speaking h3 { color: var(--speaking-color); }
.section-card.progress h3 { color: #c9a000; }

.section-card p {
  font-size: 14px;
  color: var(--text-medium);
  margin-bottom: 18px;
  font-weight: 500;
}

.section-parts {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.part-tag {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.section-card.listening .part-tag { background: var(--listening-light); color: var(--listening-color); }
.section-card.reading .part-tag { background: var(--reading-light); color: var(--reading-color); }
.section-card.speaking .part-tag { background: var(--speaking-light); color: var(--speaking-color); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-main);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(108,99,255,0.35);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-white {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-white:hover { background: var(--bg); }

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 14px rgba(0,184,148,0.3);
}
.btn-success:hover { background: #009977; }

.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover { background: #c0392b; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-medium);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--listening-light); }

.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-xs { padding: 5px 12px; font-size: 12px; }

.btn-listening { background: var(--listening-color); color: white; box-shadow: 0 4px 14px rgba(108,99,255,0.3); }
.btn-reading { background: var(--reading-color); color: white; box-shadow: 0 4px 14px rgba(0,184,148,0.3); }
.btn-speaking { background: var(--speaking-color); color: white; box-shadow: 0 4px 14px rgba(255,118,117,0.3); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================================
   EXAM PAGE LAYOUT
   ============================================================ */
.exam-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 68px);
}

.exam-sidebar {
  background: white;
  border-right: 2px solid var(--border);
  padding: 24px 16px;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow-y: auto;
}

.exam-content {
  padding: 32px 40px;
  max-width: 900px;
}

.exam-content-wide {
  padding: 32px 24px;
}

/* Sidebar Parts */
.sidebar-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-light);
  padding: 0 8px;
  margin-bottom: 10px;
  margin-top: 20px;
}

.sidebar-part-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-medium);
  transition: all var(--transition);
  text-align: left;
}

.sidebar-part-btn:hover {
  background: var(--bg);
  color: var(--text-dark);
}

.sidebar-part-btn.active {
  background: var(--listening-light);
  color: var(--listening-color);
}

.sidebar-part-btn.active.reading-active {
  background: var(--reading-light);
  color: var(--reading-color);
}

.sidebar-part-btn.active.speaking-active {
  background: var(--speaking-light);
  color: var(--speaking-color);
}

.part-number {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.sidebar-part-btn.active .part-number {
  background: var(--listening-color);
  color: white;
}

.sidebar-part-btn.active.reading-active .part-number {
  background: var(--reading-color);
}

.sidebar-part-btn.active.speaking-active .part-number {
  background: var(--speaking-color);
}

.part-score-badge {
  margin-left: auto;
  background: var(--success-light);
  color: var(--success);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
}

/* ============================================================
   EXAM HEADER
   ============================================================ */
.exam-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.exam-header-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.exam-header-icon.listening { background: var(--listening-light); }
.exam-header-icon.reading { background: var(--reading-light); }
.exam-header-icon.speaking { background: var(--speaking-light); }

.exam-header-text h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-dark);
}

.exam-header-text p {
  font-size: 14px;
  color: var(--text-medium);
  font-weight: 500;
}

.exam-timer {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 16px;
  color: var(--text-dark);
  border: 2px solid var(--border);
}

.exam-timer.warning { color: var(--error); border-color: var(--error); background: var(--error-light); }

/* ============================================================
   INSTRUCTION BOX
   ============================================================ */
.instruction-box {
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
}

.instruction-box.listening { background: var(--listening-light); border-left: 4px solid var(--listening-color); color: #3d3880; }
.instruction-box.reading { background: var(--reading-light); border-left: 4px solid var(--reading-color); color: #006b57; }
.instruction-box.speaking { background: var(--speaking-light); border-left: 4px solid var(--speaking-color); color: #8b3a39; }

/* ============================================================
   QUESTION CARDS
   ============================================================ */
.question-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border);
  transition: all var(--transition);
}

.question-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }
.question-card.answered { border-color: var(--success); }
.question-card.correct { border-color: var(--success); background: var(--success-light); }
.question-card.incorrect { border-color: var(--error); background: var(--error-light); }

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
}

.question-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* Answer Options */
.options-grid {
  display: grid;
  gap: 10px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  transition: all var(--transition);
  text-align: left;
  width: 100%;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--primary-light);
  background: var(--listening-light);
  color: var(--primary);
}

.option-btn.selected {
  border-color: var(--primary);
  background: var(--listening-light);
  color: var(--primary);
}

.option-btn.correct {
  border-color: var(--success);
  background: var(--success-light);
  color: var(--success);
}

.option-btn.incorrect {
  border-color: var(--error);
  background: var(--error-light);
  color: var(--error);
}

.option-letter {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.option-btn.selected .option-letter { background: var(--primary); color: white; }
.option-btn.correct .option-letter { background: var(--success); color: white; }
.option-btn.incorrect .option-letter { background: var(--error); color: white; }

/* Text Input */
.answer-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  background: white;
  transition: all var(--transition);
  outline: none;
}

.answer-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }
.answer-input.correct { border-color: var(--success); background: var(--success-light); }
.answer-input.incorrect { border-color: var(--error); background: var(--error-light); }

/* Fill in the blank inline */
.blank-inline {
  display: inline-block;
  min-width: 120px;
  border: none;
  border-bottom: 2.5px solid var(--primary);
  background: rgba(108,99,255,0.05);
  border-radius: 6px 6px 0 0;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  padding: 3px 10px;
  outline: none;
  margin: 0 4px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.blank-inline:focus {
  border-bottom-color: var(--primary-dark);
  background: rgba(108,99,255,0.1);
}
.blank-inline.correct {
  border-bottom-color: var(--success);
  color: var(--success);
  background: var(--success-light);
}
.blank-inline.incorrect {
  border-bottom-color: var(--error);
  color: var(--error);
  background: var(--error-light);
}
.blank-inline:disabled {
  cursor: default;
  opacity: 0.85;
}

/* Textarea for stories */
.story-textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--text-dark);
  background: white;
  resize: vertical;
  outline: none;
  transition: all var(--transition);
}

.story-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }

/* ============================================================
   FEEDBACK MESSAGES
   ============================================================ */
.feedback-correct {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--success-light);
  border: 1.5px solid var(--success);
  border-radius: var(--radius-md);
  color: #006b57;
  font-weight: 700;
  font-size: 14px;
  margin-top: 12px;
  animation: fadeInUp 0.3s ease;
}

.feedback-incorrect {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--error-light);
  border: 1.5px solid var(--error);
  border-radius: var(--radius-md);
  color: #8b3a39;
  font-weight: 700;
  font-size: 14px;
  margin-top: 12px;
  animation: fadeInUp 0.3s ease;
}

.answer-reveal {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-medium);
  margin-top: 6px;
}

/* ============================================================
   AUDIO / TTS PLAYER
   ============================================================ */
.audio-player {
  background: linear-gradient(135deg, var(--listening-light), #e8e6ff);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  border: 2px solid var(--primary-light);
}

.audio-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(108,99,255,0.35);
}

.audio-play-btn:hover { background: var(--primary-dark); transform: scale(1.05); }
.audio-play-btn.playing { background: var(--error); animation: pulse 1.5s infinite; }

.audio-info {
  flex: 1;
}

.audio-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.audio-subtitle {
  font-size: 13px;
  color: var(--text-medium);
  font-weight: 500;
}

.audio-speed-btns {
  display: flex;
  gap: 6px;
}

.speed-btn {
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-light);
  background: white;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all var(--transition);
}

.speed-btn.active, .speed-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================================
   PROGRESS / SCORE
   ============================================================ */
.score-header {
  background: linear-gradient(135deg, var(--primary), #a59ef7);
  border-radius: var(--radius-xl);
  padding: 32px;
  color: white;
  text-align: center;
  margin-bottom: 28px;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 4px solid rgba(255,255,255,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  backdrop-filter: blur(8px);
}

.score-number {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
}

.score-total {
  font-size: 14px;
  opacity: 0.8;
}

.progress-bar-container {
  background: var(--border);
  border-radius: var(--radius-full);
  height: 12px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.6s ease;
}

.progress-bar.reading { background: linear-gradient(90deg, var(--reading-color), #55efc4); }
.progress-bar.speaking { background: linear-gradient(90deg, var(--speaking-color), #fab1a0); }
.progress-bar.gold { background: linear-gradient(90deg, var(--progress-color), #f9ca24); }

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border);
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--primary);
  line-height: 1;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-medium);
  font-weight: 600;
  margin-top: 4px;
}

/* ============================================================
   SPEAKING CARDS
   ============================================================ */
.speaking-card-container {
  perspective: 1000px;
  cursor: pointer;
}

.speaking-card {
  width: 100%;
  min-height: 200px;
  border-radius: var(--radius-xl);
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  position: relative;
}

.speaking-card.flipped { transform: rotateY(180deg); }

.card-face {
  position: absolute;
  width: 100%;
  min-height: 200px;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
}

.card-front {
  background: linear-gradient(135deg, var(--speaking-color), #fab1a0);
  color: white;
}

.card-back {
  background: linear-gradient(135deg, #f8f9fa, white);
  border: 2px solid var(--border);
  transform: rotateY(180deg);
  color: var(--text-dark);
}

.card-scene-text {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-emoji {
  font-size: 52px;
  margin-bottom: 12px;
  display: block;
}

/* ============================================================
   TEACHER PANEL
   ============================================================ */
.teacher-panel {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

.teacher-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.student-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.student-table th {
  background: var(--bg);
  padding: 14px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-medium);
  border-bottom: 2px solid var(--border);
}

.student-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.student-table tr:last-child td { border-bottom: none; }
.student-table tr:hover td { background: var(--bg); }

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
}

.score-pill.high { background: var(--success-light); color: var(--success); }
.score-pill.mid { background: var(--warning-light); color: #b8860b; }
.score-pill.low { background: var(--error-light); color: var(--error); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.modal-icon { font-size: 56px; margin-bottom: 16px; }
.modal-title { font-family: var(--font-display); font-size: 26px; color: var(--text-dark); margin-bottom: 10px; }
.modal-body { font-size: 15px; color: var(--text-medium); font-weight: 500; margin-bottom: 24px; line-height: 1.7; }
.modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   BADGES & ACHIEVEMENTS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
}

.badge-primary { background: var(--listening-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #b8860b; }
.badge-danger { background: var(--error-light); color: var(--error); }

.achievement-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border);
  transition: all var(--transition);
}

.achievement-card.unlocked {
  border-color: var(--progress-color);
  background: var(--progress-light);
}

.achievement-icon {
  font-size: 36px;
  width: 60px;
  height: 60px;
  background: var(--bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.achievement-card.unlocked .achievement-icon {
  background: white;
  box-shadow: 0 0 0 3px var(--progress-color);
}

/* ============================================================
   STORY TEXT DISPLAY
   ============================================================ */
.story-box {
  background: #fafbff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  font-size: 15px;
  line-height: 1.9;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 24px;
}

.story-box h4 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 12px;
}

/* ============================================================
   PART INTRO SCREENS
   ============================================================ */
.part-intro {
  background: white;
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  max-width: 600px;
  margin: 40px auto;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border);
}

.part-intro-icon {
  font-size: 72px;
  margin-bottom: 20px;
  display: block;
}

.part-intro h2 {
  font-family: var(--font-display);
  font-size: 30px;
  margin-bottom: 12px;
}

.part-intro p {
  font-size: 15px;
  color: var(--text-medium);
  font-weight: 500;
  margin-bottom: 24px;
  line-height: 1.7;
}

.part-intro .instruction-list {
  text-align: left;
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 28px;
}

.instruction-list li {
  padding: 6px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-medium);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   IMAGE PANELS (Part 1 difference finder, etc.)
   ============================================================ */
.image-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.image-panel {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  overflow: hidden;
}

.image-panel-header {
  background: white;
  border-bottom: 2px solid var(--border);
  padding: 10px 16px;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-medium);
  text-align: center;
}

.image-panel-body {
  padding: 20px;
  font-size: 30px;
  text-align: center;
  line-height: 2.5;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225,112,85,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(225,112,85,0); }
}

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

@keyframes confetti-fall {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.animate-bounce { animation: bounce 1s ease infinite; }
.animate-fade-in { animation: fadeInUp 0.4s ease; }

@keyframes teacherShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(5px); }
}

/* ============================================================
   SET SWITCHER
   ============================================================ */
.set-switcher {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.set-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-medium);
  margin-right: 4px;
  flex-shrink: 0;
}

.set-btn {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text-medium);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.set-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--listening-light);
  transform: translateY(-1px);
}

.set-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(108,99,255,0.3);
}

/* ============================================================
   CONFETTI
   ============================================================ */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
  z-index: 9999;
  pointer-events: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  #nav-student-badge { display: none !important; }

  .exam-layout {
    grid-template-columns: 1fr;
  }

  .exam-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 2px solid var(--border);
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .exam-sidebar .sidebar-section-title { display: none; }

  .sidebar-part-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .exam-content { padding: 24px 16px; }

  .image-panels { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: white;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .hamburger { display: flex; }

  .hero { padding: 48px 20px 56px; }
  .hero-stats { gap: 24px; }

  .sections-grid { grid-template-columns: 1fr; padding: 24px 16px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .teacher-panel { padding: 20px 16px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }

  .modal-box { padding: 24px; }

  .part-intro { padding: 32px 20px; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-medium); }
.w-full { width: 100%; }
.rounded-full { border-radius: var(--radius-full); }

/* Divider */
.divider {
  border: none;
  border-top: 2px solid var(--border);
  margin: 24px 0;
}

/* Tag */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--bg);
  color: var(--text-medium);
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   TÜRKÇE ÇEVİRİ — kelime badge + popup + feedback notu
   ============================================================ */

/* Word Box'taki badge — tüm kelimeler */
.word-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--reading-light);
  color: var(--reading-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid transparent;
  font-family: var(--font-main);
  line-height: 1;
}

/* Tıklanabilir olanlar */
.word-badge.has-tr {
  cursor: pointer;
  transition: all 0.15s ease;
}
.word-badge.has-tr:hover,
.word-badge.has-tr:active {
  background: var(--reading-color);
  color: white;
  border-color: var(--reading-color);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(108,99,255,0.25);
}
.word-badge.has-tr:hover .word-badge-tr-pill {
  background: white;
  color: var(--reading-color);
}

/* Kelimenin metni */
.word-badge-text {
  white-space: nowrap;
}

/* Küçük "TR" pill — kelimenin sağında, ayrı */
.word-badge-tr-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--reading-color);
  color: white;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.15s;
}

/* Türkçe açıklama popup'ı */
.word-tr-popup {
  animation: fadeInUp 0.2s ease;
  pointer-events: auto;
}
.word-tr-popup-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 2px solid var(--reading-color);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  min-width: 160px;
  max-width: 240px;
}
.word-tr-flag  { font-size: 20px; flex-shrink: 0; }
.word-tr-en    { font-size: 11px; font-weight: 800; color: var(--text-medium); text-transform: uppercase; letter-spacing: 0.5px; }
.word-tr-tr    { font-size: 16px; font-weight: 800; color: var(--reading-color); }
.word-tr-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  flex-shrink: 0;
  border-radius: 6px;
  transition: background 0.15s;
}
.word-tr-close:hover { background: var(--error-light); color: var(--error); }

/* Feedback içindeki Türkçe notu */
.feedback-tr {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #5a3a8a;
  background: rgba(255,255,255,0.6);
  border-radius: 6px;
  padding: 3px 8px;
  width: fit-content;
}

/* feedback-incorrect flex-direction column — TR notu alt satıra geçsin */
.feedback-incorrect {
  flex-wrap: wrap;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* ============================================================
   GLOBAL PROGRESS BAR — navbar altında yapışık şerit
   ============================================================ */

#global-progress-bar {
  position: sticky;
  top: 68px;          /* navbar height */
  z-index: 999;
  background: white;
  border-bottom: 1.5px solid var(--border);
  padding: 6px 20px 7px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: background 0.2s;
}
#global-progress-bar:hover { background: #faf9ff; }

/* Çubuk izi */
.gpb-track {
  flex: 1;
  height: 10px;
  background: #eee;
  border-radius: 99px;
  overflow: hidden;
  display: flex;
  min-width: 0;
}

/* Segment'ler — yan yana dizilir */
.gpb-seg {
  height: 100%;
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
}
.gpb-listening { background: var(--listening-color); border-radius: 99px 0 0 99px; }
.gpb-reading   { background: var(--reading-color); }
.gpb-speaking  { background: var(--speaking-color); border-radius: 0 99px 99px 0; }

/* Etiket */
.gpb-label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-medium);
}
#gpb-parts { font-weight: 900; color: var(--text-dark); font-size: 13px; }
.gpb-parts-label { font-size: 11px; color: var(--text-light); }
.gpb-pct-badge {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  margin-left: 2px;
}

/* Tamamlandı durumu */
#global-progress-bar.gpb-complete .gpb-pct-badge {
  background: var(--success);
}

@media (max-width: 480px) {
  #global-progress-bar { padding: 5px 12px 6px; gap: 8px; }
  .gpb-parts-label { display: none; }
  .gpb-label { gap: 4px; }
}

.section-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-dark);
}

/* ============================================================
   PROGRESS PAGE — Child-friendly redesign
   ============================================================ */

/* Greeting */
.prog-greeting {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border);
  flex-wrap: wrap;
}
.prog-greeting-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-family: var(--font-display);
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(108,99,255,0.3);
}
.prog-greeting-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-dark);
  margin: 0 0 4px;
}
.prog-greeting-sub {
  font-size: 14px;
  color: var(--text-medium);
  font-weight: 600;
  margin: 0;
}

/* Level Card */
.prog-level-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--level-color, var(--primary));
  position: relative;
  overflow: hidden;
}
.prog-level-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--level-color, var(--primary));
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}
.prog-level-badge {
  font-size: 52px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
  line-height: 1;
}
.prog-level-info { flex: 1; }
.prog-level-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.prog-level-next {
  font-size: 13px;
  color: var(--text-medium);
  font-weight: 600;
  margin-bottom: 10px;
}
.prog-level-bar-wrap {
  background: #eee;
  border-radius: 99px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 4px;
}
.prog-level-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 1s ease;
}
.prog-level-xp {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-light);
}

/* Stats Row */
.prog-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.prog-stat-box {
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 18px 14px;
  text-align: center;
}
.prog-stat-icon { font-size: 28px; margin-bottom: 6px; }
.prog-stat-val {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 4px;
}
.prog-stat-lbl {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-medium);
  margin-bottom: 4px;
}
.prog-stat-note {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}

/* Ring */
.prog-ring-box { padding: 14px 10px; }
.prog-ring-wrap {
  position: relative;
  width: 90px; height: 90px;
  margin: 0 auto 6px;
}
.prog-ring-svg {
  width: 90px; height: 90px;
  transform: rotate(-90deg);
}
.prog-ring-inner {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.prog-ring-pct {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-dark);
  line-height: 1;
}
.prog-ring-lbl {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-light);
}
.prog-ring-sub {
  font-size: 12px;
  color: var(--text-medium);
  font-weight: 700;
  margin-top: 4px;
}

/* Week Calendar */
.prog-week-cal {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 10px;
}
.prog-week-day {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-light);
  border: 2px solid transparent;
}
.prog-week-day.active {
  background: linear-gradient(135deg, #fd79a8, #e17055);
  color: white;
  border-color: transparent;
}
.prog-week-day.today {
  border-color: var(--primary);
}

/* Section heading */
.prog-section-heading {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-dark);
  margin: 28px 0 14px;
}

/* Section Cards */
.prog-section-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 4px;
}
.prog-section-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.prog-sec-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}
.prog-sec-title {
  font-family: var(--font-display);
  font-size: 15px;
  flex: 1;
}
.prog-sec-avg {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.prog-sec-body { padding: 14px 16px; flex: 1; }
.prog-sec-btn { margin: 0 12px 12px; width: calc(100% - 24px); }

/* Part rows */
.prog-part-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.prog-part-label {
  width: 22px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-light);
  flex-shrink: 0;
}
.prog-part-bar-bg {
  flex: 1;
  height: 10px;
  background: #f0f0f0;
  border-radius: 99px;
  overflow: hidden;
}
.prog-part-pct {
  width: 34px;
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Bar Chart */
.prog-chart-wrap {
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px 16px 12px;
  margin-bottom: 4px;
}
.prog-chart-bar-area {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 4px;
}
.prog-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.prog-bar-col-bar {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.prog-bar-col-lbl {
  font-size: 9px;
  font-weight: 800;
  margin-top: 4px;
  white-space: nowrap;
}
.prog-bar-vert {
  align-self: flex-end;
  width: 100%;
  border-radius: 6px 6px 0 0;
  min-height: 2px;
}
.prog-chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-medium);
  justify-content: center;
  flex-wrap: wrap;
}
.prog-chart-legend span {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
}

/* Weak Areas */
.prog-weak-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}
.prog-weak-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border-radius: var(--radius-md);
  border: 2px solid var(--error-light);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}
.prog-weak-info { flex: 1; }
.prog-weak-name { font-weight: 800; font-size: 14px; color: var(--text-dark); }
.prog-weak-tip  { font-size: 12px; color: var(--text-medium); font-weight: 600; margin-top: 2px; }
.prog-weak-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--success-light);
  border: 2px solid var(--success);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 4px;
}

/* Badges */
.prog-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.prog-badge {
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  padding: 16px 12px;
  text-align: center;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.prog-badge-unlocked {
  border-color: var(--progress-color);
  background: linear-gradient(135deg, #fffdf0, #fff8d6);
  box-shadow: 0 4px 16px rgba(253,203,110,0.25);
}
.prog-badge-unlocked:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(253,203,110,0.35);
}
.prog-badge-locked { opacity: 0.45; filter: grayscale(0.7); }
.prog-badge-emoji { font-size: 32px; margin-bottom: 6px; }
.prog-badge-label { font-weight: 800; font-size: 13px; color: var(--text-dark); margin-bottom: 3px; }
.prog-badge-desc  { font-size: 11px; color: var(--text-medium); font-weight: 500; line-height: 1.4; }
.prog-badge-check { font-size: 11px; font-weight: 800; color: var(--success); margin-top: 5px; }
.prog-badge-lock  { font-size: 11px; color: var(--text-light); margin-top: 5px; }

/* Recent Activity */
.prog-activity-list {
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 4px;
}
.prog-activity-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.prog-activity-row:last-child { border-bottom: none; }
.prog-activity-row:hover { background: var(--bg); }
.prog-act-icon { font-size: 22px; }
.prog-act-info { flex: 1; }
.prog-act-name { font-weight: 700; font-size: 14px; color: var(--text-dark); }
.prog-act-date { font-size: 12px; color: var(--text-light); font-weight: 600; }

/* Responsive */
@media (max-width: 900px) {
  .prog-stats-row { grid-template-columns: repeat(2, 1fr); }
  .prog-section-cards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .prog-stats-row { grid-template-columns: repeat(2, 1fr); }
  .prog-badges-grid { grid-template-columns: repeat(2, 1fr); }
  .prog-chart-bar-area { height: 100px; }
  .prog-level-badge { font-size: 36px; }
  .prog-greeting-avatar { width: 44px; height: 44px; font-size: 18px; }
}
