:root {
    --bg-color: #0f0f13;
    --panel-bg: rgba(20, 20, 25, 0.7);
    --text-color: #e0e0e0;
    --accent-color: #00ff88;
    --accent-hover: #00cc6a;
    --danger-color: #ff4444;
    --secondary-color: #4444ff;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-blur: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    overflow: hidden;
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    padding: 2rem;
}

.panel {
    pointer-events: auto;
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: transform 0.2s ease;
}

.control-panel {
    width: 320px;
    align-self: flex-start;
}

.status-panel {
    width: 200px;
    align-self: flex-start;
    position: absolute;
    right: 2rem;
    top: 2rem;
}

h1 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.85rem;
    color: #aaa;
    display: flex;
    justify-content: space-between;
}

select,
input[type="range"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
}

select:focus {
    border-color: var(--accent-color);
}

.button-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

button {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.75rem;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button.primary {
    background: var(--accent-color);
    color: #000;
}

button.primary:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 0 10px var(--accent-color);
}

button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

button.secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

button.danger {
    background: rgba(255, 68, 68, 0.2);
    color: var(--danger-color);
}

button.danger:hover:not(:disabled) {
    background: rgba(255, 68, 68, 0.4);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

#progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.status-item {
    display: flex;
    justify-content: space-between;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.2rem;
}

.status-item .label {
    color: #888;
}

.status-item .value {
    color: var(--accent-color);
}