:root {
  --topbar-height: 64px;
  --bg: #0b1020;
  --surface: #121a2f;
  --surface-soft: #1a2340;
  --text: #e8ecff;
  --muted: #b3bfdc;
  --accent: #6c7dff;
  --accent-2: #8a5cff;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #19254f 0%, var(--bg) 50%);
}

body {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--topbar-height);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(9, 14, 30, 0.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(108, 125, 255, 0.25);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.counter {
  margin: 0;
  min-width: 72px;
  text-align: center;
  font-weight: 700;
  color: var(--accent);
}

.nav-btn {
  border: 1px solid rgba(108, 125, 255, 0.5);
  color: var(--text);
  background: linear-gradient(
    135deg,
    rgba(108, 125, 255, 0.2),
    rgba(138, 92, 255, 0.2)
  );
  padding: 0.6rem 0.95rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.nav-btn:hover,
.nav-btn:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.presentation {
  height: 100vh;
  overflow: hidden;
}

.slides-track {
  margin-top: var(--topbar-height);
  display: flex;
  height: calc(100vh - var(--topbar-height));
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.slide {
  flex: 0 0 100vw;
  width: 100vw;
  min-width: 100vw;
  height: 100%;
  padding-block: clamp(1rem, 3vw, 2.5rem);
  padding-left: clamp(1.4rem, 4vw, 3.4rem);
  padding-right: clamp(1.4rem, 4vw, 3.4rem);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: stretch;
}

.slide-content,
.slide-visual {
  background: linear-gradient(
    145deg,
    rgba(26, 35, 64, 0.85),
    rgba(18, 26, 47, 0.9)
  );
  border: 1px solid rgba(108, 125, 255, 0.3);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2vw, 2rem);
  height: 100%;
  max-height: 100%;
  overflow: auto;
}

.slide-content {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.slide.is-active .slide-content {
  opacity: 1;
  transform: translateY(0);
}

h1,
h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.02rem, 2.1vw, 1.25rem);
  color: #dce4ff;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: #dce4ff;
}

h2 {
  font-size: clamp(1.45rem, 3.5vw, 2.25rem);
  color: #dce4ff;
}

ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

li {
  margin: 0.5rem 0;
  line-height: 1.5;
}

.slide-visual {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.slide-visual img {
  flex: 1;
  width: 100%;
  height: min(56vh, 420px);
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(108, 125, 255, 0.25);
}

figcaption {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

code {
  color: #9dc2ff;
}

pre {
  margin: 0.9rem 0 0;
  background: rgba(7, 11, 24, 0.78);
  border: 1px solid rgba(108, 125, 255, 0.25);
  border-radius: 12px;
  padding: 0.75rem;
  overflow: auto;
}

pre code {
  color: #c7d7ff;
  font-family:
    "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88rem;
}

.flow {
  margin: 0.95rem 0 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(108, 125, 255, 0.24),
    rgba(138, 92, 255, 0.2)
  );
  color: #d9e3ff;
  font-weight: 600;
}

.example-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.example-grid span {
  border: 1px solid rgba(108, 125, 255, 0.4);
  background: rgba(108, 125, 255, 0.14);
  border-radius: 10px;
  padding: 0.55rem;
  text-align: center;
  color: #d6e0ff;
  font-weight: 600;
}

.live-demo {
  margin-top: 1rem;
  border: 1px solid rgba(108, 125, 255, 0.28);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(108, 125, 255, 0.06);
}

.html-live-demo {
  margin-top: 1rem;
  border: 1px solid rgba(108, 125, 255, 0.28);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(108, 125, 255, 0.06);
}

.media-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.media-demo-card {
  border: 1px solid rgba(108, 125, 255, 0.22);
  border-radius: 10px;
  padding: 0.65rem;
  background: rgba(7, 11, 24, 0.55);
}

.media-demo-card audio,
.media-demo-card video {
  width: 100%;
  border-radius: 8px;
  margin-top: 0.3rem;
}

.geo-demo {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.js-demo-actions {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.demo-title {
  margin: 0 0 0.45rem;
  color: #dce4ff;
  font-weight: 700;
}

.demo-label {
  display: block;
  font-size: 0.9rem;
  color: #b9c7ea;
  margin-bottom: 0.35rem;
}

.demo-input {
  width: 100%;
  border: 1px solid rgba(108, 125, 255, 0.35);
  background: rgba(7, 11, 24, 0.7);
  color: #dce4ff;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
}

.demo-input:focus {
  outline: 2px solid rgba(138, 92, 255, 0.6);
  outline-offset: 1px;
}

.demo-help {
  margin: 0.55rem 0 0.7rem;
  color: #b3bfdc;
  font-size: 0.86rem;
  line-height: 1.45;
}

.layout-demo {
  min-height: 150px;
  border: 1px dashed rgba(108, 125, 255, 0.5);
  border-radius: 12px;
  padding: 0.6rem;
  background: rgba(9, 14, 30, 0.5);
}

.demo-item {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(108, 125, 255, 0.45);
  background: linear-gradient(
    135deg,
    rgba(108, 125, 255, 0.2),
    rgba(138, 92, 255, 0.2)
  );
  color: #e6ecff;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.layout-flex {
  display: flex;
}

.layout-grid {
  display: grid;
}

.fd-row {
  flex-direction: row;
}

.fd-col {
  flex-direction: column;
}

.jc-start {
  justify-content: flex-start;
}

.jc-center {
  justify-content: center;
}

.jc-between {
  justify-content: space-between;
}

.ai-start {
  align-items: flex-start;
}

.ai-center {
  align-items: center;
}

.ai-stretch {
  align-items: stretch;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gap-1 {
  gap: 0.35rem;
}

.gap-2 {
  gap: 0.7rem;
}

.gap-4 {
  gap: 1rem;
}

.position-samples {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.position-samples span {
  border: 1px solid rgba(108, 125, 255, 0.35);
  background: rgba(108, 125, 255, 0.1);
  border-radius: 10px;
  padding: 0.5rem;
  text-align: center;
  color: #dce4ff;
  font-weight: 600;
  font-size: 0.9rem;
}

.single-panel {
  grid-template-columns: 1fr;
}

.single-panel .slide-content {
  grid-column: 1 / -1;
}

.title-slide .slide-content,
.title-slide .slide-visual,
.ai-seminar-slide .slide-content {
  background: linear-gradient(
    140deg,
    rgba(7, 11, 28, 0.98),
    rgba(23, 29, 66, 0.92),
    rgba(42, 20, 71, 0.85)
  );
  border-color: rgba(140, 133, 255, 0.4);
}

.title-content {
  display: grid;
  align-content: center;
  gap: 0.7rem;
  min-height: min(46vh, 420px);
}

.eyebrow {
  margin: 0;
  color: #9fb4ff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.82rem;
}

.title-slide h1 {
  font-size: clamp(1.7rem, 4.2vw, 3rem);
  margin-bottom: 0.3rem;
}

.title-slide .lead-text {
  font-size: clamp(1rem, 2.3vw, 1.22rem);
  color: #d5e0ff;
  max-width: 62ch;
}

.title-visual img {
  height: min(42vh, 360px);
}

.icon-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.7rem;
}

.icon-list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: rgba(108, 125, 255, 0.08);
  border: 1px solid rgba(108, 125, 255, 0.25);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
}

.icon-list li span {
  line-height: 1.2;
  font-size: 1.1rem;
}

.icon-list strong {
  color: #dce4ff;
}

.lead-text {
  margin: 0 0 1rem;
  color: #c5d2f3;
  line-height: 1.6;
}

.platform-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.platform-card {
  background: rgba(108, 125, 255, 0.08);
  border: 1px solid rgba(108, 125, 255, 0.3);
  border-radius: 14px;
  padding: 0.85rem;
}

.platform-icon {
  width: 2.2rem;
  height: 2.2rem;
  margin: 0 0 0.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(
    135deg,
    rgba(108, 125, 255, 0.3),
    rgba(138, 92, 255, 0.3)
  );
  font-size: 1.25rem;
}

.table-wrap {
  overflow: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  background: rgba(7, 11, 24, 0.6);
  border-radius: 12px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  border: 1px solid rgba(108, 125, 255, 0.2);
  padding: 0.65rem 0.7rem;
  text-align: left;
}

.comparison-table th {
  color: #dce4ff;
  background: rgba(108, 125, 255, 0.14);
}

.comparison-table td {
  color: #c5d2f3;
}

.architecture-flow {
  display: grid;
  grid-template-columns: 1fr auto 1.3fr auto 1.3fr auto 1fr;
  gap: 0.35rem;
  align-items: center;
  margin: 0.45rem 0 1rem;
}

.layer-box {
  text-align: center;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(108, 125, 255, 0.32);
  background: rgba(108, 125, 255, 0.12);
  color: #dce4ff;
  font-weight: 600;
}

.layer-arrow {
  color: #9fb4ff;
  font-weight: 800;
  font-size: 1.2rem;
  animation: arrowPulse 1.1s ease-in-out infinite;
}

.stack-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.stack-card {
  background: rgba(108, 125, 255, 0.08);
  border: 1px solid rgba(108, 125, 255, 0.28);
  border-radius: 12px;
  padding: 0.8rem;
}

.flow-line {
  margin: 0.95rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(108, 125, 255, 0.2),
    rgba(138, 92, 255, 0.2)
  );
  color: #dce4ff;
  line-height: 1.5;
}

.vdom-diagram {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.4rem;
}

.vdom-node {
  border: 1px solid rgba(108, 125, 255, 0.32);
  background: rgba(108, 125, 255, 0.12);
  color: #dce4ff;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  padding: 0.55rem;
}

.comparison-visual {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.comparison-visual img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(108, 125, 255, 0.25);
}

.link-list {
  margin-top: 0.25rem;
}

.link-list a {
  color: #9fc0ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(159, 192, 255, 0.45);
}

.link-list a:hover,
.link-list a:focus-visible {
  color: #d5e4ff;
  border-bottom-color: #d5e4ff;
}

@keyframes arrowPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(2px);
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-height: 60px;
  }

  .slide {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .slide-visual img {
    height: min(34vh, 260px);
  }

  .platform-cards,
  .stack-sections {
    grid-template-columns: 1fr;
  }

  .media-demo-grid {
    grid-template-columns: 1fr;
  }

  .position-samples {
    grid-template-columns: 1fr 1fr;
  }

  .architecture-flow {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.25rem;
  }

  .vdom-diagram {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .architecture-flow .layer-arrow {
    animation: none;
    transform: rotate(90deg);
  }
}

@media (max-width: 600px) {
  :root {
    --topbar-height: 58px;
  }

  .topbar {
    padding: 0.7rem;
    gap: 0.55rem;
  }

  .nav-btn {
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
  }

  .topbar-actions {
    gap: 0.45rem;
  }

  .slide {
    padding-block: 0.85rem;
    padding-left: 0.95rem;
    padding-right: 0.95rem;
    gap: 0.85rem;
  }

  .counter {
    font-size: 0.95rem;
  }

  li {
    font-size: 0.96rem;
  }

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