/* audio_grapher.css */
:root {
    --bg-main: #0f172a;
    --bg-panel: #1e293b;
    --text-main: #e2e8f0;
    --accent-pink: #ec4899;
    --accent-violet: #8b5cf6;
    --wave-green: #22c55e;
    --wave-red: #ef4444;
}

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

/* Lab Layout */
.lab-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    flex-grow: 1;
    width: 100%;
}

/* Graph Area */
.oscilloscope-screen {
    background: #000;
    border-radius: 12px;
    border: 4px solid #334155;
    position: relative;
    height: 400px;
    width: 100%;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grid overlay */
.oscilloscope-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 255, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

canvas {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* Controls */
.control-deck {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.control-group h3 {
    color: var(--accent-violet);
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.value-badge {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-violet);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin-bottom: 10px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--accent-pink);
    cursor: pointer;
    margin-top: -8px;
    border: 2px solid #fff;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #475569;
    border-radius: 2px;
}

.desc {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* Stats */
.stats-panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-box {
    text-align: center;
}

.stat-title {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

.stat-num {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-pink);
}

/* Legend */
.legend {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-green {
    background: var(--wave-green);
    box-shadow: 0 0 10px var(--wave-green);
}

.dot-red {
    background: var(--wave-red);
    box-shadow: 0 0 10px var(--wave-red);
}