/* Exam page styles */
.exam-page {
  overflow-y: auto;
}

#examMain {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px;
}

.back-link {
  color: #9E1B32;
  text-decoration: none;
  font-size: 13px;
}

.back-link:hover {
  text-decoration: underline;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 20px;
}

.exam-card {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.exam-card.warning {
  border-color: #fbbf24;
}

.exam-card.ok {
  border-color: #4ade80;
}

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

.exam-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.exam-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}

.predicted-grade {
  font-size: 15px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  margin-left: auto;
}
.predicted-grade.grade-a { color: #166534; }
.predicted-grade.grade-b { color: #0e7490; }
.predicted-grade.grade-c { color: #a16207; }
.predicted-grade.grade-d { color: #dc2626; }
.predicted-grade.grade-f { color: #dc2626; }

.exam-date {
  font-size: 13px;
  color: #6b7280;
}

.exam-status {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.exam-status.needs-review {
  color: #a16207;
}

.exam-status.ready {
  color: #166534;
}

.topic-list {
  list-style: none;
  margin-top: 8px;
}

.topic-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}

.topic-mastery {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 40px;
  text-align: center;
}

.topic-mastery.low {
  background: #fee2e2;
  color: #991b1b;
}

.topic-mastery.mid {
  background: #fef9c3;
  color: #854d0e;
}

.topic-mastery.high {
  background: #dcfce7;
  color: #166534;
}

.topic-name {
  color: #1a1a2e;
}

.topic-bar {
  flex: 1;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.topic-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease-out;
}

/* --- Practice Suggestions --- */

.practice-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.practice-header .section-title {
  margin-bottom: 0;
}
.practice-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  background: #9E1B32;
  padding: 4px 10px;
  border-radius: 4px;
  flex-shrink: 0;
}
.practice-title {
  color: #1a1a2e;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.practice-card {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.practice-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
}

.practice-mastery-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.practice-btn {
  display: inline-block;
  text-align: center;
  padding: 8px 16px;
  background: transparent;
  color: #9E1B32;
  border: 1px solid #9E1B32;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
  align-self: flex-start;
}

.practice-btn:hover {
  background: rgba(158, 27, 50, 0.08);
}

.more-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 12px;
}
.more-toggle:hover { color: #1a1a2e; }
.more-toggle::before {
  content: "\25B6";
  font-size: 10px;
  transition: transform 0.2s;
}
.more-toggle.open::before {
  transform: rotate(90deg);
}
.more-count { color: #6b7280; }

.more-section {
  display: none;
}
.more-section.expanded {
  display: grid;
}
