/* Global CSS Variables & Design System */
:root {
  /* Tech-Dark Color Palette (HSL System) - Softer midnight theme for comfortable eyes */
  --bg-primary: hsl(220, 20%, 10%);
  --bg-secondary: hsl(220, 20%, 13%);
  --bg-surface: hsla(220, 20%, 18%, 0.65);
  --bg-surface-hover: hsla(220, 20%, 22%, 0.85);
  
  --border-color: hsla(220, 12%, 28%, 0.4);
  --border-glow: hsla(185, 75%, 55%, 0.25);
  
  /* Accent Colors - Softer palette */
  --color-cyan: hsl(185, 75%, 55%);
  --color-cyan-dim: hsl(185, 75%, 45%);
  --color-magenta: hsl(260, 60%, 70%);
  --color-yellow: hsl(40, 75%, 60%);
  --color-green: hsl(150, 50%, 55%);
  --color-red: hsl(0, 70%, 60%);
  
  /* Text Colors */
  --text-primary: hsl(210, 40%, 98%);
  --text-muted: hsl(215, 20%, 68%);
  --text-dark: hsl(222, 47%, 10%);
  
  /* Fonts - updated to Noto Sans Thai as primary Thai font */
  --font-heading: 'Outfit', 'Noto Sans Thai', sans-serif;
  --font-body: 'Inter', 'Noto Sans Thai', sans-serif;
  
  /* Box Shadows */
  --shadow-neon: 0 0 15px hsla(180, 100%, 50%, 0.25);
  --shadow-neon-magenta: 0 0 15px hsla(280, 100%, 65%, 0.25);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.tech-dark {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

/* Background Grids & Orbs */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  pointer-events: none;
  z-index: 1;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  animation: orb-float 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background-color: var(--color-cyan);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background-color: var(--color-magenta);
  bottom: -150px;
  right: -100px;
  animation-delay: -5s;
}

@keyframes orb-float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.2); }
}

/* Typographical Utilities */
.font-outfit {
  font-family: var(--font-heading);
}

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

.accent-text {
  color: var(--color-cyan);
  text-shadow: 0 0 10px hsla(180, 100%, 50%, 0.3);
}

.text-cyan { color: var(--color-cyan); }
.text-magenta { color: var(--color-magenta); }
.text-yellow { color: var(--color-yellow); }
.text-green { color: var(--color-green); }
.text-red { color: var(--color-red); }
.muted {
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1.6;
}
.slide p {
  font-size: 1.25rem;
  line-height: 1.6;
}

/* Layout Wrappers */
.presentation-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 2;
  overflow: hidden;
}

.presentation-container {
  width: 100%;
  max-width: 1440px;
  height: 810px; /* 16:9 ratio target */
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glass);
}

/* Slide Shell */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(100px) scale(0.95);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  padding: 50px 60px;
  justify-content: center;
}

.slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.slide.prev-slide {
  transform: translateX(-100px) scale(0.95);
}

/* Header Slide Styles */
.slide-title {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.slide-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--color-cyan);
  border-radius: 2px;
  box-shadow: var(--shadow-neon);
}

/* Sub-components layout */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}

.grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.grid-2row {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}

/* Glass Cards style */
.glass {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.glass:hover {
  border-color: var(--border-glow);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-neon);
}

.p-4 { padding: 24px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }
.flex-col { display: flex; flex-direction: column; }
.justify-between { justify-content: space-between; }
.flex-center { display: flex; justify-content: center; align-items: center; }

/* Lists styling */
.bullet-list {
  list-style: none;
  margin-top: 10px;
}

.bullet-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 1.3rem;
  line-height: 1.6;
}

.bullet-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--color-cyan);
}

.text-accent-list li::before {
  color: var(--color-magenta);
}

.bullet-list-small {
  list-style: none;
}

.bullet-list-small li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.bullet-list-small li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--color-cyan);
}

/* Special Components: Title Slide */
.title-slide-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background-color: hsla(180, 100%, 50%, 0.15);
  color: var(--color-cyan);
  border: 1px solid var(--color-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.title-slide-content h1 {
  font-size: 3.4rem;
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 800;
}

.subtitle {
  font-size: 1.35rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.speaker-meta {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
  padding-top: 25px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meta-item .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.meta-item .value {
  font-weight: 600;
  font-size: 1.05rem;
}

/* Circuit Line animation */
.circuit-animation {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.7;
}

.circuit-line {
  fill: none;
  stroke: var(--color-cyan);
  stroke-width: 2;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw-circuit 6s infinite linear;
}

.circuit-node {
  fill: var(--bg-primary);
  stroke: var(--color-cyan);
  stroke-width: 2;
}

@keyframes draw-circuit {
  0% { stroke-dashoffset: 200; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -200; }
}

/* Avatar slot and Info Card */
.avatar-slot {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--color-cyan);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 15px auto;
  color: var(--color-cyan);
  box-shadow: var(--shadow-neon);
}

.info-card h3 {
  font-family: var(--font-heading);
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.role-desc {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

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

.spec-list li {
  margin-bottom: 8px;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.spec-list li:last-child {
  border-bottom: none;
}

/* Stat Cards */
.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
}

.stat-num {
  font-size: 2.8rem;
  font-weight: 800;
  font-family: var(--font-heading);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Interactive Timeline (Slide 3) */
.timeline-interactive-wrapper {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-nodes-row {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 10px 0;
  margin-bottom: 20px;
}

.timeline-line-bg {
  position: absolute;
  top: 22px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--border-color);
  z-index: 1;
}

.timeline-line-active {
  position: absolute;
  top: 22px;
  left: 0;
  width: 0%; /* updated by JS */
  height: 4px;
  background: linear-gradient(90deg, var(--color-magenta), var(--color-cyan));
  box-shadow: var(--shadow-neon);
  z-index: 2;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 3;
  cursor: pointer;
  width: 100px;
}

.node-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 3px solid var(--border-color);
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.timeline-node:hover .node-circle,
.timeline-node.active-node .node-circle {
  background-color: var(--color-cyan);
  border-color: var(--color-cyan);
  box-shadow: var(--shadow-neon);
  transform: scale(1.15);
}

.node-year {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.3s;
}

.node-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  transition: color 0.3s;
  margin-top: 2px;
}

.timeline-node:hover .node-year,
.timeline-node.active-node .node-year {
  color: var(--color-cyan);
}

.timeline-node:hover .node-label,
.timeline-node.active-node .node-label {
  color: var(--text-primary);
}

/* Detail Card and Galleries */
.timeline-detail-card {
  min-height: 380px;
  padding: 30px;
  animation: fadeIn 0.4s ease forwards;
}

.detail-text-block h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

.detail-text-block p {
  line-height: 1.6;
}

/* Agenda slide details */
.agenda-card {
  padding: 30px 24px;
  text-align: center;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.agenda-num {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: hsla(255, 255, 255, 0.05);
  margin-bottom: -15px;
  transition: color 0.3s;
}

.agenda-card:hover .agenda-num {
  color: var(--border-glow);
}

.agenda-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.agenda-card p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.highlight-card {
  border-color: var(--color-cyan);
  box-shadow: var(--shadow-neon);
}

/* Section dividers styling */
.section-divider {
  text-align: center;
  background: radial-gradient(circle at center, hsla(180, 100%, 50%, 0.03) 0%, transparent 70%);
}

.section-divider .badge {
  background-color: hsla(280, 100%, 65%, 0.15);
  color: var(--color-magenta);
  border-color: var(--color-magenta);
}

.section-divider h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.15;
}

/* Vertical Steps layout */
.step-vertical {
  margin-top: 20px;
}

.v-step {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.step-num-v {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: hsla(180, 100%, 50%, 0.1);
  color: var(--color-cyan);
  border: 1px solid var(--color-cyan);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  flex-shrink: 0;
}

.v-step h5 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.v-step p {
  font-size: 1.15rem;
}

/* Multi-Image Gallery styles */
.gallery-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-title-lbl {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  min-height: 80px;
  max-height: 250px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
}

.gallery-grid:empty::after {
  content: 'ยังไม่มีรูปประกอบ (คลิกปุ่มด้านล่างเพื่อเลือกทีละหลายๆ รูปได้)';
  grid-column: span 3;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 20px 0;
  font-style: italic;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #000;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.delete-thumb-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.85);
  border: none;
  color: white;
  font-size: 14px;
  line-height: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}

.delete-thumb-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.uploader-dropzone {
  position: relative;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.3s;
  cursor: pointer;
}

.uploader-dropzone:hover {
  border-color: var(--color-cyan);
  background: hsla(180, 100%, 50%, 0.02);
}

.file-input-multi {
  display: none;
}

.uploader-label-multi {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  width: 100%;
}

.uploader-dropzone:hover .uploader-label-multi {
  color: var(--color-cyan);
}

.plus-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* Compact Flow Diagram in year 4-6 */
.interactive-diagram-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.diag-node {
  width: 90%;
  text-align: center;
  padding: 14px 10px;
  background: hsla(222, 47%, 20%, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.diag-arrow {
  color: var(--color-cyan);
  font-size: 0.9rem;
}

/* Traditional 2010 vs 2026 CPE Evolution */
.card-outline {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  position: relative;
}

.accent-border {
  border-color: var(--color-cyan);
  box-shadow: var(--shadow-neon);
}

.card-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  color: white;
}

.bg-red { background-color: var(--color-red); }
.bg-blue { background-color: var(--color-cyan-dim); }

.evo-box {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.2);
  padding: 15px;
  border-radius: 8px;
}

.evo-item {
  font-weight: 600;
  font-size: 0.95rem;
}

.evo-arrow {
  margin: 4px 0;
  color: var(--text-muted);
}

.evo-box-scroll {
  margin: 20px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0,0,0,0.2);
  padding: 15px;
  border-radius: 8px;
}

.stack-tag {
  background: hsla(180, 100%, 50%, 0.15);
  color: var(--color-cyan);
  border: 1px solid var(--color-cyan);
  padding: 6px;
  font-size: 0.8rem;
  text-align: center;
  border-radius: 4px;
  font-weight: 600;
}

.evo-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Interactive Stack Layout */
.stack-interactive-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 30px;
  margin-top: 20px;
  height: 480px;
}

.stack-layers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 8px;
}

.stack-layer-btn {
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
}

.layer-num {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-right: 12px;
  color: var(--text-muted);
}

.stack-layer-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--color-cyan);
  transform: translateX(4px);
}

.stack-layer-btn.active-layer {
  background: hsla(180, 100%, 50%, 0.12);
  border-color: var(--color-cyan);
  box-shadow: var(--shadow-neon);
  font-weight: 700;
}

.stack-layer-btn.active-layer .layer-num {
  color: var(--color-cyan);
}

.stack-info-panel {
  padding: 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.layer-details {
  display: none;
}

.layer-details.active-details {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

.layer-details h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.layer-details p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.layer-details ul {
  padding-left: 20px;
}

.layer-details li {
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Table Style */
.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.tech-table th,
.tech-table td {
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  font-size: 0.85rem;
  text-align: left;
}

.tech-table th {
  background-color: rgba(255, 255, 255, 0.03);
  font-weight: 600;
}

/* Bus Protocols layout */
.bus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bus-card {
  background: rgba(0,0,0,0.2);
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.bus-card strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.bus-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.tag {
  display: inline-block;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-cyan);
  margin-top: 2px;
}

/* PCB layer stack */
.pcb-stack-diagram {
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pcb-layer {
  padding: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 4px;
}

.layer-top {
  background-color: hsl(120, 70%, 25%);
  color: white;
  border: 1px solid hsl(120, 100%, 45%);
}

.layer-bottom {
  background-color: hsl(200, 70%, 25%);
  color: white;
  border: 1px solid hsl(200, 100%, 45%);
}

.layer-inner1 {
  background-color: hsl(0, 0%, 20%);
  color: var(--color-cyan);
  border: 1px dashed var(--color-cyan);
}

.layer-inner2 {
  background-color: hsl(0, 0%, 20%);
  color: var(--color-magenta);
  border: 1px dashed var(--color-magenta);
}

.pcb-dielectric {
  height: 18px;
  background-color: hsl(40, 40%, 20%);
  text-align: center;
  font-size: 0.7rem;
  line-height: 18px;
  color: hsl(40, 40%, 60%);
  font-style: italic;
}

/* Protocol Cards */
.protocol-card {
  background: rgba(0,0,0,0.25);
  border-left: 3px solid var(--color-cyan);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
}

.protocol-card strong {
  font-size: 0.95rem;
  display: block;
}

.protocol-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Database SQL view */
.sql-box {
  background-color: #0b0f19;
  border: 1px solid var(--border-color);
  font-family: monospace;
  padding: 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #c9d1d9;
  line-height: 1.5;
  overflow-x: auto;
}

.sql-comment { color: #8b949e; }
.sql-keyword { color: #ff7b72; font-weight: bold; }
.sql-table { color: #d2a8ff; }
.sql-type { color: #79c0ff; }

/* Mock Dashboard */
.dashboard-mockup {
  border-color: var(--color-cyan);
  padding: 16px;
}

.db-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.db-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.db-status-online {
  color: var(--color-green);
  font-size: 0.85rem;
  font-weight: 600;
}

.db-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.db-card-val {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.db-card-val .lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.db-card-val .val {
  font-size: 1.6rem;
  font-weight: 700;
}

.db-card-val .sub {
  font-size: 0.7rem;
  margin-top: 4px;
}

.btn-control-cell {
  justify-content: center;
  align-items: center;
}

.db-btn {
  background: transparent;
  border: 1px solid var(--color-yellow);
  color: var(--color-yellow);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
}

.db-btn:hover {
  background-color: var(--color-yellow);
  color: var(--text-dark);
  box-shadow: 0 0 10px hsla(45, 100%, 55%, 0.3);
}

.db-graph-area {
  margin-top: 15px;
}

.graph-placeholder {
  background: rgba(0,0,0,0.4);
  border-radius: 8px;
  height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15px;
  position: relative;
}

.bar-chart-sim {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 120px;
  width: 100%;
}

.chart-bar {
  width: 8%;
  background-color: var(--color-cyan);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
  opacity: 0.75;
}

#live-chart-bar {
  background-color: var(--color-magenta);
}

.graph-legend {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Virtualization diagram */
.infra-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.infra-node {
  background-color: hsla(222, 47%, 20%, 0.5);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.infra-node.main-node {
  border-color: var(--color-cyan);
  background-color: hsla(180, 100%, 50%, 0.05);
}

.infra-arrow {
  color: var(--color-cyan);
}

.infra-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.infra-sub-node {
  background-color: rgba(0,0,0,0.3);
  border: 1px dashed var(--border-color);
  padding: 12px 8px;
  text-align: center;
  font-size: 0.75rem;
  border-radius: 6px;
  font-weight: 500;
}

/* AI flow diagram */
.ai-flow-diagram {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 0;
}

.flow-step {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  max-width: 180px;
}

.glow-border {
  border-color: var(--color-magenta);
  box-shadow: var(--shadow-neon-magenta);
}

.flow-icon {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.flow-step p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.flow-arrow {
  color: var(--color-cyan);
  font-weight: bold;
}

/* RISC-V Graphics */
.trend-graphic-riscv {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.riscv-logo {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--color-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(140, 255, 140, 0.1);
}

.riscv-desc .tag {
  margin: 0 4px;
  background-color: hsla(140, 100%, 45%, 0.12);
  color: var(--color-green);
  border: 1px solid var(--color-green);
}

/* Tool Cards */
.tool-card-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 260px;
  padding: 30px 20px;
}

.icon-tool {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.tool-card-layout h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 12px;
}

/* Mindset structures */
.mindset-item {
  background: rgba(0,0,0,0.25);
  border-left: 3px solid var(--color-magenta);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
}

.mindset-item strong {
  display: block;
  font-size: 1rem;
}

.mindset-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Integrator satellite diagram */
.integrator-diagram {
  position: relative;
  width: 100%;
  height: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.integrator-core {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 3px solid var(--color-cyan);
  box-shadow: var(--shadow-neon);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.integrator-sat {
  position: absolute;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s;
  z-index: 5;
}

.integrator-sat:hover {
  border-color: var(--color-cyan);
  transform: scale(1.08);
  box-shadow: var(--shadow-neon);
}

/* Position satellite items in circle layout */
.sat-1 { transform: rotate(0deg) translate(200px) rotate(0deg); }
.sat-2 { transform: rotate(45deg) translate(200px) rotate(-45deg); }
.sat-3 { transform: rotate(90deg) translate(200px) rotate(-90deg); }
.sat-4 { transform: rotate(135deg) translate(200px) rotate(-135deg); }
.sat-5 { transform: rotate(180deg) translate(200px) rotate(-180deg); }
.sat-6 { transform: rotate(225deg) translate(200px) rotate(-225deg); }
.sat-7 { transform: rotate(270deg) translate(200px) rotate(-270deg); }
.sat-8 { transform: rotate(315deg) translate(200px) rotate(-315deg); }

/* QA Ideas styles */
.qa-grid-ideas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: 800px;
  margin: 0 auto;
}

.qa-idea-card {
  padding: 15px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.qa-idea-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-cyan);
  box-shadow: var(--shadow-neon);
}

/* Control Bar styling */
.control-bar {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 10;
}

.nav-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  border-color: var(--color-cyan);
  background-color: hsla(180, 100%, 50%, 0.05);
  color: var(--color-cyan);
}

.slide-indicator {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}

.controls-left,
.controls-right,
.controls-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Progress bar styling */
.progress-bar-container {
  height: 4px;
  background-color: var(--bg-primary);
  width: 100%;
  position: relative;
  z-index: 12;
}

.progress-bar {
  height: 100%;
  width: 3.33%; /* Calculated by js */
  background: linear-gradient(90deg, var(--color-magenta) 0%, var(--color-cyan) 100%);
  box-shadow: 0 0 8px var(--color-cyan);
  transition: width 0.3s ease;
}

/* Sidebar styling */
.sidebar {
  position: fixed;
  top: 0;
  left: -350px;
  width: 350px;
  height: 100vh;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  z-index: 100;
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  left: 0;
}

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

.sidebar-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.close-sidebar-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.close-sidebar-btn:hover {
  color: var(--color-red);
}

.slide-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 10px 0;
}

.slide-list-item {
  padding: 12px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slide-list-item:hover {
  background-color: var(--bg-surface);
  color: var(--color-cyan);
}

.slide-list-item.active-item {
  background-color: hsla(180, 100%, 50%, 0.08);
  border-left: 4px solid var(--color-cyan);
  color: var(--color-cyan);
  font-weight: 600;
}

.item-num {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Speaker Notes panel drawer (bottom) */
.notes-panel {
  position: fixed;
  bottom: -300px;
  left: 0;
  width: 100vw;
  height: 250px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  z-index: 90;
  transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.notes-panel.open {
  bottom: 60px; /* Sits above control bar */
}

.notes-header {
  padding: 12px 30px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255,255,255,0.02);
}

.notes-header h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
}

.close-notes-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.close-notes-btn:hover {
  color: var(--color-red);
}

.notes-body {
  padding: 20px 30px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #c9d1d9;
}

/* Keyframes animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive design adjustment for 16:9 box scale */
@media (max-width: 1480px) {
  .presentation-container {
    transform: scale(0.9);
  }
}
@media (max-width: 1300px) {
  .presentation-container {
    transform: scale(0.8);
  }
}
@media (max-width: 1150px) {
  .presentation-container {
    transform: scale(0.7);
  }
}
@media (max-width: 1000px) {
  .presentation-container {
    transform: scale(0.6);
  }
}
@media (max-width: 850px) {
  .presentation-container {
    transform: scale(0.5);
  }
}
@media (max-width: 700px) {
  /* Fallback for smaller screens */
  .presentation-wrapper {
    overflow: auto;
    align-items: flex-start;
  }
  .presentation-container {
    transform: none;
    height: auto;
    min-height: 810px;
  }
  .slide {
    position: relative;
    opacity: 1;
    transform: none;
    display: none;
    padding: 30px 20px;
  }
  .slide.active {
    display: flex;
  }
}

.stack-tags-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-badge {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  background-color: hsla(180, 100%, 50%, 0.08);
  border: 1px solid var(--color-cyan);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-neon);
}

/* Cinema Quotes Layout (Slide 30-C) */
.quote-cinema-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1000px;
  margin: 30px auto 0 auto;
}

.cinema-quote-card {
  position: relative;
  background: hsla(220, 20%, 15%, 0.4);
  border-radius: 16px;
  padding: 40px 60px;
  border-left: 6px solid var(--color-cyan);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cinema-quote-card.cyan-glow {
  border-left-color: var(--color-cyan);
  background: linear-gradient(90deg, hsla(185, 75%, 55%, 0.05) 0%, transparent 100%);
}

.cinema-quote-card.magenta-glow {
  border-left-color: var(--color-magenta);
  background: linear-gradient(90deg, hsla(260, 60%, 70%, 0.05) 0%, transparent 100%);
}

.cinema-quote-card:hover {
  transform: translateY(-4px);
}

.cinema-quote-card.cyan-glow:hover {
  box-shadow: 0 15px 40px hsla(185, 75%, 55%, 0.1);
}

.cinema-quote-card.magenta-glow:hover {
  box-shadow: 0 15px 40px hsla(260, 60%, 70%, 0.1);
}

.quote-symbol {
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 5rem;
  font-family: 'Outfit', sans-serif;
  color: hsla(255, 255, 255, 0.08);
  line-height: 1;
}

.quote-symbol-close {
  position: absolute;
  bottom: -20px;
  right: 20px;
  font-size: 5rem;
  font-family: 'Outfit', sans-serif;
  color: hsla(255, 255, 255, 0.08);
  line-height: 1;
}

.quote-text-large {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-primary);
  font-family: var(--font-heading);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.highlight-cyan {
  color: var(--color-cyan);
  text-shadow: 0 0 12px hsla(185, 75%, 55%, 0.4);
}

.highlight-magenta {
  color: var(--color-magenta);
  text-shadow: 0 0 12px hsla(260, 60%, 70%, 0.4);
}
