.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.control-panel {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--panel-h, 52px);

    display: flex;
    align-items: center;
    gap: 0.75rem;

    padding: 0 6vw;
    background: rgba(11, 16, 24, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.control-panel label {
    font-family: var(--sans, 'Instrument Sans', system-ui, sans-serif);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted, #72706a);
    white-space: nowrap;
}

.control-panel label:not(:first-child) {
    margin-left: 2rem;
}

.slider {
    flex: 1;
    min-width: 180px;
    cursor: pointer;
    accent-color: var(--text, #1a1a18);
    margin: 0;
}

.slider-label,
.play-btn {
    font-family: var(--sans, 'Instrument Sans', system-ui, sans-serif);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text, #1a1a18);
    background: transparent;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.09));
    padding: 3px 10px;
    border-radius: 3px;
    display: inline-block;
    min-width: 90px;
    text-align: center;
    white-space: nowrap;
}

.play-btn {
    padding: 6px;
    min-width: 32px;
    cursor: pointer;
    font-size: 12px;
}
.play-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.play-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.play-btn.active {
    background: rgba(255, 255, 255, 0.14);
}
.play-btn.active:active {
    background: rgba(255, 255, 255, 0.22);
}

#play-pause-btn {
    min-width: 64px;
}

.viz-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.viz-frame {
    position: relative;
    width: 100%;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.09));
    border-radius: 5px;
}

canvas {
    display: block;
}

.viz-frame canvas {
    border: none;
    box-shadow: none;
    display: block;
    width: 100%;
    height: 100%;
}

.colorbar {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.colorbar-gradient {
    width: 300px;
    height: 20px;
    margin: 0 10px;
    border: 1px solid #ddd;
}

.display {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-family: monospace;
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #7f8c8d;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading::after {
    content: '...';
    animation: pulse 1.5s infinite;
}

.tooltip {
    visibility: hidden;
    position: absolute;
    pointer-events: none;
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.82);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    white-space: nowrap;
    z-index: 420;
}

/* ─── RESPONSIVE CONTROL PANEL ─── */

@media (max-width: 600px) {
    .control-panel {
        flex-wrap: wrap;
        height: auto;
        min-height: var(--panel-h, 52px);
        padding: 6px 4vw;
        gap: 0.4rem 0.6rem;
    }

    .control-panel label:not(:first-child) {
        margin-left: 0.5rem;
    }

    .slider {
        min-width: 110px;
        flex: 1 1 110px;
    }

    .slider-label {
        min-width: 64px;
    }
}

@media (pointer: coarse) {
    .slider {
        height: 32px;
    }

    .play-btn {
        min-height: 40px;
        padding: 8px 12px;
    }
}