/* ===== OpenPresentation Styles ===== */
:root {
  --primary: #1a73e8;
  --primary-light: #d3e3fd;
  --primary-bg: rgba(26,115,232,0.1);
  --border: #d4d4d4;
  --border-light: #e0e0e0;
  --header-bg: #f8f9fa;
  --toolbar-bg: #f3f3f3;
  --text: #202124;
  --text-sec: #5f6368;
  --surface: #fff;
  --danger: #d93025;
  --radius: 4px;
  --shadow: 0 2px 8px rgba(0,0,0,.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.18);
  --canvas-bg: #e0e0e0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
}

/* ===== Menu Bar ===== */
.menu-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 32px;
  padding: 0 4px;
  user-select: none;
  position: relative;
  z-index: 100;
  flex-shrink: 0;
}
.menu-item { position: relative; }
.menu-label {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background .1s;
}
.menu-label:hover { background: rgba(0,0,0,.06); }
.menu-item.open .menu-label { background: rgba(0,0,0,.1); }
.menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px 0;
  z-index: 1000;
}
.menu-item.open .menu-dropdown { display: block; }
.menu-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 16px;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background .1s;
}
.menu-action:hover { background: var(--primary-bg); }
.menu-shortcut {
  font-size: 11px;
  color: var(--text-sec);
  margin-left: 24px;
}
.menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

/* ===== Toolbar ===== */
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 8px;
  background: var(--toolbar-bg);
  border-bottom: 1px solid var(--border);
  min-height: 36px;
  user-select: none;
  flex-shrink: 0;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  border-right: 1px solid var(--border-light);
}
.toolbar-group:last-child { border-right: none; }
.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  transition: background .1s;
}
.toolbar-btn:hover { background: rgba(0,0,0,.08); }
.toolbar-btn:active, .toolbar-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.toolbar-select {
  height: 28px;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 12px;
  cursor: pointer;
  max-width: 140px;
}
.toolbar-select-sm { width: 60px; }
.toolbar-color {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: var(--radius);
}
.toolbar-color:hover { background: rgba(0,0,0,.08); }
.toolbar-color input[type="color"] {
  width: 16px;
  height: 16px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: none;
}

/* ===== Main Content ===== */
.pres-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ===== Slide Panel (Left Sidebar) ===== */
.slide-panel {
  width: 200px;
  min-width: 200px;
  background: var(--header-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.slide-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slide-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: white;
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s;
  flex-shrink: 0;
}
.slide-thumb:hover { border-color: var(--primary); }
.slide-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.slide-thumb-number {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-sec);
  background: rgba(255,255,255,.8);
  padding: 1px 4px;
  border-radius: 2px;
  z-index: 1;
}
.slide-thumb-inner {
  position: absolute;
  top: 0; left: 0;
  width: 960px;
  height: 540px;
  transform-origin: top left;
  pointer-events: none;
  overflow: hidden;
}
.btn-add-slide {
  margin: 8px;
  padding: 8px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-sec);
  transition: background .1s;
}
.btn-add-slide:hover { background: var(--primary-bg); color: var(--primary); }

/* ===== Slide Canvas Container ===== */
.slide-canvas-container {
  flex: 1;
  background: var(--canvas-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 20px;
}
.slide-canvas {
  width: 960px;
  height: 540px;
  background: white;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  position: relative;
  overflow: hidden;
  transform-origin: center center;
}

/* ===== Slide Elements ===== */
.slide-element {
  position: absolute;
  cursor: move;
  user-select: none;
}
.slide-element.selected {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.slide-element.editing {
  cursor: text;
  outline: 2px solid var(--primary);
}

/* Resize handles */
.resize-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border: 1px solid white;
  border-radius: 1px;
  z-index: 10;
}
.resize-handle.nw { top: -4px; left: -4px; cursor: nw-resize; }
.resize-handle.n  { top: -4px; left: 50%; margin-left: -4px; cursor: n-resize; }
.resize-handle.ne { top: -4px; right: -4px; cursor: ne-resize; }
.resize-handle.w  { top: 50%; margin-top: -4px; left: -4px; cursor: w-resize; }
.resize-handle.e  { top: 50%; margin-top: -4px; right: -4px; cursor: e-resize; }
.resize-handle.sw { bottom: -4px; left: -4px; cursor: sw-resize; }
.resize-handle.s  { bottom: -4px; left: 50%; margin-left: -4px; cursor: s-resize; }
.resize-handle.se { bottom: -4px; right: -4px; cursor: se-resize; }

/* Textbox elements */
.slide-element-textbox {
  padding: 8px;
  overflow: hidden;
  word-wrap: break-word;
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 1.3;
}
.slide-element-textbox[contenteditable="true"] {
  cursor: text;
  outline: none;
}

/* Image elements */
.slide-element-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Shape elements */
.slide-element-shape {
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-element-shape svg {
  width: 100%;
  height: 100%;
}

/* Table elements */
.slide-element-table table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.slide-element-table td {
  border: 1px solid var(--border);
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
}
.slide-element-table td:focus {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* ===== Status Bar ===== */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  padding: 0 12px;
  background: var(--toolbar-bg);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-sec);
  user-select: none;
  flex-shrink: 0;
}

/* ===== Slideshow Overlay ===== */
.slideshow-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
}
.slideshow-overlay:hover { cursor: default; }
.slideshow-slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.slideshow-slide .slide-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
}
.slideshow-number {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: rgba(255,255,255,.6);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.slideshow-number.show { opacity: 1; }

/* Transition animations (30 effects) */
@keyframes pres-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pres-slide-left { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes pres-slide-right { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes pres-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pres-slide-down { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes pres-zoom-in { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pres-zoom-out { from { transform: scale(2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pres-flip { from { transform: perspective(800px) rotateY(90deg); } to { transform: perspective(800px) rotateY(0); } }
@keyframes pres-flip-vertical { from { transform: perspective(800px) rotateX(90deg); } to { transform: perspective(800px) rotateX(0); } }
@keyframes pres-rotate-in { from { transform: rotate(180deg) scale(0); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes pres-spin-in { from { transform: rotate(720deg) scale(0); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes pres-bounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.08); opacity: 1; }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
@keyframes pres-swing {
  0% { transform: perspective(800px) rotateY(70deg); opacity: 0; }
  40% { transform: perspective(800px) rotateY(-10deg); opacity: 1; }
  70% { transform: perspective(800px) rotateY(5deg); }
  100% { transform: perspective(800px) rotateY(0); }
}
@keyframes pres-blur { from { filter: blur(20px); opacity: 0; } to { filter: blur(0); opacity: 1; } }
@keyframes pres-fade-up { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pres-fade-down { from { transform: translateY(-60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pres-fade-left { from { transform: translateX(60px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes pres-fade-right { from { transform: translateX(-60px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes pres-fade-scale { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pres-stretch-h { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes pres-stretch-v { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes pres-rotate-left { from { transform: rotate(-90deg); opacity: 0; transform-origin: top left; } to { transform: rotate(0); opacity: 1; } }
@keyframes pres-rotate-right { from { transform: rotate(90deg); opacity: 0; transform-origin: top right; } to { transform: rotate(0); opacity: 1; } }
@keyframes pres-skew { from { transform: skewX(30deg) scaleX(0.5); opacity: 0; } to { transform: skewX(0) scaleX(1); opacity: 1; } }
@keyframes pres-fold { from { transform: perspective(800px) rotateX(-90deg); transform-origin: top; opacity: 0; } to { transform: perspective(800px) rotateX(0); opacity: 1; } }
@keyframes pres-door-left { from { transform: perspective(800px) rotateY(-90deg); transform-origin: left; opacity: 0; } to { transform: perspective(800px) rotateY(0); opacity: 1; } }
@keyframes pres-door-right { from { transform: perspective(800px) rotateY(90deg); transform-origin: right; opacity: 0; } to { transform: perspective(800px) rotateY(0); opacity: 1; } }
@keyframes pres-drop {
  0% { transform: translateY(-100%); opacity: 0; }
  60% { transform: translateY(5%); opacity: 1; }
  80% { transform: translateY(-2%); }
  100% { transform: translateY(0); }
}
@keyframes pres-glitch {
  0% { transform: translate(10px, -10px); opacity: 0; filter: hue-rotate(90deg); }
  20% { transform: translate(-8px, 5px); opacity: 0.5; filter: hue-rotate(180deg); }
  40% { transform: translate(5px, -3px); opacity: 0.7; filter: hue-rotate(270deg); }
  60% { transform: translate(-3px, 8px); opacity: 0.8; filter: hue-rotate(360deg); }
  80% { transform: translate(2px, -2px); opacity: 0.9; filter: none; }
  100% { transform: translate(0, 0); opacity: 1; filter: none; }
}
@keyframes pres-curtain {
  0% { clip-path: inset(0 100% 0 0); opacity: 0; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; }
}

/* ===== Dialogs ===== */
.dialog {
  position: fixed;
  z-index: 900;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  max-width: 90vw;
}
.find-dialog { top: 60px; right: 20px; }
.center-dialog { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 14px;
}
.dialog-close {
  width: 24px; height: 24px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-sec);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dialog-close:hover { background: rgba(0,0,0,.08); }
.dialog-body { padding: 16px; }
.dialog-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.dialog-row label { font-size: 12px; min-width: 60px; color: var(--text-sec); }
.dialog-input {
  flex: 1;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
}
.dialog-input:focus { border-color: var(--primary); outline: none; }
.dialog-actions { gap: 8px; justify-content: flex-end; }
.dialog-btn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  font-size: 12px;
  transition: background .1s;
}
.dialog-btn:hover { background: rgba(0,0,0,.06); }
.dialog-btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.dialog-btn-primary:hover { background: #1765cc; }
.find-status { font-size: 11px; color: var(--text-sec); margin-left: 8px; }

/* ===== Layout Grid ===== */
.layout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.layout-item {
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-sec);
  background: var(--header-bg);
}
.layout-item:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.layout-item-title {
  width: 60%;
  height: 4px;
  background: var(--text-sec);
  border-radius: 2px;
}
.layout-item-content {
  width: 80%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}

/* ===== Shape Grid ===== */
.shape-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.shape-item {
  width: 60px;
  height: 60px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s, border-color .1s;
  background: var(--header-bg);
}
.shape-item:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
}
.shape-item svg {
  width: 36px;
  height: 36px;
}

/* ===== Help Panel ===== */
.help-panel {
  position: fixed;
  top: 0; right: 0;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 800;
  display: flex;
  flex-direction: column;
}
.help-panel-body { flex: 1; overflow-y: auto; padding: 12px; }
.shortcuts-panel { width: 440px; }
.shortcuts-body { padding: 16px; }
.shortcut-category {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin: 16px 0 8px;
}
.shortcut-category:first-child { margin-top: 0; }
.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border-light);
}
.shortcut-keys {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  background: var(--header-bg);
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--border);
  font-weight: 500;
}
.shortcut-desc { color: var(--text-sec); }

/* ===== Save Notification ===== */
.save-notification {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: #323232;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.save-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Dialog Overlay ===== */
.dialog-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,.4);
  z-index: 850;
}
.dialog-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ===== Theme Picker ===== */
.theme-dialog { width: 620px; max-height: 80vh; }
.theme-dialog .dialog-body { overflow-y: auto; max-height: calc(80vh - 50px); }
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.theme-grid-section {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-sec);
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--border-light);
}
.theme-grid-section:first-child { padding-top: 0; }
.theme-swatch {
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.theme-swatch:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.theme-swatch-preview {
  width: 100%;
  aspect-ratio: 16/9;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  position: relative;
}
.theme-swatch-title {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.theme-swatch-body {
  font-size: 7px;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.theme-swatch-accent {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 18px;
  height: 10px;
  border-radius: 3px;
}
.theme-swatch-name {
  padding: 5px 4px;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  border-top: 1px solid var(--border-light);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.theme-swatch-custom {
  position: relative;
}
.theme-swatch-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s;
  z-index: 1;
}
.theme-swatch:hover .theme-swatch-delete { opacity: 1; }

/* ===== Theme Generator ===== */
.theme-gen-dialog { width: 600px; }
.theme-gen-body {
  display: flex;
  gap: 20px;
}
.theme-gen-controls {
  flex: 1;
  min-width: 0;
}
.theme-gen-controls .dialog-row {
  margin-bottom: 10px;
}
.theme-gen-controls label {
  min-width: 80px;
}
.tg-color {
  width: 36px;
  height: 28px;
  padding: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: none;
}
.theme-gen-preview {
  width: 220px;
  flex-shrink: 0;
}
.tg-preview-slide {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.tg-preview-title {
  font-size: 14px;
  font-weight: 700;
}
.tg-preview-body {
  font-size: 10px;
}
.tg-preview-accent {
  width: 50px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  margin-top: 4px;
}
.theme-gen-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ===== Dark Theme ===== */
body.dark-theme {
  --primary: #8ab4f8;
  --primary-light: #2d3a4a;
  --primary-bg: rgba(138,180,248,0.15);
  --border: #555;
  --border-light: #444;
  --header-bg: #2a2a2a;
  --toolbar-bg: #2d2d2d;
  --text: #e8eaed;
  --text-sec: #9aa0a6;
  --surface: #1e1e1e;
  --canvas-bg: #333;
}
body.dark-theme .slide-canvas { background: #2a2a2a; }
body.dark-theme .slide-thumb { background: #2a2a2a; }
body.dark-theme .save-notification { background: #555; }

/* ===== Print ===== */
@media print {
  .menu-bar, .toolbar, .slide-panel, .status-bar,
  .dialog, .help-panel, .save-notification, .slideshow-overlay { display: none !important; }
  body { background: white !important; overflow: visible !important; }
  #app { height: auto !important; }
  .pres-main { display: block !important; }
  .slide-canvas-container {
    background: white !important;
    padding: 0 !important;
    display: block !important;
  }
  .slide-canvas {
    box-shadow: none !important;
    page-break-after: always;
    margin: 0 auto;
  }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .slide-panel { width: 120px; min-width: 120px; }
  .toolbar {
    padding: 2px 4px;
    gap: 1px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .toolbar-group { padding: 0 2px; border-right: none; }
  .toolbar-select { max-width: 80px; font-size: 11px; }
  .help-panel, .shortcuts-panel { width: 100vw; }
  .dialog { max-width: 95vw; }
}
