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

/* =========================================================================
   DESIGN SYSTEM & CSS VARIABLES
   ========================================================================= */
:root {
  /* Light Theme Colors (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --border-glass: rgba(255, 255, 255, 0.4);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.05);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.15);
  
  --secondary: #ec4899;
  --secondary-glow: rgba(236, 72, 153, 0.15);

  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.15);

  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.15);

  --border-color: #e2e8f0;
  --card-radius: 16px;
  --btn-radius: 12px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Dark Theme Colors */
  --bg-primary: #0b0f19;
  --bg-secondary: #131a2e;
  --bg-glass: rgba(19, 26, 46, 0.75);
  --border-glass: rgba(255, 255, 255, 0.06);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);

  --secondary: #f472b6;
  --secondary-glow: rgba(244, 114, 182, 0.25);

  --border-color: #1e293b;
}

/* =========================================================================
   BASE RESET & LAYOUT
   ========================================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Background animated glow orbs */
body::before, body::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
  animation: floatOrb 12s infinite alternate ease-in-out;
}

body::before {
  background: var(--primary);
  top: -100px;
  right: -50px;
}

body::after {
  background: var(--secondary);
  bottom: -100px;
  left: -50px;
  animation-delay: -6s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.15); }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* =========================================================================
   TYPOGRAPHY & UTILITIES
   ========================================================================= */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  border-radius: var(--card-radius);
  transition: var(--transition-smooth);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================================================
   HEADER & NAVBAR
   ========================================================================= */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  padding: 16px 0;
  transition: var(--transition-smooth);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
  color: var(--text-primary);
}

.logo i {
  color: var(--primary);
  font-size: 1.6rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Switcher Button */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-toggle:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  transform: rotate(15deg);
}

.theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: block; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--btn-radius);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--text-muted);
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-warning {
  background: var(--warning);
  color: white;
  box-shadow: 0 4px 12px var(--warning-glow);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--warning-glow);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 12px var(--danger-glow);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--danger-glow);
}

.btn:active {
  transform: translateY(0);
}

/* =========================================================================
   VIEW / ROUTER ROUTER SECTION
   ========================================================================= */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.app-view {
  display: none;
  width: 100%;
  animation: fadeIn 0.4s ease-out forwards;
}

.app-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   LOGIN SCREEN
   ========================================================================= */
.login-card {
  max-width: 450px;
  width: 100%;
  margin: 0 auto;
  padding: 40px;
  text-align: center;
}

.login-header {
  margin-bottom: 30px;
}

.login-header h2 {
  font-size: 1.8rem;
  margin-top: 10px;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 8px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.form-control {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.login-submit {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  font-size: 1rem;
}

.login-footer {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================================================================
   DASHBOARD SCREEN
   ========================================================================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-hero {
  padding: 30px;
}

.student-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-glow);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.dashboard-hero h2 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.dashboard-hero p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.exam-rules {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.exam-rules h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.rule-list {
  list-style: none;
}

.rule-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rule-list li::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--success);
}

.exam-sidebar-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: fit-content;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.info-item span:first-child {
  color: var(--text-muted);
}

.info-item span:last-child {
  font-weight: 600;
}

.start-action-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.05rem;
}

/* =========================================================================
   EXAM INTERFACE (CBT BOARD)
   ========================================================================= */
.exam-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
}

@media (max-width: 1024px) {
  .exam-layout {
    grid-template-columns: 1fr;
  }
}

/* Left: Question Card */
.question-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.question-number {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.text-size-adjust {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-text-adjust {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.btn-text-adjust:hover {
  background: var(--border-color);
}

.question-body {
  flex: 1;
}

.question-text {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 24px;
  color: var(--text-primary);
  font-weight: 500;
}

.question-image {
  max-width: 100%;
  max-height: 250px;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: block;
}

/* Opsi Pilihan Ganda (Radio Grid) */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.option-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.option-item:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
  transform: translateX(4px);
}

.option-item.selected {
  border-color: var(--primary);
  background: var(--primary-glow);
  box-shadow: 0 0 0 2px var(--primary);
}

.option-item.selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--primary);
}

/* Sembunyikan radio input standard */
.option-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-label-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--border-color);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 16px;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.option-item:hover .option-label-letter {
  background: var(--primary);
  color: white;
}

.option-item.selected .option-label-letter {
  background: var(--primary);
  color: white;
}

.option-label-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Navigation Buttons at the bottom of Question Card */
.question-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

@media (max-width: 480px) {
  .question-footer-nav {
    flex-direction: column;
    width: 100%;
  }
  .question-footer-nav button {
    width: 100%;
  }
}

/* Right Side: Sidebar Navigation Grid & Timer */
.exam-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timer-card {
  padding: 24px;
  text-align: center;
}

.timer-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timer-value {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.timer-value.danger-alert {
  color: var(--danger);
  animation: pulseDanger 1s infinite alternate;
}

@keyframes pulseDanger {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

/* Question Navigator Grid */
.grid-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.grid-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Nav Item buttons */
.nav-grid-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--text-primary);
}

.nav-grid-item:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

/* State Styling for Grid Items */
.nav-grid-item.active {
  box-shadow: 0 0 0 2px var(--primary);
  background: var(--primary-glow);
  border-color: var(--primary);
}

.nav-grid-item.answered {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.nav-grid-item.flagged {
  background: var(--warning);
  color: white;
  border-color: var(--warning);
}

.nav-grid-item.unanswered {
  background: var(--bg-secondary);
}

/* Grid Legend */
.grid-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.legend-dot.answered { background: var(--success); }
.legend-dot.flagged { background: var(--warning); }
.legend-dot.unanswered { background: var(--bg-secondary); border: 1px solid var(--border-color); }
.legend-dot.current { box-shadow: 0 0 0 2px var(--primary); background: var(--primary-glow); border: 1px solid var(--primary); }

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================================================================
   FINISH & SUMMARY SCREEN
   ========================================================================= */
.finish-card {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 40px;
  text-align: center;
}

.success-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-glow);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 24px auto;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.finish-card h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.finish-card p {
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

.score-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.score-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-box-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.score-box-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.score-box-value.big-score {
  font-size: 2.6rem;
  color: var(--primary);
}

/* =========================================================================
   GLOBAL MODALS & DIALOGS
   ========================================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  max-width: 480px;
  width: 90%;
  padding: 30px;
  text-align: center;
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.modal-icon.danger { color: var(--danger); }
.modal-icon.warning { color: var(--warning); }
.modal-icon.success { color: var(--success); }

.modal-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.modal-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* =========================================================================
   LOADER ELEMENT
   ========================================================================= */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 16px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loader-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Footer style */
footer {
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-glass);
  margin-top: auto;
  background: var(--bg-glass);
}

/* =========================================================================
   RESPONSIVE DESIGN KHUSUS HP (SMARTPHONE OPTIMIZATION)
   ========================================================================= */
.mobile-exam-nav-bar {
  display: none;
}

@media (max-width: 768px) {
  /* Memunculkan top sticky bar pada ujian HP */
  .mobile-exam-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 10px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    padding: 12px 18px;
    margin-bottom: 20px;
    border-radius: 14px;
    z-index: 99;
    box-shadow: var(--shadow-glass);
  }
  
  .mobile-timer-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
  }
  
  .mobile-timer-box i {
    color: var(--primary);
  }

  /* Sembunyikan timer besar & info profil statis pada sidebar asli di HP */
  .exam-sidebar .timer-card {
    display: none;
  }

  /* Mengubah bilah samping menjadi laci geser (Slide-In Drawer) */
  .exam-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--border-glass);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }
  
  .exam-sidebar.active {
    right: 0;
  }

  /* Tampilkan tombol tutup (silang) hanya di mode laci HP */
  #btn-close-grid-mobile {
    display: flex !important;
  }

  /* Tata letak satu kolom penuh untuk HP */
  .exam-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* Kurangi padding card agar muat maksimal di layar HP */
  .question-card {
    padding: 20px;
    min-height: auto;
  }
  
  .question-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  
  .question-number {
    font-size: 1.1rem;
  }
  
  .question-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
  }
  
  .option-item {
    padding: 12px 14px;
  }
  
  .option-label-letter {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    margin-right: 12px;
  }
  
  .option-label-text {
    font-size: 0.88rem;
  }

  .nav-grid {
    grid-template-columns: repeat(5, 1fr);
    max-height: calc(100vh - 350px);
  }
  
  /* Penyesuaian layout dasbor di HP */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .dashboard-hero {
    padding: 20px;
  }
  
  .dashboard-hero h2 {
    font-size: 1.6rem;
  }
  
  /* Penyesuaian halaman penyelesaian di HP */
  .finish-card {
    padding: 24px;
  }
  
  .finish-card h2 {
    font-size: 1.6rem;
  }
  
  .score-panel {
    padding: 16px;
  }
  
  .score-box-value.big-score {
    font-size: 2.2rem;
  }
}

/* =========================================================================
   ANIMASI PULSING LIVE MONITOR
   ========================================================================= */
.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: var(--danger);
  border-radius: 50%;
  display: inline-block;
  animation: pulseDot 1.5s infinite;
  box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
}

@keyframes pulseDot {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.pulse-green {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  display: inline-block;
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.pulse-red {
  width: 8px;
  height: 8px;
  background-color: var(--danger);
  border-radius: 50%;
  display: inline-block;
  animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

@keyframes pulseDanger {
  0% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
    transform: scale(1.02);
  }
}
