/* ═══════════════════════════════════════════════
   CWM Slide — Presentation & Slide Styles (Nas.io inspired)
   ═══════════════════════════════════════════════ */

/* ── Presentation Overlay ── */
.presentation {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: var(--slide-bg);
  transition: background 300ms ease;
}

[data-theme="light"] .presentation {
  --slide-bg: #ffffff;
  --slide-surface: #fafafa;
  --slide-border: rgba(0,0,0,0.07);
  --slide-overlay: rgba(255,255,255,0.85);
}

[data-theme="dark"] .presentation {
  --slide-bg: #111111;
  --slide-surface: #1a1a1a;
  --slide-border: rgba(255,255,255,0.07);
  --slide-overlay: rgba(17,17,17,0.85);
}

/* ── Presentation Header ── */
.pres-header {
  position: relative;
  z-index: 10;
  height: 58px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--slide-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--slide-border);
  flex-shrink: 0;
}

.pres-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.pres-course {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.pres-divider { color: var(--text-3); font-size: 14px; flex-shrink: 0; }

.pres-module {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.slide-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  font-family: var(--font-mono);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 183, 48, 0.2);
}

.pres-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--slide-border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.pres-icon-btn:hover {
  color: var(--text-1);
  border-color: var(--border-h);
  background: var(--accent-soft);
}

.pres-icon-btn.exit-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* ── Slides Viewport ── */
.slides-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ── Slide overlays: school logo + author ── */
.slide-school-logo {
  position: absolute;
  top: 20px;
  left: 24px;
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  object-position: left center;
  pointer-events: none;
  z-index: 10;
  opacity: 0.72;
}

.slide-author-tag {
  position: absolute;
  bottom: 18px;
  right: 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #999);
  pointer-events: none;
  z-index: 10;
  opacity: 0.6;
}

.slides-container {
  position: absolute;
  inset: 0;
}

/* ── Base Slide ── */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slide-inner {
  width: 100%;
  max-width: 960px;
  position: relative;
  z-index: 1;
  padding: 0 20px;
}

/* ─────────────────────────────────────
   SLIDE TYPE: TITLE
───────────────────────────────────── */
.slide-title-type {
  text-align: center;
  padding: 60px 80px;
}

/* Light: warm cream gradient with soft glows */
[data-theme="light"] .slide-title-type {
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(255, 220, 130, 0.35) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(232, 123, 58, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(180, 120, 240, 0.08) 0%, transparent 60%),
    #ffffff;
}

/* Dark: warm amber glow on dark */
[data-theme="dark"] .slide-title-type {
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(245, 183, 48, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(232, 123, 58, 0.07) 0%, transparent 60%),
    #111111;
}

.slide-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
  background: var(--orange-soft);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(232, 123, 58, 0.2);
  margin-bottom: 28px;
}

.slide-headline {
  font-size: clamp(34px, 5.5vw, 68px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text-1);
  margin-bottom: 20px;
}

.slide-headline em {
  font-style: normal;
  color: var(--orange);
}

.slide-subtitle {
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.65;
  color: var(--text-2);
  max-width: 580px;
  margin: 0 auto 36px;
  white-space: pre-line;
  font-weight: 400;
}

.slide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.slide-tag {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  box-shadow: var(--shadow-card);
}

/* ─────────────────────────────────────
   SLIDE TYPE: SECTION
───────────────────────────────────── */
.slide-section-type {
  padding: 60px 80px;
  align-items: center;
}

[data-theme="light"] .slide-section-type {
  background:
    radial-gradient(ellipse 50% 80% at 0% 50%, rgba(245, 183, 48, 0.12) 0%, transparent 60%),
    #fafafa;
}

[data-theme="dark"] .slide-section-type {
  background:
    radial-gradient(ellipse 50% 80% at 0% 50%, rgba(245, 183, 48, 0.07) 0%, transparent 60%),
    #111111;
}

.slide-section-type .slide-inner { text-align: left; padding: 0; max-width: 800px; }

.section-num {
  font-size: 120px;
  font-weight: 900;
  line-height: 0.9;
  color: var(--accent);
  opacity: 0.12;
  letter-spacing: -4px;
  margin-bottom: -10px;
  font-family: var(--font-mono);
  display: block;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 3px;
  background: var(--orange);
  border-radius: 99px;
  display: inline-block;
}

.section-heading {
  font-size: clamp(30px, 4.5vw, 56px);
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--text-1);
  line-height: 1.15;
  margin-bottom: 28px;
}

.section-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-chip {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1.5px solid rgba(245, 183, 48, 0.25);
}

[data-theme="dark"] .topic-chip { color: var(--accent); }

/* ─────────────────────────────────────
   SLIDE TYPE: BULLETS
───────────────────────────────────── */
.slide-bullets-type {
  padding: 60px 80px;
  align-items: center;
}

[data-theme="light"] .slide-bullets-type { background: #ffffff; }
[data-theme="dark"]  .slide-bullets-type { background: #111111; }

.slide-title {
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text-1);
  margin-bottom: 36px;
  line-height: 1.2;
  position: relative;
  padding-bottom: 18px;
}

.slide-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 4px;
  background: var(--accent);
  border-radius: 99px;
}

.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.5;
  color: var(--text-1);
  font-weight: 500;
}

.bullet-item.hidden-bullet {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}

.bullet-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 9px;
  box-shadow: 0 0 10px var(--accent-glow);
}

.bullet-sub {
  font-size: 0.82em;
  color: var(--text-2);
  margin-top: 4px;
  display: block;
  font-weight: 400;
}

/* ─────────────────────────────────────
   SLIDE TYPE: CODE
───────────────────────────────────── */
.slide-code-type {
  padding: 50px 80px;
  align-items: center;
}

[data-theme="light"] .slide-code-type { background: #fafafa; }
[data-theme="dark"]  .slide-code-type { background: #0d0d0d; }

.slide-description {
  font-size: 16px;
  color: var(--text-2);
  margin-bottom: 20px;
  line-height: 1.6;
  font-weight: 400;
}

/* Code block — always dark regardless of theme */
.code-block {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #1a1a2a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #28ca41; }

.code-lang {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #666;
  font-family: var(--font-mono);
}

.code-block pre {
  margin: 0 !important;
  border-radius: 0 !important;
  background: #1e1e2e !important;
  padding: 22px !important;
  overflow-x: auto;
  max-height: 420px;
}

.code-block code {
  font-family: var(--font-mono) !important;
  font-size: clamp(13px, 1.2vw, 16px) !important;
  line-height: 1.75 !important;
  background: transparent !important;
}

/* ─────────────────────────────────────
   SLIDE TYPE: SPLIT (text + code)
───────────────────────────────────── */
.slide-split-type {
  padding: 50px 60px;
  align-items: center;
}

[data-theme="light"] .slide-split-type { background: #fafafa; }
[data-theme="dark"]  .slide-split-type { background: #0d0d0d; }

.slide-split-type .slide-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 44px;
  align-items: start;
  max-width: 1080px;
  padding: 0;
}

.split-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

/* ─────────────────────────────────────
   SLIDE TYPE: END
───────────────────────────────────── */
.slide-end-type {
  text-align: center;
  padding: 60px 80px;
}

[data-theme="light"] .slide-end-type {
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(245, 183, 48, 0.2) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 80% 30%, rgba(232, 123, 58, 0.1) 0%, transparent 60%),
    #ffffff;
}

[data-theme="dark"] .slide-end-type {
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(245, 183, 48, 0.1) 0%, transparent 65%),
    #111111;
}

.end-icon {
  font-size: 72px;
  margin-bottom: 24px;
  display: block;
}

.end-title {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: -2px;
  color: var(--text-1);
  margin-bottom: 14px;
  line-height: 1.1;
}

.end-subtitle {
  font-size: 18px;
  color: var(--text-2);
  font-weight: 400;
}

/* ── Presentation Footer ── */
.pres-footer {
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  background: var(--slide-overlay);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--slide-border);
  flex-shrink: 0;
}

.nav-arrow {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--slide-border);
  background: var(--bg-card);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-card);
}

.nav-arrow:hover {
  color: #111;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-btn);
  transform: scale(1.08);
}

.nav-arrow:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.nav-arrow svg { width: 20px; height: 20px; }

.progress-track {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--orange) 100%);
  border-radius: var(--radius-pill);
  transition: width 450ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .slide-title-type,
  .slide-bullets-type,
  .slide-code-type,
  .slide-end-type,
  .slide-section-type { padding: 40px 40px; }

  .slide-split-type { padding: 40px 30px; }
  .slide-split-type .slide-inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 600px) {
  .slide-title-type,
  .slide-bullets-type,
  .slide-code-type,
  .slide-end-type,
  .slide-section-type { padding: 28px 22px; }

  .slide-headline { letter-spacing: -1px; }
  .section-num { font-size: 72px; }
  .code-block pre { padding: 16px !important; }
  .code-block code { font-size: 12px !important; }
  .bullet-item { font-size: 16px; }
}
