/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  /* Color Palette */
  --bg-gradient-start: #2b275a;
  --bg-gradient-end: #1a1936;
  --card-bg: #ffffff;
  
  /* Text Colors */
  --text-dark-primary: #1e1b4b;   /* Deep Indigo for title and heavy elements */
  --text-dark-secondary: #475569; /* Slate for body/meta text */
  --text-light-primary: #f8fafc;
  --text-light-secondary: #94a3b8;
  
  /* Brand Accents */
  --color-cyan: #06b6d4;
  --color-cyan-glow: rgba(6, 182, 212, 0.4);
  --color-cyan-hover: #00e5ff;
  
  /* Status Colors */
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-success-border: #a7f3d0;
  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;
  
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-title: 'Outfit', sans-serif;
  
  /* Layout Metrics */
  --border-radius-lg: 20px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 80px rgba(43, 39, 90, 0.15);
}

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

body {
  background: radial-gradient(circle at top, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text-light-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Decorative Background Accents */
body::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: '';
  position: absolute;
  bottom: 15%;
  right: 5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(43, 39, 90, 0.4) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* ==========================================================================
   APP CONTAINER LAYOUT
   ========================================================================== */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.shield-icon {
  font-size: 2.25rem;
  line-height: 1;
}

.brand-text h1 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.brand-text p {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--color-cyan);
  margin-top: 0.2rem;
}

/* Status Badge */
.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 0.75rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-cyan);
  display: inline-block;
  animation: pulse-dot 1.5s infinite alternate;
}

.status-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-light-secondary);
}

/* ==========================================================================
   QUIZ CARD MAIN CONTAINER
   ========================================================================== */
.quiz-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.quiz-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-premium);
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Card Header & Badges */
.card-header {
  padding: 1.5rem 2rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.difficulty-tag {
  background: rgba(43, 39, 90, 0.08);
  color: var(--bg-gradient-start);
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  text-transform: uppercase;
  border: 1px solid rgba(43, 39, 90, 0.1);
}

.score-badge {
  color: var(--text-dark-primary);
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 800;
  background: #f1f5f9;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
}

.score-badge span {
  color: var(--color-cyan);
}

/* Elegant Slim Progress Bar */
.progress-container {
  height: 4px;
  background: #f1f5f9;
  width: 100%;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--bg-gradient-start), var(--color-cyan));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Body Content */
.card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Question Section */
.question-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.question-meta {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dark-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.question-title {
  color: var(--text-dark-primary);
  font-family: var(--font-title);
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 700;
}

/* ==========================================================================
   OPTIONS LAYOUT & BUTTONS
   ========================================================================== */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.option-btn {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--border-radius-md);
  color: var(--text-dark-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 1.15rem 1.25rem;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  position: relative;
}

/* Badge letter (A, B, C, D) on the left of each option */
.option-btn::before {
  content: attr(data-letter);
  background: #f1f5f9;
  color: var(--text-dark-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: all 0.25s ease;
  border: 1px solid #e2e8f0;
}

/* Option Hover Effect */
.option-btn:hover {
  border-color: var(--color-cyan);
  background-color: rgba(6, 182, 212, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.08);
}

.option-btn:hover::before {
  background: var(--color-cyan);
  color: #ffffff;
  border-color: var(--color-cyan);
}

/* Selected option states */
.option-btn.correct {
  background-color: var(--color-success-bg);
  border-color: var(--color-success);
  color: #065f46;
}

.option-btn.correct::before {
  background: var(--color-success);
  color: #ffffff;
  border-color: var(--color-success);
}

.option-btn.wrong {
  background-color: var(--color-danger-bg);
  border-color: var(--color-danger);
  color: #991b1b;
}

.option-btn.wrong::before {
  background: var(--color-danger);
  color: #ffffff;
  border-color: var(--color-danger);
}

.option-btn:disabled {
  pointer-events: none;
  opacity: 0.8;
}

.option-btn:disabled:not(.correct):not(.wrong) {
  border-color: #f1f5f9;
  background-color: #f8fafc;
  color: #94a3b8;
}

.option-btn:disabled:not(.correct):not(.wrong)::before {
  background: #f1f5f9;
  color: #cbd5e1;
  border-color: #e2e8f0;
}

/* ==========================================================================
   FEEDBACK BOX (Pop-up/Slide down inside card)
   ========================================================================== */
.feedback-box {
  background: #f8fafc;
  border-left: 4px solid var(--color-cyan);
  padding: 1.25rem 1.5rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: slide-down 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.feedback-box.hidden {
  display: none;
}

.feedback-box.correct {
  border-left-color: var(--color-success);
  background-color: var(--color-success-bg);
}

.feedback-box.wrong {
  border-left-color: var(--color-danger);
  background-color: var(--color-danger-bg);
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feedback-icon {
  font-size: 1rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  background: var(--color-cyan);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.correct .feedback-icon {
  background: var(--color-success);
}

.wrong .feedback-icon {
  background: var(--color-danger);
}

.feedback-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.correct .feedback-title {
  color: #065f46;
}

.wrong .feedback-title {
  color: #991b1b;
}

.feedback-content p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-dark-secondary);
}

.correct .feedback-content p {
  color: #047857;
}

.wrong .feedback-content p {
  color: #b91c1c;
}

/* ==========================================================================
   CARD FOOTER & NAVIGATION
   ========================================================================== */
.card-footer {
  background: #f8fafc;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid #f1f5f9;
}

.primary-button {
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: #ffffff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(43, 39, 90, 0.25);
  transition: all 0.25s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(43, 39, 90, 0.35);
  opacity: 0.95;
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button.cyan-glow {
  background: linear-gradient(135deg, var(--color-cyan) 0%, #0891b2 100%);
  box-shadow: 0 4px 12px var(--color-cyan-glow);
}

.primary-button.cyan-glow:hover {
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.6);
}

.primary-button.hidden {
  display: none;
}

/* ==========================================================================
   APP FOOTER
   ========================================================================== */
.app-footer {
  text-align: center;
  margin-top: auto;
  padding-top: 1rem;
}

.app-footer p {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-light-secondary);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   LOADING OVERLAY & SPINNER
   ========================================================================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 11, 24, 0.95);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(6, 182, 212, 0.1);
  border-radius: 50%;
  border-top-color: var(--color-cyan);
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.loading-text {
  font-family: var(--font-title);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.loading-subtext {
  color: var(--color-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.8;
  max-width: 320px;
  line-height: 1.4;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 6px var(--color-cyan); }
  100% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 12px var(--color-cyan); }
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Overrides */
@media (max-width: 600px) {
  .app-container {
    padding: 1.5rem 1rem;
  }
  .app-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .header-status {
    align-self: flex-end;
  }
  .card-body {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .option-btn {
    padding: 1rem;
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   WELCOME SCREEN CARD SPECIFIC STYLES
   ========================================================================== */
.welcome-card {
  background: radial-gradient(circle at top, #23204e 0%, #171533 100%) !important;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 480px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.welcome-content {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
  width: 100%;
}

.welcome-title {
  font-family: var(--font-title);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.welcome-subtitle {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-light-secondary);
  max-width: 420px;
  margin: 0;
}

.welcome-illustration {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.glowing-svg {
  filter: drop-shadow(0 8px 16px rgba(6, 182, 212, 0.15));
  animation: float 4s ease-in-out infinite;
}

.welcome-btn {
  width: 100%;
  max-width: 280px;
  justify-content: center;
  padding: 1.1rem 2rem;
  font-size: 1.05rem;
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-btn:hover {
  transform: translateY(-3px);
}

/* Float animation for the welcome illustration */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Global hidden utility to override default displays */
.hidden {
  display: none !important;
}

/* ==========================================================================
   AUDIO & NAVIGATION BUTTONS
   ========================================================================== */
.audio-control-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-right: 0.5rem;
}

.audio-control-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-cyan);
  transform: scale(1.05);
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 320px;
  align-items: center;
}

.secondary-button {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
}

.secondary-button:hover {
  border-color: var(--color-cyan);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.text-btn {
  border: none;
  background: transparent;
  color: var(--text-dark-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

.text-btn:hover {
  color: var(--text-dark-primary);
  background: rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   MODE SCREEN CARD STYLES
   ========================================================================== */
.mode-card {
  min-height: 450px;
}

.mode-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mode-title {
  color: var(--text-dark-primary);
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
}

.mode-subtitle {
  color: var(--text-dark-secondary);
  font-size: 0.9rem;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.5;
}

.mode-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.mode-select-btn {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.mode-icon {
  font-size: 1.75rem;
  background: #f1f5f9;
  padding: 0.6rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.mode-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mode-name {
  color: var(--text-dark-primary);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.05rem;
}

.mode-desc {
  color: var(--text-dark-secondary);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* Hover effect for Mode Selection */
.mode-select-btn:hover {
  border-color: var(--bg-gradient-start);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 39, 90, 0.08);
}

.mode-select-btn:hover .mode-icon {
  background: var(--bg-gradient-start);
  color: #ffffff;
}

.mode-select-btn.exam:hover {
  border-color: var(--color-cyan);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.08);
}

.mode-select-btn.exam:hover .mode-icon {
  background: var(--color-cyan);
}

/* ==========================================================================
   MATERI MODULE STYLES
   ========================================================================== */
.materi-card {
  min-height: 520px;
}

.materi-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 0.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.materi-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.85rem 0.5rem;
  color: var(--text-dark-secondary);
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
}

.materi-tab-btn:hover {
  color: var(--text-dark-primary);
}

.materi-tab-btn.active {
  background: #ffffff;
  color: var(--text-dark-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.scrollable-content {
  max-height: 340px;
  overflow-y: auto;
  padding: 2rem;
  background: #ffffff;
}

/* Premium Scrollbar */
.scrollable-content::-webkit-scrollbar {
  width: 6px;
}

.scrollable-content::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.scrollable-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.tab-pane {
  display: none;
  animation: fade-in 0.35s ease;
}

.tab-pane.active {
  display: block;
}

.materi-section-title {
  color: var(--text-dark-primary);
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.scrollable-content p {
  color: var(--text-dark-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.scrollable-content ul,
.scrollable-content ol {
  padding-left: 1.25rem;
  color: var(--text-dark-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scrollable-content li strong {
  color: var(--text-dark-primary);
}

/* ==========================================================================
   AUDIT REPORT (QUIZ SUMMARY)
   ========================================================================== */
.audit-report-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
  border-top: 2px dashed #e2e8f0;
  padding-top: 1.5rem;
  width: 100%;
}

.audit-report-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-dark-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.audit-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.audit-card {
  background: #f8fafc;
  border-radius: var(--border-radius-md);
  border: 1px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease;
}

.audit-card:hover {
  transform: translateX(2px);
}

.audit-card.correct {
  border-left: 4px solid var(--color-success);
}

.audit-card.wrong {
  border-left: 4px solid var(--color-danger);
}

.audit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-dark-secondary);
  text-transform: uppercase;
}

.audit-status-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

.correct .audit-status-badge {
  background: var(--color-success-bg);
  color: #047857;
}

.wrong .audit-status-badge {
  background: var(--color-danger-bg);
  color: #b91c1c;
}

.audit-question-text {
  color: var(--text-dark-primary);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.45;
}

.audit-answers {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
}

.audit-ans-row {
  display: flex;
  gap: 0.5rem;
}

.audit-ans-label {
  font-weight: 700;
  color: var(--text-dark-secondary);
}

.audit-ans-val {
  color: var(--text-dark-primary);
}

.audit-explanation-block {
  font-size: 0.82rem;
  line-height: 1.5;
  background: rgba(0,0,0,0.02);
  padding: 0.75rem;
  border-radius: var(--border-radius-sm);
  border-left: 2px solid #cbd5e1;
}

.correct .audit-explanation-block {
  border-left-color: var(--color-success);
  color: #047857;
  background: rgba(16, 185, 129, 0.02);
}

.wrong .audit-explanation-block {
  border-left-color: var(--color-danger);
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.02);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   AI CHAT / TANYA AI SECTION
   ========================================================================== */
.ai-chat-section {
  margin-top: 1rem;
  border-top: 1px dashed #e2e8f0;
  padding-top: 0.75rem;
}

.ai-chat-toggle {
  background: transparent;
  border: 2px solid var(--color-cyan);
  color: var(--color-cyan);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 1.25rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  width: 100%;
}

.ai-chat-toggle:hover {
  background: rgba(6, 182, 212, 0.08);
  transform: translateY(-1px);
}

.ai-chat-container {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: slide-down 0.3s ease;
}

.ai-chat-messages {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--border-radius-sm);
  border: 1px solid #f1f5f9;
}

/* Custom scrollbar for chat */
.ai-chat-messages::-webkit-scrollbar {
  width: 4px;
}
.ai-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.chat-bubble {
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 90%;
  animation: fade-in 0.25s ease;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--bg-gradient-start);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: #f1f5f9;
  color: var(--text-dark-primary);
  border-bottom-left-radius: 4px;
}

.chat-bubble.typing {
  align-self: flex-start;
  background: #f1f5f9;
  color: var(--text-dark-secondary);
  font-style: italic;
}

.ai-chat-input-row {
  display: flex;
  gap: 0.5rem;
}

.ai-chat-input {
  flex: 1;
  border: 2px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-dark-primary);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}

.ai-chat-input:focus {
  border-color: var(--color-cyan);
}

.ai-chat-input::placeholder {
  color: #94a3b8;
}

.ai-chat-send {
  background: linear-gradient(135deg, var(--color-cyan) 0%, #0891b2 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 0.65rem 1.25rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-chat-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(6, 182, 212, 0.3);
}

.ai-chat-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   AI WEAKNESS ANALYSIS SECTION
   ========================================================================== */
.weakness-section {
  margin-top: 1.5rem;
  border-top: 2px dashed #e2e8f0;
  padding-top: 1.5rem;
  width: 100%;
  animation: slide-down 0.4s ease;
}

.weakness-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 0.85rem 2rem;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.weakness-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

.weakness-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.weakness-result {
  margin-top: 1rem;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-left: 4px solid #7c3aed;
  border-radius: var(--border-radius-md);
  padding: 1.25rem 1.5rem;
  animation: slide-down 0.4s ease;
}

.weakness-result-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.95rem;
  color: #5b21b6;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.weakness-result-body {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #6b21a8;
  white-space: pre-wrap;
}

/* ==========================================================================
   MATERI CHATBOT WIDGET
   ========================================================================== */
.materi-chatbot {
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.materi-chatbot-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.materi-chatbot-icon {
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--color-cyan) 0%, #0891b2 100%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.2);
}

.materi-chatbot-label {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-dark-secondary);
  letter-spacing: 0.3px;
}

.materi-chatbot-messages {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #ffffff;
  border-radius: var(--border-radius-sm);
  border: 1px solid #e2e8f0;
}

.materi-chatbot-messages::-webkit-scrollbar {
  width: 4px;
}
.materi-chatbot-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.materi-chatbot-input-row {
  display: flex;
  gap: 0.5rem;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  animation: toast-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 420px;
  width: calc(100% - 3rem);
}

.toast-container.hidden {
  display: none !important;
}

.toast-container.toast-exit {
  animation: toast-slide-out 0.3s ease forwards;
}

.toast-content {
  background: #ffffff;
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

/* Timer bar at the bottom */
.toast-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  animation: toast-timer 8s linear forwards;
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.toast-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.toast-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-dark-primary);
}

.toast-message {
  font-size: 0.8rem;
  color: var(--text-dark-secondary);
  line-height: 1.45;
  margin: 0;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--text-dark-primary);
}

/* Toast with warning style */
.toast-content.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-content.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-content.toast-info {
  border-left: 4px solid var(--color-cyan);
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

@keyframes toast-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes toast-timer {
  from { width: 100%; }
  to { width: 0%; }
}
