/* IELTS Prep Platform Core Design System */

:root {
  /* Dashboard Theme (Modern Dark Glass) */
  --dash-bg: #090d16;
  --dash-bg-card: rgba(21, 28, 45, 0.6);
  --dash-border: rgba(255, 255, 255, 0.08);
  --dash-text: #f3f4f6;
  --dash-text-muted: #9ca3af;
  
  /* Brand Accents */
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  
  /* Exam Simulator Theme (Strict Official Computer IELTS layout) */
  --exam-bg: #f4f6fa;
  --exam-header-bg: #3c4b5c;
  --exam-header-text: #ffffff;
  --exam-footer-bg: #e1e6eb;
  --exam-pane-bg: #ffffff;
  --exam-text: #333333;
  --exam-text-muted: #666666;
  --exam-border: #d3dbe3;
  --exam-highlight: #007bb6;
  --exam-answered: #8ba2b9;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  scrollbar-width: thin;
}

body {
  background-color: var(--dash-bg);
  color: var(--dash-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: var(--transition-smooth);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Typography & Gradient Utility */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--dash-text-muted) !important; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }

/* Navigation Bar */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2.5rem;
  background: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dash-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.logo-icon {
  animation: logo-pulse 4s infinite alternate;
}

@keyframes logo-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(139,92,246,0.3)); }
  100% { transform: scale(1.05); filter: drop-shadow(0 0 10px rgba(6,182,212,0.6)); }
}

.nav-links {
  display: flex;
  gap: 0.75rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--dash-text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  color: var(--dash-text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-btn.active {
  color: #ffffff;
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

.user-badge {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Main Viewport */
.view-viewport {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem;
}

.view-panel {
  display: none;
  animation: fade-in 0.4s ease-out forwards;
}

.view-panel.active {
  display: block;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Hero */
.dashboard-hero {
  background: linear-gradient(135deg, #131427 0%, #0d162c 100%);
  border: 1px solid var(--dash-border);
  border-radius: 24px;
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  color: var(--dash-text-muted);
  max-width: 600px;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* progress ring container */
.overall-progress-card {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ring-progress {
  position: relative;
  width: 120px;
  height: 120px;
}

.ring-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 8;
}

.ring-fg {
  fill: none;
  stroke: url(#gradient-accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.band-num {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.band-sub {
  font-size: 0.65rem;
  color: var(--dash-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--dash-bg-card);
  border: 1px solid var(--dash-border);
  padding: 1.5rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-title {
  color: var(--dash-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-value {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 2px;
}

.listening .stat-icon { background: rgba(6, 182, 212, 0.1); color: var(--accent-cyan); }
.reading .stat-icon { background: rgba(139, 92, 246, 0.1); color: var(--accent-purple); }
.writing .stat-icon { background: rgba(245, 158, 11, 0.1); color: var(--accent-amber); }
.speaking .stat-icon { background: rgba(16, 185, 129, 0.1); color: var(--accent-emerald); }

.section-title-wrapper {
  margin-bottom: 1.5rem;
}

.section-title-wrapper h2 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

/* Practice Cards */
.practice-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.practice-card {
  background: var(--dash-bg-card);
  border: 1px solid var(--dash-border);
  border-top: 4px solid transparent;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.practice-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.border-listening { border-top-color: var(--accent-cyan); }
.border-reading { border-top-color: var(--accent-purple); }
.border-writing { border-top-color: var(--accent-amber); }
.border-speaking { border-top-color: var(--accent-emerald); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.listening-bg { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.reading-bg { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.writing-bg { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.speaking-bg { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }

.test-duration {
  font-size: 0.8rem;
  color: var(--dash-text-muted);
  font-weight: 500;
}

.practice-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.practice-card p {
  color: var(--dash-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  flex: 1;
}

.action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dash-border);
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  transition: var(--transition-smooth);
}

.action-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.listening-btn:hover { background: var(--accent-cyan); border-color: var(--accent-cyan); color: #000; }
.reading-btn:hover { background: var(--accent-purple); border-color: var(--accent-purple); color: #fff; }
.writing-btn:hover { background: var(--accent-amber); border-color: var(--accent-amber); color: #000; }
.speaking-btn:hover { background: var(--accent-emerald); border-color: var(--accent-emerald); color: #000; }

/* Glass Container General */
.glass-container {
  background: var(--dash-bg-card);
  border: 1px solid var(--dash-border);
  padding: 3rem;
  border-radius: 24px;
  backdrop-filter: blur(15px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  margin-bottom: 2.5rem;
}

/* Band Calculator View */
.calculator-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  margin-top: 2rem;
  align-items: center;
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.calc-input-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dash-text);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.calc-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  outline: none;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  cursor: pointer;
  transition: transform 0.1s;
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  color: var(--accent-cyan);
  font-weight: 600;
  min-width: 120px;
}

.calc-result-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dash-border);
  padding: 3rem 2rem;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.02);
}

.band-badge-large {
  font-size: 4.5rem;
  font-weight: 800;
  color: #ffffff;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
  border: 4px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
  animation: pulse-ring 2s infinite alternate;
}

@keyframes pulse-ring {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(6, 182, 212, 0.2); }
  100% { transform: scale(1.03); box-shadow: 0 0 40px rgba(139, 92, 246, 0.4); }
}

.result-details h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* History View */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.clear-btn {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.clear-btn:hover {
  background: var(--accent-rose);
  color: #ffffff;
}

.history-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--dash-border);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.history-table th, .history-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--dash-border);
}

.history-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--dash-text);
  font-weight: 600;
  font-size: 0.9rem;
}

.history-table td {
  color: var(--dash-text-muted);
  font-size: 0.9rem;
}

.history-table tr:last-child td {
  border-bottom: none;
}

.history-table tr:hover td {
  color: var(--dash-text);
  background: rgba(255, 255, 255, 0.01);
}

.band-chip {
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  display: inline-block;
}

.band-chip.high { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.band-chip.med { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.band-chip.low { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.trash-icon-btn {
  background: transparent;
  border: none;
  color: var(--accent-rose);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.trash-icon-btn:hover {
  background: rgba(244, 63, 94, 0.1);
}

/* Results View */
.results-summary-card {
  display: flex;
  align-items: center;
  gap: 3rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--dash-border);
  padding: 2.5rem;
  border-radius: 20px;
  margin-bottom: 2.5rem;
}

.score-ring {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 5px solid var(--accent-purple);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.score-val {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.score-lbl {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.summary-details h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.result-module-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.detailed-review-section {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--dash-border);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 1.5rem;
}

.detailed-review-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.review-item {
  border-bottom: 1px solid var(--dash-border);
  padding: 1.5rem 0;
}

.review-item:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.review-q-num {
  font-weight: 700;
  color: #ffffff;
}

.review-status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.review-status-pill.correct { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.review-status-pill.incorrect { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.review-q-text {
  color: var(--dash-text);
  margin-bottom: 1rem;
}

.review-answers-compare {
  display: flex;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.user-ans-row strong { color: var(--accent-cyan); }
.correct-ans-row strong { color: var(--accent-emerald); }

/* Manual Self Grader Desk */
.manual-grader-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.criteria-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--dash-border);
  padding: 1.25rem;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.criteria-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.criteria-card.active {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

.band-indicator {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--accent-purple);
  color: #ffffff;
  font-weight: 800;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.criteria-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.criteria-card p {
  font-size: 0.85rem;
  color: var(--dash-text-muted);
  line-height: 1.4;
}

.scoring-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.model-answer-box, .user-submission-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 1.5rem;
}

.model-answer-box h4, .user-submission-box h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.model-answer-content, .user-submission-content {
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--dash-text-muted);
  max-height: 200px;
  overflow-y: auto;
}

.form-control-select {
  background: #111827;
  border: 1px solid var(--dash-border);
  color: #ffffff;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  width: 100%;
  font-weight: 600;
  outline: none;
}

/* ==========================================================================
   OFFICIAL CD-IELTS EXAM SIMULATOR STYLING (Light / Slate Mode Overlay)
   ========================================================================== */

.exam-simulator-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--exam-bg);
  color: var(--exam-text);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif; /* Standard default for IELTS exam look */
}

/* Simulator Header */
.simulator-header {
  background-color: var(--exam-header-bg);
  color: var(--exam-header-text);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 4px solid var(--exam-highlight);
  height: 60px;
}

.simulator-title-info {
  display: flex;
  align-items: center;
}

.exam-title-text {
  font-family: Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: bold;
}

.candidate-name {
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
}

.timer-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timer-text {
  font-family: 'JetBrains Mono', monospace, Arial;
  font-size: 1.5rem;
  font-weight: bold;
  background: #000;
  color: #00ff00;
  padding: 0.2rem 0.8rem;
  border-radius: 4px;
}

.timer-hide-btn {
  background: #e2e8f0;
  color: #333333;
  border: none;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: bold;
  border-radius: 2px;
}

.timer-hide-btn:hover {
  background: #cbd5e1;
}

/* Simulator Workspace */
.simulator-workspace {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  background: var(--exam-bg);
}

.workspace-pane {
  overflow-y: auto;
  height: 100%;
  background: var(--exam-pane-bg);
  display: flex;
  flex-direction: column;
}

.split-left {
  width: 50%;
  border-right: 1px solid var(--exam-border);
}

.split-right {
  width: 50%;
}

.split-gutter {
  width: 8px;
  background: #e1e6eb;
  cursor: col-resize;
  position: relative;
  z-index: 10;
  transition: background 0.2s;
}

.split-gutter:hover {
  background: #a0aec0;
}

/* Inside Panels */
.content-panel {
  padding: 2rem 2.5rem;
  overflow-y: auto;
  flex: 1;
  display: none;
  font-size: 1.05rem;
  line-height: 1.6;
}

.content-panel h2 {
  font-family: Arial, sans-serif;
  color: #111827;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--exam-border);
  padding-bottom: 0.5rem;
}

.content-panel p {
  margin-bottom: 1.25rem;
  color: #374151;
}

.select-text {
  user-select: text; /* Allow highlighting */
}

/* Highlight Helper styles */
::selection {
  background-color: #ffeb3b;
  color: #000;
}

/* Listening Audio panel in Exam Simulator */
.listening-box-card {
  max-width: 500px;
  margin: 4rem auto;
  background: #f8fafc;
  border: 1px solid var(--exam-border);
  border-radius: 8px;
  padding: 3rem 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.audio-animation-waves {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  height: 35px;
  margin-bottom: 1.5rem;
}

.sound-wave-bar {
  width: 5px;
  height: 5px;
  background: var(--exam-highlight);
  border-radius: 3px;
}

.audio-animation-waves.playing .sound-wave-bar {
  animation: bounce-wave 0.8s ease-in-out infinite alternate;
}

.audio-animation-waves.playing .sound-wave-bar:nth-child(2) { animation-delay: 0.15s; }
.audio-animation-waves.playing .sound-wave-bar:nth-child(3) { animation-delay: 0.3s; }
.audio-animation-waves.playing .sound-wave-bar:nth-child(4) { animation-delay: 0.45s; }
.audio-animation-waves.playing .sound-wave-bar:nth-child(5) { animation-delay: 0.6s; }

@keyframes bounce-wave {
  0% { height: 5px; }
  100% { height: 35px; }
}

.custom-audio-controller {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  margin-top: 2rem;
}

.audio-play-btn {
  background: var(--exam-highlight);
  color: #ffffff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.audio-play-btn:hover {
  background: #005a87;
}

.audio-speed-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.status-msg-box {
  background: #f1f5f9;
  border-left: 4px solid var(--exam-highlight);
  padding: 0.75rem 1rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  border-radius: 0 4px 4px 0;
  text-align: left;
}

/* Writing Layout in Exam Simulator */
.flex-column-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--exam-border);
}

.word-counter-widget {
  font-family: 'JetBrains Mono', monospace;
  font-weight: bold;
  background: #e2e8f0;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.writing-textarea {
  flex: 1;
  width: 100%;
  min-height: 350px;
  border: 1px solid var(--exam-border);
  padding: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
  resize: none;
  outline: none;
  border-radius: 4px;
}

.writing-textarea:focus {
  border-color: var(--exam-highlight);
  box-shadow: 0 0 0 2px rgba(0, 123, 182, 0.15);
}

.editor-footer-status {
  padding-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--exam-text-muted);
}

.writing-tasks-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--exam-border);
}

.task-tab-btn {
  background: #e2e8f0;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  color: var(--exam-text-muted);
}

.task-tab-btn.active {
  background: var(--exam-pane-bg);
  color: var(--exam-highlight);
  border: 1px solid var(--exam-border);
  border-bottom-color: var(--exam-pane-bg);
  margin-bottom: -2px;
}

/* SVG Chart styled nicely */
.svg-chart-container {
  background: #f8fafc;
  border: 1px solid var(--exam-border);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

/* Speaking Layout in Simulator */
.speaking-stages-wrapper {
  max-width: 600px;
  margin: 1.5rem auto;
}

.stages-indicator-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  position: relative;
}

.stages-indicator-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--exam-border);
  z-index: 1;
}

.stage-dot {
  background: var(--exam-pane-bg);
  border: 2px solid var(--exam-border);
  color: var(--exam-text-muted);
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  z-index: 2;
  position: relative;
}

.stage-dot.active {
  border-color: var(--exam-highlight);
  color: var(--exam-highlight);
  background: #f0f9ff;
}

.current-stage-box {
  background: #f8fafc;
  border: 1px solid var(--exam-border);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  min-height: 200px;
}

.speaking-question-box {
  font-size: 1.3rem;
  font-weight: bold;
  color: #1e293b;
  margin-top: 1rem;
  line-height: 1.5;
}

.cue-card-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.cue-card-box h4 {
  color: #92400e;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.cue-card-box ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.cue-card-box li {
  margin-bottom: 0.4rem;
  color: #78350f;
}

/* Speaking recorder components */
.speaking-recording-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.visualizer-canvas {
  background: #111827;
  border-radius: 6px;
  width: 100%;
  max-width: 400px;
}

.rec-controls {
  display: flex;
  gap: 1rem;
}

.rec-btn-start, .rec-btn-stop {
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.rec-btn-start {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

.rec-btn-start:hover:not(:disabled) {
  background: #fecaca;
}

.rec-btn-stop {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.rec-btn-stop:hover:not(:disabled) {
  background: #e2e8f0;
}

.rec-btn-start:disabled, .rec-btn-stop:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rec-red-dot {
  width: 12px;
  height: 12px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 1s infinite alternate;
}

@keyframes pulse-dot {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.2); opacity: 1; }
}

.recording-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--exam-text-muted);
}

.speaking-timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.circular-progress-bar {
  position: relative;
  width: 80px;
  height: 80px;
}

.circle-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 6;
}

.circle-fg {
  fill: none;
  stroke: var(--exam-highlight);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 219.91;
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.1s linear;
}

.circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--exam-highlight);
}

.timer-desc {
  font-size: 0.8rem;
  color: var(--exam-text-muted);
  margin-top: 0.4rem;
}

.playback-box {
  background: #f1f5f9;
  border: 1px solid var(--exam-border);
  padding: 1.25rem;
  border-radius: 6px;
  width: 100%;
  max-width: 400px;
  margin-top: 1rem;
}

.playback-box h4 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--exam-text);
  text-align: left;
}

.custom-audio-elem {
  width: 100%;
}

/* Exam Right Side Questions List formatting */
.questions-scroll-area {
  padding: 0.5rem 0.25rem;
}

.exam-question-item {
  background: #f8fafc;
  border: 1px solid var(--exam-border);
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.exam-question-item.active-item {
  border-left: 4px solid var(--exam-highlight);
  background: #f0f9ff;
}

.exam-q-text {
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 1rem;
  display: block;
}

/* Form Input Styling for Exam Questions */
.exam-form-control-text {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--exam-border);
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  outline: none;
  border-radius: 3px;
}

.exam-form-control-text:focus {
  border-color: var(--exam-highlight);
}

.choice-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.option-row input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Simulator Footer Control Bar */
.simulator-footer {
  background-color: var(--exam-footer-bg);
  border-top: 2px solid var(--exam-border);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.footer-nav-btn {
  background: #ffffff;
  color: #333333;
  border: 1px solid #c0cacf;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: bold;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-nav-btn:hover {
  background: #f4f6fa;
}

.inline-svg {
  display: inline-block;
  vertical-align: middle;
}

.bottom-center {
  display: flex;
  gap: 4px;
}

.q-pallet-btn {
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 1px solid #c0cacf;
  color: #333333;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  position: relative;
}

.q-pallet-btn.active {
  border: 2px solid var(--exam-highlight);
}

.q-pallet-btn.answered {
  background-color: var(--exam-answered);
  color: #ffffff;
}

/* Tiny dot indicating current active in the pallet */
.q-pallet-btn.answered::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

.submit-exam-btn {
  background: #b91c1c;
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
}

.submit-exam-btn:hover {
  background: #991b1b;
}

/* Responsive configurations */
@media (max-width: 1024px) {
  .practice-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .calculator-layout {
    grid-template-columns: 1fr;
  }
  .manual-grader-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .practice-cards-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-hero {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 2rem;
  }
  .nav-bar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .nav-links {
    width: 100%;
    justify-content: space-around;
  }
}
