:root {
    --primary: #6c5ce7;
    --danger: #ff7675;
    --success: #55efc4;
    --dark: #2d3436;
    --light: #dfe6e9;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e1e;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: #2d2d2d;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    text-align: center;
    width: 90%;
    max-width: 500px;
}

h1 { margin-bottom: 1.5rem; }

/* Visualizer Canvas */
.visualizer-container {
    width: 100%;
    height: 120px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid #444;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Buttons */
.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn {
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    font-weight: bold;
}

.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.record { background-color: var(--danger); color: white; }
.stop { background-color: var(--dark); color: white; border: 1px solid #555; }
.play { background-color: var(--success); color: #2d3436; width: 100%; margin-top: 1rem;}

/* Animation for recording state */
.recording-active { animation: pulse 1.5s infinite; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 118, 117, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 118, 117, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 118, 117, 0); }
}

/* Playback Area */
.playback-area {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #444;
    opacity: 0.3; /* Dimmed until active */
    pointer-events: none;
    transition: opacity 0.3s;
}

.playback-area.active {
    opacity: 1;
    pointer-events: all;
}

.effect-selector {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    background: #444;
    color: white;
    border: none;
    font-size: 1rem;
}