/* ==========================================================================
   TÀI LIỆU TẬP HUẤN ATTT
   Slide Presentation Engine - Ultra-Lightweight & Zero-Lag
   ========================================================================== */

:root {
  --bg-gradient: #090e1a;
  --header-bg: #0d1527;
  --slide-bg: #111a2e;
  --card-bg: #18233c;
  --card-border: rgba(99, 133, 212, 0.2);
  --text-primary: #f0f4fc;
  --text-secondary: #9db2db;
  --text-muted: #62779e;
  
  --accent-cyan: #00e5ff;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  
  --shadow-glow: none;
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
  
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --nav-height: 64px;
}

/* Base Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body, button, input, select, textarea {
  font-family: var(--font-main) !important;
}

html {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  user-select: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Background Cyber Grid Effect */
.cyber-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Top Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 100;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple));
  transition: width 0.15s ease;
}

/* Header & Controls */
header.app-header {
  position: relative;
  z-index: 10;
  height: var(--nav-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

.header-title-group h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.header-title-group span {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-1px);
}

.slide-counter {
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

/* Slide Jump Input Box */
.slide-jump-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 229, 255, 0.35);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.slide-jump-input {
  width: 46px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--accent-cyan);
  border-radius: 4px;
  color: var(--accent-cyan);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  font-family: var(--font-mono);
  outline: none;
  -moz-appearance: textfield;
  transition: all 0.2s ease;
}

.slide-jump-input::-webkit-outer-spin-button,
.slide-jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.slide-jump-input:focus {
  background: rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 12px var(--accent-cyan);
  color: #fff;
}

.slide-jump-btn {
  background: rgba(0, 229, 255, 0.2);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slide-jump-btn:hover {
  background: var(--accent-cyan);
  color: #050b17;
}

/* Main Presentation Deck Container */
main.deck-container {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px 115px 32px;
  overflow-x: hidden;
  overflow-y: visible;
  min-height: calc(100vh - var(--nav-height));
  box-sizing: border-box;
}

/* Slide Cards - High Performance Zero-Lag Engine */
@media screen {
  .slide {
    position: relative;
    width: 94%;
    max-width: 1350px;
    min-height: 480px;
    max-height: calc(100vh - var(--nav-height) - 115px);
    background: var(--slide-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 28px 38px;
    box-shadow: var(--shadow-card);
    font-size: 1.05rem;
    display: none !important;
    flex-direction: column;
    overflow-y: auto;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    z-index: -9999;
    -webkit-overflow-scrolling: touch;
  }

  .slide:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
    z-index: -9999 !important;
  }

  .slide.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    pointer-events: auto !important;
    z-index: 10 !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Slide Typography & Layouts */
.slide-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.slide-tag {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  margin-bottom: 8px;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.slide-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.slide-subtitle {
  font-size: 1.18rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

.slide-body {
  flex: 1;
  display: flex;
  gap: 28px;
  align-items: stretch;
}

/* Common Layout Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}

/* Visual Cards */
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.15);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}

.card-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 12px;
  width: fit-content;
}

.badge-danger { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid var(--accent-red); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid var(--accent-yellow); }
.badge-success { background: rgba(16, 185, 129, 0.2); color: #86efac; border: 1px solid var(--accent-green); }
.badge-cyan { background: rgba(0, 229, 255, 0.2); color: #a5f3fc; border: 1px solid var(--accent-cyan); }

/* Keyboard Badge */
kbd {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(180deg, #374151, #1f2937);
  border: 1px solid #4b5563;
  border-bottom: 3px solid #111827;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Hero Slide */
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding-right: 20px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.25;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.btn-primary, .start-learn-btn {
  font-family: var(--font-main) !important;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #050b17;
  font-weight: 800 !important;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.4);
  transition: all 0.25s ease;
  letter-spacing: 0.2px;
}

.btn-primary:hover, .start-learn-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(0, 229, 255, 0.6);
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-media img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

/* Image Showcase in Slides */
.media-showcase {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
  position: relative;
}

.media-showcase img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: contain;
  background: rgba(0,0,0,0.3);
  display: block;
}

.media-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 21, 39, 0.9);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Comparison Tables */
.compare-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: 100%;
}

.compare-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
}

.compare-card.danger {
  border-top: 4px solid var(--accent-red);
}

.compare-card.success {
  border-top: 4px solid var(--accent-green);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.compare-list li strong {
  color: var(--text-primary);
}

/* Step by Step Tabs Simulator */
.tabs-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: rgba(0, 229, 255, 0.18);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
  height: 100%;
}

.tab-content.active {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--card-border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #050b17;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.step-details h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.step-details p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Interactive Password Strength Tester */
.pw-tester-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pw-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-input {
  width: 100%;
  padding: 14px 48px 14px 18px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1.1rem;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s ease;
}

.pw-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

.pw-toggle-btn {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
}

.strength-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.pw-feedback {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.pw-crack-time {
  font-weight: 700;
  color: var(--accent-cyan);
}

.pw-tips {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Antigravity AI Simulator */
.ai-chat-window {
  background: rgba(10, 16, 30, 0.9);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.ai-chat-header {
  background: rgba(18, 28, 52, 0.9);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-green);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.ai-chat-messages {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.5;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: rgba(30, 41, 69, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chip-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent-cyan);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  background: var(--accent-cyan);
  color: #050b17;
  font-weight: 700;
}

/* Mini Game / Scenario Card */
.scenario-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s ease;
}

.scenario-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.scenario-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-yellow);
}

.scenario-actions {
  display: flex;
  gap: 10px;
}

.scenario-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.scenario-btn.safe {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-green);
  color: #86efac;
}

.scenario-btn.danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--accent-red);
  color: #fca5a5;
}

.scenario-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.scenario-result {
  display: none;
  font-size: 0.88rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
  line-height: 1.45;
}

/* Quiz Engine */
.quiz-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-question {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.quiz-option:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent-cyan);
}

.quiz-option.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: var(--accent-green) !important;
  color: #a7f3d0;
}

.quiz-option.wrong {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: var(--accent-red) !important;
  color: #fecaca;
}

/* Bottom Presentation Control Dock */
footer.dock-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--header-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 50;
}

.dock-left, .dock-center, .dock-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dock-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.dock-btn:hover {
  background: var(--accent-cyan);
  color: #050b17;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
}

.dock-btn-main {
  width: auto;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #050b17;
}

.keyboard-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Speaker Notes Drawer */
.notes-drawer {
  position: fixed;
  bottom: 64px;
  left: 0;
  right: 0;
  background: rgba(9, 14, 26, 0.98);
  border-top: 2px solid var(--accent-yellow);
  padding: 20px 32px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 45;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  max-height: 280px;
  overflow-y: auto;
}

.notes-drawer.open {
  transform: translateY(0);
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--accent-yellow);
  font-weight: 700;
  font-size: 0.95rem;
}

.notes-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* Table of Contents Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--slide-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  padding: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-glow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

/* Module Divider Banner */
.slide.module-divider {
  background: linear-gradient(135deg, #0d1527, #1c2744);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.25);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 60px;
}

@media screen {
  .slide.module-divider:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
    z-index: -9999 !important;
  }

  .slide.module-divider.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    pointer-events: auto !important;
    z-index: 10 !important;
  }
}

.module-badge {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 1px;
  padding: 8px 24px;
  border-radius: var(--radius-full);
  background: rgba(0, 229, 255, 0.2);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  margin-bottom: 20px;
  display: inline-block;
}

.module-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.25;
}

.module-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 800px;
  line-height: 1.6;
  margin-bottom: 30px;
}

.module-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.module-highlight-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Enhanced Modal TOC for 50 slides */
.modal-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  overflow-y: auto;
  max-height: 65vh;
  padding-right: 8px;
}

.modal-category-header {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.5px;
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.1);
  padding: 6px 12px;
  border-radius: 4px;
  margin-top: 10px;
  border-left: 3px solid var(--accent-cyan);
}

.modal-item {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.modal-item:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateX(4px);
}

/* Feature card compact variations */
.feature-card.compact {
  padding: 16px;
  gap: 8px;
}

.feature-card.compact h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.feature-card.compact p {
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Shortcut visual keys */
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.shortcut-row:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
}

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shortcut-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.shortcut-desc strong {
  color: var(--text-primary);
}



/* ==========================================================================
   MOBILE & TABLET LANDSCAPE OPTIMIZATION ENGINE
   ========================================================================== */

/* Safe Area Insets for Notch / Dynamic Island / Curved Edges */
@supports (padding: env(safe-area-inset-left)) {
  .app-header {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
  footer.dock-footer {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
    padding-bottom: env(safe-area-inset-bottom);
  }
  .deck-container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* Tablet Landscape & Medium Desktops (iPad, iPad Pro, Android Tablets) */
@media screen and (max-width: 1200px) {
  .slide {
    padding: 24px 32px;
    height: calc(100vh - var(--nav-height) - 85px);
    max-height: 820px;
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .slide-title {
    font-size: 1.55rem;
  }
  .header-title-group h1 {
    font-size: 0.95rem;
  }
  .header-tools .tool-btn {
    padding: 5px 10px;
    font-size: 0.78rem;
  }
}

/* Small Screens / Portrait Mode */
@media screen and (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .compare-box {
    grid-template-columns: 1fr;
  }
  .slide-body {
    flex-direction: column;
  }
  .hero-media {
    display: none;
  }
  .dock-center span {
    display: none;
  }
  .tab-content.active {
    grid-template-columns: 1fr;
  }
}

/* Desktop / Laptop with limited vertical screen height (e.g. 1366x768, scaling 125%, 150%) */
@media screen and (min-width: 993px) and (max-height: 820px) {
  main.deck-container {
    padding: 12px 24px 115px 24px !important;
    align-items: flex-start !important;
  }
  .slide {
    max-height: none !important;
    padding: 20px 28px !important;
  }
  .hero-media img {
    max-height: 270px !important;
    width: auto !important;
    object-fit: contain !important;
  }
  .hero-title {
    font-size: 1.85rem !important;
  }
  .hero-desc {
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
    margin-bottom: 10px !important;
  }
  .hero-tags {
    margin-bottom: 12px !important;
    gap: 6px !important;
  }
}

/* ==========================================================================
   DEDICATED MOBILE & TABLET RESPONSIVE & LANDSCAPE MODE
   Tối ưu hóa toàn diện cho Smartphone & Tablet (Màn hình hẹp & Chiều ngang hạn chế)
   ========================================================================== */

/* Ẩn hoàn toàn viền vàng của notes-drawer khi chưa mở */
.notes-drawer:not(.open) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(150%) !important;
}

/* BẢO MẬT LỜI GIẢNG: Học viên và khách tuyệt đối không thấy nút lời giảng và khay ghi chú */
body:not(.is-teacher) #notesBtn,
body:not(.is-teacher) .notes-drawer,
body:not(.is-teacher) .teacher-only-hint,
body.student-mode #notesBtn,
body.student-mode .notes-drawer,
body.student-mode .teacher-only-hint {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.sync-text-compact {
  display: none;
}
.header-title-group .brand-short {
  display: none;
}

@media screen and (max-width: 992px), screen and (orientation: landscape) and (max-height: 560px) {
  :root {
    --nav-height: 40px !important;
    --footer-height: 40px !important;
  }

  /* 1. APP HEADER: SIÊU GỌN GÀNG, BIẾN NÚT THÀNH ICON */
  .app-header {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    z-index: 100 !important;
  }

  .header-brand {
    gap: 6px !important;
  }

  .header-logo {
    font-size: 1.1rem !important;
  }

  /* Thu gọn tên thương hiệu thành ATTT */
  .header-title-group .brand-full {
    display: none !important;
  }
  .header-title-group .brand-short {
    display: inline-block !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    letter-spacing: 0.5px !important;
  }

  /* Thu gọn pill thông báo đồng bộ */
  .live-sync-indicator {
    padding: 2px 8px !important;
    font-size: 0.68rem !important;
    gap: 4px !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
  }
  .live-sync-indicator .sync-text-full {
    display: none !important;
  }
  .live-sync-indicator .sync-text-compact {
    display: inline-block !important;
  }
  .live-sync-indicator .live-sync-dot {
    width: 6px !important;
    height: 6px !important;
  }
  .live-sync-indicator .btn-catchup {
    padding: 1px 5px !important;
    font-size: 0.62rem !important;
    margin-left: 4px !important;
  }

  /* Header Tools: chuyển toàn bộ các nút thành Icon */
  .header-tools {
    gap: 5px !important;
  }

  #exportPdfBtn,
  #notesBtn {
    display: none !important;
  }

  .tool-btn.icon-only-mobile,
  .tool-btn.auth-status-btn {
    width: 32px !important;
    height: 30px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
  }
  .tool-btn.icon-only-mobile .btn-text,
  .tool-btn.auth-status-btn .btn-text {
    display: none !important;
  }
  .tool-btn.icon-only-mobile .btn-icon,
  .tool-btn.auth-status-btn .btn-icon {
    font-size: 1.05rem !important;
    margin: 0 !important;
    display: inline-block !important;
  }

  /* Thu gọn hộp nhảy slide */
  .slide-jump-box {
    height: 30px !important;
    padding: 2px 6px !important;
    font-size: 0.72rem !important;
    gap: 2px !important;
    border-radius: 6px !important;
  }
  .slide-jump-box .jump-label,
  .slide-jump-box .slide-jump-btn {
    display: none !important;
  }
  .slide-jump-input {
    width: 28px !important;
    height: 22px !important;
    font-size: 0.72rem !important;
    padding: 0 !important;
    text-align: center !important;
    border-radius: 4px !important;
  }
  #slideTotalCount {
    font-size: 0.72rem !important;
    color: var(--text-muted) !important;
  }

  /* 2. DOCK FOOTER: ĐỔI CÁC NÚT THÀNH ICON, CHỐNG GÃY CHỮ */
  footer.dock-footer {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    z-index: 100 !important;
  }

  .dock-left {
    gap: 6px !important;
  }

  .dock-btn {
    width: 32px !important;
    height: 30px !important;
    min-width: 32px !important;
    padding: 0 !important;
    font-size: 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
  }

  .dock-btn-main {
    width: 32px !important;
    height: 30px !important;
    min-width: 32px !important;
    padding: 0 !important;
    font-size: 1rem !important;
    border-radius: 6px !important;
  }
  .dock-btn-main .btn-text {
    display: none !important;
  }
  .dock-btn-main .btn-icon {
    font-size: 1.1rem !important;
    margin: 0 !important;
    display: inline-block !important;
  }

  .dock-center .keyboard-hint {
    display: none !important;
  }

  .dock-right {
    gap: 6px !important;
  }

  .dock-lock-badge {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 6px !important;
  }
  .dock-lock-badge svg {
    width: 17px !important;
    height: 17px !important;
  }

  .dock-home-btn {
    width: 32px !important;
    height: 30px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
  }
  .dock-home-btn .btn-text {
    display: none !important;
  }
  .dock-home-btn .btn-icon {
    font-size: 1.05rem !important;
    margin: 0 !important;
    display: inline-block !important;
  }

  /* 3. KHU VỰC CHỨA SLIDE: CỐ ĐỊNH CHUẨN XÁC, KHÔNG BỊ FOOTER/HEADER ĐÈ */
  main.deck-container {
    position: fixed !important;
    top: 40px !important;
    bottom: 40px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(100dvh - 80px) !important;
    max-height: calc(100dvh - 80px) !important;
    padding: 4px 8px !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    z-index: 5 !important;
  }

  /* Slide Active: lấp đầy khu vực hiển thị an toàn và cho phép cuộn mượt */
  .slide.active {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    padding: 6px 12px !important;
    margin: 0 auto !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  /* Thanh cuộn tinh tế siêu mảnh */
  .slide.active::-webkit-scrollbar {
    width: 4px !important;
  }
  .slide.active::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 4px !important;
  }

  /* 4. TYPOGRAPHY & CARDS TỐI ƯU CHO CHIỀU CAO HẠN CHẾ */
  .slide-header {
    margin-bottom: 4px !important;
    padding-bottom: 3px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    flex-shrink: 0 !important;
  }

  .slide-tag {
    font-size: 0.58rem !important;
    padding: 1px 6px !important;
    margin-bottom: 2px !important;
    border-radius: 4px !important;
  }

  .slide-title {
    font-size: 0.92rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1px !important;
    font-weight: 700 !important;
  }

  .slide-subtitle {
    font-size: 0.68rem !important;
    line-height: 1.22 !important;
    margin-top: 1px !important;
    margin-bottom: 3px !important;
  }

  .slide-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    min-height: 0 !important;
  }

  /* Bố cục lưới trên màn hình xoay ngang */
  .grid-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5px !important;
  }

  .grid-4 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 5px !important;
  }

  /* Feature cards & boxes */
  .feature-card,
  .card,
  .box-item,
  .step-card,
  .rule-box {
    padding: 6px 9px !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
  }

  .feature-card h3,
  .feature-card h4,
  .card h3,
  .box-item h3 {
    font-size: 0.78rem !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
  }

  .feature-card p,
  .feature-card li,
  .card p,
  .box-item p {
    font-size: 0.7rem !important;
    line-height: 1.28 !important;
    margin-bottom: 2px !important;
  }

  .feature-card span[style*="font-size: 1.3rem"],
  .feature-card span[style*="font-size: 2rem"] {
    font-size: 0.88rem !important;
  }

  .card-badge {
    font-size: 0.6rem !important;
    padding: 1px 5px !important;
    border-radius: 3px !important;
  }

  kbd {
    font-size: 0.6rem !important;
    padding: 1px 4px !important;
    line-height: 1.1 !important;
  }

  /* Trang bìa Hero */
  .hero-title {
    font-size: 1.15rem !important;
    line-height: 1.2 !important;
  }
  .hero-desc {
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
    margin-bottom: 6px !important;
  }
  .hero-tags {
    gap: 3px !important;
    margin-bottom: 6px !important;
  }
  .hero-tag {
    font-size: 0.65rem !important;
    padding: 1px 6px !important;
  }
  .start-learn-btn {
    padding: 6px 14px !important;
    font-size: 0.78rem !important;
  }
  .hero-media {
    display: none !important;
  }

  /* Teacher Dock */
  .teacher-dock {
    bottom: 6px !important;
    padding: 3px 8px !important;
    gap: 4px !important;
  }
  .teacher-dock-brand .teacher-label {
    display: none !important;
  }
  .teacher-dock-btn {
    padding: 3px 6px !important;
    font-size: 0.68rem !important;
  }
  .teacher-dock-pill {
    bottom: 6px !important;
    padding: 4px 12px !important;
    font-size: 0.72rem !important;
  }

  /* Modals */
  .modal-card {
    max-height: 94vh !important;
    padding: 12px 14px !important;
  }
  .modal-header h3 {
    font-size: 0.95rem !important;
  }
  .roster-scroll-list {
    max-height: 180px !important;
  }
  .notes-drawer {
    bottom: 40px !important;
    max-height: 200px !important;
    padding: 12px 16px !important;
  }
}

/* ==========================================================================
   LIVE SYNCHRONIZED PRESENTATION & CLASSROOM ENGINE STYLES
   ========================================================================== */

/* Header Indicator & Status Badge */
.live-sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-left: 14px;
}

.live-sync-indicator.locked {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.live-sync-indicator.unlocked {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.live-sync-indicator.teacher {
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid rgba(139, 92, 246, 0.6);
  color: #c4b5fd;
}

.live-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.btn-catchup {
  background: var(--accent-cyan);
  color: #050b17;
  border: none;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.2s;
}

.btn-catchup:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* Room Auth Button in Header */
.tool-btn.auth-status-btn {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--accent-cyan);
}

.tool-btn.auth-status-btn:hover {
  background: var(--accent-cyan);
  color: #050b17;
}

/* Student Locked Mode - Interaction Blockade */
body.student-locked .dock-footer .dock-btn,
body.student-locked .slide-jump-box,
body.student-locked .start-learn-btn,
body.student-locked .modal-list .toc-slide-item {
  pointer-events: none !important;
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

/* Explicitly disable any floating banner/toast on footer */
.dock-footer::after,
body.student-locked .dock-footer::after {
  display: none !important;
  content: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ==========================================================================
   ROOM GATE MODAL (XÁC THỰC MÃ LỚP & ĐĂNG NHẬP BÁO CÁO VIÊN)
   ========================================================================== */
.gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  background: rgba(6, 10, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gate-modal {
  width: 100%;
  max-width: 520px;
  background: #0f182c;
  border: 1.5px solid rgba(0, 229, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 45px rgba(0, 229, 255, 0.15);
  animation: gatePopIn 0.25s ease-out forwards;
}

@keyframes gatePopIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.gate-header {
  text-align: center;
  margin-bottom: 24px;
}

.gate-emblem {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.gate-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.gate-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.gate-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 10px;
}

.gate-tab {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main) !important;
}

.gate-tab:hover {
  color: #fff;
}

.gate-tab.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(59, 130, 246, 0.3));
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.4);
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gate-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gate-input-group label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.gate-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(99, 133, 212, 0.35);
  border-radius: 10px;
  padding: 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gate-input-wrapper:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.3);
}

.gate-input-icon {
  font-size: 1.1rem;
  margin-right: 8px;
}

.gate-input {
  flex: 1;
  padding: 13px 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  outline: none;
  font-family: var(--font-main) !important;
}

.gate-input::placeholder {
  color: #64748b;
  font-weight: 500;
}

.gate-input.code {
  letter-spacing: 2px;
  text-transform: uppercase;
}

.gate-input-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.gate-error-banner {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid var(--accent-red);
  color: #fca5a5;
  font-size: 0.85rem;
  font-weight: 600;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.gate-submit-btn {
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #050b17;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-top: 6px;
  font-family: var(--font-main) !important;
}

.gate-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(0, 229, 255, 0.6);
}

.gate-submit-btn.teacher {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.gate-submit-btn.teacher:hover {
  box-shadow: 0 6px 26px rgba(139, 92, 246, 0.6);
}

.gate-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.gate-offline-link {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
  font-family: var(--font-main) !important;
}

.gate-offline-link:hover {
  color: #fff;
}

/* ==========================================================================
   TEACHER CONTROL DOCK (BẢNG ĐIỀU KHIỂN NỔI CỦA BÁO CÁO VIÊN)
   ========================================================================== */
.teacher-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  background: rgba(13, 21, 39, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid var(--accent-cyan);
  border-radius: 50px;
  padding: 6px 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 229, 255, 0.25);
  animation: slideUpDock 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 96vw;
  transition: all 0.25s ease;
}

@keyframes slideUpDock {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.teacher-dock-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.teacher-dock-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.6);
  border-radius: var(--radius-full);
}

.teacher-crown {
  font-size: 0.95rem;
}

.teacher-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: #c4b5fd;
  letter-spacing: 0.5px;
}

.stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulseDot 1.5s infinite;
}

.teacher-dock-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
}

.teacher-dock-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main) !important;
  white-space: nowrap;
}

.teacher-dock-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.teacher-dock-btn.student-roster-btn {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.teacher-dock-btn.student-roster-btn:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.teacher-dock-btn.lock-btn {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

.teacher-dock-btn.lock-btn.unlocked {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.6);
  color: #6ee7b7;
}

.teacher-dock-btn.minimize-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.teacher-dock-btn.minimize-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.teacher-dock-btn.logout {
  color: #94a3b8;
}

.teacher-dock-btn.logout:hover {
  color: #ef4444;
  border-color: #ef4444;
}

/* Bottom Corner Lock/Unlock Indicator */
.dock-lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  flex-shrink: 0;
  user-select: none;
}

.dock-lock-badge.locked {
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.65);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.dock-lock-badge.locked:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.55);
}

.dock-lock-badge.unlocked {
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px solid rgba(16, 185, 129, 0.75);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.dock-lock-badge.unlocked:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.6);
}

.dock-lock-badge .lock-icon-svg {
  display: block;
  transition: transform 0.2s ease;
}

.dock-lock-badge:hover .lock-icon-svg {
  transform: scale(1.15);
}

/* Collapsed Floating Pill for Teacher (Centered and highly noticeable) */
.teacher-dock-pill {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px;
  border-radius: 40px;
  background: rgba(13, 21, 39, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid var(--accent-cyan);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85), 0 0 24px rgba(0, 229, 255, 0.35);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  animation: pillFadeIn 0.25s ease-out forwards;
}

@keyframes pillFadeIn {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.teacher-dock-pill:hover {
  transform: translate(-50%, -2px);
  border-color: #fff;
  background: rgba(18, 30, 56, 0.98);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 229, 255, 0.6);
}

.pill-expand-badge {
  background: var(--accent-cyan);
  color: #050b17;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 229, 255, 0.4);
}

/* Student Roster Modal - Clean Vertical Single Column List */
.roster-table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.roster-scroll-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
  padding: 6px 4px 6px 0;
  margin-top: 6px;
}

/* Custom Scrollbar for Roster */
.roster-scroll-list::-webkit-scrollbar {
  width: 6px;
}

.roster-scroll-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.roster-scroll-list::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.35);
  border-radius: 4px;
}

.roster-scroll-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.roster-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.roster-item:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.25);
  transform: translateX(2px);
}

.roster-index {
  width: 50px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent-cyan);
  font-size: 0.92rem;
  flex-shrink: 0;
}

.roster-name {
  flex: 1;
  font-weight: 700;
  color: #fff;
  font-size: 0.96rem;
  padding-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-time {
  width: 140px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #a0aec0;
  font-weight: 600;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.roster-time-badge {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.22);
  color: #00e5ff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.roster-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Fullscreen Request Toast on Student Side */
.fs-request-toast {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  background: rgba(15, 24, 44, 0.95);
  border: 2px solid var(--accent-cyan);
  border-radius: 14px;
  padding: 12px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 229, 255, 0.3);
  animation: dropDown 0.3s ease-out forwards;
}

@keyframes dropDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.fs-toast-content {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
}

.fs-toast-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Floating Notification Toast (Non-blocking modern notify) */
.app-notify-toast {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 100000;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: rgba(13, 21, 39, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--accent-cyan);
  border-radius: 50px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85), 0 0 24px rgba(0, 229, 255, 0.35);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-notify-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-notify-toast .notify-icon {
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-notify-toast .notify-message {
  line-height: 1.4;
}

/* ==========================================================================
   IOS PSEUDO-FULLSCREEN ENGINE (CHẾ ĐỘ TOÀN MÀN HÌNH NÂNG CAO TRÊN IPHONE)
   ========================================================================== */
body.ios-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  overflow: hidden !important;
  z-index: 99999 !important;
}

body.ios-fullscreen .app-header {
  display: none !important;
}

body.ios-fullscreen main.deck-container {
  top: 0 !important;
  bottom: 38px !important;
  height: calc(100dvh - 38px) !important;
  max-height: calc(100dvh - 38px) !important;
  padding: 4px 6px !important;
}

body.ios-fullscreen .slide.active {
  height: 100% !important;
  max-height: 100% !important;
}

/* Floating Exit Button for iOS Fullscreen */
.ios-fs-exit-btn {
  display: none;
  position: fixed;
  top: 8px;
  right: 12px;
  z-index: 100001;
  background: rgba(13, 21, 39, 0.88);
  border: 1.5px solid var(--accent-cyan);
  color: var(--accent-cyan);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

body.ios-fullscreen .ios-fs-exit-btn {
  display: inline-flex !important;
}

/* ==========================================================================
   PRINT ENGINE - KHỔ GIẤY A4 LANDSCAPE, 1 SLIDE = ĐÚNG 1 TRANG IN
   ========================================================================== */
@page {
  size: A4 landscape;
  margin: 0;
}

@media print {
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    box-sizing: border-box !important;
  }

  html {
    background: #090e1a !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  body {
    background: #090e1a !important;
    color: #f0f4fc !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    display: block !important;
    position: static !important;
  }

  /* Ẩn hoàn toàn tất cả các thành phần giao diện trình duyệt, điều khiển & popup */
  header, 
  footer, 
  .app-header,
  .dock-footer,
  .progress-container, 
  .notes-drawer, 
  .cyber-bg, 
  .modal-overlay, 
  .hero-actions, 
  .scenario-actions, 
  .slide-jump-box, 
  .slide-counter,
  .tool-btn,
  .header-tools,
  .btn-primary, 
  #printCheatSheetBtn, 
  #printCheatSheetBtn2, 
  #quizResetBtn, 
  .gate-overlay, 
  .teacher-dock, 
  .teacher-dock-pill,
  .fs-request-toast,
  .app-notify-toast,
  .live-sync-indicator,
  .ios-fs-exit-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Container dàn trải dòng chảy tài liệu tự nhiên */
  main.deck-container {
    display: block !important;
    position: static !important;
    width: 297mm !important;
    max-width: 297mm !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    transform: none !important;
    border: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
  }

  /* BẮT BUỘC TẤT CẢ 61 SLIDE ĐỀU HIỂN THỊ VÀ MỖI SLIDE LÀ 1 TRANG IN A4 NẰM NGANG */
  .slide,
  .slide:not(.active),
  .slide.active,
  .slide[aria-hidden="true"],
  .slide.module-divider,
  .slide.module-divider:not(.active),
  .slide.module-divider.active,
  section.slide,
  section.slide:not(.active),
  section.slide.active {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 1 !important;
    transform: none !important;
    contain: none !important;
    clip-path: none !important;

    /* Kích thước A4 Landscape chuẩn quốc tế: 297mm x 210mm */
    width: 297mm !important;
    max-width: 297mm !important;
    min-width: 297mm !important;
    height: 209mm !important;
    max-height: 209mm !important;
    min-height: 209mm !important;

    box-sizing: border-box !important;
    padding: 10mm 15mm !important;
    margin: 0 !important;

    /* Ngắt trang tuyệt đối: Mỗi slide sang đúng 1 trang in mới */
    page-break-before: auto !important;
    page-break-after: always !important;
    page-break-inside: avoid !important;
    break-before: auto !important;
    break-after: page !important;
    break-inside: avoid !important;

    background: #111a2e !important;
    color: #e2e8f0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  /* Slide cuối cùng không ngắt trang rỗng thừa */
  .slide:last-child,
  section.slide:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  /* Định dạng nội dung bên trong slide khi in */
  .slide-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 5mm !important;
    padding-bottom: 3mm !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  .slide-title {
    font-size: 1.55rem !important;
    line-height: 1.3 !important;
    color: #ffffff !important;
  }

  .slide-subtitle {
    font-size: 0.92rem !important;
    color: var(--text-secondary) !important;
  }

  .slide-body {
    flex: 1 !important;
    display: flex !important;
    gap: 16px !important;
    overflow: hidden !important;
  }

  .slide.module-divider {
    background: linear-gradient(135deg, #0d1527, #1c2744) !important;
    border: 2px solid #00e5ff !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  .feature-card, .compare-card, .step-item, .shortcut-row {
    background: #16223b !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #e2e8f0 !important;
  }

  .feature-card h3, .feature-card h4, .module-title {
    color: #ffffff !important;
  }

  .slide-tag, .module-badge, .card-badge {
    background: rgba(0, 229, 255, 0.2) !important;
    color: #00e5ff !important;
    border-color: #00e5ff !important;
  }

  kbd {
    background: #1c2a47 !important;
    color: #00e5ff !important;
    border-color: #00e5ff !important;
  }

  .tab-content {
    display: grid !important;
  }

  .quiz-option {
    border-color: rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.05) !important;
  }

  .quiz-option.correct {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: #10b981 !important;
  }
}




/* =========================================================
   COMPREHENSIVE PRESENTATION & DECK STYLING (BUOI 1 & 2)
   ========================================================= */

/* Top Header Bar */
header.app-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
  padding: 10px 24px !important;
  min-height: 60px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.header-brand {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.header-logo {
  font-size: 1.6rem !important;
  background: rgba(14, 165, 233, 0.15) !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(14, 165, 233, 0.3) !important;
}

.header-title-group h1 {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  margin: 0 !important;
  letter-spacing: 0.5px !important;
}

.header-title-group span {
  font-size: 0.8rem !important;
  color: #38bdf8 !important;
  font-weight: 500 !important;
}

.header-tools {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.tool-btn {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f1f5f9 !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.tool-btn:hover {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.slide-jump-box {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #090d16 !important;
  border: 1px solid #0284c7 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
}

.slide-jump-input {
  width: 44px !important;
  background: #1e293b !important;
  border: 1px solid #38bdf8 !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  text-align: center !important;
  border-radius: 4px !important;
  padding: 2px 4px !important;
}

.slide-jump-total {
  color: #94a3b8 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}

/* Cover Slide Styling */
.cover-slide {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  min-height: 480px !important;
  padding: 20px !important;
}

.cover-badge {
  display: inline-block !important;
  align-self: flex-start !important;
  background: rgba(14, 165, 233, 0.15) !important;
  border: 1px solid #0284c7 !important;
  color: #38bdf8 !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  margin-bottom: 16px !important;
}

.cover-title {
  font-size: 2.2rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  line-height: 1.3 !important;
  margin-bottom: 12px !important;
}

.cover-subtitle {
  font-size: 1.15rem !important;
  color: #94a3b8 !important;
  line-height: 1.5 !important;
  margin-bottom: 28px !important;
  max-width: 900px !important;
}

.cover-meta-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 28px !important;
}

.meta-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
}

.meta-icon {
  font-size: 1.8rem !important;
}

.meta-item strong {
  display: block !important;
  font-size: 0.85rem !important;
  color: #94a3b8 !important;
}

.meta-item p {
  margin: 0 !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #f1f5f9 !important;
}

.room-pin-badge {
  display: inline-block !important;
  background: #0284c7 !important;
  color: #ffffff !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
}

.cover-footer {
  border-top: 1px solid #334155 !important;
  padding-top: 16px !important;
  font-size: 0.85rem !important;
  color: #64748b !important;
  font-weight: 500 !important;
}

/* Grids & Cards */
.grid-2 {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px !important;
}

.grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 18px !important;
}

.grid-4 {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
}

.grid-5 {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 14px !important;
}

.card {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 10px !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.2s ease, border-color 0.2s ease !important;
}

.card:hover {
  border-color: #0284c7 !important;
}

.card-accent {
  border-color: #0284c7 !important;
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.08), rgba(30, 41, 59, 0.95)) !important;
}

.card-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding-bottom: 10px !important;
}

.card-header h3 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  margin: 0 !important;
}

.card-icon {
  font-size: 1.4rem !important;
}

.card-icon-big {
  font-size: 2.4rem !important;
  margin-bottom: 12px !important;
}

.card-body {
  flex: 1 !important;
  color: #cbd5e1 !important;
  font-size: 0.92rem !important;
  line-height: 1.6 !important;
}

/* Badges */
.badge {
  display: inline-block !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.badge-primary { background: rgba(14, 165, 233, 0.2) !important; color: #38bdf8 !important; border: 1px solid #0284c7 !important; }
.badge-secondary { background: rgba(148, 163, 184, 0.2) !important; color: #cbd5e1 !important; border: 1px solid #64748b !important; }
.badge-info { background: rgba(56, 189, 248, 0.2) !important; color: #38bdf8 !important; border: 1px solid #0284c7 !important; }
.badge-warning { background: rgba(245, 158, 11, 0.2) !important; color: #fbbf24 !important; border: 1px solid #d97706 !important; }
.badge-danger { background: rgba(239, 68, 68, 0.2) !important; color: #f87171 !important; border: 1px solid #dc2626 !important; }
.badge-success { background: rgba(16, 185, 129, 0.2) !important; color: #34d399 !important; border: 1px solid #059669 !important; }

/* Callouts */
.callout {
  padding: 14px 18px !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
  margin: 12px 0 !important;
  border-left: 4px solid !important;
}

.callout-info { background: rgba(2, 132, 199, 0.12) !important; border-color: #0284c7 !important; color: #e0f2fe !important; }
.callout-warning { background: rgba(217, 119, 6, 0.12) !important; border-color: #d97706 !important; color: #fef3c7 !important; }
.callout-danger { background: rgba(220, 38, 38, 0.12) !important; border-color: #dc2626 !important; color: #fee2e2 !important; }
.callout-success { background: rgba(5, 150, 105, 0.12) !important; border-color: #059669 !important; color: #d1fae5 !important; }

/* Lists & Steps */
.feature-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.feature-list li {
  position: relative !important;
  padding-left: 20px !important;
  margin-bottom: 10px !important;
  font-size: 0.92rem !important;
  color: #cbd5e1 !important;
  line-height: 1.5 !important;
}

.feature-list li::before {
  content: "•" !important;
  position: absolute !important;
  left: 4px !important;
  color: #38bdf8 !important;
  font-size: 1.2rem !important;
}

.step-card {
  display: flex !important;
  gap: 14px !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid #334155 !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  margin-bottom: 10px !important;
}

.step-num {
  width: 28px !important;
  height: 28px !important;
  background: #0284c7 !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.step-content strong {
  display: block !important;
  color: #f8fafc !important;
  margin-bottom: 2px !important;
}

.step-content p {
  margin: 0 !important;
  font-size: 0.85rem !important;
  color: #94a3b8 !important;
}

.step-card-vertical {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  text-align: center !important;
}

.step-badge-vert {
  background: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  padding: 3px 8px !important;
  border-radius: 12px !important;
  display: inline-block !important;
  align-self: center !important;
  margin-bottom: 10px !important;
}

/* Timeline */
.timeline-compact {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.timeline-step {
  display: flex !important;
  gap: 12px !important;
  align-items: flex-start !important;
  background: rgba(15, 23, 42, 0.5) !important;
  border: 1px solid #334155 !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
}

.step-badge {
  background: #0284c7 !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
}

/* Tables */
.table-wrapper {
  overflow-x: auto !important;
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  margin-top: 10px !important;
}

.custom-table {
  width: 100% !important;
  border-collapse: collapse !important;
  text-align: left !important;
  font-size: 0.9rem !important;
}

.custom-table th {
  background: #0f172a !important;
  color: #38bdf8 !important;
  padding: 12px 16px !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #334155 !important;
}

.custom-table td {
  padding: 12px 16px !important;
  border-bottom: 1px solid #334155 !important;
  color: #cbd5e1 !important;
}

.custom-table tr:hover td {
  background: rgba(2, 132, 199, 0.05) !important;
}

/* Checklists */
.checklist-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.checklist-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  padding: 12px 18px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.checklist-item:hover {
  border-color: #0284c7 !important;
  transform: translateX(4px) !important;
}

.check-box {
  font-size: 1.2rem !important;
  user-select: none !important;
}

.check-text strong {
  display: block !important;
  color: #f8fafc !important;
  font-size: 0.95rem !important;
  margin-bottom: 2px !important;
}

.checklist-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
}

.check-box-item {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid #334155 !important;
  padding: 10px 14px !important;
  border-radius: 6px !important;
  font-size: 0.88rem !important;
  color: #e2e8f0 !important;
}

/* Interactive Polls & Quizzes */
.poll-options, .opinion-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.poll-btn, .opinion-card {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #f1f5f9 !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  text-align: left !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.poll-btn:hover, .opinion-card:hover {
  border-color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.15) !important;
  transform: translateX(4px) !important;
}

.op-icon {
  font-size: 1.6rem !important;
}

.room-pin-huge {
  display: block !important;
  font-size: 3.5rem !important;
  font-weight: 900 !important;
  color: #38bdf8 !important;
  font-family: var(--font-mono, monospace) !important;
  letter-spacing: 4px !important;
  margin-top: 8px !important;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.4) !important;
}

/* Console Terminals */
.demo-console {
  background: #090d16 !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  font-family: var(--font-mono, monospace) !important;
}

.console-header {
  background: #1e293b !important;
  padding: 8px 14px !important;
  font-size: 0.8rem !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid #334155 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.console-body {
  padding: 14px 16px !important;
  font-size: 0.88rem !important;
  line-height: 1.6 !important;
}

.console-body p {
  margin: 4px 0 !important;
}

.dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}
.dot.red { background: #ef4444 !important; }
.dot.yellow { background: #f59e0b !important; }
.dot.green { background: #10b981 !important; }

/* Shortcuts & Code */
.shortcut-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
  background: rgba(15, 23, 42, 0.5) !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  border: 1px solid #334155 !important;
}

kbd {
  background: #0284c7 !important;
  color: #ffffff !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 0 #0369a1 !important;
  white-space: nowrap !important;
}

code {
  background: rgba(14, 165, 233, 0.15) !important;
  color: #38bdf8 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.88rem !important;
}

pre {
  background: #090d16 !important;
  border: 1px solid #334155 !important;
  padding: 12px !important;
  border-radius: 6px !important;
  overflow-x: auto !important;
  color: #38bdf8 !important;
}

/* Modal TOC */


.toc-card {
  width: 90% !important;
  max-width: 1100px !important;
  max-height: 85vh !important;
  background: #0f172a !important;
  border: 1px solid #0284c7 !important;
  border-radius: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
}

.modal-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 16px 24px !important;
  border-bottom: 1px solid #1e293b !important;
}

.modal-header h3 {
  margin: 0 !important;
  color: #f8fafc !important;
  font-size: 1.2rem !important;
}

.modal-close {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 1.5rem !important;
  cursor: pointer !important;
}

.modal-close:hover {
  color: #ef4444 !important;
}

.toc-body {
  padding: 24px !important;
  overflow-y: auto !important;
}

.toc-columns {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 24px !important;
}

.toc-col h4 {
  color: #38bdf8 !important;
  font-size: 0.95rem !important;
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid #334155 !important;
  padding-bottom: 8px !important;
}

.toc-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.toc-list li {
  margin-bottom: 8px !important;
}

.toc-list a {
  color: #cbd5e1 !important;
  text-decoration: none !important;
  font-size: 0.88rem !important;
  transition: color 0.15s ease !important;
  display: block !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
}

.toc-list a:hover {
  background: rgba(2, 132, 199, 0.15) !important;
  color: #38bdf8 !important;
}

/* Forms & Inputs */
.custom-input, .custom-textarea {
  width: 100% !important;
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
  padding: 10px 14px !important;
  border-radius: 6px !important;
  font-size: 0.9rem !important;
  box-sizing: border-box !important;
}

.custom-input:focus, .custom-textarea:focus {
  border-color: #0284c7 !important;
  outline: none !important;
}

.btn {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: none !important;
  padding: 10px 20px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.btn:hover {
  background: #0369a1 !important;
  transform: translateY(-1px) !important;
}

.btn-primary { background: #0284c7 !important; }
.btn-success { background: #059669 !important; }
.btn-lg { padding: 14px 28px !important; font-size: 1.1rem !important; }
.btn-block { width: 100% !important; }

/* Text Utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-muted { color: #94a3b8 !important; }
.text-danger { color: #f87171 !important; }
.text-warning { color: #fbbf24 !important; }
.text-info { color: #38bdf8 !important; }
.text-success { color: #34d399 !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.justify-center { justify-content: center !important; }


/* =========================================================
   BOTTOM DOCK & CONTROLS (EXACT MATCH OLD UI)
   ========================================================= */

.bottom-nav-bar {
  position: fixed;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
  pointer-events: none;
}

.bottom-nav-left, .bottom-nav-right, .bottom-nav-center {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.nav-circle-btn:hover {
  background: #0284c7;
  border-color: #38bdf8;
  transform: scale(1.05);
}

.nav-circle-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.nav-next-main-btn {
  background: #00e5ff;
  color: #050b17;
  border: none;
  padding: 10px 22px;
  border-radius: 25px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
  transition: all 0.2s ease;
}

.nav-next-main-btn:hover {
  background: #38bdf8;
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.8);
  transform: translateY(-2px);
}

.nav-next-main-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.dock-home-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  padding: 10px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.dock-home-btn:hover {
  background: rgba(2, 132, 199, 0.3);
  border-color: #38bdf8;
  color: #38bdf8;
}

.dock-lock-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Modals Overlay Fix */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(6, 10, 20, 0.88) !important;
  backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
}

.modal-overlay.open {
  display: flex !important;
}

/* User customization: Hide live sync indicator and notes button */
#liveSyncIndicator,
.live-sync-indicator,
#notesBtn {
  display: none !important;
}
