:root {
    --bg: #121212;
    --panel: #1e1e1e;
    --neon: #00ff9d;
    --accent: #ff0055;
    --text: #eeeeee;
    --dim: #444;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Courier New', monospace;
    margin: 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none; /* Prevents highlighting text while tapping */
}

.header {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 1.8rem;
    color: var(--neon);
    text-shadow: 0 0 10px var(--neon);
    margin: 10px 0;
    letter-spacing: 2px;
}

.status-bar {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
    height: 1.2em;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--panel);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

button, select {
    background: #333;
    color: white;
    border: 1px solid #555;
    padding: 10px 14px;
    font-family: inherit;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

button:active { transform: scale(0.95); }

#playBtn { background: var(--neon); color: black; border: none; }
#stopBtn { background: var(--accent); border: none; }

.save-btn {
    background: #0088ff;
    border: none;
}

.slide-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
input[type=range] { width: 100px; }
span { font-size: 0.7rem; margin-top: 2px; }

/* GRID STYLES */
.grid-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 600px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--panel);
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #333;
}

.track-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 75px;
}

.rec-btn, .robot-btn {
    font-size: 0.65rem;
    border: none;
    padding: 6px;
    border-radius: 3px;
    transition: all 0.2s;
}

.rec-btn { background: #444; color: #fff; }
.rec-btn.recording { background: red; animation: pulse 1s infinite; }
.rec-btn.has-sample { background: #4caf50; } /* Green when sound recorded */

.robot-btn { background: #222; color: #666; }
.robot-btn.active { background: var(--neon); color: black; box-shadow: 0 0 5px var(--neon); }

.steps {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    flex-grow: 1;
}

.step {
    width: 100%;
    aspect-ratio: 1;
    background: #2a2a2a;
    border-radius: 3px;
    cursor: pointer;
}

.step.active { background: var(--neon); box-shadow: 0 0 8px var(--neon); }
.step.playing { background: white !important; transform: scale(1.1); }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
