:root {
    --bg-dark: #121214;
    --panel-bg: rgba(30, 30, 35, 0.8);
    --text-main: #f0f0f0;
    --text-muted: #888;
    --accent-color: #ff3366;
    --accent-glow: 0 0 10px rgba(255, 51, 102, 0.6);
    --grid-border: #333;
    --cell-bg: #222;
    --cell-active: #ff3366;
    --cell-playhead: rgba(255, 255, 255, 0.1);
    --slide-color: #33ccff;
    --accent-step-color: #ffcc00;
    --ghost-step-color: #8a2be2;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.app-container {
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

h1 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2.5rem;
    letter-spacing: 2px;
    color: var(--text-main);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.transport-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

button {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: var(--accent-glow);
}

.btn-primary:hover {
    background: #ff4d79;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.8);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tempo-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tempo-control input {
    width: 60px;
    padding: 0.25rem;
    background: #111;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
}

.synth-controls {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.knob-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.knob-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.knob-group select, .knob-group input[type="range"] {
    cursor: pointer;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.grid-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.grid-container {
    display: grid;
    /* 1 label col + 16 steps */
    grid-template-columns: 60px repeat(16, 1fr);
    gap: 2px;
    background: var(--grid-border);
    border: 2px solid var(--grid-border);
    border-radius: 4px;
    overflow: hidden;
}

.grid-row {
    display: contents;
}

.grid-label {
    background: #111;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    padding: 0.5rem;
}

.grid-cell {
    background: var(--cell-bg);
    cursor: pointer;
    transition: background-color 0.1s ease;
    height: 24px;
}

.grid-cell:hover {
    background: rgba(255, 255, 255, 0.1);
}

.grid-cell.active-note {
    background: var(--cell-active);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.grid-cell.active-slide {
    background: var(--slide-color);
}

.grid-cell.active-accent {
    background: var(--accent-step-color);
}

.grid-cell.active-ghost {
    background: var(--ghost-step-color);
}

.grid-cell.playhead {
    background: var(--cell-playhead);
}
.grid-cell.active-note.playhead {
    background: #ff6688; /* Lighter active when playing */
}

.sequencer-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.left-panel {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pedal-board,
.sequencer-instructions {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pedal-board h3,
.sequencer-instructions h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.pedal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.pedal:last-child {
    margin-bottom: 0;
}

.pedal input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.pedal label {
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-main);
    text-transform: uppercase;
}

.sequencer-instructions p {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.sequencer-instructions p:last-child {
    margin-bottom: 0;
}

.sequencer-instructions strong {
    color: var(--accent-color);
    font-family: 'Share Tech Mono', monospace;
}

.sequencer-main {
    flex: 1;
}
