:root {
    --primary-color: #3b82f6;
    --accent-color: #f59e0b;
    --bg-dark: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    pointer-events: auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.top-panel {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.header p {
    color: var(--text-dim);
    font-size: 0.875rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    text-align: right;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
}

.bottom-panel {
    width: 400px;
    align-self: flex-start;
}

.control-group {
    margin-bottom: 1.25rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.label-row span {
    font-size: 0.875rem;
    font-weight: 500;
}

.value-display {
    color: var(--primary-color);
    font-weight: 700;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #334155;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.instruction-hint {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    color: var(--text-dim);
    font-size: 0.75rem;
    text-align: right;
}
