:root {
  --accent: #007aff;
  --color-blue: #007aff;
  --color-purple: #af52de;
  --color-orange: #ff9500;
  --color-gray: #8e8e93;

  --radius-panel: 20px;
  --radius-btn: 12px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* LIGHT MODE */
:root, [data-theme="light"] {
  --bg-app: #f2f2f7;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-main: #1c1c1e;
  --text-muted: #8e8e93;
  --border-color: rgba(0, 0, 0, 0.08);
  
  --hover-bg: rgba(0, 0, 0, 0.05);
  --active-bg: rgba(0, 0, 0, 0.08);
  --hover-btn-bg: #ffffff;
}

/* AUTOMATISCH PER SYSTEM */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-app: #0c0c0e;
    --bg-card: #1c1c1e;
    --bg-sidebar: #1c1c1e;
    --text-main: #ffffff;
    --text-muted: #8e8e93;
    --border-color: rgba(255, 255, 255, 0.08);

    --hover-bg: rgba(255, 255, 255, 0.08);
    --active-bg: rgba(255, 255, 255, 0.14);
    --hover-btn-bg: #2c2c2e;
  }
}

/* DARK MODE */
[data-theme="dark"] {
  --bg-app: #0c0c0e;
  --bg-card: #1c1c1e;
  --bg-sidebar: #1c1c1e;
  --text-main: #ffffff;
  --text-muted: #8e8e93;
  --border-color: rgba(255, 255, 255, 0.08);

  --hover-bg: rgba(255, 255, 255, 0.08);
  --active-bg: rgba(255, 255, 255, 0.14);
  --hover-btn-bg: #2c2c2e;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, 
.app-container, 
.main-content, 
.sidebar-panel, 
.settings-card, 
.floating-toggle-btn,
.segment-btn,
.segmented-control {
  transition: background-color 0.2s ease, 
              color 0.2s ease, 
              border-color 0.2s ease, 
              box-shadow 0.2s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  padding: 12px;
  gap: 12px;
  position: relative;
}

.main-content {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding-top: 2rem;
}

.floating-toggle-btn {
  position: fixed;
  top: 0rem;
  left: 0rem;
  z-index: 50;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.floating-toggle-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.floating-toggle-btn:hover {
  transform: scale(1.04);
  background: var(--hover-btn-bg);
}

.floating-toggle-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Vollbild-Modus für den Editor */
.editor-view {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg-app);
  display: none;
  overflow: hidden;
}

.editor-view.active {
  display: flex;
  flex-direction: column;
}

.app-container.editor-active {
  visibility: hidden;
}

