/* ========================================
   IELTS SIMULATOR STYLES
   ======================================== */

/* Nav Timer */
.nav-timer {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nav-timer .timer-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-timer.warning { color: var(--red); }

/* Section Cards */
.section-select {
  max-width: 900px;
  margin: -40px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.section-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.section-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  border: 2px solid transparent;
  transition: all 0.3s;
}

.section-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}

.section-card.selected { border-color: var(--accent); }
.section-card .icon { font-size: 2.5rem; margin-bottom: 12px; }
.section-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.section-card p { font-size: 0.82rem; color: var(--text-secondary); }
.section-card .time { font-size: 0.78rem; color: var(--accent); font-weight: 600; margin-top: 8px; }

/* Exam Container */
.exam-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
  display: none;
}

.exam-container.active { display: block; }

/* Question Card */
.question-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.question-num {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.question-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.question-context {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding: 20px;
  background: var(--bg);
  border-radius: 10px;
  line-height: 1.8;
  border-left: 4px solid var(--blue);
}

/* Answer Options */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.option:hover {
  border-color: var(--accent);
  background: #fff7ed;
}

.option.selected {
  border-color: var(--accent);
  background: #fff7ed;
}

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

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

.option-letter {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.option.selected .option-letter {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.option.correct .option-letter {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.option.incorrect .option-letter {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

/* Fill in Blank */
.fill-blank {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fill-blank input {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  width: 250px;
  transition: border-color 0.2s;
}

.fill-blank input:focus {
  outline: none;
  border-color: var(--accent);
}

.fill-blank.correct input {
  border-color: var(--green);
  background: var(--green-light);
}

.fill-blank.incorrect input {
  border-color: var(--red);
  background: var(--red-light);
}

/* Passage */
.passage {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  line-height: 1.9;
  border: 1px solid var(--border);
  max-height: 400px;
  overflow-y: auto;
}

.passage-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 12px;
  display: block;
}

/* Writing Textarea */
.writing-textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
  transition: border-color 0.2s;
}

.writing-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.word-count {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 8px;
  text-align: right;
}

.word-count.warning { color: var(--red); }

/* Cue Card */
.cue-card {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 2px solid var(--accent);
  margin-bottom: 24px;
}

.cue-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
}

.cue-card ul { padding-left: 20px; }
.cue-card li { margin-bottom: 8px; color: var(--text-secondary); font-size: 0.95rem; }
.cue-card li strong { color: var(--text); }

/* Timer Box */
.timer-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}

.timer-box.green { background: var(--green-light); color: var(--green); }
.timer-box.yellow { background: var(--yellow-light); color: var(--yellow); }
.timer-box.red { background: var(--red-light); color: var(--red); }

/* Speaking Timer */
.speaking-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 24px 0;
}

.speak-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.speak-btn.record {
  background: var(--red);
  color: white;
  box-shadow: 0 4px 15px rgba(239,68,68,.3);
}

.speak-btn.record:hover { transform: scale(1.1); }
.speak-btn.stop { background: var(--text); color: white; }
.speak-time { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Results */
.results {
  max-width: 700px;
  margin: 0 auto;
  padding: 48px 24px;
  display: none;
}

.results.active { display: block; }

.results-header {
  text-align: center;
  margin-bottom: 40px;
}

.results-header h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.score-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 900;
}

.score-circle .label {
  font-size: 0.85rem;
  font-weight: 500;
}

.score-circle.excellent { background: var(--green-light); color: var(--green); border: 4px solid var(--green); }
.score-circle.good { background: var(--blue-light); color: var(--blue); border: 4px solid var(--blue); }
.score-circle.ok { background: var(--yellow-light); color: var(--yellow); border: 4px solid var(--yellow); }
.score-circle.poor { background: var(--red-light); color: var(--red); border: 4px solid var(--red); }

.result-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.result-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}

.result-item .icon { font-size: 1.5rem; margin-bottom: 8px; }
.result-item .name { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 4px; }
.result-item .score { font-size: 1.5rem; font-weight: 800; }
.result-item .total { font-size: 0.82rem; color: var(--text-secondary); }

.answer-review { margin-top: 32px; }
.answer-review h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; }

.review-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid;
  font-size: 0.9rem;
}

.review-item.correct { border-color: var(--green); }
.review-item.incorrect { border-color: var(--red); }
.review-item .q { font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.review-item .a { color: var(--text-secondary); }
.review-item .a strong { color: var(--green); }

/* Responsive Simulator */
@media (max-width: 768px) {
  .section-cards { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2rem; }
  .result-breakdown { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 20px; }
}

@media (max-width: 480px) {
  .section-cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
}
