:root {
    --bg: #080808;
    --surface: #111111;
    --surface2: #171717;
    --border: rgba(255, 255, 255, 0.1);
    --text: #e0e0e0;
    --muted: #a0a0a0;
    --accent: #f0f0f0;
    --accent-light: rgba(240, 240, 240, 0.6);
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --radius: 8px;
    --transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-premium: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

:root[data-theme="light"] {
    --bg: #dadce0;
    --surface: #FFFFFF;
    --surface2: #E5E7EB;
    --editor-bg: #ebebec;
    --border: #D1D5DB;
    --border-hover: #111827;
    --border-active: #000000;
    --border-subtle: #F0F0F0;
    --text: #111827;
    --muted: #4B5563;
    --placeholder: #6B7280;
    --accent: #000000;
    --accent-light: rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.08);
}

.flicker-mask {
    opacity: 0.2 !important;
}

#preview-stage, #editor-minimap {
    transition: opacity 0.4s ease-in-out;
}

select option {
    background-color: #111111;
    color: #ffffff;
}

:root[data-theme="light"] select option {
    background-color: #ffffff;
    color: #171717;
}

optgroup {
    background-color: #080808;
    color: var(--muted);
    font-size: 0.75rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto; /* allow page scroll */
    position: relative;
    min-height: 100vh;
    overscroll-behavior: none; /* Prevent elastic bouncing/swipe-down/swipe-horizontal */
    touch-action: pan-y; /* Only allow vertical panning on body to prevent horizontal jitter */
}

body.no-scroll {
    overflow: hidden !important;
}


/* ================================================================
   SCROLLBAR (Sleek and modern)
   ================================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}
