/* ═══════════════════════════════════════════
   Mock Test — Stylesheet (AlfaPTE-Inspired)
   Evee PTE Class & Overseas Admissions Hub
═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary-900: #0f172a;
  --primary-800: #1e293b;
  --primary-700: #1e3a5f;
  --primary-600: #334155;
  --primary-500: #475569;
  --blue-900: #1e3a5f;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-300: #93c5fd;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --indigo-600: #4f46e5;
  --indigo-500: #6366f1;
  --indigo-100: #e0e7ff;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-200: #bbf7d0;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --red-50: #fef2f2;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --purple-600: #9333ea;
  --purple-100: #f3e8ff;
  --teal-600: #0d9488;
  --teal-100: #ccfbf1;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.18);
  --radius-xl: 1.5rem;
  --radius-lg: 1.25rem;
  --radius-md: .75rem;
  --radius-sm: .5rem;
  --transition: .2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  min-height: 100vh;
  color: var(--gray-900);
  display: flex;
  flex-direction: column;
}

body.test-mode {
  overflow-y: auto;
  background: #fff;
}

/* ═══════════════════════════════════════════
   HERO SECTION (AlfaPTE-Inspired)
═══════════════════════════════════════════ */
.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 30%, #1e40af 60%, #2563eb 100%);
  color: var(--white);
  padding: 4rem 1.5rem 6rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: .4rem 1rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: rgba(255,255,255,0.9);
}

.hero-badge i {
  color: var(--amber-500);
}

.hero-section h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-section h1 span {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--white);
  color: var(--blue-700);
  padding: .85rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  text-decoration: none;
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  padding: .85rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════
   STATS SECTION (AlfaPTE-Inspired)
═══════════════════════════════════════════ */
.stats-section {
  background: var(--white);
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
  margin-top: -3rem;
}

.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.stat-card {
  background: var(--white);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  background: var(--blue-50);
}

.stat-icon {
  font-size: 1.5rem;
  color: var(--blue-500);
  margin-bottom: .5rem;
}

.stat-number {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}

.stat-label {
  font-size: .85rem;
  color: var(--gray-500);
  font-weight: 500;
  margin-top: .25rem;
}

/* ═══════════════════════════════════════════
   FEATURES SECTION (AlfaPTE-Inspired)
═══════════════════════════════════════════ */
.features-section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.features-header {
  text-align: center;
  margin-bottom: 3rem;
}

.features-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: .75rem;
}

.features-header p {
  color: var(--gray-500);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-500), var(--indigo-500));
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.feature-icon.blue { background: var(--blue-100); color: var(--blue-600); }
.feature-icon.green { background: var(--green-100); color: var(--green-600); }
.feature-icon.purple { background: var(--purple-100); color: var(--purple-600); }
.feature-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.feature-icon.teal { background: var(--teal-100); color: var(--teal-600); }
.feature-icon.indigo { background: var(--indigo-100); color: var(--indigo-600); }

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .5rem;
}

.feature-card p {
  font-size: .9rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════
   SELECTION PHASE
═══════════════════════════════════════════ */
.select-phase {
  flex: 1;
  padding: 2rem 1.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.select-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.select-header h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: .5rem;
}

.select-header p {
  color: var(--gray-500);
  font-size: 1rem;
}

/* Progress Summary */
.progress-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.prog-item {
  text-align: center;
}

.prog-item .prog-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue-600);
}

.prog-item .prog-label {
  font-size: .75rem;
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: .15rem;
}

/* ═══════════════════════════════════════════
   TEST GRID
═══════════════════════════════════════════ */
.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.test-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--gray-200);
  padding: 1.75rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  position: relative;
  overflow: hidden;
}

.test-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-500), var(--indigo-500));
  opacity: 0;
  transition: opacity var(--transition);
}

.test-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-300);
  box-shadow: var(--shadow-xl);
}

.test-card:hover::before {
  opacity: 1;
}

.test-card .card-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .25rem .65rem;
  border-radius: 999px;
  align-self: flex-start;
}

.badge-ready {
  background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
  color: var(--blue-700);
  border: 1px solid var(--blue-200);
}

.badge-done {
  background: linear-gradient(135deg, var(--green-100), var(--green-50));
  color: var(--green-700);
  border: 1px solid var(--green-200);
}

.test-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.test-card p {
  font-size: .85rem;
  color: var(--gray-500);
  line-height: 1.6;
  flex: 1;
}

.test-card .card-stats {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  font-size: .75rem;
  color: var(--gray-400);
}

.test-card .card-stats span {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .4rem;
  background: var(--gray-50);
  border-radius: 4px;
}

.test-card .card-action {
  color: var(--blue-600);
  font-weight: 600;
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--gray-100);
}

.test-card .card-action i {
  transition: transform var(--transition);
}

.test-card:hover .card-action i {
  transform: translateX(3px);
}

/* ═══════════════════════════════════════════
   TESTIMONIALS SECTION
═══════════════════════════════════════════ */
.testimonials-section {
  padding: 4rem 1.5rem;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

.testimonials-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.testimonials-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.testimonials-header h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: .5rem;
}

.testimonials-header p {
  color: var(--gray-500);
  font-size: 1rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
}

.testimonial-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
}

.testimonial-stars {
  color: var(--amber-500);
  font-size: .85rem;
  margin-bottom: .75rem;
}

.testimonial-text {
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--indigo-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: .9rem;
}

.testimonial-name {
  font-weight: 600;
  font-size: .85rem;
  color: var(--gray-800);
}

.testimonial-role {
  font-size: .75rem;
  color: var(--gray-400);
}

/* ═══════════════════════════════════════════
   FAQ SECTION
═══════════════════════════════════════════ */
.faq-section {
  padding: 4rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.faq-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.faq-header h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: .5rem;
}

.faq-header p {
  color: var(--gray-500);
  font-size: 1rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item:hover {
  border-color: var(--blue-200);
}

.faq-question {
  padding: 1.15rem 1.25rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--gray-800);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all var(--transition);
  user-select: none;
}

.faq-question:hover {
  color: var(--blue-700);
}

.faq-question i {
  color: var(--gray-400);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
  color: var(--blue-500);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 1.25rem;
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 1.25rem 1.15rem;
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.mock-footer {
  background: var(--primary-900);
  color: rgba(255,255,255,0.7);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: .85rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.mock-footer a {
  color: var(--blue-400);
  text-decoration: none;
}

.mock-footer a:hover {
  color: var(--blue-300);
  text-decoration: underline;
}

/* ═══════════════════════════════════════════
   TEST PHASE — PTE Academic Interface
═══════════════════════════════════════════ */
.test-phase {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: #fff;
  font-family: Arial, Helvetica, 'Segoe UI', sans-serif;
}
.test-phase.active { display: flex; }

/* ==============================
   PTE Top Bar — Minimal & Clean
   ============================== */
.pte-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #d1d5db;
  min-height: 42px;
  flex-shrink: 0;
  position: relative;
}

.pte-top-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pte-top-left .pte-test-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pte-top-left .pte-section-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}

.pte-top-left .pte-section-name::before {
  content: '|';
  margin-right: 0.75rem;
  color: #d1d5db;
}

.pte-question-progress {
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.pte-top-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* PTE-Style Timer */
.pte-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #111827;
  min-width: 70px;
  text-align: center;
  transition: all 0.3s ease;
}

/* Timer section label — shows section name before the countdown */
.pte-timer-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pte-timer.warning .pte-timer-label {
  color: #92400e;
}

.pte-timer.critical .pte-timer-label {
  color: #991b1b;
}

.pte-timer.warning {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.pte-timer.critical {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
  animation: timerPulse 0.8s ease infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* PTE Exit Button */
.pte-exit-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.pte-exit-btn:hover {
  color: #ef4444;
  background: #fef2f2;
}

/* ==============================
   PTE Progress Bar
   ============================== */
.pte-progress-bar {
  height: 4px;
  background: #e5e7eb;
  flex-shrink: 0;
}

.pte-progress-bar .pte-progress-fill {
  height: 100%;
  background: #3b82f6;
  transition: width 0.5s linear;
  width: 100%;
}

.pte-progress-bar .pte-progress-fill.critical {
  background: #ef4444;
}

/* ==============================
   Recording Status Box (PTE-Style)
   ============================== */
.pte-recording-status {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.pte-recording-status.visible {
  display: flex;
}

.pte-mic-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pte-mic-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.pte-mic-icon.ready {
  background: #e5e7eb;
  color: #6b7280;
}

.pte-mic-icon.recording {
  background: #dc2626;
  color: #fff;
  animation: micPulse 0.6s ease infinite;
}

.pte-mic-icon.done {
  background: #16a34a;
  color: #fff;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}

.pte-status-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  min-width: 5rem;
}

.pte-status-text.recording {
  color: #dc2626;
}

.pte-status-text.done {
  color: #16a34a;
}

.pte-waveform {
  width: 176px;
  height: 40px;
  background: #e5e7eb;
  border-radius: 4px;
  display: block;
}

/* Play Recording Button */
.pte-play-recording-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #16a34a;
  background: #f0fdf4;
  color: #15803d;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pte-play-recording-btn:hover {
  background: #16a34a;
  color: #fff;
}

.pte-recording-timer {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #374151;
}

/* Section navigation tabs (moved below top bar) */
.pte-section-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e5e7eb;
  flex-shrink: 0;
  padding: 0 1.5rem;
  background: #fff;
}

.pte-section-tab {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pte-section-tab:hover {
  color: #2563eb;
}

.pte-section-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.pte-section-tab.completed {
  color: #16a34a;
}

.pte-section-tab.completed.active {
  color: #16a34a;
  border-bottom-color: #16a34a;
}

.pte-section-tab .tab-check {
  font-size: 0.65rem;
}

/* Main Content */
.test-content {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Section Intro — PTE Clean Style */
.section-intro {
  text-align: center;
  padding: 2.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section-intro .s-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.6;
}

.section-intro h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.section-intro p {
  color: #6b7280;
  font-size: 0.9rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}

.section-intro .btn { margin-top: 0.5rem; }

/* Part Selector — Clean List */
.part-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.part-btn {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #374151;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.part-btn:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #2563eb;
}

.part-btn.completed {
  border-color: #16a34a;
  color: #16a34a;
}

/* Part Panels */
.part-panel { display: none; }
.part-panel.active { display: block; }

/* Part Header */
.part-header { margin-bottom: 1.5rem; }
.part-header h3 { font-size: 1.3rem; font-weight: 700; color: var(--gray-900); }
.part-header .part-instruction {
  font-size: .9rem;
  color: var(--gray-600);
  margin-top: .5rem;
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  line-height: 1.6;
}

/* Question Card — PTE Clean Style */
.question-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  margin-bottom: 1rem;
  flex: 1;
}

.question-card .q-number {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.q-number .num-badge {
  background: #2563eb;
  color: #fff;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
}

/* Passage Text */
.passage-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--gray-700);
  padding: 1.25rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 1.25rem;
}

/* Read Aloud specific */
.read-aloud-display {
  font-size: 1.2rem;
  line-height: 1.85;
  color: var(--gray-800);
  text-align: center;
  padding: 1.5rem;
  font-weight: 500;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  margin-bottom: 1.25rem;
}

/* Describe Image */
.image-placeholder {
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.image-placeholder i { font-size: 2.5rem; color: var(--gray-400); margin-bottom: .75rem; }
.image-placeholder .img-type { font-weight: 700; color: var(--gray-700); font-size: 1rem; }
.image-placeholder .img-desc { color: var(--gray-500); font-size: .9rem; margin-top: .5rem; line-height: 1.6; }

/* Repeat Sentence */
.repeat-audio-box {
  background: var(--blue-50);
  border: 1.5px solid var(--blue-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.repeat-audio-box i { font-size: 2rem; color: var(--blue-600); margin-bottom: .5rem; display: block; }
.repeat-audio-box .play-btn {
  background: var(--blue-600);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: .6rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.repeat-audio-box .play-btn:hover { background: var(--blue-700); transform: scale(1.03); }

/* Options (Multiple Choice) */
.options-list { display: flex; flex-direction: column; gap: .65rem; }

.option-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1.1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: .95rem;
}

.option-item:hover { border-color: var(--blue-300); background: var(--blue-50); }
.option-item.selected { border-color: var(--blue-600); background: var(--blue-100); }
.option-item.correct-selected { border-color: var(--green-600); background: var(--green-50); }
.option-item.incorrect-selected { border-color: var(--red-600); background: var(--red-50); }
.option-item.correct-not-selected { border-color: var(--green-500); background: var(--green-50); opacity: .7; }

.option-item .opt-label {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
  transition: all var(--transition);
}

.option-item.selected .opt-label { background: var(--blue-600); color: var(--white); }
.option-item .opt-text { flex: 1; line-height: 1.5; padding-top: .15rem; }

/* Multiple answer options */
.option-item.multi .opt-check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .15rem;
  transition: all var(--transition);
}

.option-item.multi.selected .opt-check {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: var(--white);
}

/* Fill in the Blanks */
.blanks-text {
  font-size: 1.05rem;
  line-height: 2.2;
  color: var(--gray-700);
  padding: 1.25rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 1rem;
}

.blank-input {
  display: inline-block;
  min-width: 120px;
  padding: .3rem .6rem;
  border: 2px dashed var(--blue-400);
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  font-size: .95rem;
  color: var(--blue-800);
  text-align: center;
}

.blank-input.filled { border-style: solid; background: var(--blue-100); border-color: var(--blue-500); }
.blank-input.correct { background: var(--green-50); border-color: var(--green-500); color: var(--green-700); }
.blank-input.incorrect { background: var(--red-50); border-color: var(--red-500); color: var(--red-700); }

.drag-words-box {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  min-height: 50px;
}

.drag-word {
  padding: .4rem .85rem;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: 999px;
  cursor: grab;
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
  user-select: none;
}

.drag-word:hover { border-color: var(--blue-400); background: var(--blue-50); }
.drag-word.used { opacity: .35; pointer-events: none; }

/* Dropdown for Reading & Writing Fill */
.dropdown-blank {
  display: inline-block;
  position: relative;
  min-width: 140px;
}

.dropdown-blank select {
  padding: .3rem .6rem;
  border: 2px solid var(--blue-400);
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  font-size: .9rem;
  color: var(--blue-800);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%233b82f6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 24px;
  min-width: 120px;
}

.dropdown-blank select:focus { outline: none; border-color: var(--blue-600); }

/* Reorder Paragraphs */
.reorder-container { display: flex; flex-direction: column; gap: .75rem; }

.reorder-item {
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: grab;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  transition: all var(--transition);
  user-select: none;
}

.reorder-item:hover { border-color: var(--blue-400); background: var(--blue-50); }

.reorder-item .reorder-handle {
  color: var(--gray-400);
  font-size: 1.1rem;
  cursor: grab;
  padding-top: .15rem;
  flex-shrink: 0;
}

.reorder-item .reorder-text {
  flex: 1;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--gray-700);
}

.reorder-item .reorder-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}

/* Listening specific */
.audio-player-box {
  background: var(--blue-50);
  border: 1.5px solid var(--blue-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.audio-player-box i { font-size: 2.5rem; color: var(--blue-600); margin-bottom: .5rem; display: block; }

.audio-player-box .play-btn {
  background: var(--blue-600);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: .7rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.audio-player-box .play-btn:hover { background: var(--blue-700); transform: scale(1.03); }
.audio-player-box .play-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.audio-progress {
  margin-top: 1rem;
  height: 4px;
  background: var(--blue-200);
  border-radius: 999px;
  overflow: hidden;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.audio-progress .progress-fill {
  height: 100%;
  background: var(--blue-600);
  width: 0%;
  transition: width .3s linear;
}

/* Highlight incorrect words */
.highlight-text {
  font-size: 1rem;
  line-height: 2;
  padding: 1.25rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.highlight-text .hl-word {
  padding: .1rem .15rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition);
}

.highlight-text .hl-word:hover { background: var(--amber-100); }
.highlight-text .hl-word.selected { background: var(--red-100); color: var(--red-700); text-decoration: line-through; }

/* Summary Options */
.summary-options { display: flex; flex-direction: column; gap: .75rem; }

.summary-option {
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: .9rem;
  line-height: 1.6;
}

.summary-option:hover { border-color: var(--blue-300); background: var(--blue-50); }
.summary-option.selected { border-color: var(--blue-600); background: var(--blue-100); }

/* Action Buttons — PTE Style */
.action-row {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: Arial, Helvetica, 'Segoe UI', sans-serif;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) { background: #e5e7eb; }

.btn-success {
  background: #16a34a;
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: #15803d;
}

/* ── Timer references (legacy) — mapped to new PTE styles ── */
/* timer-display now uses .pte-timer, kept for JS compatibility */
.timer-display {
  /* N/A - use .pte-timer */
}

.timer-bar { /* N/A - use .pte-progress-bar */
}

/* ── Section Timer in Content Area ── */
.section-timer-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.section-timer-info .timer-countdown {
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #374151;
}

.section-timer-info.warning {
  background: #fef3c7;
  border-color: #f59e0b;
}

.section-timer-info.warning .timer-countdown {
  color: #92400e;
}

.section-timer-info.critical {
  background: #fee2e2;
  border-color: #ef4444;
}

.section-timer-info.critical .timer-countdown {
  color: #991b1b;
}

/* ═══════════════════════════════════════════
   Per-Question Timer — PTE Clean Style
═══════════════════════════════════════════ */
.q-timer-wrapper {
  margin-bottom: 0.75rem;
}

.question-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  transition: all 0.2s ease;
}

.question-timer i {
  font-size: 0.75rem;
  color: #9ca3af;
}

.question-timer .qt-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  min-width: 2.5rem;
}

.question-timer .qt-time {
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 2.8rem;
  color: #374151;
}

.question-timer .qt-bar-track {
  flex: 1;
  height: 4px;
  background: #e5e7eb;
  overflow: hidden;
  min-width: 60px;
}

.question-timer .qt-fill {
  height: 100%;
  transition: width 0.5s linear;
  width: 100%;
}

.question-timer .qt-fill.qt-fill-prep {
  background: #f59e0b;
}

.question-timer .qt-fill.qt-fill-active {
  background: #3b82f6;
}

.question-timer .qt-fill.qt-fill-critical {
  background: #ef4444;
}

/* Phase styling */
.question-timer.qt-prep {
  background: #fef3c7;
  border-color: #f59e0b;
}

.question-timer.qt-prep .qt-label { color: #92400e; }
.question-timer.qt-prep .qt-time { color: #92400e; }

.question-timer.qt-response {
  background: #eff6ff;
  border-color: #93c5fd;
}

.question-timer.qt-response .qt-label { color: #1e40af; }
.question-timer.qt-response .qt-time { color: #1e40af; }

.question-timer.qt-total {
  background: #eef2ff;
  border-color: #a5b4fc;
}

.question-timer.qt-total .qt-label { color: #3730a3; }
.question-timer.qt-total .qt-time { color: #3730a3; }

.question-timer.qt-critical {
  animation: timerPulse 0.6s ease infinite;
}

.question-timer.qt-critical.qt-response,
.question-timer.qt-critical.qt-total {
  background: #fee2e2;
  border-color: #ef4444;
}

.question-timer.qt-critical.qt-response .qt-label,
.question-timer.qt-critical.qt-total .qt-label,
.question-timer.qt-critical.qt-response .qt-time,
.question-timer.qt-critical.qt-total .qt-time {
  color: #991b1b;
}

/* ═══════════════════════════════════════════
   SETTINGS PANEL — Auto-start Toggle
═══════════════════════════════════════════ */
.settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 400;
  align-items: center;
  justify-content: center;
}
.settings-overlay.open { display: flex; }

.settings-panel {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 420px;
  max-width: 90vw;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: slideUp .25s ease;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.settings-header i { color: var(--blue-600); }

.settings-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: .3rem;
  border-radius: 4px;
  transition: all .15s ease;
}

.settings-close:hover {
  color: var(--red-600);
  background: var(--red-50);
}

.settings-desc {
  padding: 1rem 1.5rem;
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.6;
  border-bottom: 1px solid var(--gray-100);
}

.settings-toggles {
  padding: .5rem 0;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.5rem;
  transition: background .15s ease;
}

.settings-row:hover {
  background: var(--gray-50);
}

.settings-row-label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.settings-row-label i {
  font-size: .85rem;
  color: var(--blue-500);
  width: 1.2rem;
  text-align: center;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--gray-300);
  border-radius: 999px;
  transition: all .25s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all .25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--blue-600);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-slider {
  box-shadow: 0 0 0 3px var(--blue-200);
}

.settings-footer {
  padding: .75rem 1.5rem;
  font-size: .75rem;
  color: var(--gray-400);
  text-align: center;
  border-top: 1px solid var(--gray-100);
}

/* ═══════════════════════════════════════════
   Toast
═══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  padding: .75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: .875rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: slideUp .25s ease;
  max-width: 90vw;
}

.toast.hidden { display: none; }
.toast-success { background: var(--green-700); }
.toast-error { background: var(--red-700); }
.toast-info { background: var(--blue-700); }

/* Hidden */
.hidden { display: none !important; }

/* Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: scale(0.95); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn .35s ease; }
.count-up { animation: countUp .5s ease; }

/* Reading split layout */
.reading-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.reading-passage-panel {
  background: var(--white);
  border: 1.5px solid var(--blue-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-height: 500px;
  overflow-y: auto;
  position: sticky;
  top: 80px;
}

.reading-passage-panel .panel-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blue-500);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.reading-passage-panel .panel-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-700);
}

.reading-questions-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Listening Audio Hero */
.listening-audio-hero {
  background: linear-gradient(135deg, var(--primary-800), var(--blue-700));
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: white;
}

.listening-audio-hero .audio-icon {
  font-size: 3rem;
  margin-bottom: .75rem;
  display: block;
  opacity: .9;
}

.listening-audio-hero .play-btn-large {
  background: white;
  color: var(--blue-700);
  border: none;
  border-radius: 999px;
  padding: .85rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.listening-audio-hero .play-btn-large:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(0,0,0,.3);
}

.listening-audio-hero .play-btn-large:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.listening-audio-hero .audio-status {
  margin-top: 1rem;
  font-size: .85rem;
  opacity: .8;
}

/* Writing panel */
.writing-editor-box {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.writing-editor-box:focus-within {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-100);
}

.writing-editor-box .editor-toolbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: .75rem;
  color: var(--gray-500);
}

.writing-editor-box .editor-toolbar i {
  color: var(--gray-400);
}

.writing-editor-box .editor-toolbar .toolbar-sep {
  width: 1px;
  height: 20px;
  background: var(--gray-200);
}

.writing-editor-box .editor-body textarea {
  width: 100%;
  min-height: 200px;
  padding: 1rem 1.25rem;
  border: none;
  font-size: 1rem;
  line-height: 1.7;
  font-family: inherit;
  resize: vertical;
  outline: none;
  background: transparent;
}

.writing-editor-box .editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 1rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  font-size: .8rem;
  color: var(--gray-500);
}

/* Chart container */
.chart-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto 1rem;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.chart-container svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Auto-start overlay — PTE Style */
.auto-start-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.auto-start-card {
  background: #fff;
  border: 1px solid #d1d5db;
  padding: 2.5rem;
  text-align: center;
  max-width: 360px;
}

.auto-start-card .countdown-num {
  font-size: 5rem;
  font-weight: 700;
  color: #2563eb;
  line-height: 1;
  margin: 1rem 0;
}

.auto-start-card p {
  color: #6b7280;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 640px) {
  .reading-split-layout { grid-template-columns: 1fr; }
  .reading-passage-panel { position: static; max-height: none; }
  .tests-grid { grid-template-columns: 1fr; }
  .test-content { padding: 1rem; }
  .question-card { padding: 1.25rem; }
  .passage-text { font-size: .95rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-section { padding: 3rem 1rem 5rem; }

  /* PTE Responsive */
  .pte-top-bar {
    padding: 0.35rem 0.75rem;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .pte-question-progress {
    position: static;
    transform: none;
    font-size: 0.75rem;
    order: 3;
    width: 100%;
    text-align: center;
  }
  .pte-top-left .pte-test-title { font-size: 0.65rem; }
  .pte-top-left .pte-section-name { font-size: 0.7rem; }
  .pte-timer { font-size: 0.9rem; min-width: 55px; padding: 0.15rem 0.5rem; }
  .pte-section-tabs { overflow-x: auto; padding: 0 0.75rem; }
  .pte-section-tab { font-size: 0.65rem; padding: 0.35rem 0.6rem; }
  .pte-recording-status { flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .pte-waveform { width: 160px; }
  .part-selector { max-width: 100%; }
}

/* ═══════════════════════════════════════════
   TEST COMPLETE SCREEN — Results Summary
═══════════════════════════════════════════ */
.test-complete-screen {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

/* Confetti Container */
.tc-confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.tc-confetti-piece {
  position: absolute;
  top: -10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Hero Score Card */
.tc-hero {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  border-radius: var(--radius-xl);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.tc-hero-inner {
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  color: white;
  position: relative;
  z-index: 1;
}

.tc-hero::before {
  content: '\u266B';
  position: absolute;
  top: -30px;
  right: -20px;
  font-size: 8rem;
  opacity: 0.06;
  line-height: 1;
}

.tc-hero::after {
  content: '\u2605';
  position: absolute;
  bottom: -20px;
  left: -10px;
  font-size: 6rem;
  opacity: 0.06;
  line-height: 1;
}

.tc-hero-icon {
  font-size: 4rem;
  margin-bottom: 0.25rem;
}

.tc-hero h2 {
  color: white;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.tc-hero-sub {
  opacity: 0.7;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.tc-hero-score-wrap {
  margin-top: 0.5rem;
}

.tc-score-number {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: white;
}

.tc-score-label {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

.tc-grade-badge {
  display: inline-block;
  padding: 0.3rem 1.2rem;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-top: 0.75rem;
}

.tc-new-best {
  margin-top: 0.75rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-block;
}

.tc-new-best i {
  color: #fbbf24;
  margin-right: 0.35rem;
}

.tc-prev-best {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Insights Cards */
.tc-insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tc-insight-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}

.tc-insight-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.tc-insight-icon.best {
  background: #dbeafe;
  color: #1d4ed8;
}

.tc-insight-icon.needs {
  background: #fef3c7;
  color: #92400e;
}

.tc-insight-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
}

.tc-insight-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-top: 0.1rem;
}

.tc-insight-score {
  font-size: 0.85rem;
  color: var(--blue-600);
  font-weight: 700;
}

/* Section Heading */
.tc-section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}

.tc-section-heading i {
  color: var(--blue-500);
  margin-right: 0.4rem;
}

/* Section Breakdown */
.tc-section-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tc-section-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}

.tc-section-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-sm);
}

.tc-section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.tc-section-card-header:hover {
  background: var(--gray-50);
}

.tc-section-card-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tc-section-icon {
  font-size: 1rem;
  color: var(--blue-500);
  width: 1.5rem;
  text-align: center;
}

.tc-section-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
}

.tc-section-card-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tc-section-score {
  font-size: 1.1rem;
  font-weight: 700;
}

.tc-section-grade {
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.tc-expand-icon {
  font-size: 0.75rem;
  color: var(--gray-400);
  transition: transform 0.2s ease;
}

.tc-section-card.tc-expanded .tc-expand-icon {
  transform: rotate(180deg);
}

/* Progress bar under section card header */
.tc-progress-track {
  height: 4px;
  background: var(--gray-100);
  margin: 0 1rem 0.5rem;
  border-radius: 999px;
  overflow: hidden;
}

.tc-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease;
}

/* Part breakdown (expandable) */
.tc-part-breakdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1rem;
}

.tc-section-card.tc-expanded .tc-part-breakdown {
  max-height: 500px;
  padding: 0 1rem 0.75rem;
}

.tc-part-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.8rem;
}

.tc-part-row:last-child {
  border-bottom: none;
}

.tc-part-label {
  color: var(--gray-600);
}

.tc-part-score {
  font-weight: 700;
}

/* Actions */
.tc-actions {
  display: flex;
  gap: 0.75rem;
}

/* Responsive */
@media (max-width: 640px) {
  .tc-insights {
    grid-template-columns: 1fr;
  }
  .tc-actions {
    flex-direction: column;
  }
  .tc-hero-inner {
    padding: 1.5rem 1rem;
  }
  .tc-score-number {
    font-size: 2.5rem;
  }
}

/* ═══════════════════════════════════════════
   PART RESULTS MODAL
═══════════════════════════════════════════ */
.part-results-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  animation: fadeIn .2s ease;
  backdrop-filter: blur(4px);
}

.part-results-card {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 420px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: slideUp .3s ease;
}

.pr-header {
  text-align: center;
  padding: 1.5rem 1.5rem 0.5rem;
}

.pr-icon {
  font-size: 2.5rem;
  color: var(--green-500);
  margin-bottom: 0.25rem;
}

.pr-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
}

.pr-subtitle {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.15rem;
}

.pr-score-section {
  text-align: center;
  padding: 1rem 1.5rem;
}

.pr-score-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.pr-score-label {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.25rem;
}

.pr-grade-badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
}

.pr-progress-track {
  height: 6px;
  background: var(--gray-100);
  margin: 0 1.5rem 1rem;
  border-radius: 999px;
  overflow: hidden;
}

.pr-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease;
}

.pr-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0 1.5rem 1rem;
}

.pr-stat {
  text-align: center;
  padding: 0.75rem 0.5rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}

.pr-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gray-800);
}

.pr-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  margin-top: 0.1rem;
}

.pr-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-400);
  padding: 0 1.5rem 1rem;
}

.pr-note i {
  margin-right: 0.25rem;
}

.pr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

.pr-actions .btn {
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════
   ANSWER REVIEW
═══════════════════════════════════════════ */
.answer-review {
  max-width: 700px;
  margin: 0 auto;
}

.ar-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--gray-200);
}

.ar-header i {
  font-size: 1.2rem;
  color: var(--gray-500);
}

.ar-back-btn {
  background: var(--gray-100);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.ar-back-btn:hover {
  background: var(--gray-200);
}

.ar-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
}

.ar-subtitle {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.1rem;
}

.ar-question {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all var(--transition);
}

.ar-question:hover {
  border-color: var(--blue-200);
}

.ar-question.ar-correct {
  border-left: 4px solid var(--green-500);
}

.ar-question.ar-incorrect {
  border-left: 4px solid var(--red-500);
}

.ar-question.ar-unanswered {
  border-left: 4px solid var(--gray-300);
}

.ar-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.ar-q-num {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.ar-q-status {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ar-q-text {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}

.ar-answers {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ar-answer-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.ar-answer-label {
  font-weight: 600;
  color: var(--gray-500);
  min-width: 100px;
  flex-shrink: 0;
}

.ar-answer-value {
  font-weight: 600;
  padding: 0.2rem 0.75rem;
  border-radius: 4px;
}

.ar-val-correct {
  background: var(--green-50);
  color: var(--green-700);
}

.ar-val-incorrect {
  background: var(--red-50);
  color: var(--red-700);
  text-decoration: line-through;
}

.ar-footer {
  padding: 1rem 0 2rem;
}

/* ═══════════════════════════════════════════
   ATTEMPT HISTORY
═══════════════════════════════════════════ */
.history-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  animation: fadeIn .2s ease;
  backdrop-filter: blur(4px);
}

.history-card {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 700px;
  max-width: 95vw;
  max-height: 85vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp .3s ease;
}

.history-card-lg {
  width: 850px;
}

.history-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  position: relative;
}

.history-header .history-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 4px;
  transition: all var(--transition);
}

.history-header .history-close:hover {
  color: var(--red-600);
  background: var(--red-50);
}

.history-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
}

.history-title i {
  color: var(--blue-500);
  margin-right: 0.4rem;
}

.history-subtitle {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.2rem;
}

.history-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}

.history-stat {
  text-align: center;
}

.hs-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue-600);
}

.hs-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
}

.history-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.history-table th {
  text-align: left;
  padding: 0.5rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

.history-table td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  white-space: nowrap;
}

.history-table tr:hover td {
  background: var(--gray-50);
}

.hist-score {
  color: var(--gray-900);
  font-weight: 700;
}

.hist-grade-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.history-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

/* Progress Summary History Button */
.prog-history-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.prog-history-btn:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-700);
}

.prog-history-btn i {
  color: var(--blue-500);
}

/* Test Card History Button */
.card-history-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
}

.card-history-btn:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-600);
}


/* ═══════════════════════════════════════════
   PTE ACADEMIC SCORE REPORT STYLES
═══════════════════════════════════════════ */

/* Report Container */
.pte-score-report {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Report Header */
.pte-report-header {
  background: #1e3a5f;
  color: #fff;
  padding: 1.25rem 1.5rem;
}

.pte-report-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pte-report-logo {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  opacity: 0.85;
}

.pte-report-logo span {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.2em;
}

.pte-report-meta {
  flex: 1;
}

.pte-report-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.pte-report-date {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.15rem;
}

.pte-report-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin-top: 0.75rem;
}

/* Overall Score */
.pte-overall-section {
  text-align: center;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.pte-overall-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 0.35rem;
}

.pte-overall-value {
  font-size: 3.5rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  margin-bottom: 0.15rem;
}

.pte-score-counter {
  display: inline-block;
}

.pte-overall-range {
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Communicative Skills */
.pte-skills-section {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.pte-skills-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #374151;
  margin-bottom: 0.75rem;
}

.pte-skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pte-skill-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pte-skill-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.pte-skill-info {
  flex: 1;
  min-width: 0;
}

.pte-skill-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.pte-skill-bar-track {
  height: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

.pte-skill-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease;
}

.pte-skill-score {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
  min-width: 2.2rem;
  text-align: right;
}

.pte-skill-grade {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Breakdown Section */
.pte-breakdown-section {
  border-bottom: 1px solid #e5e7eb;
}

.pte-breakdown-title {
  padding: 0.85rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.15s ease;
  user-select: none;
}

.pte-breakdown-title:hover {
  background: #eff6ff;
}

.pte-breakdown-title i {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.pte-breakdown-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.pte-breakdown-body.open {
  max-height: 2000px;
}

.pte-breakdown-card {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid #f3f4f6;
}

.pte-breakdown-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.pte-breakdown-card-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.pte-breakdown-card-left i {
  color: #6b7280;
  width: 1rem;
  text-align: center;
}

.pte-breakdown-card-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pte-breakdown-card-score {
  font-size: 1.1rem;
  font-weight: 700;
}

.pte-breakdown-bar-track {
  height: 4px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.pte-breakdown-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.pte-breakdown-parts {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pte-part-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.78rem;
  border-bottom: 1px solid #f9fafb;
}

.pte-part-label {
  color: #6b7280;
}

.pte-part-score {
  font-weight: 600;
  color: #374151;
}

/* Insight Banner */
.pte-insight-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.82rem;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.pte-insight-banner.new-best {
  background: #fefce8;
  color: #854d0e;
  font-weight: 600;
}

/* Score Interpretation */
.pte-interpretation {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.pte-interp-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.pte-interp-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #6b7280;
  padding: 0.12rem 0;
}

.pte-interp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Report Actions */
.pte-report-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
}

.pte-report-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Old TC styles - keep for backward compat with confetti */
.tc-hero { /* fallback */ }

/* Override old tc-score-counter for new layout */
.pte-score-counter {
  font-size: inherit;
}

/* Responsive */
@media (max-width: 640px) {
  .part-results-card { width: auto; }
  .pr-actions { grid-template-columns: 1fr; }
  .pr-stats { grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
  .pr-stat { padding: 0.5rem; }
  .pr-stat-value { font-size: 1.1rem; }

  .history-card { width: 100%; max-height: 90vh; }
  .history-card-lg { width: 100%; }
  .history-table { font-size: 0.72rem; }
  .history-table th, .history-table td { padding: 0.35rem 0.25rem; }
  .history-stats-row { gap: 0.35rem; }

  .ar-answer-label { min-width: 80px; font-size: 0.78rem; }
  .ar-q-text { font-size: 0.85rem; }

  .progress-summary { position: relative; }
  .prog-history-btn { position: static; margin-top: 0.5rem; width: 100%; justify-content: center; }
}
