/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Fira+Code:wght@300;400;500&display=swap');

:root {
    /* Colors */
    --bg-level-1: #0F1016;
    --bg-level-2: #151621;
    --accent-1: #002FFF;
    --accent-2: #B4E03C;
    --text-primary: #F5F5F7;
    --text-secondary: #86868B;

    /* Fonts */
    --font-serif: 'Instrument Serif', serif;
    --font-mono: 'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

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

body {
    background-color: var(--bg-level-1);
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1.6;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* No scroll */
}

.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

/* Header / Controls */
.app-header {
    text-align: center;
    z-index: 10;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 64px;
    font-weight: 400;
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.controls-hint {
    display: flex;
    gap: 24px;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Visual Card */
.visual-card {
    width: 50vw;
    /* 50% of viewport width */
    height: 300px;
    /* Fixed height for the wave strip? Or responsive? 
                      Let's make it proportional or fixed height that looks good. 
                      Seed said "canvas: 800 x 300", let's aim for that aspect but fluid width. */
    background-color: var(--bg-level-2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;

    /* Aesthetic touches */
    box-shadow: 0 0 100px 30px rgba(15, 16, 22, 0.8),
        0 0 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);

    /* Flex to hold canvas? Canvas is absolute inside? */
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas#visualizer {
    width: 100%;
    height: 100%;
    /* Canvas resolution will be set by JS, CSS just scales it */
}

/* Controls Bar */
.controls-bar {
    width: 600px;
    max-width: 90%;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px;
    background: var(--bg-level-2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.control-btn {
    background: var(--accent-1);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.1s;
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.active {
    background: #ff3b30;
    /* Stop color */
}

/* Slider */
.slider-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

input[type=range] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

/* Track */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Thumb */
input[type=range]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    /* center on track */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 48px;
    }

    .visual-card {
        width: 90vw;
        /* 90% on mobile */
        height: 250px;
    }

    .controls-bar {
        width: 90%;
        flex-direction: column;
        gap: 16px;
    }

    .slider-container {
        width: 100%;
    }

    .control-btn {
        width: 100%;
    }

    .controls-hint {
        display: none;
        /* Hide hints on mobile to save space */
    }
}