/* Reset ringan + variabel tema */
:root {
  --bg: #f9f9f9;
  --surface: #ffffff;
  --surface-2: #f1f1f1;
  --text: #111111;
  --muted: #555555;
  --primary: #63ba67;
  --primary-contrast: #ffffff;
  --accent: #2ca58d;
  --danger: #d62828;
  --warning: #f77f00;
  --border: #cccccc;
  --focus: #63ba67;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --gap: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

body {
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

/* Header */
.app-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--gap);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  font-size: 28px;
}

.exam-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.exam-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.avatar { font-size: 20px; }
.person-name, .person-id { margin: 0; font-size: 13px; }

.timer {
  display: grid;
  justify-items: end;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.timer-label { color: var(--muted); font-size: 12px; }
.timer-value { font-size: 18px; font-weight: 700; }

/* Layout utama */
.app-main {
  display: grid;
  grid-template-columns: 1fr 280px; /* konten di kiri, sidebar di kanan */
  gap: 20px;
  padding: 20px;
}

.sidebar {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar-section{
  margin-bottom:20px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.grid-questions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.qitem {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.qitem:hover { transform: translateY(-2px); border-color: #30445e; box-shadow: 0 6px 16px rgba(0,0,0,0.25); }

.qitem.answered { background: #b9f0bc; border-color: var(--primary); }
.qitem.flagged { background: #ffe6e6; border-color: var(--danger); }
.qitem.empty { background: var(--surface-2); }

.summary {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.dot {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 50%;
  margin-right: 8px;
}
.dot.answered { background: #b9f0bc; border: 1px solid var(--primary) }
.dot.unanswered { background: var(--surface-2); border: 1px solid var(--border) }
.dot.flagged { background: var(--danger); }
.dot.empty { background: #42556b; }

.progress {
  width: 100%;
  height: 8px;
  background: #f1f1f1;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--primary);
  border: 1px 0px 1px 1px solid var(--border);
  border-radius: 999px;
}

/* Konten soal */
.content {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.question-header h2 {
  font-size: 18px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.badge-outline {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
}

.question-body p {
  font-size: 16px;
  line-height: 1.6;
  margin: 12px 0 16px;
}

.options {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.option {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 10px;
  #border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
}
.option input[type="radio"] {
  width: 18px; height: 18px; accent-color: var(--primary);
}
.option:hover { border-color: #2b3b50; }

.note {
  margin-top: 8px;
}
.note-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  resize: vertical;
}

/* Aksi konten */
.content-actions {
  margin-top: 25px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}
.nav { display: flex; gap: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Tombol */
.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,0.35); border-color: #345a78; }

.btn-soft {
  background: #ffffff;
  border: 1px solid var(--border);
  font-weight: 600;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn.primary {
  background: var(--primary);
  color: var(--primary-contrast);
}
.btn-outline.danger {
  border-color: var(--danger);
  color: var(--danger);
}
.btn-outline.danger:hover {
  border-color: #a94e4e;
  box-shadow: 0 8px 22px rgba(255, 107, 107, 0.25);
}

/* Footer */
.app-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none; /* ganti ke 'grid' saat aktif */
  place-items: center;
  background: rgba(5, 8, 12, 0.6);
  backdrop-filter: blur(4px);
}
.modal-dialog {
  width: min(560px, 92vw);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Responsif */
@media (max-width: 1024px) {
  .app-main {
    grid-template-columns: 240px 1fr;
  }
  .grid-questions { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .app-header { grid-template-columns: 1fr; }
  .header-actions { justify-content: space-between; }
  .app-main { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .content { order: 1; }
  .grid-questions { grid-template-columns: repeat(5, 1fr); }
  .content-actions { grid-template-columns: 1fr; }
}



/* Add custom */
/* opsional: gaya scrollbar agar lebih rapi */

.question-body {
  max-height: calc(100vh - 400px);      /* batas tinggi area soal, bisa disesuaikan */
  overflow-y: auto;       /* aktifkan scrollbar vertikal */
  padding-right: 8px;     /* beri ruang agar teks tidak menempel scrollbar */
}

/* opsional: gaya scrollbar agar lebih rapi */
.question-body::-webkit-scrollbar {
  width: 8px;
}
.question-body::-webkit-scrollbar-track {
  background: var(--surface-2);
  border-radius: 8px;
}
.question-body::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 8px;
}
.question-body::-webkit-scrollbar-thumb:hover {
  background: #468449; /* warna lebih gelap saat hover */
}

/* judul navigasi soal */
.section-title {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.6px;
  text-align: right;
}


/* volume slider */

/* Style umum untuk slider */
input[type="range"] {
  -webkit-appearance: none; /* hilangkan style default */
  width: 200px;
  height: 6px;
  background: linear-gradient(to right, #4caf50, #81c784);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
}

/* Track (jalur slider) */
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right, #4caf50, #81c784);
  border-radius: 5px;
}

input[type="range"]::-moz-range-track {
  height: 6px;
  background: linear-gradient(to right, #4caf50, #81c784);
  border-radius: 5px;
}

/* Thumb (tombol geser) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border: 2px solid #4caf50;
  border-radius: 50%;
  margin-top: -5px; /* posisikan thumb di tengah track */
  transition: 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #4caf50;
  border: 2px solid #388e3c;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #ffffff;
  border: 2px solid #4caf50;
  border-radius: 50%;
  transition: 0.3s;
}

input[type="range"]::-moz-range-thumb:hover {
  background: #4caf50;
  border: 2px solid #388e3c;
}

/* Style ikon volume */
#volumeIcon {
  font-size: 15px;
  margin-left: 1px;
  color: #4caf50;
}

/* paragraf */
.questions-paragraf {
  width:45%;
  float:right;
  padding-left:15px
}

/* timer */
.countdown .count {
  vertical-align: middle;
}

