/* ==========================================================================
   PREZI AUTHENTIC SPATIAL CANVAS THEME & LAYOUT WITH REAL VISUAL ASSETS
   Matches 100% the user's Prezi screenshot & reference presentation:
   - Light academic background with subtle dot grid
   - German handwritten manuscript texture (Bottom-Left)
   - Watercolor / ink splash artwork (Top-Right)
   - Manila vintage note paper background (Bottom-Right)
   - Framed cards with philosopher portraits & evolution graphics
   - Fluid camera flight, zoom-in, zoom-out, pan transitions
   ========================================================================== */

:root {
  --bg-canvas: #f6f7f9;
  --grid-dot-color: rgba(30, 40, 55, 0.12);
  --frame-bg: #ffffff;
  --frame-border: #d2d6dc;
  --frame-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  --frame-shadow-active: 0 0 0 3px #1864ab, 0 18px 45px rgba(24, 100, 171, 0.22);
  
  --primary-accent: #1971c2;
  --primary-dark: #1864ab;
  --gold-accent: #d4af37;
  --crimson-accent: #c92a2a;
  
  --text-main: #1f242e;
  --text-muted: #495057;
  --text-light: #868e96;

  --sidebar-width: 230px;
  --topbar-height: 48px;
  --bottombar-height: 52px;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-canvas);
  user-select: none;
}

/* ==========================================================================
   PREZI TOPBAR
   ========================================================================== */
.prezi-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: #ffffff;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.prezi-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1864ab;
  font-weight: 700;
  font-size: 1.1rem;
}

.presentation-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #343a40;
}

.badge-public {
  background: #e7f5ff;
  color: #1971c2;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

/* TOPBAR CENTER EDITING TOOLS */
.topbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tool {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  user-select: none;
}

.btn-tool:hover {
  background: #edf2ff;
  border-color: #74c0fc;
  color: #1864ab;
}

.btn-tool:active {
  transform: translateY(1px);
}

.save-status-indicator {
  font-size: 0.75rem;
  color: #868e96;
  margin-left: 8px;
  font-weight: 500;
}

.save-status-indicator.saving {
  color: #f59f00;
}

.save-status-indicator.saved {
  color: #2b8a3e;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-topbar {
  background: transparent;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-topbar:hover {
  background: #f8f9fa;
  border-color: #ced4da;
}

.btn-topbar.btn-primary {
  background: #1971c2;
  border-color: #1971c2;
  color: #ffffff;
}

.btn-topbar.btn-primary:hover {
  background: #1864ab;
}

/* ==========================================================================
   PREZI MAIN CONTAINER & SIDEBAR
   ========================================================================== */
.prezi-main-container {
  position: absolute;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
}

.prezi-sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: #ffffff;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.prezi-sidebar.collapsed {
  transform: translateX(calc(-1 * var(--sidebar-width)));
}

.sidebar-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f3f5;
  gap: 8px;
}

.btn-add-frame {
  background: #2b8a3e;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-toggle-sidebar {
  background: none;
  border: none;
  color: #868e96;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 6px;
  border-radius: 4px;
}

.btn-toggle-sidebar:hover {
  background: #f1f3f5;
  color: #343a40;
}

.frames-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.frame-thumb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  position: relative;
}

.frame-thumb-item:hover {
  background: #f8f9fa;
  border-color: #ced4da;
  transform: translateY(-1px);
}

.frame-thumb-item.active {
  background: #edf2ff;
  border-color: #4dabf7;
  box-shadow: 0 0 0 2px rgba(24, 100, 171, 0.2);
}

.thumb-card-preview {
  width: 100%;
  height: 90px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  background: #fdfdfd;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.thumb-img-ov {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-img-card {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fafafa;
}

.thumb-home-icon {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #ffffff;
  padding: 3px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  display: flex;
  color: #1864ab;
}

.thumb-badge-index {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  border-radius: 50%;
  background: #1864ab;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.thumb-mini-title {
  padding: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #343a40;
  line-height: 1.3;
}

.thumb-caption {
  font-size: 0.75rem;
  font-weight: 500;
  color: #868e96;
  margin-top: 6px;
  text-align: center;
}

/* ==========================================================================
   INFINITE VIEWPORT & SPATIAL WORLD CANVAS
   ========================================================================== */
.prezi-viewport {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: grab;
  /* Prezi Dot Grid Pattern: Chấm mờ tinh tế, thanh thoát, không bị đậm */
  background-color: #ffffff;
  background-image: radial-gradient(rgba(30, 40, 55, 0.075) 1px, transparent 1px);
  background-size: 11px 11px;
}

.prezi-viewport:active {
  cursor: grabbing;
}

.prezi-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 3400px;
  height: 2400px;
  transform-origin: 0 0;
  transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* ==========================================================================
   AUTHENTIC PREZI GRAPHIC ASSETS (Extracted from User Screenshot)
   ========================================================================== */
/* German handwritten manuscript texture (Bottom-Left) */
.bg-manuscript-layer {
  position: absolute;
  bottom: 120px;
  left: 580px;
  width: 900px;
  height: 600px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
}

.img-manuscript {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: contrast(105%);
}

/* Watercolor ink wash splash (Top-Right) */
.bg-splash-layer {
  position: absolute;
  top: 100px;
  right: 500px;
  width: 1100px;
  height: 700px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.75;
}

.img-splash {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Manila vintage note paper background (Bottom-Right) */
.bg-note-paper-layer {
  position: absolute;
  bottom: 240px;
  right: 480px;
  width: 480px;
  height: 640px;
  pointer-events: none;
  z-index: 2;
  transform: rotate(-4deg);
  opacity: 0.9;
}

.img-note-paper {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   HERO TITLE (Overview Focal Point matching screenshot)
   ========================================================================== */
.title-cluster {
  position: absolute;
  top: 280px;
  left: 200px;
  width: 820px;
  padding: 20px;
  z-index: 10;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.9rem;
  font-weight: 900;
  line-height: 1.12;
  color: #1a1a24;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 1.6rem;
  font-weight: 400;
  color: #495057;
  line-height: 1.4;
  margin-bottom: 24px;
}

.hero-meta {
  display: flex;
  gap: 12px;
}

.meta-tag {
  background: #ffffff;
  border: 1px solid #dee2e6;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #495057;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

/* ==========================================================================
   FRAME CLUSTERS & CARDS (Mindmap layout matching screenshot)
   ========================================================================== */
.frame-cluster {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 50px;
  z-index: 5;
}

/* Topic Cluster 1: Intro (Center-Left) */
.cluster-intro {
  top: 860px;
  left: 220px;
  width: 640px;
  gap: 45px;
}

/* Topic Cluster 2: Principles (Top-Right, on top of Watercolor) */
.cluster-principles {
  top: 220px;
  left: 1520px;
  width: 760px;
  gap: 45px;
}

/* Topic Cluster 3: Spiral Process (Middle Center) */
.cluster-spiral-process {
  top: 920px;
  left: 1040px;
  width: 880px;
  gap: 65px;
}

/* Topic Cluster 4: Examples (Far-Right Top) */
.cluster-examples {
  top: 360px;
  left: 2460px;
  width: 680px;
  gap: 45px;
}

/* Topic Cluster 5: Conclusion & Q&A (Bottom-Right, on Vintage Paper) */
.cluster-conclusion {
  top: 1260px;
  left: 2150px;
  width: 760px;
  gap: 45px;
}

/* Common Card Styling */
.canvas-card {
  background: var(--frame-bg);
  border: 1px solid var(--frame-border);
  border-radius: 12px;
  padding: 26px 30px;
  box-shadow: var(--frame-shadow);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  min-width: 280px;
  min-height: 120px;
}

.canvas-card:hover {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
  border-color: #adb5bd;
}

.canvas-card.current-active {
  box-shadow: var(--frame-shadow-active);
  border-color: var(--primary-accent);
}

/* Card Selection Frame (Edit Mode) */
.canvas-card.card-selected,
.canvas-item.card-selected {
  outline: 2px solid #1971c2 !important;
  outline-offset: 4px;
  box-shadow: 0 16px 40px rgba(25, 113, 194, 0.25) !important;
  z-index: 60 !important;
}

/* 8 Resize Handles */
.card-resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 2px solid #1971c2;
  border-radius: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  z-index: 70;
  display: none;
  box-sizing: border-box;
}

.canvas-card.card-selected .card-resize-handle,
.canvas-item.card-selected .card-resize-handle {
  display: block;
}

.card-resize-handle.handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.card-resize-handle.handle-n  { top: -6px; left: calc(50% - 6px); cursor: ns-resize; }
.card-resize-handle.handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.card-resize-handle.handle-e  { top: calc(50% - 6px); right: -6px; cursor: ew-resize; }
.card-resize-handle.handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.card-resize-handle.handle-s  { bottom: -6px; left: calc(50% - 6px); cursor: ns-resize; }
.card-resize-handle.handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.card-resize-handle.handle-w  { top: calc(50% - 6px); left: -6px; cursor: ew-resize; }

/* Floating Card Action Bar (Appears right above selected card) */
.card-action-bar {
  position: absolute;
  top: -46px;
  left: 0;
  display: none;
  align-items: center;
  gap: 6px;
  background: #1e2430;
  color: #ffffff;
  border-radius: 8px;
  padding: 5px 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  z-index: 80;
  font-size: 0.78rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  white-space: nowrap;
  user-select: none;
}

.canvas-card.card-selected .card-action-bar,
.canvas-item.card-selected .card-action-bar {
  display: flex;
}

.card-action-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #f1f3f5;
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s, color 0.15s;
}

.card-action-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.card-action-btn.btn-drag-handle {
  cursor: grab;
  background: #1971c2;
  color: #ffffff;
  font-weight: 600;
}

.card-action-btn.btn-drag-handle:active {
  cursor: grabbing;
}

.card-action-btn.btn-del {
  color: #ff8787;
}

.card-action-btn.btn-del:hover {
  background: rgba(235, 77, 75, 0.35);
  color: #ffc9c9;
}

/* Hide handles and action bar during Present Mode */
body.in-present-mode .card-resize-handle,
body.in-present-mode .card-action-bar,
body.in-present-mode .canvas-card.card-selected,
body.in-present-mode .canvas-item.card-selected {
  display: none !important;
  outline: none !important;
  box-shadow: var(--frame-shadow) !important;
}

/* Card Inner Flex Layout with Photos */
.card-inner-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.card-text-col {
  flex: 1;
}

.card-media-col {
  width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.card-media-col.fixed-bust {
  width: 110px;
}

.card-portrait-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ced4da;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card-portrait-img.antique-bust {
  height: 125px;
  object-fit: cover;
  background: #000;
}

.card-antique-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card-field-img {
  width: 100%;
  height: 115px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card-evo-img {
  width: 160px;
  height: 100px;
  object-fit: contain;
}

.img-caption-tag {
  font-size: 0.72rem;
  color: var(--text-light);
  text-align: center;
}

.card-step-badge {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  border-radius: 50%;
  background: #1864ab;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  margin-bottom: 8px;
}

.card-header-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-accent);
  background: #edf2ff;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.card-header-badge.gold-glow {
  background: #fff9db;
  color: #b58900;
}

.card-title-large {
  font-family: 'Playfair Display', serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: #1a1a24;
  margin-bottom: 12px;
  line-height: 1.3;
}

.card-title-prezi {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 10px;
  line-height: 1.35;
}

/* ==========================================================================
   INTERACTIVE INLINE EDITING & IMAGE PASTING STYLES
   ========================================================================== */
[contenteditable="true"] {
  outline: none;
  border-radius: 4px;
  transition: background-color 0.2s, box-shadow 0.2s;
  cursor: text;
}

[contenteditable="true"]:hover {
  background-color: rgba(24, 100, 171, 0.04);
}

[contenteditable="true"]:focus {
  background-color: rgba(24, 100, 171, 0.08);
  box-shadow: 0 0 0 2px rgba(24, 100, 171, 0.25);
}

body.in-present-mode [contenteditable="true"] {
  cursor: inherit !important;
}

body.in-present-mode [contenteditable="true"]:hover,
body.in-present-mode [contenteditable="true"]:focus {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* User Inserted Floating Images & Resizable Cards */
.user-placed-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid #ffffff;
  pointer-events: none;
}

.user-image-wrapper {
  position: absolute;
  width: 280px;
  height: 200px;
  min-width: 80px;
  min-height: 60px;
  display: inline-block;
  cursor: move;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 50;
  transition: box-shadow 0.2s;
}

.user-image-wrapper:hover {
  box-shadow: 0 12px 32px rgba(24, 100, 171, 0.3);
}

/* Resize corner handle (Góc kéo giãn kích thước ảnh) */
.user-image-wrapper .img-resize-handle {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: #1890ff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  cursor: se-resize;
  display: none;
  z-index: 60;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.user-image-wrapper:hover .img-resize-handle,
.user-image-wrapper.selected .img-resize-handle {
  display: block;
}

.user-image-wrapper .btn-del-img {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e03131;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  z-index: 60;
}

.user-image-wrapper:hover .btn-del-img,
.user-image-wrapper.selected .btn-del-img {
  display: flex;
}

body.in-present-mode .user-image-wrapper .btn-del-img,
body.in-present-mode .user-image-wrapper .img-resize-handle {
  display: none !important;
}

body.in-present-mode .user-image-wrapper .btn-del-img {
  display: none !important;
}

/* Paste Notification Toast */
.prezi-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f242e;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.prezi-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.card-body-text {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-micro-quote {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-light);
}

/* Principles Dual List */
.principles-dual-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.p-item {
  background: #f8f9fa;
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 3px solid #1864ab;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Compare Card Body */
.compare-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.cmp-box {
  padding: 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.cmp-good {
  background: #edf2ff;
  border-top: 3px solid #1864ab;
  color: #1864ab;
}

.cmp-bad {
  background: #fff5f5;
  border-top: 3px solid #c92a2a;
  color: #c92a2a;
}

/* Prezi Cycle Triad */
.prezi-cycle-triad {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}

.cycle-box {
  flex: 1;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
}

.cy-badge {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  background: var(--primary-accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.cy-badge.crimson { background: var(--crimson-accent); }
.cy-badge.gold { background: var(--gold-accent); }

.cycle-box h5 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cycle-box p {
  font-size: 0.8rem;
  color: var(--text-light);
}

.cy-arrow {
  font-size: 1.4rem;
  color: #adb5bd;
}

/* ==========================================================================
   SPIRAL DIAGRAM IN PREZI CANVAS (SLIDE 08)
   ========================================================================== */
.spiral-hub-card {
  background: #ffffff;
}

.spiral-quote {
  font-family: 'Caveat', cursive, sans-serif;
  font-size: 1.35rem;
  color: #b58900;
  margin-bottom: 14px;
}

.prezi-spiral-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.prezi-spiral-svg {
  width: 460px;
  height: 310px;
  flex-shrink: 0;
  overflow: visible;
}

.axis-svg-label {
  font-size: 12px;
  font-weight: 600;
  fill: #868e96;
}

.pz-spiral-path {
  fill: none;
  stroke-width: 4.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.25, 1, 0.5, 1), stroke-width 0.3s;
}

.pz-spiral-path.turn-1 { stroke: url(#pz-grad-1); }
.pz-spiral-path.turn-2 { stroke: url(#pz-grad-2); }
.pz-spiral-path.turn-3 { stroke: url(#pz-grad-3); filter: url(#pz-gold-glow); }

.spiral-captions-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.s-cap {
  background: #f8f9fa;
  border-left: 3px solid #ced4da;
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.s-cap.cap-1 { border-color: var(--gold-accent); }
.s-cap.cap-2 { border-color: var(--crimson-accent); }
.s-cap.cap-3 { border-color: #ffd700; background: #fffdf5; }

/* Lenin Quote Strip in Conclusion */
.lenin-quote-strip {
  border-left: 4px solid var(--primary-accent);
  padding: 10px 16px;
  background: #f8f9fa;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  margin: 12px 0;
  color: #1a1a24;
}

.lenin-quote-strip cite {
  display: block;
  font-size: 0.85rem;
  color: #868e96;
  font-style: normal;
  margin-top: 4px;
  font-family: 'Be Vietnam Pro', sans-serif;
}

/* Methodology Grid Mini */
.methodology-grid-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.m-card {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
  border-left: 2px solid #1864ab;
}

/* Quiz Prezi Card */
.qr-prezi-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8f9fa;
  padding: 14px;
  border-radius: 8px;
  margin-top: 10px;
}

.qr-code-graphic {
  background: #fff;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  display: flex;
}

.qr-prezi-desc strong {
  display: block;
  font-size: 0.92rem;
  color: #1864ab;
  margin-bottom: 4px;
}

.qr-prezi-desc p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   PREZI BOTTOM FLOATING CONTROLS
   ========================================================================== */
.prezi-bottom-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  height: var(--bottombar-height);
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 18px;
  z-index: 100;
}

.nav-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: #495057;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: #f1f3f5;
  color: #1971c2;
}

.divider-v {
  width: 1px;
  height: 20px;
  background: #dee2e6;
  margin: 0 4px;
}

.zoom-level {
  font-size: 0.82rem;
  font-weight: 600;
  color: #495057;
  min-width: 44px;
  text-align: center;
}

.current-stop-indicator {
  display: flex;
  flex-direction: column;
  border-left: 1px solid #dee2e6;
  padding-left: 16px;
}

#current-stop-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #212529;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stop-counter {
  font-size: 0.72rem;
  color: #868e96;
}

/* ==========================================================================
   PRESENTATION FULLSCREEN OVERRIDE (Giống hệt Hình 2 người dùng cung cấp)
   ========================================================================== */
body.in-present-mode .prezi-topbar {
  display: none !important;
}

body.in-present-mode .prezi-sidebar {
  display: none !important;
}

body.in-present-mode .prezi-bottom-bar {
  display: none !important;
}

body.in-present-mode .prezi-main-container {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
}

/* Khi trình chiếu: Bỏ hoàn toàn lưới chấm, nền trắng tinh khôi chuẩn Hình 2 */
body.in-present-mode .prezi-viewport {
  background-image: none !important;
  background-color: #ffffff !important;
}

/* RIGHT FLOATING BUTTONS (Hai nút tròn đen Home & Next/Prev ở cạnh phải như Hình 2) */
.prezi-present-right-controls {
  display: none;
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

body.in-present-mode .prezi-present-right-controls {
  display: flex;
}

.present-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #18191c;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  outline: none;
}

.present-circle-btn:hover {
  background: #2b2d33;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.4);
}

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

.present-circle-btn.btn-present-exit {
  background: rgba(30, 32, 38, 0.7);
  width: 36px;
  height: 36px;
  margin-top: 8px;
  align-self: center;
}

.present-circle-btn.btn-present-exit:hover {
  background: #c92a2a;
  border-color: #ff8787;
}

/* ==========================================================================
   PREZI FLOATING TOOLBARS (Text: Hình 2 & Image: Hình 1)
   ========================================================================== */
.prezi-floating-text-toolbar,
.prezi-floating-image-toolbar {
  position: absolute;
  background: #ffffff;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16), 0 1px 4px rgba(0,0,0,0.08);
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  z-index: 5000;
  transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1);
  user-select: none;
}

.prezi-floating-text-toolbar.show,
.prezi-floating-image-toolbar.show {
  display: flex;
}

body.in-present-mode .prezi-floating-text-toolbar,
body.in-present-mode .prezi-floating-image-toolbar {
  display: none !important;
}

.fl-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  color: #303133;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.fl-btn:hover {
  background: #f2f3f5;
  border-color: #e4e7ed;
}

.fl-btn.active {
  background: #e6f7ff;
  border-color: #91d5ff;
  color: #1890ff;
}

.fl-btn.font-ask-ai {
  background: #fdf2ff;
  color: #a825ba;
  font-weight: 600;
  border-color: #f0c9ff;
}

.fl-divider {
  width: 1px;
  height: 18px;
  background: #e4e7ed;
  margin: 0 4px;
}

.fl-select {
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.82rem;
  background: #ffffff;
  color: #303133;
  outline: none;
  font-family: inherit;
}

.fl-size-label {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.fl-color-input {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
}

/* Selection bounding boxes (Viền xanh chọn khung giống ảnh mẫu) */
.prezi-selected-el {
  outline: 2px solid #1890ff !important;
  outline-offset: 3px;
  position: relative;
}

.prezi-selected-img {
  outline: 2px solid #1890ff !important;
  outline-offset: 2px;
}


