@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

@property --score-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

body {
  /* background-color: #2b2b35; */
  background-color: #1c1f2b;
  font-family: "Poppins", sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  overflow-y: auto;
  padding: 40px 0;
}

html,
body {
  overflow-y: scroll;
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

*::-webkit-scrollbar {
  display: none;
}

/* ===== TITLE CLEAN & MINIMAL ===== */
.quiz-title-clean {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e8f2f4;
  margin: 0;

  /* memberi ruang agar tidak nempel ke soal */
  padding-bottom: 10px;
  margin-bottom: 12px;

  /* garis halus, sangat soft */
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);

  /* hilangkan efek glow yang terlalu kuat */
  text-shadow: none;
}


.correct {
  background-color: rgba(50, 120, 80, 0.5) !important;
}

.wrong {
  background-color: rgba(150, 40, 40, 0.5) !important;
}


.expected-hint {
  display: block;
  color: #d3d3d3;
  margin-top: 4px;
  font-style: italic;
  opacity: 0; 
  animation: fadeInExplain 0.5s ease 0.2s forwards; 
}



/* main card */
.card-quiz {
  width: 80%;
  max-width: 1100px;
  margin: 36px auto;
  padding: 28px;
  border-radius: 16px;
  background-color: #1c1f2b;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  color: #fff;
}

.top-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.question-area {
  margin-top: 18px;
}

#quizRoot h4 + div {
  font-size: 1.20rem; 
  line-height: 1.6;              
  font-weight: 500;              
}

/* MCQ options */
.option-btn {
  display: block;
  text-align: left;
  width: 100%;
  margin: 8px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(59, 59, 71, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

/* ===== Saat jawaban sudah dikunci (setelah evaluasi) ===== */
.option-btn.locked {
  pointer-events: none;
  /* tidak bisa diklik lagi */
  opacity: 0.85;
  transform: none;
  transition: none;
}

/* Hilangkan efek hover & scale setelah terkunci */
.option-btn.locked:hover {
  transform: none;
  background: inherit;
  box-shadow: none;
}

/* Saat opsi dipilih */
.option-btn.selected {
  background: linear-gradient(135deg, #5c6bc0, #3949ab);
  color: #fff;
  border: 2px solid #9fa8da;
  transform: scale(1.02);
}

/* Saat di-hover, tapi belum dipilih */
.option-btn:hover:not(.selected) {
  background: rgba(100, 100, 120, 0.8);
  transform: scale(1.02);
}


/* explanation */
.explain {
  padding: 12px 14px;
  border-radius: 10px;
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.explain.correct {
  background: rgba(56, 141, 90, 0.14);
  border: 1px solid rgba(56, 141, 90, 0.25);
  color: #dff7e6;
}

.explain.wrong {
  background: rgba(182, 58, 58, 0.12);
  border: 1px solid rgba(182, 58, 58, 0.22);
  color: #ffe6e6;
}

/* drag & drop */
.tables-wrap {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 12px;
}

.left-area {
  width: 62%;
  min-width: 320px;
}

.right-area {
  width: 34%;
  min-width: 240px;
  background: rgba(36, 36, 42, 0.45);
  padding: 12px;
  border-radius: 10px;
}

.partition-table,
.process-table {
  width: 100%;
  border-collapse: collapse;
}

.partition-table th,
.partition-table td,
.process-table td {
  border: 1px solid rgba(200, 200, 210, 0.08);
  padding: 8px;
  text-align: center;
  color: #fff;
}

.process-slot {
  min-height: 46px;
  vertical-align: middle;
}

.draggable-process {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #2f6f8a;
  cursor: grab;
  color: #fff;
}

.drop-hover {
  outline: 2px dashed rgba(200, 230, 255, 0.5);
}

.btn-small {
  padding: 8px 12px;
  border-radius: 8px;
  background: #52616B;
  color: #d0d0d0;
  border: none;
}

/* progress */
.progress-text {
  font-weight: 600;
}

/* next button style */
#nextBtn {
  background: #7c5cff;
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
}

#nextBtn:disabled {
  opacity: 0.5;
}



/* Tombol animasi & loading */
.loading-anim {
  padding: 12px;
  color: #ddd;
  font-style: italic;
  animation: fadeIn 0.4s ease;
}

button#nextBtn.processing {
  pointer-events: none;
  opacity: 0.7;
}

/* Animasi fade-in untuk feedback */
.explain.animated {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeInExplain 0.5s ease forwards;
}

/* Animasi loading blink */
@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.loading-anim {
  animation: blink 1s infinite;
}

.option-btn, #nextBtn {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.option-btn:hover {
  transform: scale(1.02);
}

#nextBtn:hover:not(:disabled) {
  background: #9a7fff;
  box-shadow: 0 10px 25px rgba(124, 92, 255, 0.3);
  transform: scale(1.04);
}

/* ==== Animasi untuk drag & drop ==== */

/* Efek saat elemen sedang diseret */
.draggable-process {
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.draggable-process:active {
  transform: scale(1.05);
  opacity: 0.8;
}

/* Efek saat slot dihover oleh drag */
.drop-hover {
  outline: 3px dashed rgba(120, 200, 255, 0.7);
  background-color: rgba(80, 120, 160, 0.15);
  animation: pulseHover 0.8s infinite alternate;
}

@keyframes pulseHover {
  from {
    outline-color: rgba(120, 200, 255, 0.4);
  }

  to {
    outline-color: rgba(120, 200, 255, 0.8);
  }
}

/* Efek saat proses dijatuhkan (drop) */
@keyframes slotPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.process-slot.filled {
  animation: slotPop 0.3s ease-out;
}

/* Animasi hasil evaluasi */
.explain.fade-in {
  animation: fadeInExplain 0.6s ease forwards;
}

@keyframes fadeInExplain {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slot benar/salah diberi efek nyala singkat */
@keyframes correctFlash {
  0% {
    background-color: rgba(80, 200, 120, 0.2);
  }

  50% {
    background-color: rgba(80, 200, 120, 0.5);
  }

  100% {
    background-color: rgba(80, 200, 120, 0.2);
  }
}

@keyframes wrongFlash {
  0% {
    background-color: rgba(220, 80, 80, 0.2);
  }

  50% {
    background-color: rgba(220, 80, 80, 0.5);
  }

  100% {
    background-color: rgba(220, 80, 80, 0.2);
  }
}

.process-slot.correct {
  animation: correctFlash 0.8s ease;
}

.process-slot.wrong {
  animation: wrongFlash 0.8s ease;
}

/* ====== STATUS TAMBAHAN UNTUK DRAG ====== */
.process-slot.neutral {
  background-color: rgba(150, 150, 150, 0.1);
}

.waiting-box {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 220, 120, 0.12);
  border: 1px solid rgba(255, 220, 120, 0.3);
  color: #ffe9a1;
  animation: fadeInExplain 0.8s ease forwards;
}

#waitingBody {
  transition: background-color 0.5s ease;
}

/* Tambahkan sedikit warna visual agar jelas */
.process-slot.wrong {
  animation: wrongFlash 0.8s ease;
}

.process-slot.correct {
  animation: correctFlash 0.8s ease;
}


/* ===== Tombol hapus minimalis di slot jawaban ===== */
.slot-content {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.proc-label {
  font-weight: 600;
  color: #fff;
}

.remove-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 5px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

/* Tombol hanya muncul saat hover pada cell */
.process-slot:hover .remove-btn {
  opacity: 1;
  transform: scale(1);
  color: rgba(255, 255, 255, 0.7);
}

/* Efek hover tombol */
.remove-btn:hover {
  color: #ff8080;
  background-color: rgba(255, 255, 255, 0.08);
  transform: scale(1.1);
}

/* ==== Animasi saat proses dihapus dari tabel ==== */
@keyframes fadeOutShrink {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

.process-slot.removing {
  animation: fadeOutShrink 0.4s ease forwards;
}

/* ===== Highlight MCQ Evaluation ===== */

.option-btn.correct-answer {
  background: rgba(60, 160, 100, 0.45) !important;
  border: 2px solid rgba(120, 255, 170, 0.8) !important;
  color: #eafff3 !important;
  opacity: 1 !important;
  transform: scale(1.02);
}

.option-btn.wrong-answer {
  background: rgba(200, 70, 70, 0.45) !important;
  border: 2px solid rgba(255, 150, 150, 0.85) !important;
  color: #ffecec !important;
  opacity: 1 !important;
  transform: scale(1.02);
}

.option-btn.dimmed-answer {
  opacity: 0.45 !important;
}

/* ===== Result Summary Modern ===== */
.result-wrapper {
  margin-top: 20px;
  padding: 32px;
  background: rgba(40, 42, 50, 0.85);
  border-radius: 18px;
  text-align: center;
  animation: fadeIn 0.8s ease;
}

.result-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #F0F5F9;
  margin-bottom: 20px;
}

.result-subtitle {
  font-size: 1rem;
  color: #bbb;
  margin-bottom: 24px;
}

/* progress ring */
.score-ring {
  margin: 0 auto 26px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;

  background: conic-gradient(#7c5cff var(--score-angle, 0deg), rgba(255, 255, 255, 0.08) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;

}

.score-ring::before {
  content: "";
  width: 115px;
  height: 115px;
  background: #2b2b35;
  border-radius: 50%;
  position: absolute;
}

.score-text {
  position: absolute;
  font-size: 2rem;
  font-weight: 700;
  color: #7c5cff;
}

/* breakdown */
.breakdown-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
  border-radius: 12px;
  margin: 10px auto;
  width: 75%;
  text-align: left;
  border-left: 4px solid #52616B;
  animation: slideUp 0.5s ease;
}

.breakdown-box strong {
  color: #F0F5F9;
}

.breakdown-small {
  color: #ccc;
  margin-top: 3px;
}

/* restart button */
.btn-restart {
  margin-top: 30px;
  background: #7c5cff;
  color: #ffffff;
  border: none;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  transition: .25s ease;
}

.btn-restart:hover {
  background: #9a7fff;
  box-shadow: 0 10px 25px rgba(124, 92, 255, 0.3);
  transform: scale(1.05);
}

/* animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(15px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-question {
  animation: slideLeft 0.35s ease;
}

.waiting-indicator {
  color: #ffd580; 
  font-size: 0.85em;
  margin-top: 2px;
  font-style: italic;
}

/* ============ TAMBAHKAN INI DI AKHIR FILE CSS ============ */

/* Box khusus untuk feedback waiting list */
.explain-waiting {
  margin-top: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
  /* Garis pemisah dari feedback partisi di atasnya */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Detail di dalam box waiting (jika salah) */
.wait-detail {
  font-size: 0.9em;
  margin-top: 6px;
  margin-left: 10px;
  color: #eee;
}

.wait-detail strong {
   color: #fff;
}

/* Detail khusus untuk proses yang 'missed' */
.wait-detail.missed {
  color: #ffc2c2; /* Warna teks merah muda */
  font-weight: 600;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 180, 180, 0.3);
}



/* ============ TAMBAHKAN INI DI AKHIR FILE CSS ============ */

/* Kotak status sederhana (Benar/Salah) */
.simple-status {
  padding: 14px 18px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
  animation: fadeInExplain 0.5s ease forwards;
}

.simple-status.correct {
  background: rgba(56, 141, 90, 0.14);
  border: 1px solid rgba(56, 141, 90, 0.25);
  color: #dff7e6;
}

.simple-status.wrong {
  background: rgba(182, 58, 58, 0.12);
  border: 1px solid rgba(182, 58, 58, 0.22);
  color: #ffe6e6;
}

/* Tombol untuk toggle detail */
.btn-toggle-detail {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn-toggle-detail:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.eval-algo-explain {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
  font-style: italic;
  color: #ccc;
}
.eval-algo-explain strong {
  color: #e0e0e0;
  font-style: normal;
}

/* (BARU) Judul (H3) untuk setiap bagian (Partisi / Waiting) */
.eval-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #e8f2f4;
  margin: 20px 0 8px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
/* Sembunyikan heading pertama jika itu yg pertama muncul */
.eval-heading:first-of-type {
  margin-top: 0;
}

/* (BARU) Teks sub-info (seperti "Urutan proses...") */
.eval-subtitle {
  font-size: 0.85em;
  font-style: italic;
  color: #bbb;
  margin-bottom: 10px;
}

/* (BARU) Judul untuk daftar koreksi (Detail Kesalahan:) */
.correction-list-title {
  font-size: 0.9em;
  font-weight: 600;
  color: #ddd;
  margin-top: 14px;
  margin-bottom: 6px;
}

/* (BARU) List untuk detail kesalahan partisi */
.correction-list {
  list-style-type: none;
  padding-left: 10px;
  margin-bottom: 0;
}
.correction-list li {
  font-size: 0.9em;
  color: #eee;
  margin-bottom: 4px;
}
/* (BARU) Highlight jawaban user/benar di list */
.correction-list li span {
  font-weight: 600;
  color: #fff;
  background-color: rgba(0,0,0,0.2);
  padding: 1px 4px;
  border-radius: 4px;
}

/* (LAMA, tapi penting) Mengatur ulang style .wait-detail 
   karena kita masih menggunakannya di bagian waiting */
.eval-section .wait-detail {
  font-size: 0.9em;
  margin-top: 6px;
  margin-left: 0; /* reset dari style lama jika ada */
  color: #eee;
}
.eval-section .wait-detail.missed {
  color: #ffc2c2;
  font-weight: 600;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 180, 180, 0.3);
}

.mcq-detail-text {
  font-size: 0.95em;
  margin-top: 6px;
  color: #eee;
  line-height: 1.4;
}

/* (BARU) Tambahkan style neutral untuk .eval-section 
   (dipakai untuk kotak "Penjelasan") */
.eval-section.eval-neutral {
  background-color: rgba(120, 120, 120, 0.1);
  border-left-color: #999;
  color: #ddd;
}
.eval-section.eval-neutral strong {
  color: #e0e0e0;
}

/* ===== (BARU) Progress Bar ===== */

/* Wrapper untuk teks dan bar */
.progress-wrapper {
  width: 200px; /* Atur lebar agar konsisten */
  text-align: right;
  /* (BARU) Pastikan transisi mulus saat hide/show */
  transition: opacity 0.3s ease; 
}

/* Sesuaikan jarak teks progres yang sudah ada */
.progress-text {
  font-weight: 600;
  margin-bottom: 6px; /* Beri jarak ke bar */
}

/* Latar/Track dari progress bar */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden; /* Penting agar inner bar tidak tumpah */
}

/* Bar yang terisi (warna hijau) */
.progress-bar-inner {
  width: 0%; /* Mulai dari 0 */
  height: 100%;
  background-color: #7c5cff; /* Warna cerah yang sudah ada di .score-text */
  border-radius: 4px;
  /* (PENTING) Animasi saat ganti soal */
  transition: width 0.4s ease; 
}

/* ============ Tombol Admin Minimalis ============ */
.admin-btn-minimal {
  background: transparent;
  border: none;
  width: 34px; 
  height: 34px;
  border-radius: 50%;
  padding: 0; 
  margin-right: 4px; 
  font-size: 1.1rem; 
  cursor: pointer;
  display: inline-flex;
  align-items: center; 
  justify-content: center;
  transition: all 0.2s ease-out;

  /* (BARU) State default (logged out): ikon putih transparan */
  color: #fff; 
  opacity: 0.3;
}

/* 2. (BARU) Style saat logged in (class dari JS) */
.admin-btn-minimal.admin-active {
  /* Menggantikan state default: ikon hijau/cyan terang */
  color: #64ffda; 
  opacity: 1.0; 
}

/* 3. (BARU) Style saat HOVER (berlaku untuk keduanya) */
.admin-btn-minimal:hover {
  opacity: 1.0; /* Selalu 100% opacity saat hover */
  transform: scale(1.05); 
  background-color: rgba(255, 255, 255, 0.15); 
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); 
  
  /* (PENTING) Paksa warna ikon menjadi putih terang saat hover */
  color: #f8f8f8; 
}

/* Pastikan sejajar saat tombol Next muncul/hilang */
.mt-3.d-flex.justify-content-end {
  align-items: center;
}


.admin-toolbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 36, 0.95);
  border: 1px solid rgba(100, 255, 218, 0.3);
  padding: 10px 20px;
  border-radius: 50px;
  display: flex;
  gap: 15px;
  align-items: center;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  animation: slideUpToolbar 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpToolbar {
  from { bottom: -100px; opacity: 0; }
  to { bottom: 20px; opacity: 1; }
}

.admin-badge {
  background: rgba(100, 255, 218, 0.1);
  color: #64ffda;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(100, 255, 218, 0.2);
  margin-right: 5px;
}

.admin-tool-btn {
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

.admin-tool-btn.solve:hover { color: #64ffda; background: rgba(100, 255, 218, 0.1); }
.admin-tool-btn.skip:hover { color: #ffd580; background: rgba(255, 213, 128, 0.1); }
.admin-tool-btn.reset:hover { color: #78aaff; background: rgba(120, 170, 255, 0.1); }
.admin-tool-btn.logout:hover { color: #ff8080; background: rgba(255, 128, 128, 0.1); }

/* Sembunyikan tombol kunci lama jika toolbar aktif (opsional, atau biarkan sebagai toggle) */
.admin-btn-minimal.hidden {
  display: none;
}



/* ============ (BARU) Modal Login Admin Kustom ============ */

.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(43, 43, 53, 0.85); /* Latar belakang gelap */
  backdrop-filter: blur(5px); /* Efek blur modern */
  
  display: none; /* Sembunyi secara default */
  align-items: center;
  justify-content: center;
  z-index: 1050;
  
  /* Animasi fade-in */
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.admin-modal-overlay.visible {
  display: flex;
  opacity: 1;
}

.admin-modal-box {
  background: rgba(46, 48, 55, 0.95); /* Warna kartu kuis */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 380px;
  color: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  
  /* Animasi slide-down */
  transform: translateY(-20px);
  transition: transform 0.2s ease-out;
}

.admin-modal-overlay.visible .admin-modal-box {
  transform: translateY(0);
}

.admin-modal-box h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e8f2f4;
  margin-top: 0;
  margin-bottom: 8px;
}

.admin-modal-desc {
  font-size: 0.9rem;
  color: #bbb;
  margin-bottom: 16px;
}

.admin-form-group {
  margin-bottom: 14px;
}

.admin-form-group label {
  display: block;
  font-size: 0.85rem;
  color: #ccc;
  font-weight: 500;
  margin-bottom: 4px;
}

.admin-form-control {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 6px;
  font-size: 1rem;
}

.admin-form-control:focus {
  outline: none;
  border-color: #64ffda; /* Warna highlight */
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.2);
}

.admin-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn-modal-batal,
.btn-modal-login {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-batal {
  background-color: #52616B; /* Warna abu-abu */
  color: #d0d0d0;
}
.btn-modal-batal:hover {
  background-color: #6a7c87;
}

.btn-modal-login {
  background-color: #64ffda; /* Warna highlight */
  color: #2b2b35; /* Teks gelap */
}
.btn-modal-login:hover {
  background-color: #fff;
  transform: scale(1.03);
}

#adminModalMessage {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 14px;
  display: none; /* Sembunyi by default */
  border: 1px solid transparent;
  animation: fadeInExplain 0.3s ease; /* Gunakan animasi yang sudah ada */
}

#adminModalMessage.error {
  background-color: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.5);
  color: #f8d7da; /* Merah */
}

#adminModalMessage.success {
  background-color: rgba(100, 255, 218, 0.15);
  border-color: rgba(100, 255, 218, 0.5);
  color: #64ffda; /* Hijau/Cyan */
}

/* ============ (BARU) Ikon Show/Hide Password ============ */

.admin-password-wrapper {
  position: relative;
}

.admin-toggle-pass {
  position: absolute;
  top: 50%;
  right: 15px; /* (Disesuaikan) Jarak ikon dari kanan */
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none; 
  font-size: 1.1rem; /* (Disesuaikan) Ukuran ikon */
  color: #999;
  transition: color 0.2s ease;
  
  /* (Dihapus) Padding tidak diperlukan untuk ikon */
}

.admin-toggle-pass:hover {
  color: #fff;
}

/* Sesuaikan input agar teks tidak tertimpa ikon */
.admin-password-wrapper .admin-form-control {
  padding-right: 40px; /* (Disesuaikan) Beri ruang untuk ikon */
}

/* ============ (BARU) Ikon Status & Loading ============ */

/* 1. Animasi putar untuk ikon loading */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 2. Style untuk ikon loading di dalam .loading-anim */
.loading-anim .spin-icon {
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
  font-size: 1.1rem;
  vertical-align: middle;
  margin-top: -2px;
}

/* 3. Style untuk ikon status di dalam .simple-status */
.status-icon {
  font-size: 1.1rem; 
  margin-right: 8px; /* Jarak dari teks */
  vertical-align: middle; 
  margin-top: -2px; /* Penyesuaian vertikal */
}

/* 4. Beri warna ikon sesuai status (menggunakan warna yang sudah ada) */
.simple-status.correct .status-icon {
  color: #64ffda; /* Warna highlight hijau/cyan */
}

.simple-status.wrong .status-icon {
  color: #ff8080; /* Warna highlight merah */
}

/* (BARU) Beri warna ikon 'missed' di dalam detail evaluasi */
.wait-detail.missed .status-icon {
  color: #ffc2c2; /* Samakan dengan warna teks 'missed' */
  font-size: 0.9em; /* Sedikit lebih kecil agar pas */
}


.waiting-dropzone {
  transition: all 0.2s ease;
  border-radius: 8px; /* Agar sudut tidak tajam saat menyala */
}

/* Saat di-hover (dragover), gunakan style yang SAMA dengan slot partisi (.drop-hover) */
.waiting-dropzone.drop-hover {
  outline: 3px dashed rgba(100, 255, 218, 0.7); /* Garis putus-putus Cyan */
  background-color: rgba(100, 255, 218, 0.15); /* Background redup */
  box-shadow: 0 0 15px rgba(100, 255, 218, 0.2); /* Sedikit efek glow */
}


@media (max-width: 768px) {

  .card-quiz {
    width: 95%; /* Lebarkan card hampir penuh layar */
    padding: 16px; /* Kurangi padding dalam */
    border-radius: 12px;
  }

  .top-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .quiz-title-clean {
    font-size: 1.5rem; /* Kecilkan judul */
    margin-bottom: 5px;
  }

  /* 2. Progress Bar */
  .progress-wrapper {
    width: 100%; /* Progress bar penuh lebar */
    text-align: left;
  }
  
  /* 3. Area Drag & Drop (PENTING) */
  .tables-wrap {
    display: flex;
    flex-direction: column; /* Susun atas-bawah */
    gap: 20px;
  }

  .left-area {
    width: 100%;
    order: 1; /* Tabel partisi di atas */
  }

  /* Panel Daftar Proses (Sticky di Bawah) */
  .right-area {
    width: 100%;
    position: fixed; /* Menempel di layar */
    bottom: 0;
    left: 0;
    z-index: 1000;
    background: #24242a; /* Warna latar solid */
    border-top: 2px solid #7c5cff;
    padding: 10px 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.6);
    border-radius: 16px 16px 0 0;
    
    order: 2;
    
    /* Agar bisa discroll horizontal jika proses banyak */
    display: flex;
    flex-direction: column;
    max-height: 150px; /* Batasi tinggi */
  }

  /* Judul 'Daftar Proses' di panel bawah */
  .right-area .small-muted {
    text-align: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
   
  }

  /* Container pool agar proses berjejer kesamping (Horizontal Scroll) */
  #procPool {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 5px;
    /* Sembunyikan scrollbar tapi tetap bisa scroll */
    -webkit-overflow-scrolling: touch;
  }

  /* Kotak Proses yang bisa didrag */
  .draggable-process {
    flex: 0 0 auto; /* Jangan mengecil */
    margin: 0;
    padding: 10px 16px;
    font-size: 0.9rem;
    background: #2f6f8a;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  }

  /* 4. Tabel Partisi & Slot */
  .partition-table th, 
  .partition-table td {
    font-size: 0.85rem; /* Kecilkan font tabel */
    padding: 6px;
  }

  /* Perbesar area drop agar mudah kena jari */
  process-slot .remove-btn {
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 16px;
    background: rgba(255, 100, 100, 0.2); /* Beri background merah tipis */
  }
  
  
  /* Tampilkan tombol hapus (X) selalu di HP (karena tidak ada hover) */
  .remove-btn {
    opacity: 1 !important;
    transform: scale(1) !important;
    background: rgba(255, 255, 255, 0.15);
    width: 24px;
    height: 24px;
    margin-left: 8px;
  }

  /* 5. Tombol Pilihan Ganda (MCQ) */
  .option-btn {
    padding: 14px; /* Area sentuh lebih besar */
    font-size: 1rem;
    margin: 10px 0;
  }

  /* 6. Tombol Navigasi (Next/Admin) */
  .mt-3.d-flex {
    flex-direction: row; /* Tetap sejajar */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 140px; /* Jarak extra agar tidak tertutup panel bawah */
  }

  #nextBtn {
    width: auto;
    flex-grow: 1; /* Tombol next memenuhi sisa ruang */
    padding: 12px;
    font-size: 1rem;
  }

  .admin-btn-minimal {
    width: 44px; /* Sedikit lebih besar */
    height: 44px;
    font-size: 1.3rem;
    background: rgba(255,255,255,0.05);
  }


    #toast-container {
    /* Reset posisi desktop */
    bottom: auto !important;
    right: auto !important;

    /* Pindah ke ATAS TENGAH */
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;

    /* Lebar menyesuaikan layar HP */
    width: 90% !important;
    align-items: center;
  }

  #toast-container .toast {
    width: 100%; /* Penuhi container */
    max-width: 100%;
    margin-bottom: 8px;
    
    /* Ganti animasi menjadi masuk dari ATAS */
    animation: slideDownTop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  }


/* Animasi Keyframes Mobile */
@keyframes slideDownTop {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
  

}


.dnd-poly-drag-image {
  opacity: 0.9 !important;
  position: absolute !important;
  z-index: 9999 !important;
  transform: scale(1.1); /* Sedikit membesar saat diangkat */
  pointer-events: none;  /* Agar sentuhan tembus ke elemen di bawahnya */
}

/* Agar ikon status (dilarang/boleh) dari library terlihat bagus */
.dnd-poly-drag-icon {
  display: none !important; /* Sembunyikan ikon default browser yang jelek */
}


.icon-box {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.4rem;
  flex-shrink: 0; /* Agar ikon tidak gepeng di layar kecil */
}

/* Warna Khusus Ikon MCQ (Misal: Biru/Ungu) */
.mcq-icon {
  background: rgba(92, 107, 192, 0.2);
  color: #9fa8da;
  border: 1px solid rgba(92, 107, 192, 0.3);
}

/* Warna Khusus Ikon Drag (Misal: Cyan/Hijau sesuai tema memori) */
.drag-icon {
  background: rgba(124, 92, 255, 0.15);
  color: #7c5cff;
  border: 1px solid rgba(124, 92, 255, 0.3);
}

/* Penyesuaian Flexbox untuk breakdown-box */
.breakdown-box {
  /* Pastikan konten di dalam box rata tengah secara vertikal */
  display: flex; 
  align-items: center;
}

.score-bg-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Memastikan ikon tepat di tengah sentral */
  
  font-size: 4rem;    /* Ukuran besar agar memenuhi tengah ring */
  color: #ffd700;     /* Warna Emas (Gold) */
  opacity: 0.15;      /* Transparan (samar) agar teks angka tetap terbaca jelas */
  z-index: 1;         /* Layer di atas background hitam ring */
  
  /* Sedikit efek glow emas opsional */
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
}

/* Pastikan teks angka muncul DI ATAS ikon piala */
.score-text {
  z-index: 2; /* Layer lebih tinggi dari ikon */
  position: absolute;
  /* (Style lain seperti color, font-weight sudah ada di style sebelumnya) */
}
