/* RESET & VARIABLES */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --app-bg: #0a0a0f;
  --app-surface: #13131a;
  --app-surface-2: #1a1a24;
  --app-surface-3: #22222f;
  --app-border: #2a2a3a;
  --app-border-lt: #3a3a4a;
  --app-accent: #6c63ff;
  --app-accent-2: #ff6584;
  --app-accent-3: #43e97b;
  --app-text: #f0f0f8;
  --app-text-2: #9090b0;
  --app-text-3: #5a5a7a;
  --sidebar-w: 300px;
  --header-h: 56px;
  --radius: 10px;
  --radius-sm: 6px;
  --ease: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "Segoe UI", system-ui, sans-serif;
}

html,
body {
  height: 100%;
  overflow: hidden;
}
body {
  font-family: var(--font);
  background: var(--app-bg);
  color: var(--app-text);
  font-size: 14px;
  line-height: 1.5;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--app-border) transparent;
}
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-thumb {
  background: var(--app-border);
  border-radius: 2px;
}

/* UTILITIES */
.hidden {
  display: none !important;
}
.gradient-text {
  background: linear-gradient(135deg, var(--app-accent), var(--app-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* TOAST */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(80px);
  opacity: 0;
  transition: var(--ease);
  z-index: 1000;
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* PRINT */
@media print {
  body {
    background: white;
    color: black;
    overflow: auto;
  }
  #header,
  #edit-sidebar,
  #present-nav,
  #mode-edit,
  #mode-video {
    display: none !important;
  }
  #mode-present {
    display: flex !important;
  }
  #present-content {
    overflow: visible;
  }
  .sg-section {
    page-break-inside: avoid;
  }
  :root {
    --app-bg: white;
    --app-surface: #f5f5f5;
    --app-surface-2: #eee;
    --app-surface-3: #e0e0e0;
    --app-border: #ddd;
    --app-text: #111;
    --app-text-2: #444;
    --app-text-3: #888;
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  #mode-edit {
    flex-direction: column-reverse;
  }
  #edit-sidebar {
    width: 100%;
    height: 50vh;
    border-right: none;
    border-top: 1px solid var(--app-border);
  }
  #edit-preview {
    height: 50vh;
  }
  #mode-present {
    flex-direction: column;
  }
  #present-nav {
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 8px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--app-border);
    display: flex;
    flex-wrap: nowrap;
  }
  .nav-title,
  .nav-actions {
    display: none;
  }
  .nav-item {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 12px;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  .nav-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--app-accent);
  }
  .lp-features-grid {
    grid-template-columns: 1fr;
  }
  .sg-cover {
    padding: 32px 24px;
  }
  .sg-cover-title {
    font-size: 32px;
  }
  .present-sections {
    padding: 24px;
  }
  .mode-tab .tab-label {
    display: none;
  }
}
