/* ==========================================================================
   SlideShow Studio — Stylesheet
   Modern Bold Slab Typography & Fullscreen Presentation Engine
   ========================================================================== */

:root {
  /* Fonts */
  --font-slab: 'Roboto Slab', Georgia, serif;
  --font-slab-heavy: 'Alfa Slab One', 'Roboto Slab', Georgia, serif;
  --font-ui: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* App Core Palette */
  --bg-app: #0F1115;
  --bg-surface: #171A21;
  --bg-surface-elevated: #20242E;
  --bg-tile: #1B1E26;
  --border-color: #2D323E;
  --border-hover: #4D5569;
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;

  --accent-primary: #E5A93C; /* Warm Ochre */
  --accent-primary-hover: #F2B94F;
  --accent-coral: #FF5C47;
  --accent-cyan: #38BDF8;
  --accent-mint: #34D399;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-tile: 20px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(229, 169, 60, 0.3);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-ui);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* App Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Header & Toolbar
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2.2rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-coral));
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(229, 169, 60, 0.35);
}

.brand-title {
  font-family: var(--font-slab);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.deck-badge {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #F59E0B);
  color: #111317;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(229, 169, 60, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-primary-hover), #FBBF24);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229, 169, 60, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #282D3A;
  border-color: var(--border-hover);
  color: #FFF;
}

.btn-icon-only {
  padding: 0.6rem;
  width: 40px;
  height: 40px;
}

/* Tips Banner */
.tips-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0.75rem 2rem;
  background: rgba(23, 26, 33, 0.75);
  border-bottom: 1px solid rgba(45, 50, 62, 0.6);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tip-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tip-kbd {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tip-separator {
  width: 4px;
  height: 4px;
  background: var(--border-color);
  border-radius: 50%;
}

/* ==========================================================================
   Deck Canvas & Tiles Grid
   ========================================================================== */
.deck-canvas {
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}

@media (min-width: 1200px) {
  .tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2.2rem;
  }
}

/* Rounded Square Tile */
.slide-tile {
  aspect-ratio: 1 / 1;
  background: var(--bg-tile);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-tile);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-smooth), border-color var(--transition-fast), box-shadow var(--transition-smooth);
  user-select: none;
}

.slide-tile:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.slide-tile.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(229, 169, 60, 0.4), var(--shadow-md);
}

/* Drag & Drop Reordering States */
.slide-tile.dragging {
  opacity: 0.35;
  transform: scale(0.95);
  border-style: dashed;
}

.slide-tile.drag-over {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(229, 169, 60, 0.6);
  transform: scale(1.03);
}

/* Image File Drop Zone Indicator (Active Drag) */
.slide-tile.file-drag-over::after {
  content: 'Drop Image to Replace';
  position: absolute;
  inset: 0;
  background: rgba(229, 169, 60, 0.92);
  color: #111;
  font-weight: 800;
  font-family: var(--font-slab);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  z-index: 30;
  backdrop-filter: blur(4px);
}

/* Tile Preview Container */
.tile-preview-wrap {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image Slide Preview */
.tile-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.slide-tile:hover .tile-preview-img {
  transform: scale(1.05);
}

/* Text Slide Preview in Tile */
.tile-preview-text-canvas {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tile-preview-quote-text {
  font-family: var(--font-slab);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-preview-quote-author {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tile-preview-list-headline {
  font-family: var(--font-slab);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  width: 100%;
  text-align: left;
}

.tile-preview-list-items {
  width: 100%;
  text-align: left;
  font-size: 0.75rem;
  opacity: 0.85;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tile-preview-body-headline {
  font-family: var(--font-slab);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.tile-preview-body-text {
  font-size: 0.75rem;
  opacity: 0.8;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tile Badges & Action Overlays */
.tile-index-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(17, 19, 23, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFF;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  z-index: 10;
}

.tile-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(17, 19, 23, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--accent-primary);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  z-index: 10;
}

/* Hover Action Bar */
.tile-action-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(15, 17, 21, 0.95), transparent);
  padding: 1.5rem 0.75rem 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition-fast);
  z-index: 15;
}

.slide-tile:hover .tile-action-bar {
  opacity: 1;
  transform: translateY(0);
}

.tile-action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(32, 36, 46, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tile-action-btn:hover {
  background: var(--accent-primary);
  color: #111;
  transform: scale(1.08);
}

.tile-action-btn.delete-btn:hover {
  background: var(--accent-coral);
  color: #FFF;
}

/* ==========================================================================
   Add Slide Tile (+)
   ========================================================================== */
.add-slide-tile {
  aspect-ratio: 1 / 1;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-tile);
  background: rgba(23, 26, 33, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  color: var(--text-muted);
  user-select: none;
  position: relative;
}

.add-slide-tile:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(229, 169, 60, 0.06);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(229, 169, 60, 0.12);
}

.add-slide-tile.file-drag-over {
  border-color: var(--accent-primary);
  border-style: solid;
  background: rgba(229, 169, 60, 0.2);
  color: #FFF;
}

.add-plus-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.add-slide-tile:hover .add-plus-icon {
  background: var(--accent-primary);
  color: #111;
  border-color: var(--accent-primary);
  transform: scale(1.1) rotate(90deg);
}

.add-slide-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.add-slide-subtext {
  font-size: 0.75rem;
  opacity: 0.65;
  text-align: center;
  padding: 0 1rem;
}

/* ==========================================================================
   Slide Themes & Geometric Styling
   ========================================================================== */
/* 1. Midnight & Ochre */
.theme-midnight-ochre,
.presentation-stage.theme-midnight-ochre {
  background-color: #111317;
  color: #F5F5F0;
  --theme-accent: #E5A93C;
  --theme-accent-bg: rgba(229, 169, 60, 0.12);
  --theme-border: #2D313B;
}
.theme-midnight-ochre .geometric-accent,
.presentation-stage.theme-midnight-ochre .geometric-accent {
  background: linear-gradient(135deg, #E5A93C, #F59E0B);
}

/* 2. Terracotta & Sand */
.theme-terracotta-sand,
.presentation-stage.theme-terracotta-sand {
  background-color: #F5EFEB;
  color: #2D1E17;
  --theme-accent: #C85A32;
  --theme-accent-bg: rgba(200, 90, 50, 0.12);
  --theme-border: #DCD3CB;
}
.theme-terracotta-sand .geometric-accent,
.presentation-stage.theme-terracotta-sand .geometric-accent {
  background: linear-gradient(135deg, #C85A32, #E07A5F);
}

/* 3. Cobalt & Coral */
.theme-cobalt-coral,
.presentation-stage.theme-cobalt-coral {
  background-color: #0F1E4A;
  color: #FFFFFF;
  --theme-accent: #FF5C47;
  --theme-accent-bg: rgba(255, 92, 71, 0.15);
  --theme-border: #253C7D;
}
.theme-cobalt-coral .geometric-accent,
.presentation-stage.theme-cobalt-coral .geometric-accent {
  background: linear-gradient(135deg, #FF5C47, #FF8A7A);
}

/* 4. Forest & Cream */
.theme-forest-cream,
.presentation-stage.theme-forest-cream {
  background-color: #14281E;
  color: #FAF6ED;
  --theme-accent: #86C191;
  --theme-accent-bg: rgba(134, 193, 145, 0.15);
  --theme-border: #274536;
}
.theme-forest-cream .geometric-accent,
.presentation-stage.theme-forest-cream .geometric-accent {
  background: linear-gradient(135deg, #86C191, #A3D9AC);
}

/* 5. Obsidian & Mint */
.theme-obsidian-lime,
.presentation-stage.theme-obsidian-lime {
  background-color: #0A0B0E;
  color: #FFFFFF;
  --theme-accent: #27E29F;
  --theme-accent-bg: rgba(39, 226, 159, 0.12);
  --theme-border: #222631;
}
.theme-obsidian-lime .geometric-accent,
.presentation-stage.theme-obsidian-lime .geometric-accent {
  background: linear-gradient(135deg, #27E29F, #10B981);
}

/* 6. Monochrome Bold */
.theme-monochrome-bold,
.presentation-stage.theme-monochrome-bold {
  background-color: #FFFFFF;
  color: #111827;
  --theme-accent: #111827;
  --theme-accent-bg: rgba(17, 24, 39, 0.08);
  --theme-border: #E5E7EB;
}
.theme-monochrome-bold .geometric-accent,
.presentation-stage.theme-monochrome-bold .geometric-accent {
  background: #111827;
}

/* ==========================================================================
   Slide Typography & Layout Content Styles
   ========================================================================== */

/* Universal Layout Container */
.slide-content-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8vmin;
  position: relative;
  overflow: hidden;
}

/* Decorative Geometric Elements */
.geo-backdrop-shape {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
  z-index: 1;
}

.geo-corner-bracket {
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: var(--theme-accent, var(--accent-primary));
  opacity: 0.4;
  pointer-events: none;
}
.geo-corner-bracket.tl { top: 5vmin; left: 5vmin; border-top: 3px solid; border-left: 3px solid; }
.geo-corner-bracket.br { bottom: 5vmin; right: 5vmin; border-bottom: 3px solid; border-right: 3px solid; }

/* 1. Quote Layout */
.layout-quote-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 82%;
  z-index: 2;
  position: relative;
}

.quote-mark-icon {
  color: var(--theme-accent, var(--accent-primary));
  opacity: 0.7;
  font-family: var(--font-slab-heavy);
  font-size: clamp(3rem, 5.5vw, 5rem);
  line-height: 0.8;
  user-select: none;
}

.quote-mark-open {
  align-self: flex-start;
  margin-bottom: 0.25rem;
}

.quote-mark-close {
  align-self: flex-end;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

.quote-box {
  font-family: var(--font-slab);
  font-weight: 800;
  font-size: clamp(1.8rem, 4.2vw, 3.8rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
  outline: none;
  word-break: break-word;
}

.quote-author-line {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.9;
}

.author-em-dash {
  color: var(--theme-accent, var(--accent-primary));
  font-family: var(--font-slab);
  font-weight: 800;
  font-size: 1.25em;
  line-height: 1;
}

.author-box {
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  outline: none;
}

/* 2. List Layout */
.layout-list-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 80%;
  max-width: 900px;
  z-index: 2;
  position: relative;
}

.list-header-box {
  font-family: var(--font-slab);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.2;
  margin-bottom: 2rem;
  outline: none;
  border-bottom: 4px solid var(--theme-accent, var(--accent-primary));
  padding-bottom: 0.75rem;
  width: 100%;
}

.list-items-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
}

.list-item-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  font-weight: 600;
  line-height: 1.35;
}

.list-item-bullet {
  flex-shrink: 0;
  width: clamp(2rem, 3.5vw, 3rem);
  height: clamp(2rem, 3.5vw, 3rem);
  border-radius: var(--radius-sm);
  background: var(--theme-accent, var(--accent-primary));
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-slab);
  font-weight: 900;
  font-size: clamp(0.9rem, 1.8vw, 1.3rem);
}

.list-item-bullet.dot-style {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.list-item-content {
  flex: 1;
  outline: none;
  word-break: break-word;
}

.remove-list-item-btn {
  background: rgba(255, 92, 71, 0.12);
  border: 1px solid rgba(255, 92, 71, 0.3);
  color: var(--accent-coral);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0;
  transition: all var(--transition-fast);
  margin-left: 0.5rem;
}

.list-item-row:hover .remove-list-item-btn {
  opacity: 1;
}

.remove-list-item-btn:hover {
  background: var(--accent-coral);
  color: #FFF;
  transform: scale(1.15);
}

/* 3. Text Layout */
.layout-text-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 80%;
  max-width: 920px;
  z-index: 2;
  position: relative;
}

.text-headline-box {
  font-family: var(--font-slab);
  font-weight: 900;
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  outline: none;
  letter-spacing: -0.02em;
}

.text-body-box {
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  line-height: 1.6;
  font-weight: 500;
  opacity: 0.92;
  outline: none;
  word-break: break-word;
}

/* ==========================================================================
   WYSIWYG Modal Dialog (Fullscreen)
   ========================================================================== */
.editor-modal {
  position: fixed;
  inset: 0;
  margin: 0;
  border: none;
  background: var(--bg-app);
  padding: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  box-shadow: none;
  outline: none;
}

.editor-modal::backdrop {
  background: rgba(8, 10, 14, 0.95);
}

.modal-shell {
  background: var(--bg-surface);
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.layout-selector {
  display: flex;
  background: var(--bg-app);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 4px;
}

.layout-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.layout-tab:hover {
  color: #FFF;
}

.layout-tab.active {
  background: var(--accent-primary);
  color: #111;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
}

/* WYSIWYG Toolbar */
.wysiwyg-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1.8rem;
  background: #1C2029;
  border-bottom: 1px solid var(--border-color);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.toolbar-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}

.color-palette {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.color-swatch:hover {
  transform: scale(1.2);
  border-color: #FFF;
}

.custom-color-btn {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  color: var(--text-main);
}

.custom-color-btn input[type="color"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  inset: -10px;
}

.tool-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.tool-btn:hover {
  background: #2D3240;
  border-color: var(--border-hover);
  color: #FFF;
}

.toolbar-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.toolbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border-color);
  margin: 0 0.25rem;
}

/* Modal Body Preview Canvas (Maximized Space for Slide) */
.modal-body {
  display: flex;
  flex: 1;
  padding: 1.25rem 2rem;
  gap: 1.5rem;
  overflow: hidden;
  background: var(--bg-app);
  height: calc(100vh - 125px);
}

.editor-canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  min-height: 0;
}

.slide-preview-frame {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  max-width: min(100%, calc((100vh - 145px) * 16 / 9));
  max-height: calc(100vh - 145px);
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
}

/* Sidebar for list controls */
.editor-sidebar {
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.sidebar-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
  z-index: 20;
}

.footer-actions {
  display: flex;
  gap: 0.75rem;
}

/* ==========================================================================
   Fullscreen Presentation Overlay (Pristine — Slide Only)
   ========================================================================== */
.presentation-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  outline: none;
}

.presentation-overlay.active {
  display: flex;
}

/* Presentation Stage */
.presentation-stage {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.presentation-stage.stage-image {
  background-color: #000000;
}

/* Presentation Image: Fit to screen nicely without distortion */
.presentation-image-wrap {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: relative;
}

.presentation-image {
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Perfect fit to screen as requested */
  user-select: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-header {
    padding: 1rem 1.25rem;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .deck-canvas {
    padding: 1.5rem 1.25rem;
  }
}
