:root {
    --bg: #05070e;
    --card-bg: rgba(10, 16, 30, 0.85);
    --border: rgba(255, 255, 255, 0.08);
    --accent: #38bdf8;
    --green: #10b981;
    --amber: #f59e0b;
    --rose: #f43f5e;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.glow-bg {
    position: fixed;
    top: -20%;
    left: 25%;
    width: 50vw;
    height: 40vh;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, rgba(56, 189, 248, 0.04) 60%, transparent 80%);
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 32px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: rgba(5, 7, 14, 0.85);
}

.brand h1 {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 40%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle { font-size: 0.75rem; color: var(--text-muted); }

.badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-accent {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent);
    border-color: rgba(56, 189, 248, 0.3);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-preset {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 0.8rem;
    outline: none;
}

.btn {
    padding: 6px 14px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

.viewport-container {
    position: relative;
    flex: 1;
    width: 100%;
    overflow: hidden;
}

#glCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

#glCanvas:active { cursor: grabbing; }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.studio-hud {
    position: absolute;
    bottom: 24px;
    left: 24px;
    width: 310px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.hud-header h3 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
}

.val-display {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

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

.hud-tip {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
}

footer {
    text-align: center;
    padding: 10px;
    font-size: 0.72rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: rgba(5, 7, 14, 0.85);
}

footer a { color: var(--accent); text-decoration: none; }
