/* CSS reset & variables */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131a2e;
  --bg-panel: rgba(30, 41, 59, 0.4);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-secondary: #a855f7;
  --accent-secondary-hover: #9333ea;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 40px -4px rgba(0, 0, 0, 0.3);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-panel: rgba(255, 255, 255, 0.7);
  --border-color: rgba(15, 23, 42, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-lg: 0 12px 40px -4px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 10px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.logo-text h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

/* Workspace Layout */
.workspace {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 73px);
}

@media (max-width: 1024px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    overflow-y: auto;
    height: auto;
  }
}

/* Panel Styles */
.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-primary);
}

.editor-panel {
  border-right: 1px solid var(--border-color);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(15, 23, 42, 0.1);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.panel-title i {
  color: var(--accent-primary);
  width: 20px;
  height: 20px;
}

.panel-title h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  outline: none;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-secondary-hover));
  color: white;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.btn-accent:hover {
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.35);
  transform: translateY(-1px);
}

.btn-large {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Select Picker */
.select-picker {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.select-picker:focus {
  border-color: var(--accent-primary);
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(15, 23, 42, 0.05);
  overflow-x: auto;
}

.tool-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-main);
  transition: all var(--transition-fast);
}

.tool-btn i {
  width: 16px;
  height: 16px;
}

.tool-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Textarea Wrapper */
.textarea-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#markdown-input {
  width: 100%;
  height: 100%;
  border: none;
  background-color: transparent;
  color: var(--text-primary);
  padding: 1.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: background-color var(--transition-fast);
}

#markdown-input:focus {
  background-color: rgba(59, 130, 246, 0.01);
}

.panel-footer {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: rgba(15, 23, 42, 0.05);
  font-weight: 500;
}

/* Ratio Buttons */
.ratio-selector {
  display: flex;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 2px;
  border-radius: var(--radius-sm);
}

.ratio-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all var(--transition-fast);
}

.ratio-btn i {
  width: 14px;
  height: 14px;
}

.ratio-btn:hover {
  color: var(--text-primary);
}

.ratio-btn.active {
  background-color: var(--accent-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Preview Viewport & Virtual Scaling */
.preview-viewport-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.preview-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Virtual Slide Resolution Containers */
.slide-container {
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transform-origin: center center;
  transition: transform 0.2s ease, width 0.3s ease, height 0.3s ease;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 4rem; /* Virtual padding */
  box-sizing: border-box;
}

/* Background Geometric Watermark Circle */
.slide-container::after {
  content: '';
  position: absolute;
  bottom: -15%;
  right: -15%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  opacity: 0.04;
  border: 1px solid var(--accent-primary);
  pointer-events: none;
  z-index: 1;
}

.slide-container.layout-cover::after {
  background-color: #FFFFFF;
  border-color: #FFFFFF;
  opacity: 0.05;
}

/* Left Accent Stripe on Cover Slides */
.slide-container.layout-cover::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4%;
  background-color: var(--accent-secondary, var(--accent-primary));
  z-index: 10;
}

/* Toggle option to turn off shapes on a slide */
.slide-container.shapes-off::before,
.slide-container.shapes-off::after {
  display: none !important;
}

/* Define fixed virtual sizes for clean html2canvas rendering */
.slide-container.ratio-16-9 {
  width: 1200px;
  height: 675px;
}

.slide-container.ratio-1-1 {
  width: 1080px;
  height: 1080px;
  padding: 5rem;
}

.slide-container.ratio-4-5 {
  width: 1080px;
  height: 1350px;
  padding: 6rem 5rem;
}

/* Progress Bar / Indikator Slide (Visual Timeline) */
.slide-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 6px;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
  z-index: 10;
}

/* Badges / Tag Kategori (Aesthetic Label) */
.slide-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

/* Slide Content Core Styling */
.slide-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.5rem;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  word-wrap: break-word;
}

/* Slide layout directives */
.slide-content.layout-center {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.slide-content.layout-center .slide-badge {
  align-self: center;
}

.slide-content.layout-cover {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.slide-content.layout-cover .slide-badge {
  align-self: center;
}

/* Slide elements */
.slide-content h1, 
.slide-content h2, 
.slide-content h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
}

.slide-content h1 {
  font-size: 4rem;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.slide-content h2 {
  font-size: 3rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.slide-content p {
  font-size: 1.75rem;
  line-height: 1.6;
}

.slide-content ul {
  font-size: 1.65rem;
  line-height: 1.8;
  margin-left: 2.5rem;
}

.slide-content li {
  margin-bottom: 0.75rem;
}

/* Icon list item rendering */
.slide-content li.icon-list-item {
  list-style: none;
  position: relative;
  padding-left: 2.5rem;
}

.slide-content li.icon-list-item .list-icon {
  position: absolute;
  left: 0;
  top: 0.1em;
  font-size: 1.8rem;
}

/* Big Number Typography / Watermark Art */
.big-number {
  font-family: var(--font-display);
  font-size: 11rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0.12;
  position: absolute;
  top: 2rem;
  right: 3rem;
  pointer-events: none;
  letter-spacing: -0.05em;
  z-index: 1;
}

/* Elegant horizontal divider */
.slide-divider {
  border: none;
  height: 2px;
  background-color: var(--border-color);
  margin: 1.5rem 0;
  width: 100%;
}

/* Smart Highlighter */
.slide-content mark, 
.slide-content .highlight {
  background: linear-gradient(120deg, rgba(254, 240, 138, 0.4) 0%, rgba(253, 224, 71, 0.6) 100%);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  color: inherit;
  font-weight: 700;
  display: inline;
}

/* Fancy rounded images with elegant borders */
.slide-content img {
  max-width: 100%;
  max-height: 60%;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 4px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
  margin-top: 1rem;
}

/* Large Emoji layout */
.emoji-only {
  font-size: 8rem !important;
  text-align: center;
  display: block;
  margin: auto;
  animation: emoji-bounce 2s ease-in-out infinite;
}

@keyframes emoji-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Carousel Control Overlay */
.carousel-nav {
  position: absolute;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  z-index: 5;
}

.nav-arrow {
  background: transparent;
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-arrow:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-indicators {
  display: flex;
  gap: 0.5rem;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.indicator-dot.active {
  width: 20px;
  border-radius: 10px;
  background-color: var(--accent-primary);
}

/* SVG Chart Visualizations */
.chart-container {
  width: 100%;
  height: 60%;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
}

.chart-visual {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 1rem 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  height: 100%;
}

.chart-visual-pie {
  align-items: center;
  justify-content: center;
  padding: 0;
  border-bottom: none;
}

/* Bar Chart */
.chart-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 12%;
  height: 100%;
  justify-content: flex-end;
  gap: 0.5rem;
}

.chart-bar-rect {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(to top, var(--accent-primary), var(--accent-secondary));
  position: relative;
  animation: bar-grow 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: bottom;
  min-height: 5px;
}

.chart-bar-value {
  position: absolute;
  top: -2.2rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-align: center;
  width: 100%;
}

.chart-bar-label {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

@keyframes bar-grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* Pie Chart Visual */
.chart-pie-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  width: 100%;
  height: 100%;
}

.chart-pie-svg-container {
  position: relative;
  width: 250px;
  height: 250px;
}

.chart-pie-svg {
  transform: rotate(-90deg);
  border-radius: 50%;
}

.chart-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

.chart-pie-legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
}

.chart-pie-legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.chart-pie-legend-text {
  color: rgba(255, 255, 255, 0.8);
}

/* Line Chart Visual */
.chart-line-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-line-path {
  fill: none;
  stroke: url(#line-grad);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: line-draw 1.5s ease-out forwards;
}

@keyframes line-draw {
  to { stroke-dashoffset: 0; }
}

.chart-line-dot {
  fill: var(--accent-secondary);
  stroke: white;
  stroke-width: 3;
  transition: r 0.2s ease;
}

.chart-line-dot:hover {
  r: 10;
}

/* Multi-column layout grid styling */
.slide-columns-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  width: 100%;
  height: auto;
  align-items: flex-start;
}

.slide-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Premium Rounded Column Cards styling (e.g. red, orange, yellow, green, white) */
.slide-col.col-card {
  padding: 2.2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  height: 100%;
  box-sizing: border-box;
}

.slide-col.col-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* Inside card alignment overrides */
.slide-col.col-card h3,
.slide-col.col-card h2,
.slide-col.col-card h1 {
  text-align: center !important;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Card Circle Emoji/Icon Container */
.card-circle-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background-color: rgba(31, 78, 44, 0.12); /* transparent theme light green tint */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  color: var(--accent-primary);
}

.slide-col.col-card:hover .card-circle-icon {
  transform: scale(1.08);
}

/* Card Preset Modifiers */
.col-card-red {
  background-color: #A81A1A !important;
  color: #FFFFFF !important;
}
.col-card-orange {
  background-color: #ED7D31 !important;
  color: #FFFFFF !important;
}
.col-card-yellow {
  background-color: #B59E10 !important;
  color: #FFFFFF !important;
}
.col-card-green {
  background-color: #1F4E2C !important;
  color: #FFFFFF !important;
}
.col-card-white {
  background-color: #FFFFFF !important;
  color: #1F2937 !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.col-card-dark {
  background-color: #1E293B !important;
  color: #FFFFFF !important;
}

/* Dark mode overrides for white cards */
body:not(.light-theme) .col-card-white {
  background-color: #FFFFFF !important;
  color: #1F2937 !important;
}

/* Enforce white text for colored background cards */
.col-card-red *,
.col-card-orange *,
.col-card-yellow *,
.col-card-green *,
.col-card-dark * {
  color: #FFFFFF !important;
}

/* Card icon light white background for colored cards */
.col-card-red .card-circle-icon,
.col-card-orange .card-circle-icon,
.col-card-yellow .card-circle-icon,
.col-card-green .card-circle-icon,
.col-card-dark .card-circle-icon {
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: #FFFFFF !important;
}

/* Callout Box / Blockquote Sorotan Premium */
.slide-content blockquote {
  background: rgba(255, 255, 255, 0.04);
  border-left: 6px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 2rem 2.5rem;
  margin: 1.5rem 0;
  font-style: normal;
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.slide-content blockquote p {
  font-size: 1.6rem;
  margin: 0;
}

/* 9 Slide Themes Definition (including 3 new request styles) */

/* A. Minimalist */
.theme-minimalist {
  background: #F9F9FB;
  color: #19191B;
  --accent-primary: #70707A;
  --accent-secondary: #19191B;
}
.theme-minimalist h1, .theme-minimalist h2 {
  color: #19191B;
}
.theme-minimalist mark {
  background: rgba(112, 112, 122, 0.15);
  color: #19191B;
}
.theme-minimalist blockquote {
  background: #FFFFFF;
  border-left-color: #70707A;
  color: #19191B;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* B. Cyberpunk */
.theme-cyberpunk {
  background: #0B0C10;
  color: #C5C6C7;
  --accent-primary: #66FCF1;
  --accent-secondary: #45A29E;
}
.theme-cyberpunk h1, .theme-cyberpunk h2 {
  color: #66FCF1;
  text-shadow: 0 0 10px rgba(102, 252, 241, 0.3);
}
.theme-cyberpunk mark {
  background: rgba(102, 252, 241, 0.2);
  color: #66FCF1;
  box-shadow: 0 0 15px rgba(102, 252, 241, 0.4);
}
.theme-cyberpunk blockquote {
  background: #1F2833;
  border-left-color: #66FCF1;
  color: #FFFFFF;
}

/* C. Earthy */
.theme-earthy {
  background: #F4F1EA;
  color: #3E3B33;
  --accent-primary: #A3B19B;
  --accent-secondary: #8F7A6E;
}
.theme-earthy h1, .theme-earthy h2 {
  color: #3E3B33;
}
.theme-earthy mark {
  background: rgba(163, 177, 155, 0.25);
  color: #3E3B33;
}
.theme-earthy blockquote {
  background: #EAE6DD;
  border-left-color: #A3B19B;
  color: #3E3B33;
}

/* D. Hero Academy */
.theme-hero-academy {
  background: #F4EFE3;
  color: #2B2523;
  --accent-primary: #A81A1A;
  --accent-secondary: #E3A834;
}
.theme-hero-academy h1, .theme-hero-academy h2 {
  color: #A81A1A;
}
.theme-hero-academy mark {
  background: rgba(227, 168, 52, 0.22);
  color: #2B2523;
  border-bottom: 2px solid #E3A834;
}
.theme-hero-academy blockquote {
  background: #EAE5D9;
  border-left-color: #A81A1A;
  color: #2B2523;
}

/* E. Kesmavet Karantina */
.theme-kesmavet-karantina {
  background: #FFFFFF;
  color: #1F2937;
  --accent-primary: #065F46;
  --accent-secondary: #6B7280;
}
.theme-kesmavet-karantina h1, .theme-kesmavet-karantina h2 {
  color: #065F46;
}
.theme-kesmavet-karantina mark {
  background: rgba(6, 95, 70, 0.15);
  color: #1F2937;
  border-bottom: 2px solid #065F46;
}
.theme-kesmavet-karantina blockquote {
  background: #F3F4F6;
  border-left-color: #065F46;
  color: #1F2937;
}

/* F. Kesmavet Batu */
.theme-kesmavet-batu {
  background: #F6F7F2;
  color: #1F2937;
  --accent-primary: #1F4E2C;
  --accent-secondary: #70AD47;
}
.theme-kesmavet-batu h1, .theme-kesmavet-batu h2 {
  color: #1F4E2C;
}
.theme-kesmavet-batu mark {
  background: rgba(112, 173, 71, 0.2);
  color: #1F2937;
  border-bottom: 2px solid #70AD47;
}
.theme-kesmavet-batu blockquote {
  background: #EAECE2;
  border-left-color: #1F4E2C;
  color: #1F2937;
}

/* Layout Cover for Kesmavet Batu (Forest Green) */
.theme-kesmavet-batu.layout-cover {
  background: #1F4E2C !important;
  color: #FFFFFF !important;
}
.theme-kesmavet-batu.layout-cover h1,
.theme-kesmavet-batu.layout-cover h2,
.theme-kesmavet-batu.layout-cover h3,
.theme-kesmavet-batu.layout-cover p,
.theme-kesmavet-batu.layout-cover li,
.theme-kesmavet-batu.layout-cover strong {
  color: #FFFFFF !important;
}
.theme-kesmavet-batu.layout-cover .slide-badge {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #FFFFFF !important;
}
.theme-kesmavet-batu.layout-cover .slide-divider {
  border-top-color: rgba(255, 255, 255, 0.3) !important;
}



/* 1. Dark Modern */
.theme-dark-modern {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  --accent-primary: #38bdf8;
  --accent-secondary: #818cf8;
}
.theme-dark-modern h1, .theme-dark-modern h2 {
  color: #38bdf8;
}
.theme-dark-modern mark {
  background: rgba(56, 189, 248, 0.2);
  border-bottom: 2px solid #38bdf8;
}

/* 2. Neon Tech */
.theme-neon-tech {
  background: linear-gradient(135deg, #09090b 0%, #18181b 100%);
  color: #f4f4f5;
  border: 1px solid rgba(168, 85, 247, 0.2);
  --accent-primary: #a855f7;
  --accent-secondary: #ec4899;
}
.theme-neon-tech h1, .theme-neon-tech h2 {
  background: linear-gradient(to right, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.theme-neon-tech mark {
  background: rgba(236, 72, 153, 0.25);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.5);
  border-radius: 4px;
}

/* 3. Ocean Wave */
.theme-glass-blue {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: #ffffff;
  --accent-primary: #60a5fa;
  --accent-secondary: #34d399;
}
.theme-glass-blue .slide-content {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 3rem;
  border-radius: var(--radius-md);
}
.theme-glass-blue h1, .theme-glass-blue h2 {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 4. Emerald Success */
.theme-emerald-success {
  background: linear-gradient(135deg, #022c22 0%, #065f46 100%);
  color: #ecfdf5;
  --accent-primary: #34d399;
  --accent-secondary: #fbbf24;
}
.theme-emerald-success h1, .theme-emerald-success h2 {
  color: #34d399;
}
.theme-emerald-success mark {
  background: rgba(52, 211, 153, 0.2);
  border-bottom: 2px solid #34d399;
}

/* 5. Warm Orange */
.theme-warm-orange {
  background: linear-gradient(135deg, #2d1a10 0%, #452410 100%);
  color: #fff7ed;
  --accent-primary: #f97316;
  --accent-secondary: #facc15;
}
.theme-warm-orange h1, .theme-warm-orange h2 {
  color: #f97316;
}
.theme-warm-orange mark {
  background: rgba(249, 115, 22, 0.2);
  border-bottom: 2px solid #f97316;
}

/* 6. Cream Light */
.theme-minimalist-light {
  background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
  color: #292524;
  --accent-primary: #78716c;
  --accent-secondary: #d97706;
}
.theme-minimalist-light h1, .theme-minimalist-light h2 {
  color: #1c1917;
  border-bottom: 3px solid #d97706;
  padding-bottom: 0.5rem;
  display: inline-block;
}
.theme-minimalist-light mark {
  background: #fef08a;
  color: #000;
}

/* Theme Selector Grid */
.theme-selection-area {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: rgba(15, 23, 42, 0.05);
}

.theme-selection-area h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.5rem;
}

@media (max-width: 1200px) {
  .theme-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-preview {
  width: 100%;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.theme-card.active .theme-preview {
  box-shadow: 0 0 0 2px var(--accent-primary), var(--shadow-md);
  transform: translateY(-2px);
}

.theme-name {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

.theme-card:hover .theme-preview {
  transform: translateY(-2px);
}

/* Export Panel */
.export-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

@media (max-width: 480px) {
  .export-actions {
    grid-template-columns: 1fr;
  }
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 850px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-enter var(--transition-normal);
}

@keyframes modal-enter {
  from { transform: scale(0.95) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.btn-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

.guide-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.guide-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--accent-primary);
}

.guide-card p, .guide-card li {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.guide-card ul {
  padding-left: 1.25rem;
}

.guide-card code {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: monospace;
  color: white;
}

.guide-card pre {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.8rem;
  color: #a7f3d0;
  overflow-x: auto;
  margin-top: 0.5rem;
}

/* Loading Overlay */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#loading-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
