:root {
    --bg-deep-space: #1A1D21;
    --bg-space: #2d2d2d;
    --bg-interface: #181818;
    --bg-interface-hover: #3C424D;
    --text-primary: #ffffff;
    --text-secondary: #A0A2A8;
    --text-disabled: #6A6E77;
    --text-on-accent: #FFFFFF;
    --border-color: #4444;
    --border-interactive: #525760;
    --border-focus: #4A90E2;
    --accent-primary: #4A90E2;
    --accent-primary-hover: #5AA3F2;
    --accent-secondary: #D47AE8;
    --accent-danger: #E94B3C;
    --playhead-color: #FF5353;
    --spacing-base: 8px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --track-height: 55px;
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-interface);
    color: var(--text-primary);
}

#user-dropdown {
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

input[type="range"]::-webkit-slider-runnable-track {
    background: #444;
    height: 0.25rem;
    border-radius: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -0.375rem;
    background-color: #999;
    height: 1rem;
    width: 1rem;
    border-radius: 9999px;
}

input[type="range"]:hover::-webkit-slider-thumb {
    background-color: #bbb;
}

#animationTabs {
    position: relative;
    display: flex;
    align-items: center;
}

#textAnimationTabs {
    position: relative;
    display: flex;
    align-items: center;
}

#activeIndicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: #fff;
    /* white underline */
    border-radius: 999px;
    will-change: transform, width;
}

.selected {
    outline: 2px solid #0af;
    /* background-color: #3b82f6 !important; */
    border-radius: 6px;
}

.active {
    outline: 1px solid #0af;
    /* background-color: #3b82f6 !important; */
    border-radius: 8px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-space);
    transition: .4s;
    border-radius: 20px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked+.slider {
    background-color: #2563eb;
}

.toggle-switch input:checked+.slider:before {
    transform: translateX(14px);
}

.is-dragging {
    opacity: 1;
    /* outline: 2px dashed #fbbf24; */
}

.drag-over-target {
    outline: 2px dashed #34d399;
    background-color: #556272;
}

.media-library {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-radius: 6px;
    padding: 4px;
    min-height: 60px;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.library-remove {
    position: absolute;
    top: 0;
    right: 0;
    background: red;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
    padding: 0 2px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: #181818;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #444;
}

#warningToast {
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateY(-20px);
}

#warningToast.show {
    opacity: 1;
    transform: translateY(0);
}

.context-menu {
    display: none;
    position: absolute;
    z-index: 1000;
    background-color: #333;
    border: 1px solid #4444;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-family: sans-serif;
    font-size: 14px;
}

.context-menu ul {
    list-style: none;
    margin: 0;
    padding: 5px 0;
}

.context-menu li {
    padding: 8px 15px;
    color: #eee;
    cursor: pointer;
}

.context-menu li:hover {
    background-color: #4a90e2;
}

.context-menu {
    display: none;
    position: absolute;
    background-color: #181818;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border: 1px solid #4444;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    padding: 5px 0;
}

.context-menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.context-menu ul li {
    display: flex;
    align-items: center;
    color: white;
    font: semibold;
    padding: 10px 15px;
    cursor: pointer;
    user-select: none;
}

.context-menu ul li:hover {
    background-color: #444;
}

.menu-icon {
    margin-right: 12px;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-icon svg {
    width: 100%;
    height: 100%;
}

.context-menu li.separator {
    height: 1px;
    background-color: #4444;
    padding: 0;
    margin: 5px 0;
    display: block;
}

.context-menu .submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 195px;
    background-color: #181818;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    border: 1px solid #4444;
    border-radius: 5px;
    margin: 3px;
}

.context-menu li:hover>.submenu {
    display: block;
}

.context-menu ul li.disabled {
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

.context-menu ul li.disabled .submenu {
    display: none !important;
}

#menu-group, #menu-ungroup {
    display: none;
}