/* ═══════════════════════════════════════════════════════════════
   DataBeta AI Engineering Bootcamp — Module 1
   Design System & Component Styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  --bg-root: #09090f;
  --bg-surface: #0f0f17;
  --bg-card: #141420;
  --bg-card-hover: #1a1a2a;
  --bg-code: #0b0b12;
  --bg-inline-code: #1a1a2c;
  --border-subtle: #1e1e2e;
  --border-accent: #2a2a3e;

  --text-primary: #e4e4ed;
  --text-secondary: #9090a8;
  --text-muted: #5e5e76;

  --accent-indigo: #6366f1;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;

  --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 30%, #ec4899 60%, #f59e0b 100%);
  --gradient-accent: linear-gradient(135deg, #6366f1, #8b5cf6);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', monospace;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, .5), 0 4px 20px rgba(0, 0, 0, .4);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, .15);
  --transition-base: .25s cubic-bezier(.4, 0, .2, 1);
}

/* ─── Reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-accent);
  border-radius: 999px;
}

/* ═══════════════ TOOLBAR (Sticky Top Bar) ═══════════════ */
.toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(9, 9, 15, .94);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.toolbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.toolbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.toolbar-brand img {
  height: 28px;
  width: auto;
}

.toolbar-brand-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: .3px;
}

.toolbar-separator {
  width: 1px;
  height: 28px;
  background: var(--border-accent);
  flex-shrink: 0;
}

/* Mode badge */
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  border: 1px solid;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition-base);
  user-select: none;
}

.mode-badge.instructor {
  background: rgba(245, 158, 11, .1);
  border-color: rgba(245, 158, 11, .3);
  color: var(--accent-orange);
}

.mode-badge.student {
  background: rgba(59, 130, 246, .1);
  border-color: rgba(59, 130, 246, .3);
  color: var(--accent-blue);
}

.mode-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.mode-badge.instructor .dot {
  background: var(--accent-orange);
}

.mode-badge.student .dot {
  background: var(--accent-blue);
}

/* Session info */
.session-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.session-code-display {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-green);
  letter-spacing: 2px;
  padding: 4px 14px;
  background: rgba(16, 185, 129, .08);
  border: 1px solid rgba(16, 185, 129, .25);
  border-radius: var(--radius-sm);
}

.student-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.student-count .count-number {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* Toolbar buttons */
.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-accent);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.toolbar-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.toolbar-btn.active {
  background: rgba(99, 102, 241, .12);
  border-color: rgba(99, 102, 241, .35);
  color: var(--accent-indigo);
}

.toolbar-btn.danger:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
}

.toolbar-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Session selector dropdown */
.toolbar-select {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 28px 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e5e76' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  max-width: 200px;
}

.toolbar-select:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.toolbar-select:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .15);
}

.toolbar-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, .5);
  }

  50% {
    opacity: .6;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

/* ═══════════════ LAYOUT ═══════════════ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  padding-top: 70px;
  padding-bottom: 100px;
}

/* ═══════════════ HERO SECTION ═══════════════ */
.hero {
  text-align: center;
  padding: 64px 0 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(139, 92, 246, .12));
  border: 1px solid rgba(99, 102, 241, .25);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-purple);
  letter-spacing: .6px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  letter-spacing: -1.5px;
}

.hero .subtitle {
  display: none;
}

.hero .subtitle-sm {
  display: none;
}

.hero-meta {
  display: none;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-meta-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
}

/* ═══════════════ SECTION TABS (Slides / Lab / Exercise) ═══════════════ */
.section-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin: 0 auto 36px;
  max-width: 520px;
}

.section-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.section-tab:hover {
  color: var(--text-secondary);
}

.section-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

/* Locked tab (students) */
.section-tab.tab-locked {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}

.section-tab.tab-locked::after {
  content: ' 🔒';
  font-size: 11px;
}

/* Tab with lock toggle container */
.tab-with-lock {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}

.tab-with-lock .section-tab {
  flex: 1;
}

/* Lock toggle button (admin only) */
.lock-toggle {
  display: none;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: all .2s;
  flex-shrink: 0;
  line-height: 1;
}

.lock-toggle:hover {
  background: rgba(255, 255, 255, .08);
}

.lock-toggle.unlocked {
  filter: hue-rotate(90deg);
}

/* Show lock toggles only in instructor mode */
.instructor-mode .lock-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.section-content {
  display: none;
}

.section-content.active {
  display: block;
  animation: fadeIn .35s ease;
}

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

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

/* ═══════════════ SLIDE DECK ═══════════════ */
.slide-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.slide-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-accent);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
}

.slide-nav-btn:hover:not(:disabled) {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
  box-shadow: 0 0 20px rgba(99, 102, 241, .15);
}

.slide-nav-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.slide-nav-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.slide-counter {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 60px;
  text-align: center;
}

.slide-counter .current {
  color: var(--accent-indigo);
  font-size: 18px;
}

/* Slide card */
.slide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.slide-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: .6;
}

.slide-card:hover {
  border-color: var(--border-accent);
}

.slide-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(99, 102, 241, .1);
  color: var(--accent-indigo);
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 16px;
}

.slide-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 6px;
  letter-spacing: -.5px;
}

.slide-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.slide-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* Key points */
.key-points {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}

.key-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, .04);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-indigo);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.key-point::before {
  content: '→';
  color: var(--accent-indigo);
  font-weight: 700;
  flex-shrink: 0;
}

/* AI Context callout */
.callout {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 16px;
  line-height: 1.65;
  border: 1px solid;
}

#lab-container .callout {
  margin-left: 34px;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 8px;
}

.callout-title svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.callout.ai-context {
  background: linear-gradient(135deg, rgba(6, 182, 212, .06), rgba(59, 130, 246, .04));
  border-color: rgba(6, 182, 212, .2);
}

.callout.ai-context .callout-title {
  color: var(--accent-cyan);
}

.callout.ai-context .callout-title svg {
  stroke: var(--accent-cyan);
  fill: none;
}

.callout.ai-context p {
  color: var(--text-secondary);
  margin: 0;
}

.callout.pro-tip {
  background: rgba(245, 158, 11, .05);
  border-color: rgba(245, 158, 11, .2);
}

.callout.pro-tip .callout-title {
  color: var(--accent-orange);
}

.callout.pro-tip .callout-title svg {
  stroke: var(--accent-orange);
  fill: none;
}

#lab-container .callout.pro-tip p {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.callout ol,
.callout ul {
  padding-left: 20px;
  margin: 8px 0 0;
}

.callout ol li,
.callout ul li {
  margin-bottom: 4px;
}

.callout table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 4px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.callout th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .03);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.callout td {
  padding: 6px 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  font-size: 13px;
}

.callout tr:last-child td {
  border-bottom: none;
}

.callout tr:nth-child(even) {
  background: rgba(255, 255, 255, .015);
}

.callout.warning {
  background: rgba(239, 68, 68, .05);
  border-color: rgba(239, 68, 68, .2);
}

.callout.warning .callout-title {
  color: var(--accent-red);
}

.callout.warning .callout-title svg {
  stroke: var(--accent-red);
  fill: none;
}

.callout.warning p {
  color: var(--text-secondary);
  margin: 0;
}

/* Presenter notes (instructor only) */
.presenter-notes {
  margin-top: 20px;
  padding: 16px 18px;
  background: rgba(139, 92, 246, .06);
  border: 1px dashed rgba(139, 92, 246, .25);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: none;
}

.presenter-notes-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 11px;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

body.instructor-mode .presenter-notes {
  display: block;
}

/* Set position button (instructor only) */
.set-position-btn {
  display: none;
  margin-top: 16px;
  padding: 8px 16px;
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: var(--radius-sm);
  color: var(--accent-orange);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.set-position-btn:hover {
  background: rgba(245, 158, 11, .15);
  box-shadow: 0 0 20px rgba(245, 158, 11, .1);
}

body.instructor-mode .set-position-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Slide dots */
.slide-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-accent);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}

.slide-dot.active {
  background: var(--accent-indigo);
  box-shadow: 0 0 8px rgba(99, 102, 241, .4);
  transform: scale(1.3);
}

.slide-dot:hover:not(.active) {
  background: var(--text-muted);
}

/* ═══════════════ CODE BLOCKS ═══════════════ */
.code-wrapper {
  position: relative;
  margin: 14px 0 6px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-code);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, .025);
  border-bottom: 1px solid var(--border-subtle);
}

.code-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .4px;
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 2px 8px;
  background: rgba(255, 255, 255, .04);
  border-radius: 4px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-accent);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
}

.copy-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.copy-btn.copied {
  color: var(--accent-green);
  border-color: var(--accent-green);
}

pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  tab-size: 2;
}

pre code {
  font-family: inherit;
}

code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-inline-code);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--accent-cyan);
  border: 1px solid var(--border-subtle);
  display: inline;
  word-break: break-word;
}

/* Syntax token colors */
.tok-comment {
  color: #5e5e76;
  font-style: italic;
}

.tok-keyword {
  color: #c084fc;
}

.tok-string {
  color: #34d399;
}

.tok-function {
  color: #60a5fa;
}

.tok-number {
  color: #f59e0b;
}

.tok-operator {
  color: #94a3b8;
}

.tok-variable {
  color: #f472b6;
}

.tok-flag {
  color: #38bdf8;
}

/* ═══════════════ LAB SECTION ═══════════════ */
.lab-header {
  text-align: center;
  margin-bottom: 36px;
}

.lab-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.lab-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

.lab-progress-bar {
  margin: 16px auto;
  max-width: 400px;
  height: 6px;
  background: var(--border-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.lab-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-hero);
  border-radius: 999px;
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

.lab-part {
  margin-bottom: 32px;
}

/* ─── Markdown-rendered lab content ─── */
#lab-container {
  padding: 0 24px 24px;
  padding-bottom: 100vh;
}

#lab-container p {
  font-size: 18px;
  line-height: 1.7;
}

#lab-container h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 12px 0 10px;
  border-bottom: 2px solid var(--accent-indigo);
  margin: 36px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#lab-container h2:first-child {
  margin-top: 0;
}

/* Task row with checkbox */
.lab-task-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 14px 0 6px;
  padding-left: 2px;
}

.lab-task-row .code-wrapper {
  flex: 1;
  margin: 0;
}

.task-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border-accent);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .2s;
  position: relative;
  margin-top: 10px;
}

.task-checkbox:hover {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, .06);
}

.task-checkbox:checked {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.task-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.lab-task-row.completed .code-wrapper {
  border-color: rgba(16, 185, 129, .25);
  opacity: .65;
}

.task-locked {
  display: none !important;
}

/* Admin override: show all tasks when toggled */
body.show-all-tasks .task-locked {
  display: flex !important;
  opacity: .45;
  border-left: 3px solid var(--accent-orange);
  padding-left: 12px;
}

body.show-all-tasks .task-locked.module-complete-section {
  display: block !important;
}

/* Admin task controls bar */
.admin-task-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Show all tasks toggle button (admin only) */
.show-all-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: rgba(139, 92, 246, .1);
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: var(--radius-md);
  color: var(--accent-purple);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.show-all-toggle-btn:hover {
  background: rgba(139, 92, 246, .18);
  border-color: rgba(139, 92, 246, .5);
}

/* Module end zone — checkpoint + troubleshooting revealed after all tasks done */
.module-complete-section {
  margin-top: 40px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(16, 185, 129, .04), rgba(99, 102, 241, .04));
  border: 1px solid rgba(16, 185, 129, .2);
  animation: fadeIn .5s ease;
}

.module-complete-section h2 {
  margin-top: 0 !important;
}

.module-complete-section h3 {
  margin-top: 16px !important;
}

/* ─── Tables inside lab / module-complete ─── */
#lab-container table,
.module-complete-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

#lab-container th,
.module-complete-section th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .03);
  border-bottom: 2px solid var(--border-subtle);
}

#lab-container td,
.module-complete-section td {
  padding: 10px 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(30, 30, 46, .4);
  vertical-align: top;
  line-height: 1.6;
}

#lab-container tr:last-child td,
.module-complete-section tr:last-child td {
  border-bottom: none;
}

#lab-container tr:nth-child(even),
.module-complete-section tr:nth-child(even) {
  background: rgba(255, 255, 255, .015);
}

#lab-container td code,
.module-complete-section td code {
  font-size: 11.5px;
  padding: 1px 6px;
}

/* Lab completion banner */
.lab-complete-banner {
  text-align: center;
  padding: 32px 24px;
  margin: 40px 0 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, .08), rgba(99, 102, 241, .08));
  border: 1px solid rgba(16, 185, 129, .25);
  border-radius: var(--radius-lg);
  animation: fadeIn .5s ease;
}

.lab-complete-banner .banner-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.lab-complete-banner h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-green);
  margin: 0 0 8px;
}

.lab-complete-banner p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.lab-complete-banner .banner-btn {
  background: var(--accent-indigo);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.lab-complete-banner .banner-btn:hover {
  background: var(--accent-purple);
  transform: translateY(-1px);
}

#lab-container h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 24px 0 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(30, 30, 46, .5);
}

#lab-container h3:empty {
  display: none;
}

#lab-container>ul,
#lab-container>ol {
  margin: 8px 0 16px 34px;
  padding-left: 0;
  list-style: none;
}

#lab-container>ul>li,
#lab-container>ol>li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

#lab-container>ul>li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-indigo);
  font-weight: 700;
}

#lab-container>p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 8px 0;
  margin-left: 34px;
}

#lab-container>p>strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

#lab-container>p>em,
#lab-container h2+p>em {
  color: var(--text-muted);
  font-style: italic;
  font-size: 15px;
}

#lab-container blockquote {
  border-left: 3px solid var(--accent-indigo);
  background: rgba(99, 102, 241, .04);
  padding: 16px 20px;
  margin: 16px 0 16px 34px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  transition: all 0.2s ease-in-out;
}

#lab-container blockquote::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: -34px;
  right: 0;
  height: 1px;
  background: rgba(30, 30, 46, 0.5);
  pointer-events: none;
}

/* Hide separator on last blockquote if it's the last child in the flow or followed by another blockquote/callout/locked task */
#lab-container blockquote:last-child::after,
#lab-container blockquote:has(+ .task-locked)::after,
#lab-container blockquote:has(+ blockquote)::after,
#lab-container blockquote:has(+ .callout)::after {
  display: none;
}

/* Fade out blockquotes and callouts when their associated task is completed */
.lab-task-row.completed+blockquote,
.lab-task-row.completed+.callout,
#lab-container blockquote.completed,
#lab-container .callout.completed {
  opacity: 0.55;
}

#lab-container blockquote.completed {
  border-left-color: rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.02);
}

/* Fix separator line when task is followed by blockquote or callout */
.lab-task-row:has(+ blockquote),
.lab-task-row:has(+ .callout) {
  border-bottom: none !important;
  padding-bottom: 0;
}


#lab-container blockquote p {
  margin: 0 0 8px;
  font-size: inherit;
}

#lab-container blockquote p:last-child {
  margin-bottom: 0;
}

#lab-container blockquote strong {
  color: var(--text-primary);
}

#lab-container blockquote ol,
#lab-container blockquote ul {
  padding-left: 24px;
  margin: 8px 0;
}

#lab-container blockquote li {
  padding: 2px 0;
}

#lab-container a,
#exercise-container a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Exercise container markdown styles */
#exercise-container h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-indigo);
}

#exercise-container h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 16px 0 8px;
}

#exercise-container ul,
#exercise-container ol {
  padding-left: 0;
  list-style: none;
  margin: 8px 0 16px;
}

#exercise-container li {
  position: relative;
  padding: 4px 0 4px 22px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

#exercise-container li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-indigo);
  font-weight: 700;
}

#exercise-container p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 8px 0;
}

#exercise-container details {
  margin: 12px 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

#exercise-container details summary {
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-orange);
  background: rgba(245, 158, 11, .04);
}

#exercise-container details[open] summary {
  border-bottom: 1px solid var(--border-subtle);
}

#exercise-container details>*:not(summary) {
  margin-left: 14px;
  margin-right: 14px;
}

#exercise-container details>*:last-child {
  margin-bottom: 14px;
}

/* Tips box styling (İpuçları — always visible) */
#exercise-container details.tips-box {
  border-color: rgba(6, 182, 212, .25);
}

#exercise-container details.tips-box summary {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, .06);
}

/* Solution locked state (hidden from students) */
#exercise-container details.solution-locked {
  pointer-events: none;
  position: relative;
  opacity: .5;
}

#exercise-container details.solution-locked summary {
  color: var(--text-muted);
}

#exercise-container details.solution-locked summary::after {
  content: ' 🔒';
  font-size: 12px;
}

#exercise-container details.solution-locked[open]>*:not(summary) {
  display: none;
}

/* Instructor toggle button */
.solution-toggle-btn {
  display: block;
  margin: 0 0 20px auto;
  padding: 8px 16px;
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: var(--radius-md);
  color: var(--accent-orange);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.solution-toggle-btn:hover {
  background: rgba(245, 158, 11, .18);
  border-color: rgba(245, 158, 11, .5);
}

.lab-part-header {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lab-part-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, .08);
  padding: 3px 10px;
  border-radius: 999px;
}

/* Lab steps */
.lab-step {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(30, 30, 46, .5);
  align-items: flex-start;
  transition: background var(--transition-base);
}

.lab-step:last-child {
  border-bottom: none;
}

.lab-step.instructor-here {
  background: rgba(255, 255, 255, .035);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: -4px -16px;
  border: none;
  border-left: 3px solid rgba(255, 255, 255, .12);
  animation: instructorFadeIn .4s ease-out;
}

@keyframes instructorFadeIn {
  from {
    opacity: 0.6;
    background: rgba(255, 255, 255, .08);
  }

  to {
    opacity: 1;
    background: rgba(255, 255, 255, .035);
  }
}

.step-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid var(--border-accent);
  border-radius: 6px;
  background: var(--bg-surface);
  cursor: pointer;
  margin-top: 2px;
  position: relative;
  transition: all .2s;
}

.step-checkbox:hover {
  border-color: var(--accent-indigo);
}

.step-checkbox:checked {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
}

.step-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.step-checkbox:checked~.step-content {
  opacity: .5;
}

.step-content {
  flex: 1;
  min-width: 0;
  transition: opacity .3s;
}

.step-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 4px;
}

.step-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

/* ═══════════════ EXERCISE SECTION ═══════════════ */
.exercise-container {
  max-width: 800px;
  margin: 0 auto;
}

.exercise-header {
  text-align: center;
  margin-bottom: 32px;
}

.exercise-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.exercise-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Timer */
.timer-container {
  text-align: center;
  margin: 24px 0 32px;
}

.timer-display {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 4px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: opacity .2s;
}

.timer-display:hover {
  opacity: .7;
}

.timer-input {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 800;
  color: var(--accent-cyan);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--accent-cyan);
  text-align: center;
  width: 120px;
  outline: none;
  letter-spacing: 4px;
  -moz-appearance: textfield;
  appearance: textfield;
}

.timer-input::-webkit-outer-spin-button,
.timer-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.timer-display.warning {
  color: var(--accent-orange);
}

.timer-display.danger {
  color: var(--accent-red);
  animation: timerBlink 1s infinite;
}

@keyframes timerBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.timer-btn {
  padding: 10px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-accent);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.timer-btn:hover {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 20px rgba(99, 102, 241, .1);
}

.timer-btn.primary {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: #fff;
}

.timer-btn.primary:hover {
  background: #5558e6;
  box-shadow: 0 0 20px rgba(99, 102, 241, .3);
}

/* Hide follow-toggle and Sunum buttons for students */
body:not(.instructor-mode) #follow-toggle,
body:not(.instructor-mode) #presentation-mode-btn {
  display: none !important;
}

/* Hide timer completely for students (non-admin) */
body:not(.instructor-mode) .timer-container {
  display: none;
}

/* Challenge card */
.challenge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
}

.challenge-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.requirements-list {
  list-style: none;
  margin: 16px 0;
}

.requirements-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.requirements-list li::before {
  content: '✦';
  color: var(--accent-indigo);
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Hints */
.hints-container {
  margin: 16px 0;
}

.hint-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, .06);
  border: 1px solid rgba(245, 158, 11, .2);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  cursor: pointer;
  color: var(--accent-orange);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-base);
  width: 100%;
  text-align: left;
}

.hint-toggle:hover {
  background: rgba(245, 158, 11, .1);
}

.hint-toggle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: transform .3s;
}

.hint-toggle.open svg {
  transform: rotate(90deg);
}

.hints-list {
  display: none;
  margin: 8px 0 0 0;
  padding: 12px 16px;
  background: rgba(245, 158, 11, .03);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid rgba(245, 158, 11, .12);
  border-top: none;
}

.hints-list.open {
  display: block;
}

.hints-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.hints-list li::before {
  content: '💡';
  position: absolute;
  left: 0;
  font-size: 11px;
}

/* Solution reveal */
.solution-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, .06);
  border: 1px solid rgba(16, 185, 129, .2);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  cursor: pointer;
  color: var(--accent-green);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-base);
  width: 100%;
  text-align: left;
  margin-top: 16px;
}

.solution-toggle:hover {
  background: rgba(16, 185, 129, .1);
}

.solution-content {
  display: none;
  margin-top: 8px;
}

.solution-content.open {
  display: block;
}

.solution-explanation {
  margin: 12px 0;
  padding: 16px;
  background: rgba(16, 185, 129, .04);
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 185, 129, .15);
}

.solution-explanation li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  line-height: 1.6;
}

/* Bonus challenges */
.bonus-section {
  margin-top: 32px;
}

.bonus-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.bonus-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.bonus-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card);
}

.bonus-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-indigo);
  margin-bottom: 6px;
}

.bonus-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bonus-card .bonus-solution {
  display: none;
  margin-top: 12px;
}

.bonus-card.open .bonus-solution {
  display: block;
}

/* ═══════════════ SESSION MODAL ═══════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.modal h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.modal p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

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

.modal-btn {
  padding: 14px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-accent);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.modal-btn:hover {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, .06);
}

.modal-btn.primary {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: #fff;
}

.modal-btn.primary:hover {
  background: #5558e6;
  box-shadow: 0 0 30px rgba(99, 102, 241, .2);
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-accent);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 4px;
  text-transform: uppercase;
  outline: none;
  transition: border-color var(--transition-base);
  margin-bottom: 10px;
}

.modal-input:focus {
  border-color: var(--accent-indigo);
}

.modal-input::placeholder {
  color: var(--text-muted);
  letter-spacing: 2px;
  font-size: 14px;
}

.modal-error {
  color: var(--accent-red);
  font-size: 13px;
  margin-top: 8px;
  min-height: 20px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
}

/* ═══════════════ FOLLOW INSTRUCTOR (Student FAB) ═══════════════ */
.follow-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent-orange);
  color: #000;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(245, 158, 11, .4);
  transition: all var(--transition-base);
  animation: fabBounce 2s infinite;
}

.follow-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(245, 158, 11, .5);
}

.follow-fab.visible {
  display: flex;
}

@keyframes fabBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.follow-fab svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ═══════════════ CONNECTION STATUS ═══════════════ */
.connection-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.connection-dot.connected {
  background: var(--accent-green);
  box-shadow: 0 0 6px rgba(16, 185, 129, .5);
}

.connection-dot.disconnected {
  background: var(--accent-red);
}

/* ═══════════════ CMS EDIT MODE ═══════════════ */
.cms-passphrase-input {
  width: 200px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
}

.cms-passphrase-input:focus {
  border-color: var(--accent-indigo);
}

body.edit-mode [data-editable] {
  outline: 1px dashed rgba(139, 92, 246, .3);
  outline-offset: 4px;
  cursor: text;
  border-radius: 4px;
  transition: outline-color var(--transition-base);
}

body.edit-mode [data-editable]:hover {
  outline-color: rgba(139, 92, 246, .6);
}

body.edit-mode [data-editable]:focus {
  outline: 2px solid var(--accent-purple);
  background: rgba(139, 92, 246, .04);
}

/* ═══════════════ CHECKLIST (Slide 13) ═══════════════ */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.checklist-group {
  padding: 16px;
  background: rgba(0, 0, 0, .2);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-indigo);
}

.checklist-group-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.checklist-group-items {
  list-style: none;
}

.checklist-group-items li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0;
  padding-left: 18px;
  position: relative;
}

.checklist-group-items li::before {
  content: '☐';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 13px;
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 768px) {
  .toolbar-inner {
    padding: 8px 16px;
    gap: 8px;
  }

  .toolbar-brand-text {
    display: none;
  }

  .slide-card {
    padding: 24px 20px;
  }

  .slide-title {
    font-size: 22px;
  }

  .hero {
    padding: 48px 0 32px;
  }

  .section-tabs {
    flex-direction: column;
    max-width: 100%;
  }

  .checklist-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .slide-nav {
    gap: 10px;
  }

  .slide-card {
    padding: 20px 16px;
  }

  .timer-display {
    font-size: 36px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PRESENTATION LAUNCH CARD
   ═══════════════════════════════════════════════════════════════ */

.pres-launch-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 32px;
  max-width: 520px;
  margin: 24px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
}

.pres-launch-icon {
  color: var(--accent-indigo);
  margin-bottom: 16px;
  opacity: .7;
}

.pres-launch-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pres-launch-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 380px;
}

.pres-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-indigo);
  color: #fff;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 16px rgba(99, 102, 241, .25);
}

.pres-launch-btn:hover {
  background: hsl(239, 84%, 72%);
  box-shadow: 0 6px 24px rgba(99, 102, 241, .35);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════════ */

.admin-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.admin-panel-overlay.open {
  display: flex;
}

.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  width: min(720px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--border-default);
}

.admin-panel-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.admin-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.admin-panel-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, .05);
}

/* Panel tabs */
.admin-panel-tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-default);
}

.admin-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.admin-tab:hover {
  color: var(--text-secondary);
}

.admin-tab.active {
  color: var(--accent-indigo);
  border-bottom-color: var(--accent-indigo);
}

.admin-panel-content {
  display: none;
  padding: 20px 24px;
}

.admin-panel-content.active {
  display: block;
}

/* Sections */
.admin-section {
  margin-bottom: 24px;
}

.admin-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.admin-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

/* Section tabs (slides/lab/exercise) */
.admin-section-tabs {
  display: flex;
  gap: 4px;
}

.admin-section-tab {
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.admin-section-tab:hover {
  border-color: var(--text-muted);
  color: var(--text-secondary);
}

.admin-section-tab.active {
  background: rgba(99, 102, 241, .1);
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

/* Form elements */
.admin-select {
  background: var(--bg-main);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  width: 100%;
  cursor: pointer;
  transition: border-color var(--transition-base);
}

.admin-select:focus {
  outline: none;
  border-color: var(--accent-indigo);
}

.admin-input {
  background: var(--bg-main);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  flex: 1;
  transition: border-color var(--transition-base);
}

.admin-input:focus {
  outline: none;
  border-color: var(--accent-indigo);
}

.admin-input::placeholder {
  color: var(--text-muted);
}

.admin-form-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  margin-bottom: 12px;
}

.admin-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.admin-btn {
  background: var(--bg-main);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.admin-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.admin-btn.primary {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: #fff;
}

.admin-btn.primary:hover {
  background: hsl(239, 84%, 72%);
  border-color: hsl(239, 84%, 72%);
}

.admin-btn.small {
  font-size: 11px;
  padding: 4px 10px;
}

.admin-message {
  font-size: 12px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: none;
}

.admin-message.success {
  display: block;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, .08);
}

.admin-message.error {
  display: block;
  color: var(--accent-red);
  background: rgba(239, 68, 68, .08);
}

.admin-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Version list */
.version-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.version-item:hover {
  border-color: var(--border-accent);
  background: rgba(255, 255, 255, .04);
}

.version-item.current {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, .05);
}

.version-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.version-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.version-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.version-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.version-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.version-badge.current {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, .12);
}

/* Session list */
.session-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.session-item:hover {
  border-color: var(--border-accent);
}

.session-item.active {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, .05);
}

.session-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.session-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.session-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

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

/* ═══════════════ ADMIN CODE MODAL ═══════════════ */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn .2s ease;
}

.admin-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.admin-modal h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.admin-modal p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.admin-code-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 16px;
  text-align: center;
  letter-spacing: 4px;
  background: var(--bg-code);
  border: 2px solid var(--border-accent);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}

.admin-code-input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.admin-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.admin-modal-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  border: 1px solid;
}

.admin-modal-btn.cancel {
  background: transparent;
  border-color: var(--border-accent);
  color: var(--text-muted);
}

.admin-modal-btn.cancel:hover {
  border-color: var(--text-muted);
  color: var(--text-secondary);
}

.admin-modal-btn.confirm {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: white;
}

.admin-modal-btn.confirm:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  transform: translateY(-1px);
}

.admin-modal-error {
  color: var(--accent-red) !important;
  font-size: 13px !important;
  margin-top: 12px !important;
  animation: shake .3s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

/* ═══════════════ PRESENTATION MODE ═══════════════ */
.presentation-exit-btn {
  display: none;
  position: fixed;
  top: 8px;
  right: 12px;
  z-index: 10000;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(30, 30, 46, .85);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.15;
  transition: opacity .2s, background .2s;
}

.presentation-exit-btn:hover {
  opacity: 1;
  background: rgba(30, 30, 46, .95);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, .2);
}

.presentation-exit-btn svg {
  stroke: currentColor;
  fill: none;
}

body.presentation-mode .toolbar {
  display: none;
}

body.presentation-mode .hero {
  display: none;
}

body.presentation-mode .container {
  padding-top: 12px;
}

body.presentation-mode .presentation-exit-btn {
  display: flex;
}