/* =========================
   Mock Test Page
   Deep Blue UI
========================= */

:root {
  --primary: #062b70;
  --primary-dark: #041f52;
  --primary-light: #eef4ff;
  --primary-border: #bcd0f7;

  --text-main: #0f172a;
  --text-muted: #64748b;

  --border: #e2e8f0;
  --card-bg: #ffffff;
  --body-bg: #f8fafc;

  --green: #16a34a;
  --green-bg: #eaf8ef;
  --green-border: #a7e3b8;

  --red: #dc2626;
  --red-bg: #fff1f1;
  --red-border: #fecaca;

  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--body-bg);
  color: var(--text-main);
}

button {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.mock-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* =========================
   Start Screen
========================= */

.mock-start-screen {
  display: flex;
  justify-content: center;
}

.mock-start-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 46px 42px 34px;
  text-align: center;
  overflow: hidden;
}

.mock-start-card::after {
  content: "🍁";
  position: absolute;
  top: 80px;
  right: 40px;
  font-size: 150px;
  opacity: 0.035;
  transform: rotate(-12deg);
  pointer-events: none;
}

.mock-start-icon {
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.mock-start-icon span {
  font-size: 54px;
}

.mock-start-card h1 {
  margin: 0 0 14px;
  font-size: 42px;
  line-height: 1.1;
  color: var(--primary);
  font-weight: 800;
}

.mock-start-desc {
  max-width: 480px;
  margin: 0 auto 34px;
  line-height: 1.65;
  color: var(--text-main);
  font-size: 16px;
}

.mock-rules {
  text-align: left;
  margin-bottom: 26px;
}

.mock-rule-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.mock-rule-item:last-child {
  border-bottom: 0;
}

.rule-icon {
  width: 32px;
  height: 32px;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
}

.mock-rule-item p {
  margin: 0;
  color: var(--text-main);
  line-height: 1.45;
  font-size: 16px;
}

.mock-notice {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  text-align: left;
  align-items: flex-start;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 20px 0 26px;
}

.notice-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.mock-notice strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 4px;
}

.mock-notice p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.mock-footer-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--text-main);
  font-size: 14px;
}

.mock-footer-note span {
  color: var(--primary);
}

.mock-footer-note p {
  margin: 0;
}

/* =========================
   Buttons
========================= */

.primary-btn,
.secondary-btn,
.submit-btn {
  border: none;
  cursor: pointer;
  border-radius: 9px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.primary-btn {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(6, 43, 112, 0.22);
}

.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.secondary-btn {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid #cbd5e1;
}

.secondary-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.start-btn {
  min-width: 260px;
  padding: 16px 28px;
  font-size: 17px;
}

.start-btn span {
  margin-right: 8px;
}

/* =========================
   Test Screen
========================= */

.mock-test-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.mock-test-header h1 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 40px;
  line-height: 1.1;
}

.mock-test-header p {
  margin: 0;
  color: var(--text-main);
  font-size: 16px;
}

.mock-test-header p span {
  color: var(--text-muted);
  margin: 0 6px;
}

.timer-card {
  min-width: 230px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}

.timer-icon {
  width: 46px;
  height: 46px;
  color: var(--primary);
  border: 3px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.timer-card p {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.timer-card strong {
  color: var(--primary);
  font-size: 34px;
  line-height: 1;
}

.timer-card.warning strong,
.timer-card.warning .timer-icon {
  color: var(--red);
  border-color: var(--red);
}

.mock-test-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: flex-start;
}

.question-card,
.navigator-card,
.result-score-card,
.summary-card,
.review-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.question-card {
  padding: 28px;
}

.question-top {
  margin-bottom: 28px;
}

.question-top p {
  margin: 0 0 14px;
  color: var(--text-main);
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 5%;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.question-card h2 {
  margin: 0 0 24px;
  font-size: 24px;
  line-height: 1.45;
  color: var(--text-main);
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.option-btn {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  color: var(--text-main);
}

.option-btn:hover {
  border-color: var(--primary-border);
  background: #f8fbff;
}

.option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.option-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.option-btn.selected .option-radio {
  border-color: var(--primary);
}

.option-btn.selected .option-radio::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  top: 4px;
  left: 4px;
}

.option-letter {
  font-weight: 800;
  margin-right: 6px;
}

.question-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
}

.question-actions button {
  min-width: 140px;
  padding: 14px 20px;
  font-size: 15px;
}

.question-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.question-actions button:disabled:hover {
  transform: none;
  border-color: #cbd5e1;
  color: var(--text-main);
}

/* =========================
   Navigator
========================= */

.navigator-card {
  padding: 26px 22px;
}

.navigator-card h3 {
  margin: 0 0 22px;
  font-size: 20px;
}

.question-navigator {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.nav-btn.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.nav-btn.answered {
  border-color: #60a5fa;
  background: #eff6ff;
  color: var(--primary);
}

.nav-btn.answered.current {
  background: var(--primary);
  color: #ffffff;
}

.navigator-legend {
  border-top: 1px solid var(--border);
  margin-top: 28px;
  padding-top: 22px;
}

.navigator-legend h4 {
  margin: 0 0 16px;
  font-size: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.legend-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.not-answered {
  background: #e5e7eb;
}

.legend-dot.answered {
  background: #60a5fa;
}

.legend-dot.current {
  background: var(--primary);
}

.submit-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.submit-btn {
  background: #ffffff;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 15px 38px;
  font-size: 18px;
}

.submit-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* =========================
   Result Screen
========================= */

.result-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-bottom: 34px;
}

.result-score-card,
.summary-card {
  padding: 34px;
}

.result-score-card {
  text-align: center;
}

.result-icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 42px;
  font-weight: 800;
}

.result-icon.pass {
  background: var(--green);
}

.result-icon.fail {
  background: var(--red);
}

.result-score-card h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.result-score-card > p {
  margin: 0 0 8px;
  color: var(--text-main);
}

.score-text {
  font-size: 52px;
  line-height: 1.1;
  color: var(--green);
  font-weight: 800;
  margin-bottom: 8px;
}

.score-text.fail {
  color: var(--red);
}

.pass-status {
  color: var(--green);
  font-size: 25px;
  font-weight: 800;
  margin-bottom: 18px;
}

.pass-status.fail {
  color: var(--red);
}

.result-message {
  color: var(--text-muted) !important;
  margin-bottom: 28px !important;
}

.result-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.result-buttons button {
  padding: 14px 24px;
  font-size: 15px;
}

.summary-card h3 {
  margin: 0 0 26px;
  color: var(--primary);
  font-size: 22px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0;
  color: var(--text-main);
}

.summary-row strong {
  font-weight: 800;
}

.green-text {
  color: var(--green);
}

.red-text {
  color: var(--red);
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}

.summary-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding: 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
}

.summary-alert p {
  margin: 0;
}

.summary-alert.pass {
  background: var(--green-bg);
  color: #166534;
}

.summary-alert.fail {
  background: var(--red-bg);
  color: #991b1b;
}

.summary-alert span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-alert.pass span {
  background: var(--green);
}

.summary-alert.fail span {
  background: var(--red);
}

/* =========================
   Review
========================= */

.review-section h2 {
  margin: 0 0 18px;
  color: var(--primary);
  font-size: 24px;
}

.review-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 24px;
  color: var(--text-main);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.filter-btn.incorrect-filter {
  color: var(--red);
  border-color: var(--red-border);
}

.filter-btn.incorrect-filter.active {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.review-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-left: 6px solid var(--primary);
}

.review-card.correct {
  border-left-color: var(--green);
}

.review-card.incorrect {
  border-left-color: var(--red);
}

.review-card.skipped {
  border-left-color: #94a3b8;
}

.review-question-side,
.review-explanation-side {
  padding: 26px 28px;
}

.review-question-side {
  border-right: 1px solid var(--border);
}

.review-question-side h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.review-question-side .review-question-text {
  margin: 0 0 24px;
  line-height: 1.55;
  color: var(--text-main);
}

.answer-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  margin: 14px 0;
}

.answer-row strong {
  color: var(--text-main);
}

.answer-row span {
  font-weight: 700;
}

.answer-row .correct-answer {
  color: var(--green);
}

.answer-row .wrong-answer {
  color: var(--red);
}

.answer-row .skipped-answer {
  color: #64748b;
}

.review-explanation-side h4 {
  margin: 0 0 12px;
  font-size: 17px;
}

.review-explanation-side p {
  margin: 0;
  line-height: 1.65;
  color: var(--text-main);
}

.source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border);
  margin-top: 22px;
  padding-top: 18px;
  color: var(--primary);
  font-weight: 700;
}

.empty-review {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--text-muted);
}

/* =========================
   Responsive
========================= */

@media (max-width: 900px) {
  .mock-test-layout,
  .result-top-grid,
  .review-card {
    grid-template-columns: 1fr;
  }

  .mock-test-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .timer-card {
    width: 100%;
  }

  .review-question-side {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 600px) {
  .mock-page {
    padding: 22px 14px 44px;
  }

  .mock-start-card {
    padding: 34px 22px 28px;
  }

  .mock-start-card h1,
  .mock-test-header h1 {
    font-size: 34px;
  }

  .mock-start-desc {
    font-size: 15px;
  }

  .mock-rule-item {
    grid-template-columns: 32px 1fr;
    gap: 12px;
  }

  .mock-rule-item p {
    font-size: 15px;
  }

  .start-btn {
    width: 100%;
    min-width: 0;
  }

  .question-card,
  .navigator-card,
  .result-score-card,
  .summary-card {
    padding: 22px;
  }

  .question-card h2 {
    font-size: 20px;
  }

  .question-actions {
    flex-direction: column;
  }

  .question-actions button {
    width: 100%;
  }

  .question-navigator {
    grid-template-columns: repeat(5, 42px);
    justify-content: center;
  }

  .result-buttons {
    flex-direction: column;
  }

  .result-buttons button {
    width: 100%;
  }

  .score-text {
    font-size: 44px;
  }

  .answer-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

