
:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2937;
  background: #f4f6fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.site-header {
  background: #173b72;
  color: white;
  padding: 20px max(20px, calc((100% - 900px) / 2));
}

.brand {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 1px;
}

.brand span {
  color: #facc15;
}

.header-subtitle {
  margin-top: 5px;
  font-size: 13px;
  opacity: 0.85;
}

.container {
  width: min(900px, calc(100% - 32px));
  margin: 32px auto;
}

.panel {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: clamp(20px, 4vw, 36px);
  box-shadow: 0 5px 22px rgb(15 23 42 / 5%);
}

.hidden {
  display: none !important;
}

.eyebrow {
  color: #2563eb;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.4px;
}

h1 {
  margin-top: 8px;
  font-size: clamp(26px, 4vw, 36px);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 26px 0;
}

.info-item {
  background: #f3f6fb;
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
}

.info-item strong,
.info-item span {
  display: block;
}

.info-item strong {
  margin-bottom: 6px;
  font-size: 15px;
}

.info-item span {
  color: #64748b;
  font-size: 12px;
}

button {
  font: inherit;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  border-radius: 9px;
  padding: 12px 18px;
  font-weight: 700;
  border: 1px solid transparent;
}

.primary-button {
  background: #1d4ed8;
  color: white;
}

.primary-button:hover {
  background: #1e40af;
}

.secondary-button {
  background: white;
  border-color: #cbd5e1;
  color: #334155;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#start-button,
#restart-button {
  width: 100%;
}

.quiz-top,
.navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.quiz-top h2 {
  margin: 5px 0 12px;
  font-size: 20px;
}

.score-chip {
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.progress-track {
  height: 7px;
  background: #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  margin: 8px 0 28px;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: #2563eb;
  transition: width 0.2s ease;
}

.question-text {
  font-size: 19px;
  line-height: 1.7;
  white-space: pre-line;
  margin-bottom: 22px;
}

.options-list {
  display: grid;
  gap: 12px;
}

.option-button {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 15px;
  text-align: left;
  line-height: 1.6;
  color: #1f2937;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 10px;
}

.option-button:hover:not(:disabled) {
  border-color: #2563eb;
  background: #f8faff;
}

.option-letter {
  flex: 0 0 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  border-radius: 7px;
  font-weight: 700;
}

.option-button.correct {
  background: #dcfce7;
  border: 1px solid #16a34a;
}

.option-button.correct .option-letter {
  background: #16a34a;
  color: white;
}

.option-button.wrong {
  background: #fef3c7;
  border: 1px solid #eab308;
}

.option-button.wrong .option-letter {
  background: #eab308;
  color: #422006;
}

.feedback {
  margin-top: 20px;
  padding: 18px;
  border-radius: 10px;
  line-height: 1.7;
}

.feedback.correct {
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.feedback.wrong {
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

.feedback h3 {
  margin: 0 0 10px;
}

.feedback p {
  margin: 8px 0;
}

.navigation {
  margin-top: 24px;
}

.result-score {
  background: #eff6ff;
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  margin: 20px 0;
}

.result-score strong,
.result-score span {
  display: block;
}

.result-score strong {
  font-size: 48px;
  color: #1d4ed8;
}

.result-summary {
  margin-bottom: 24px;
  line-height: 1.8;
}

.review-item {
  border-top: 1px solid #e5e7eb;
  padding: 18px 0;
  line-height: 1.7;
}

.review-item h3 {
  font-size: 16px;
}

.error-message {
  color: #b91c1c;
  background: #fee2e2;
  padding: 16px;
  border-radius: 10px;
}

.site-footer {
  text-align: center;
  color: #64748b;
  font-size: 13px;
  padding: 24px 16px;
}

@media (max-width: 520px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .quiz-top {
    align-items: flex-start;
  }

  .navigation {
    align-items: stretch;
  }

  .navigation button {
    flex: 1;
    padding: 12px 8px;
    font-size: 13px;
  }
}


/* Daftar kotak mata kuliah */
.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 18px;
}

.course-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 145px;
  padding: 20px;
  border: 1px solid #dce3ed;
  border-radius: 14px;
  background: #ffffff;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s,
              box-shadow 0.2s, transform 0.2s;
}

.course-card:hover {
  border-color: #4976d0;
  box-shadow: 0 5px 18px rgba(30, 64, 175, 0.09);
  transform: translateY(-2px);
}

.course-card.selected {
  border: 2px solid #3569c8;
  background: #eff6ff;
  padding: 19px;
}

.course-card-code {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: #3569c8;
}

.course-card-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.course-card-indicator {
  margin-top: auto;
  font-size: 12px;
  color: #64748b;
}

.course-card.selected .course-card-indicator {
  color: #2457a7;
  font-weight: 700;
}

/* Tampilan ponsel */
@media (max-width: 600px) {
  .course-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .course-card {
    min-height: 120px;
  }
}


.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.brand {
  display: inline-block;
  color: inherit;
  font-size: 26px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 1px;
  cursor: pointer;
}

.brand:hover {
  opacity: 0.8;
}

.header-subtitle {
  text-align: center;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.result-actions button {
  flex: 1 1 220px;
}

@media (max-width: 600px) {
  .result-actions {
    flex-direction: column;
  }

  .result-actions button {
    width: 100%;
  }
}
