/* Mac OS Tahoe - Design System */

:root {
    /* Colors */
    --surface-glass: rgba(30, 30, 35, 0.6);
    --surface-glass-heavy: rgba(20, 20, 25, 0.85);
    --surface-border: rgba(255, 255, 255, 0.15);
    --surface-highlight: rgba(255, 255, 255, 0.05);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.4);

    --accent-primary: #0a84ff;
    --accent-glow: rgba(10, 132, 255, 0.4);
    --accent-gradient: linear-gradient(135deg, #0AB6FF 0%, #0044FF 100%);

    --danger: #ff453a;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Typography */
    --font-heading: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'Menlo', monospace;

    /* Effects */
    --blur-strength: 20px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
    --glass-border: 1px solid var(--surface-border);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-body);
    background-color: #000;
    color: var(--text-primary);
}

/* Base UI Elements */

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Glass Panels */
.glass-panel {
    background: var(--surface-glass);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Header / Status Bar */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-lg);
    z-index: 100;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-title .icon {
    font-size: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Floating Inspector (Right Side) */
.inspector-panel {
    position: fixed;
    top: 64px;
    right: 24px;
    width: 300px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    z-index: 50;
    padding: 20px;
    transform-origin: top right;
    animation: slideIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Scrollbar styling */
.inspector-panel::-webkit-scrollbar {
    width: 6px;
}

.inspector-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Sections */
.section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

/* Inputs */
.control-group {
    margin-bottom: 16px;
}

label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Custom Select */
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    transition: border-color 0.2s;
}

select:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

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

/* Slider */
.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

/* Color Picker */
.color-row {
    display: flex;
    gap: 12px;
}

.color-input-wrapper {
    flex: 1;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 150%;
    height: 150%;
    position: absolute;
    top: -25%;
    left: -25%;
    padding: 0;
    cursor: pointer;
    background: none;
}

/* Color labels */
.color-label {
    position: absolute;
    bottom: 2px;
    left: 6px;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.6);
    pointer-events: none;
    font-weight: 600;
    mix-blend-mode: overlay;
}

/* Dock (Bottom) */
.dock-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px;
    border-radius: 24px;
    display: flex;
    gap: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.dock-item {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-primary);
    position: relative;
}

.dock-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-8px) scale(1.1);
}

.dock-item.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px var(--accent-glow);
}

.dock-icon {
    font-size: 20px;
}

.dock-tooltip {
    position: absolute;
    top: -35px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.dock-item:hover .dock-tooltip {
    opacity: 1;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 40px;
    letter-spacing: 4px;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-progress {
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    transform: translateX(-100%);
    animation: loading 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(0%);
    }
}

/* Info Overlay */
.info-overlay {
    position: fixed;
    top: 64px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    z-index: 50;
}

.info-badge {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .inspector-panel {
        width: 100%;
        bottom: 100px;
        top: auto;
        left: 0;
        right: 0;
        border-radius: 24px 24px 0 0;
        transform-origin: bottom;
    }

    .dock-container {
        bottom: 12px;
        padding: 8px;
    }
}