/* ============================================
   COMPUTER SYSTEMS PRESENTATION
   Retro-Futuristic Dark Theme
   Palette: Deep Navy + Electric Cyan + Purple
   Fonts: Syne (display) + Outfit (body)
============================================ */

:root {
  --bg-deep:      #0A0E1A;
  --bg-card:      #0D1B2A;
  --bg-card2:     #111827;
  --cyan:         #00D4FF;
  --cyan-dim:     #00A8CC;
  --cyan-glow:    rgba(0, 212, 255, 0.15);
  --purple:       #7B2FBE;
  --purple-light: #A855F7;
  --purple-glow:  rgba(123, 47, 190, 0.2);
  --text-primary: #E8F4FD;
  --text-secondary: #8BA7C0;
  --text-muted:   #4A6070;
  --border:       rgba(0, 212, 255, 0.12);
  --border-bright: rgba(0, 212, 255, 0.35);
  --font-display: 'Syne', sans-serif;
  --font-body:    'Outfit', sans-serif;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
}

/* ── Circuit Canvas ── */
#circuit-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
}

/* ── Progress Bar ── */
.progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.06);
  z-index: 100;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px var(--cyan);
}

/* ── Slide Counter ── */
.slide-counter {
  position: fixed;
  top: 20px; right: 24px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  z-index: 100;
}
.slide-counter #current-slide {
  color: var(--cyan);
}

/* ── Navigation Buttons ── */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(13, 27, 42, 0.8);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}
.nav-btn svg { width: 20px; height: 20px; }
.nav-btn:hover {
  background: var(--cyan-glow);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
}
.nav-btn:disabled { opacity: 0.2; cursor: not-allowed; }
.nav-prev { left: 20px; }
.nav-next { right: 20px; }

/* ── Slide Dots ── */
.slide-dots {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 100;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}
.dot.active {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  width: 20px;
  border-radius: 3px;
}
.dot:hover { background: var(--cyan-dim); }

/* ── Slides Container ── */
.slides-container {
  position: fixed;
  inset: 0;
  z-index: 10;
}

/* ── Base Slide ── */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}
.slide.exit-left {
  opacity: 0;
  transform: translateX(-60px);
}

.slide-inner {
  width: 100%;
  max-width: 1100px;
  animation: slideIn 0.6s ease forwards;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Common Elements ── */
.slide-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.slide-tag::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--cyan);
}

.slide-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.accent { color: var(--cyan); }

.slide-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 32px;
}

/* ============================================
   SLIDE 1 — TITLE
============================================ */
.slide-title-slide {
  background: radial-gradient(ellipse at 70% 50%, rgba(123,47,190,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(0,212,255,0.08) 0%, transparent 50%);
}

.slide-title .slide-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.title-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--border-bright);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 28px;
  width: fit-content;
  background: var(--cyan-glow);
}

.main-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  margin-bottom: 20px;
}
.title-line { display: block; color: var(--text-primary); }
.title-line.accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--cyan);
  text-shadow: 0 0 40px rgba(0,212,255,0.4);
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: 40px;
}

.title-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.meta-icon { font-size: 1rem; }
.meta-divider {
  width: 1px; height: 20px;
  background: var(--border);
}

.scroll-hint {
  margin-top: 48px;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* CPU Visual */
.title-graphic {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.cpu-visual {
  position: relative;
  width: 280px; height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.cpu-core {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  border-radius: 8px;
  box-shadow: 0 0 30px var(--cyan-glow), 0 0 60px var(--purple-glow);
  animation: corePulse 2s ease-in-out infinite;
}
@keyframes corePulse {
  0%, 100% { box-shadow: 0 0 30px var(--cyan-glow), 0 0 60px var(--purple-glow); }
  50% { box-shadow: 0 0 50px rgba(0,212,255,0.4), 0 0 100px rgba(123,47,190,0.3); }
}
.cpu-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: ringRotate linear infinite;
}
.ring-1 { width: 110px; height: 110px; border-color: rgba(0,212,255,0.4); animation-duration: 8s; }
.ring-2 { width: 170px; height: 170px; border-color: rgba(123,47,190,0.3); animation-duration: 14s; animation-direction: reverse; }
.ring-3 { width: 240px; height: 240px; border-color: rgba(0,212,255,0.15); animation-duration: 20s; }
@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.cpu-pulse {
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.2), transparent);
  animation: cpuPulse 2s ease-in-out infinite;
}
@keyframes cpuPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.5); opacity: 0; }
}

/* ============================================
   SLIDE 2 — DEFINITION
============================================ */
.definition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.def-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.def-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  opacity: 0;
  transition: opacity 0.3s;
}
.def-card:hover { border-color: var(--border-bright); transform: translateY(-4px); }
.def-card:hover::before { opacity: 1; }
.def-icon { font-size: 2rem; margin-bottom: 12px; }
.def-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.def-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ============================================
   SLIDE 3 — HARDWARE
============================================ */
.hardware-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}
.hw-main { display: flex; flex-direction: column; gap: 12px; }
.hw-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}
.hw-item:hover { border-color: var(--border-bright); background: var(--bg-card2); }
.hw-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan);
}
.hw-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.hw-stat {
  font-size: 0.75rem;
  color: var(--purple-light);
  font-family: var(--font-display);
  font-weight: 600;
  white-space: nowrap;
  background: var(--purple-glow);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(168,85,247,0.2);
}

/* Diagram */
.hw-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.diagram-box {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
  text-align: center;
  width: 100%;
}
.cpu-box {
  background: linear-gradient(135deg, rgba(123,47,190,0.3), rgba(0,212,255,0.1));
  border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
}
.bus-box { border-color: rgba(168,85,247,0.4); color: var(--purple-light); }
.diagram-arrow { color: var(--cyan); font-size: 1.2rem; }
.diagram-row { display: flex; gap: 8px; width: 100%; }
.small-box { flex: 1; padding: 10px 8px; font-size: 0.75rem; }

/* ============================================
   SLIDE 4 — CPU
============================================ */
.cpu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.cpu-component {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  transition: all 0.3s ease;
}
.cpu-component:hover { border-color: var(--border-bright); }
.comp-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(0,212,255,0.1);
  position: absolute;
  top: 12px; right: 16px;
  line-height: 1;
}
.cpu-component h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 8px;
}
.cpu-component p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

.cpu-cycle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 24px;
}
.cycle-step {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  background: var(--cyan-glow);
  border: 1px solid var(--border-bright);
  padding: 8px 16px;
  border-radius: 6px;
}
.cycle-arrow { color: var(--cyan); font-size: 1.2rem; }

/* ============================================
   SLIDE 5 — MEMORY
============================================ */
.memory-pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.mem-tier {
  border-radius: 8px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid;
  transition: all 0.3s ease;
}
.mem-tier:hover { transform: scaleX(1.01); }
.tier-1 { width: 30%; background: rgba(0,212,255,0.2); border-color: var(--cyan); }
.tier-2 { width: 45%; background: rgba(0,212,255,0.12); border-color: rgba(0,212,255,0.5); }
.tier-3 { width: 60%; background: rgba(123,47,190,0.15); border-color: rgba(168,85,247,0.4); }
.tier-4 { width: 75%; background: rgba(123,47,190,0.08); border-color: rgba(168,85,247,0.25); }
.tier-5 { width: 90%; background: rgba(255,255,255,0.03); border-color: var(--border); }

.tier-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.tier-info { font-size: 0.78rem; color: var(--text-secondary); }

.pyramid-legend {
  display: flex;
  justify-content: space-between;
  width: 90%;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
}

/* ============================================
   SLIDE 6 — OS
============================================ */
.os-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.os-function {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}
.os-function:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.os-icon { font-size: 1.8rem; margin-bottom: 10px; }
.os-function h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 8px;
}
.os-function p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }

.os-types {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.os-badge {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-bright);
  color: var(--cyan);
  background: var(--cyan-glow);
  letter-spacing: 0.05em;
}

/* ============================================
   SLIDE 7 — I/O
============================================ */
.io-layout {
  display: grid;
  grid-template-columns: 1fr 180px 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}
.io-col-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.input-title { color: var(--cyan); }
.output-title { color: var(--purple-light); }

.io-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.io-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.io-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--cyan);
}
.output-dot { background: var(--purple-light); box-shadow: 0 0 6px var(--purple-light); }

.io-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.io-cpu-box {
  background: linear-gradient(135deg, rgba(123,47,190,0.3), rgba(0,212,255,0.15));
  border: 1px solid var(--cyan);
  border-radius: 10px;
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 0 20px var(--cyan-glow);
}
.io-cpu-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
}
.io-cpu-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.io-bus-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bus-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.bus-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.3s ease;
}
.bus-item:hover { border-color: var(--border-bright); }
.bus-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}
.bus-speed { font-size: 0.78rem; color: var(--cyan); font-weight: 500; }

/* ============================================
   SLIDE 8 — ARCHITECTURE
============================================ */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.arch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.arch-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.arch-card:hover { border-color: var(--border-bright); transform: translateY(-4px); }
.arch-card:hover::after { transform: scaleX(1); }
.arch-icon { font-size: 2rem; }
.arch-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.arch-card p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; flex: 1; }
.arch-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cyan);
  background: var(--cyan-glow);
  border: 1px solid var(--border-bright);
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

/* ============================================
   SLIDE 9 — TRENDS
============================================ */
.trends-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.trend-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: all 0.3s ease;
}
.trend-item:hover { border-color: var(--border-bright); transform: translateX(4px); }
.trend-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--cyan);
  opacity: 0.4;
  min-width: 48px;
  line-height: 1;
}
.trend-content h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.trend-content p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

/* ============================================
   SLIDE 10 — SUMMARY
============================================ */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.summary-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: all 0.3s ease;
}
.summary-item:hover { border-color: var(--border-bright); }
.sum-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cyan);
  min-width: 32px;
  line-height: 1.2;
}
.summary-item p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.summary-item p strong { color: var(--text-primary); }

.highlight-item {
  background: linear-gradient(135deg, rgba(123,47,190,0.2), rgba(0,212,255,0.1));
  border-color: var(--border-bright);
  grid-column: span 1;
}
.highlight-item .sum-num { color: var(--purple-light); }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 900px) {
  .slide { padding: 50px 40px; }
  .definition-grid,
  .os-grid,
  .arch-grid { grid-template-columns: repeat(2, 1fr); }
  .hardware-layout { grid-template-columns: 1fr; }
  .hw-diagram { display: none; }
  .cpu-grid { grid-template-columns: 1fr; }
  .io-layout { grid-template-columns: 1fr; }
  .io-center { display: none; }
  .bus-types { grid-template-columns: repeat(2, 1fr); }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .title-graphic { display: none; }
  .main-title { font-size: 3.5rem; }
}

@media (max-width: 600px) {
  .slide { padding: 40px 24px; }
  .definition-grid,
  .os-grid,
  .arch-grid,
  .summary-grid { grid-template-columns: 1fr; }
  .nav-btn { width: 36px; height: 36px; }
  .nav-prev { left: 8px; }
  .nav-next { right: 8px; }
}