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

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --text-primary: #f3f4f6;
  --text-secondary: #cbd5e1;
  --slide-bg: rgba(17, 24, 39, 0.88);
  --slide-surface: rgba(255, 255, 255, 0.055);
  --slide-border: rgba(255, 255, 255, 0.13);
  --slide-title: #ffffff;
  --slide-copy: #e5edf8;
  --slide-muted: #cbd5e1;
  --primary-accent: #3b82f6;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --cyan-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  --pink-gradient: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  --card-bg: rgba(31, 41, 55, 0.45);
  --card-border: rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --slide-bg: #fff7df;
  --slide-surface: rgba(255, 255, 255, 0.72);
  --slide-border: rgba(120, 53, 15, 0.22);
  --slide-title: #1f2937;
  --slide-copy: #334155;
  --slide-muted: #475569;
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-border: rgba(15, 23, 42, 0.12);
}

html {
  min-height: 100%;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

:root[data-theme="light"] body {
  background-image:
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 46%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 46%);
}

header {
  flex-shrink: 0;
}

.main-container {
  flex-grow: 1;
  padding-top: 40px;
  padding-bottom: 80px;
}

footer {
  flex-shrink: 0;
}


/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Glassmorphism navbar */
.navbar-custom {
  background: rgba(17, 24, 39, 0.7) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

:root[data-theme="light"] .navbar-custom {
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.navbar-brand-custom {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-link-custom {
  color: var(--text-secondary) !important;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 8px 16px !important;
}

.nav-link-custom:hover, .nav-link-custom.active {
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.05);
}

.navbar-custom .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--text-primary);
  box-shadow: none;
}

.navbar-custom .navbar-toggler:focus {
  box-shadow: 0 0 0 0.18rem rgba(59, 130, 246, 0.28);
}

.navbar-custom .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28243, 244, 246, 0.94%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

:root[data-theme="light"] .navbar-custom .navbar-toggler {
  border-color: rgba(15, 23, 42, 0.38);
}

:root[data-theme="light"] .navbar-custom .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815, 23, 42, 0.92%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

:root[data-theme="light"] .nav-link-custom:hover,
:root[data-theme="light"] .nav-link-custom.active {
  background: rgba(15, 23, 42, 0.07);
}

.btn-link.nav-link-custom {
  color: var(--text-secondary) !important;
  text-decoration: none;
}

.btn-link.nav-link-custom:hover,
.btn-link.nav-link-custom:focus-visible {
  color: var(--text-primary) !important;
}



/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 50px;
  animation: fadeIn 1s ease-out;
}

.hero-title {
  font-weight: 800;
  font-size: 3rem;
  margin-bottom: 16px;
  background: linear-gradient(to right, #ffffff, #93c5fd, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-theme="light"] .hero-title {
  background: linear-gradient(to right, #0f172a, #2563eb, #047857);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
              0 0 20px rgba(59, 130, 246, 0.2);
}

:root[data-theme="light"] .glass-card:hover {
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

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

.glass-card-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 20px;
}

/* Gradient Theme Borders and Icons */
.theme-card-1 .card-icon-wrapper { background: var(--primary-gradient); }
.theme-card-2 .card-icon-wrapper { background: var(--success-gradient); }
.theme-card-3 .card-icon-wrapper { background: var(--warning-gradient); }
.theme-card-4 .card-icon-wrapper { background: var(--danger-gradient); }
.theme-card-5 .card-icon-wrapper { background: var(--cyan-gradient); }
.theme-card-6 .card-icon-wrapper { background: var(--pink-gradient); }

/* Outcome cards */
.outcome-card {
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.outcome-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateX(5px);
}

/* Badge styling */
.custom-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-hours {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-outcome {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Presentation / Slide Mode Styling */
.presentation-container {
  max-width: 1000px;
  margin: 0 auto;
}

.slide-window {
  --slide-scale: 1;
  background: var(--slide-bg);
  border: 1px solid var(--slide-border);
  border-radius: 24px;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  transition: all 0.5s ease-in-out;
  margin-bottom: 24px;
}

.slide-window:fullscreen,
.slide-window.is-pseudo-fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  padding: clamp(12px, 2.2vh, 28px) clamp(18px, 3vw, 44px);
  margin: 0;
  background: var(--slide-bg);
}

.slide-window.is-pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

body.presentation-fullscreen-active {
  overflow: hidden;
}

.slide-window:fullscreen .slide-content-area,
.slide-window.is-pseudo-fullscreen .slide-content-area {
  margin: clamp(6px, 1.2vh, 18px) 0;
}

.slide-window:fullscreen .slide-title,
.slide-window.is-pseudo-fullscreen .slide-title {
  font-size: calc(clamp(2.35rem, 3.8vw, 4.6rem) * var(--slide-scale));
}

.slide-window:fullscreen .slide-bullets li,
.slide-window.is-pseudo-fullscreen .slide-bullets li {
  font-size: calc(clamp(1.2rem, 1.8vw, 1.9rem) * var(--slide-scale));
}

.slide-window:fullscreen .slide-card-body,
.slide-window:fullscreen .slide-image-caption,
.slide-window.is-pseudo-fullscreen .slide-card-body,
.slide-window.is-pseudo-fullscreen .slide-image-caption {
  font-size: calc(clamp(1.08rem, 1.45vw, 1.55rem) * var(--slide-scale));
}

.slide-window:fullscreen .slide-image-panel img,
.slide-window.is-pseudo-fullscreen .slide-image-panel img {
  max-height: 68vh;
}

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

.slide-tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--slide-border);
  background: var(--slide-surface);
  color: var(--slide-title);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.slide-tool-btn:hover,
.slide-tool-btn:focus-visible {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(96, 165, 250, 0.55);
  outline: none;
}

.slide-content-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 14px 0;
  animation: slideFadeIn 0.5s ease-out;
}

.slide-title {
  font-size: calc(2.05rem * var(--slide-scale));
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--slide-title);
}

.slide-desc {
  font-size: calc(1.52rem * var(--slide-scale));
  color: var(--slide-copy);
  line-height: 1.6;
  max-width: 800px;
}

.slide-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--slide-border);
  padding-top: 12px;
  color: var(--slide-muted);
  font-size: 0.9rem;
}

/* Nav buttons for slides */
.slide-btn {
  background: var(--slide-surface);
  border: 1px solid var(--slide-border);
  color: var(--slide-title);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.slide-btn:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  transform: scale(1.1);
}

.slide-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

/* Comparison scenario styling */
.comparison-box {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  padding: 24px;
  margin-top: 30px;
}

.comparison-box h5 {
  color: #60a5fa;
  font-weight: 700;
  margin-bottom: 15px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Presentation Slide Layout */
.slide-rich-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  width: 100%;
  text-align: left;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .slide-rich-layout {
    grid-template-columns: 1fr !important;
  }
  .slide-window {
    aspect-ratio: auto !important;
    min-height: 600px;
  }
}

.slide-bullets {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.slide-bullets li {
  font-size: calc(1.08rem * var(--slide-scale));
  color: var(--slide-copy);
  margin-bottom: 8px;
  line-height: 1.45;
  position: relative;
  padding-left: 28px;
}

.slide-bullets li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #60a5fa;
  font-weight: bold;
}

.slide-info-card {
  background: var(--slide-surface);
  border: 1px solid var(--slide-border);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.slide-info-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.slide-card-title {
  font-size: calc(0.9rem * var(--slide-scale));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-fun-fact {
  color: #38bdf8;
}

.title-activity {
  color: #c084fc;
}

.slide-card-body {
  font-size: calc(0.94rem * var(--slide-scale));
  color: var(--slide-muted);
  line-height: 1.38;
}

.slide-title > i,
.slide-card-title > i {
  font-size: calc(1.15em * var(--slide-scale));
}

#slideNormalLayout, #slideRichLayout, #slideImageLayout {
  transition: opacity 0.25s ease-in-out;
  width: 100%;
}

.slide-image-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  align-items: center;
  width: 100%;
  text-align: left;
}

.slide-image-panel {
  background: var(--slide-surface);
  border: 1px solid var(--slide-border);
  border-radius: 18px;
  padding: 14px;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.slide-image-zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--slide-border);
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.2s ease, background 0.2s ease;
}

.slide-image-zoom-btn:hover,
.slide-image-zoom-btn:focus-visible {
  background: rgba(37, 99, 235, 0.9);
  transform: scale(1.06);
  outline: none;
}

.slide-image-panel img {
  width: 100%;
  max-height: 390px;
  object-fit: contain;
  display: block;
}

.slide-image-modal .modal-dialog {
  max-width: min(96vw, 1500px);
}

.slide-image-modal {
  z-index: 3100;
}

.modal-backdrop.show {
  z-index: 3090;
}

.slide-image-modal .modal-content {
  height: 92vh;
  background: rgba(8, 13, 23, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  overflow: hidden;
}

.slide-image-modal .modal-body {
  height: 100%;
  padding: 52px 28px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-image-modal .modal-body img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.slide-image-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.slide-image-modal-close:hover,
.slide-image-modal-close:focus-visible {
  background: rgba(220, 38, 38, 0.95);
  outline: none;
}

.slide-image-copy {
  min-width: 0;
}

.slide-image-caption {
  color: var(--slide-copy);
  font-size: calc(1.16rem * var(--slide-scale));
  line-height: 1.45;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .slide-image-layout {
    grid-template-columns: 1fr !important;
  }

  .slide-image-panel {
    min-height: 220px;
  }
}

/* Quiz layout custom styling */
.slide-quiz-layout {
  transition: opacity 0.25s ease-in-out;
}

.quiz-question-number {
  font-size: calc(1.16rem * var(--slide-scale));
  letter-spacing: 1px;
  text-transform: uppercase;
}

.quiz-question-text {
  font-size: calc(1.52rem * var(--slide-scale));
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
}

.quiz-option-btn {
  background: var(--slide-surface);
  border: 1px solid var(--slide-border);
  color: var(--slide-title);
  border-radius: 12px;
  font-size: calc(1.08rem * var(--slide-scale));
  transition: all 0.2s ease;
  outline: none;
}

.quiz-option-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.quiz-option-btn:disabled {
  cursor: default;
}

.quiz-option-btn.correct {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgb(16, 185, 129) !important;
  color: #34d399 !important;
  font-weight: 600;
}

.quiz-option-btn.incorrect {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgb(239, 68, 68) !important;
  color: #f87171 !important;
}

.quiz-explanation-card {
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: 16px;
  text-align: left;
  animation: fadeIn 0.4s ease-out;
}

.slide-window .text-white {
  color: var(--slide-title) !important;
}

.slide-window .text-secondary {
  color: var(--slide-muted) !important;
}

:root[data-theme="light"] .slide-window {
  box-shadow: 0 22px 45px rgba(120, 53, 15, 0.18);
}

:root[data-theme="light"] .slide-window .badge.bg-dark {
  background: #78350f !important;
  color: #fff7ed !important;
  border-color: rgba(120, 53, 15, 0.45) !important;
}

:root[data-theme="light"] .slide-tool-btn:hover,
:root[data-theme="light"] .slide-tool-btn:focus-visible {
  background: rgba(120, 53, 15, 0.12);
  border-color: rgba(120, 53, 15, 0.35);
}

:root[data-theme="light"] .slide-info-card:hover {
  background: rgba(255, 255, 255, 0.88);
}

:root[data-theme="light"] .slide-image-panel img {
  filter: drop-shadow(0 10px 20px rgba(120, 53, 15, 0.16));
}

:root[data-theme="light"] .slide-image-zoom-btn {
  background: rgba(120, 53, 15, 0.88);
  color: #fff7ed;
}

:root[data-theme="light"] .title-fun-fact {
  color: #0369a1;
}

:root[data-theme="light"] .title-activity {
  color: #7e22ce;
}

:root[data-theme="light"] .quiz-option-btn:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.32);
}

:root[data-theme="light"] .quiz-explanation-card {
  background: rgba(254, 243, 199, 0.9);
  border-color: rgba(180, 83, 9, 0.28);
}

.thin-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.thin-progress .progress-bar {
  border-radius: 999px;
}

.form-select.bg-dark,
.form-control.bg-dark {
  background-color: rgba(17, 24, 39, 0.9) !important;
  color: #f8fafc !important;
  border-color: rgba(203, 213, 225, 0.34) !important;
  color-scheme: dark;
}

.form-select.bg-dark option {
  background-color: #111827;
  color: #f8fafc;
}

:root[data-theme="light"] .text-white,
:root[data-theme="light"] .text-light {
  color: var(--text-primary) !important;
}

:root[data-theme="light"] .text-secondary,
:root[data-theme="light"] .navbar-text {
  color: var(--text-secondary) !important;
}

:root[data-theme="light"] .btn-outline-light {
  color: #111827;
  border-color: rgba(15, 23, 42, 0.35);
}

:root[data-theme="light"] .btn-outline-light:hover {
  color: #ffffff;
  background: #111827;
  border-color: #111827;
}

:root[data-theme="light"] .btn-outline-secondary {
  color: #334155;
  border-color: rgba(51, 65, 85, 0.35);
}

:root[data-theme="light"] .form-select.bg-dark,
:root[data-theme="light"] .form-control.bg-dark {
  background-color: #ffffff !important;
  color: #111827 !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color-scheme: light;
}

:root[data-theme="light"] .form-select.bg-dark option {
  background-color: #ffffff;
  color: #111827;
}

:root[data-theme="light"] .form-label,
:root[data-theme="light"] label.text-secondary {
  color: #334155 !important;
}

:root[data-theme="light"] .badge-hours {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.28);
}

:root[data-theme="light"] .badge-outcome {
  background: rgba(126, 34, 206, 0.1);
  color: #6b21a8;
  border-color: rgba(126, 34, 206, 0.25);
}

:root[data-theme="light"] .table-dark {
  --bs-table-bg: #ffffff;
  --bs-table-striped-bg: #f1f5f9;
  --bs-table-color: #111827;
  --bs-table-border-color: rgba(15, 23, 42, 0.12);
  color: #111827;
}

:root[data-theme="light"] .outcome-card {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 23, 42, 0.1);
}

:root[data-theme="light"] .outcome-card:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.26);
}

:root[data-theme="light"] footer {
  background: rgba(255, 255, 255, 0.86) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

:root[data-theme="light"] .thin-progress {
  background: rgba(15, 23, 42, 0.12);
}

@media (max-width: 768px) {
  .main-container {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 22px;
  }

  .navbar-custom .container-fluid {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .navbar-brand-custom {
    max-width: calc(100vw - 92px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.16rem;
    letter-spacing: 0;
  }

  .navbar-custom .navbar-collapse {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: rgba(11, 15, 25, 0.96);
  }

  :root[data-theme="light"] .navbar-custom .navbar-collapse {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(15, 23, 42, 0.12);
  }

  .navbar-custom .nav-link-custom {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 9px 10px !important;
  }

  .navbar-custom .navbar-text {
    display: block;
    margin-top: 8px;
  }

  .hero-section {
    margin-bottom: 22px;
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.12;
    margin-bottom: 0;
  }

  .home-class-selector {
    padding: 16px !important;
    overflow: visible;
    border-radius: 14px;
  }

  .home-class-selector-form {
    margin-left: 0;
    margin-right: 0;
    row-gap: 10px !important;
  }

  .home-class-selector-form > * {
    padding-left: 0;
    padding-right: 0;
    min-width: 0;
  }

  .home-class-select-wrap,
  .home-class-status-wrap {
    width: 100%;
    max-width: 100%;
  }

  #classSectionId {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 42px;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    border-radius: 10px;
    padding: 0.5rem 2rem 0.5rem 0.65rem;
    background-size: 13px 10px;
  }

  #classSectionId option {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .home-class-status-wrap {
    text-align: left !important;
  }

  .custom-badge {
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
  }

  .presentation-topbar {
    align-items: stretch !important;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px !important;
  }

  .presentation-back-btn {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
  }

  .presentation-title-stack {
    width: 100%;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: stretch !important;
  }

  .presentation-title-stack .badge {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
    padding: 0.45rem 0.65rem !important;
    font-size: 0.82rem !important;
  }

  .presentation-theme-badge {
    justify-content: flex-start !important;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .presentation-container {
    max-width: none;
    margin-left: -2px;
    margin-right: -2px;
  }

  .slide-window {
    aspect-ratio: auto !important;
    min-height: min(76vh, 680px);
    max-height: none;
    border-radius: 16px;
    padding: 12px;
    overflow: visible;
    touch-action: pan-y;
    margin-bottom: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  }

  .slide-header {
    gap: 8px;
    align-items: flex-start;
  }

  #slideCode {
    min-width: 0;
    max-width: 42%;
    overflow-wrap: anywhere;
    line-height: 1.15;
    font-size: 0.9rem;
  }

  .slide-header > div {
    gap: 6px !important;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .slide-tool-btn {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  #slideProgress {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
  }

  .slide-content-area {
    align-items: stretch;
    justify-content: flex-start;
    overflow: visible;
    margin: 10px 0;
  }

  .slide-title {
    font-size: calc(1.38rem * var(--slide-scale));
    line-height: 1.18;
    margin-bottom: 10px !important;
    overflow-wrap: anywhere;
  }

  .slide-title > i {
    font-size: 1.15em;
    flex: 0 0 auto;
  }

  .slide-desc {
    font-size: calc(1rem * var(--slide-scale));
    line-height: 1.45;
  }

  .slide-rich-layout,
  .slide-image-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
  }

  .slide-bullets li {
    font-size: calc(0.96rem * var(--slide-scale));
    line-height: 1.35;
    margin-bottom: 7px;
    padding-left: 22px;
  }

  .slide-info-card {
    border-radius: 12px;
    padding: 9px 10px;
    margin-bottom: 8px;
  }

  .slide-card-title {
    font-size: calc(0.76rem * var(--slide-scale));
    line-height: 1.2;
    letter-spacing: 0;
  }

  .slide-card-body,
  .slide-image-caption {
    font-size: calc(0.9rem * var(--slide-scale));
    line-height: 1.35;
  }

  .slide-image-panel {
    min-height: auto;
    height: clamp(190px, 42vh, 330px);
    padding: 8px;
    border-radius: 12px;
  }

  .slide-image-panel img {
    max-height: 100%;
  }

  .slide-image-zoom-btn {
    width: 36px;
    height: 36px;
    top: 8px;
    right: 8px;
  }

  .slide-quiz-layout {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .quiz-question-number {
    font-size: calc(0.9rem * var(--slide-scale));
    letter-spacing: 0;
    margin-bottom: 8px !important;
  }

  .quiz-question-text {
    font-size: calc(1.05rem * var(--slide-scale));
    line-height: 1.35;
    margin-bottom: 12px !important;
  }

  #quizOptionsContainer {
    --bs-gutter-y: 0.55rem;
    margin-bottom: 12px !important;
  }

  .quiz-option-btn {
    border-radius: 10px;
    font-size: calc(0.92rem * var(--slide-scale));
    padding: 0.65rem 0.75rem !important;
  }

  .slide-footer {
    display: none;
  }

  .presentation-container > .d-flex.justify-content-between {
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 8px;
  }

  .slide-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  #dotsContainer {
    max-height: 52px;
    overflow: auto;
    padding: 2px 0;
  }
}

@media (max-width: 420px) {
  .presentation-title-stack {
    grid-template-columns: 1fr;
  }

  .presentation-title-stack .badge {
    justify-content: center !important;
    text-align: center !important;
  }

  .slide-window {
    min-height: 78vh;
    padding: 10px;
  }

  #slideCode {
    max-width: 100%;
  }

  .slide-header {
    flex-direction: column;
  }

  .slide-header > div {
    width: 100%;
    justify-content: space-between;
  }

  .slide-title {
    font-size: calc(1.24rem * var(--slide-scale));
  }
}
