:root {
  --slide-width: 1920px;
  --slide-height: 1080px;
  --slide-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --accent-border: #93c5fd;
  --card-bg: #f8fafc;
  --card-border: #e2e8f0;
  --code-bg: #1e293b;
  --code-text: #f8fafc;
  --code-border: #334155;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-mono: "Fira Code", Menlo, Monaco, Consolas, "Courier New", monospace;
}

/* Dark mode theme option */
[data-theme="dark"] {
  --slide-bg: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --accent: #38bdf8;
  --accent-light: rgba(56, 189, 248, 0.1);
  --accent-border: rgba(56, 189, 248, 0.3);
  --card-bg: #1e293b;
  --card-border: #334155;
  --code-bg: #020617;
  --code-text: #f8fafc;
  --code-border: #1e293b;
}

body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #0b0f19;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  user-select: none;
}

/* Outer Viewport */
#slide-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Scaled Presentation Stage */
#slide-stage {
  position: absolute;
  width: var(--slide-width);
  height: var(--slide-height);
  background-color: var(--slide-bg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  transform-origin: center center;
  overflow: hidden;
  border-radius: 4px;
}

/* Individual Slide */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 12px 18px 24px 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  user-select: text;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

/* Slide Header & Titles */
.slide-header {
  margin-bottom: 32px;
}

.slide-category {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.slide-logo,
.slide-category img {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  display: inline-block;
}

.title-logo-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.title-logo-wrapper img,
.title-logo-wrapper .slide-logo {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  display: inline-block;
}

h1 {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

h3 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
}

p {
  font-size: 26px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 20px;
}

p.lead {
  font-size: 32px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Lists */
ul, ol {
  font-size: 26px;
  line-height: 1.7;
  margin-left: 36px;
  margin-bottom: 24px;
}

li {
  margin-bottom: 12px;
}

li strong {
  color: var(--accent);
}

/* Title Slide Variant */
.slide.title-slide {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px 18px 24px 18px;
}

.slide.title-slide h1 {
  font-size: 72px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide.title-slide .subtitle {
  font-size: 34px;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 48px;
}

.slide.title-slide .author-info {
  font-size: 24px;
  color: var(--text-muted);
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
}

/* Center Layout */
.slide.center {
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Multi-column Grid Layouts */
.columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 16px;
  align-items: start;
  flex: 1;
}

.columns.cols-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.column {
  display: flex;
  flex-direction: column;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.card h3 {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 12px;
}

.card p {
  font-size: 22px;
  margin-bottom: 0;
}

/* Highlight Box */
.callout {
  background-color: var(--accent-light);
  border-left: 6px solid var(--accent);
  padding: 24px 32px;
  border-radius: 0 12px 12px 0;
  margin: 24px 0;
}

.callout p {
  font-size: 24px;
  margin: 0;
  font-weight: 500;
}

/* Code Blocks */
pre {
  background-color: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--code-border);
  border-radius: 12px;
  padding: 24px 32px;
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1.5;
  overflow-x: auto;
  margin-bottom: 24px;
}

code {
  font-family: var(--font-mono);
  background-color: rgba(0, 0, 0, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
}

[data-theme="dark"] code {
  background-color: rgba(255, 255, 255, 0.1);
}

pre code {
  background: none;
  padding: 0;
}

/* Slide Navigation UI (Overlay) */
#slide-progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 4px;
  background-color: var(--accent);
  transition: width 0.2s ease;
  z-index: 100;
}

#slide-counter {
  position: absolute;
  right: 18px;
  bottom: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  z-index: 10;
  pointer-events: none;
}

/* Slide Deck Branding / Header / Footer */
.slide-footer-brand {
  position: absolute;
  left: 18px;
  bottom: 8px;
  font-size: 16px;
  color: var(--text-light);
  pointer-events: none;
}

/* UI Controls (Floating action buttons) */
.slide-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 200;
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.slide-controls:hover {
  opacity: 1;
}

.slide-btn {
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  backdrop-filter: blur(8px);
  transition: background-color 0.2s, transform 0.1s;
}

.slide-btn:hover {
  background: rgba(37, 99, 235, 0.9);
}

.slide-btn:active {
  transform: scale(0.95);
}
