/* ==============================================================================
   CRIMSON ORBIT :: STUDIO WORKSTATION CSS
   Rich Glassmorphism, 3D Instrument Physics, Dynamic Animations
   ============================================================================== */

:root {
    --bg-main: #0a0812;
    --bg-card: rgba(22, 18, 32, 0.85);
    --bg-card-hover: rgba(30, 24, 44, 0.95);
    --border-color: rgba(229, 57, 53, 0.35);
    --border-gold: rgba(255, 179, 0, 0.45);
    --crimson: #e53935;
    --crimson-glow: rgba(229, 57, 53, 0.5);
    --gold: #ffb300;
    --gold-glow: rgba(255, 179, 0, 0.45);
    --cyan: #00e5ff;
    --text-main: #f5f5f7;
    --text-muted: #8e8a9f;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --font-ui: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-ui);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Background Glows */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}
.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #e53935, transparent 70%);
    top: -150px;
    left: -150px;
}
.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #ffb300, transparent 70%);
    bottom: -100px;
    right: -100px;
}

/* Main Container */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.studio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.brand-badge {
    display: inline-block;
    background: rgba(229, 57, 53, 0.15);
    color: var(--crimson);
    border: 1px solid var(--crimson);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.main-title {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
}

.accent-title {
    color: var(--crimson);
    text-shadow: 0 0 15px var(--crimson-glow);
}

.subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gold);
}

.volume-control input[type="range"] {
    accent-color: var(--crimson);
    cursor: pointer;
    width: 110px;
}

.init-audio-btn {
    background: linear-gradient(135deg, rgba(229,57,53,0.2), rgba(255,179,0,0.2));
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.init-audio-btn:hover {
    background: var(--gold);
    color: #000;
    box-shadow: 0 0 15px var(--gold-glow);
}

.btn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 8px #00e676;
}

/* Dual-Engine Audio Mode Selector */
.engine-mode-toggle {
    display: flex;
    align-items: center;
    background: rgba(10, 8, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 4px;
}

.engine-mode-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    padding: 0 8px;
    letter-spacing: 1px;
}

.engine-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.engine-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.engine-btn.active {
    background: linear-gradient(135deg, var(--crimson), #b71c1c);
    color: #fff;
    box-shadow: 0 0 12px var(--crimson-glow);
}

.engine-btn.btn-retro.active {
    background: linear-gradient(135deg, #00b0ff, #0081cb);
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 176, 255, 0.5);
}

/* 8086 Targeted Bus Interception HUD */
.bus-inspector-hud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: rgba(13, 10, 24, 0.95);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.08);
    font-family: var(--font-mono);
    font-size: 11px;
    gap: 12px;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-title {
    font-weight: 800;
    letter-spacing: 1px;
}

.hud-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    animation: hudBlink 1.5s infinite;
}

@keyframes hudBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.hud-label {
    color: var(--text-muted);
}

.hud-val {
    color: #fff;
    font-weight: 700;
}

.text-accent { color: var(--crimson); }
.text-green { color: #00e676; }
.text-cyan { color: var(--cyan); }
.text-gold { color: var(--gold); }

/* Nav Tabs */
.instrument-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.nav-tab {
    flex: 1;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-tab:hover {
    background: var(--bg-card-hover);
    color: #fff;
    border-color: rgba(229, 57, 53, 0.4);
    transform: translateY(-2px);
}

.nav-tab.active {
    background: linear-gradient(135deg, rgba(229, 57, 53, 0.25), rgba(30, 24, 44, 0.9));
    color: #fff;
    border-color: var(--crimson);
    box-shadow: 0 4px 20px rgba(229, 57, 53, 0.25);
}

.tab-icon {
    font-size: 18px;
}

/* Viewport Stage */
.viewport-stage {
    flex: 1;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.instrument-view {
    display: none;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.3s ease;
}

.instrument-view.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toolbars */
.instrument-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.badge-accent {
    background: rgba(255, 179, 0, 0.15);
    color: var(--gold);
    border: 1px solid var(--border-gold);
}

.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    cursor: pointer;
}

.custom-toggle {
    accent-color: var(--gold);
    transform: scale(1.3);
    cursor: pointer;
}

.octave-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.oct-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.oct-btn.active {
    background: var(--crimson);
    color: #fff;
    border-color: var(--crimson);
}

/* ==============================================================================
   1. CONCERT GRAND PIANO
   ============================================================================== */
.piano-chassis {
    background: linear-gradient(180deg, #18121f 0%, #0d0a13 100%);
    border: 3px solid #2d243a;
    border-radius: 12px;
    padding: 24px 30px;
    box-shadow: inset 0 6px 16px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.fallboard {
    text-align: center;
    padding: 10px 0 16px 0;
    border-bottom: 2px solid #3d314e;
    margin-bottom: 20px;
}

.gold-crest {
    font-family: var(--font-mono);
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 3px;
    text-shadow: 0 0 10px var(--gold-glow);
}

.keys-bed {
    position: relative;
    display: flex;
    justify-content: center;
    height: 250px;
    padding-bottom: 10px;
}

/* White Keys */
.white-key {
    flex: 1;
    max-width: 72px;
    height: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 85%, #d9d9d9 100%);
    border: 1px solid #999;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4), inset 0 -4px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 14px;
    transition: transform 0.05s ease, background 0.05s ease, box-shadow 0.05s ease;
    z-index: 1;
}

.white-key:hover {
    background: linear-gradient(180deg, #fff 0%, #fff0f0 100%);
}

.white-key.active, .white-key:active {
    background: linear-gradient(180deg, #ffcdd2 0%, #ef5350 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(4px);
}

.key-hint {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 800;
    color: var(--crimson);
}

.key-name {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 900;
    color: #212121;
}

/* Black Keys */
.black-key {
    position: absolute;
    width: 44px;
    height: 155px;
    background: linear-gradient(180deg, #2c2c2c 0%, #111111 80%, #000000 100%);
    border: 1px solid #444;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.7), inset 0 -2px 3px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 10px;
    transition: transform 0.05s ease, background 0.05s ease;
}

.black-key:hover {
    background: linear-gradient(180deg, #444 0%, #1a1a1a 100%);
}

.black-key.active, .black-key:active {
    background: linear-gradient(180deg, #ffb300 0%, #ff8f00 100%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8), inset 0 1px 4px rgba(0, 0, 0, 0.5);
    transform: translateY(4px);
}

.black-key.active .bkey-hint,
.black-key.active .bkey-name {
    color: #000;
}

.bkey-hint {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    color: var(--gold);
}

.bkey-name {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 800;
    color: #eee;
}

/* Absolute positions for 5 black keys */
.bkey-c4s { left: calc(50% - 250px); }
.bkey-d4s { left: calc(50% - 180px); }
.bkey-f4s { left: calc(50% - 35px); }
.bkey-g4s { left: calc(50% + 35px); }
.bkey-a4s { left: calc(50% + 105px); }

.piano-pedals-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 24px;
}

.pedal {
    background: linear-gradient(180deg, #ffd54f 0%, #b28900 100%);
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 11px;
    font-weight: 800;
    color: #3e2723;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.pedal.active {
    box-shadow: 0 0 15px var(--gold-glow);
    background: #ffecb3;
}

/* ==============================================================================
   2. ACOUSTIC GUITAR
   ============================================================================== */
.guitar-actions {
    display: flex;
    gap: 10px;
}

.strum-btn {
    background: rgba(229, 57, 53, 0.15);
    border: 1px solid var(--crimson);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.strum-btn:hover,
.strum-btn.active {
    background: var(--crimson);
    box-shadow: 0 0 16px var(--crimson-glow);
    transform: translateY(-1px);
}

.guitar-fretboard-stage {
    background: #1c1410;
    border: 3px solid #3d2b1f;
    border-radius: 12px;
    padding: 30px;
    position: relative;
    box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.9);
    min-height: 280px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.guitar-body-silhouette {
    position: absolute;
    right: -40px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, #4a2810 0%, #201006 80%);
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.soundhole {
    width: 140px;
    height: 140px;
    background: #000;
    border-radius: 50%;
    border: 6px solid #8d5b2c;
    box-shadow: inset 0 0 25px #000;
}

.fretboard {
    position: relative;
    width: 100%;
    height: 220px;
    background: linear-gradient(180deg, #2b1d14 0%, #1a100a 100%);
    border: 2px solid #543926;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 10px 0;
}

.nut {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 12px;
    background: #fdf5e6;
    border-right: 2px solid #9e9e9e;
    box-shadow: 2px 0 6px rgba(0,0,0,0.5);
}

.fret-wire {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #9e9e9e;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.8);
}
.fw-1 { left: 8%; }
.fw-2 { left: 16%; }
.fw-3 { left: 24%; }
.fw-4 { left: 32%; }
.fw-5 { left: 40%; }
.fw-6 { left: 48%; }
.fw-7 { left: 56%; }
.fw-8 { left: 64%; }
.fw-9 { left: 72%; }
.fw-10 { left: 80%; }
.fw-11 { left: 88%; }
.fw-12 { left: 96%; }

.fret-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #efebe9;
    border-radius: 50%;
    top: calc(50% - 5px);
    left: -5px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}
.double-top { top: 30%; }
.double-bot { top: 70%; }

.string-lane {
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    padding-left: 20px;
}

.string-lane:hover .string-wire {
    box-shadow: 0 0 12px var(--gold);
}

.string-wire {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    transition: transform 0.05s ease;
}

.wire-treble { height: 1.5px; background: #fff; }
.wire-mid { height: 2.2px; background: #d7ccc8; }
.wire-wound { height: 3px; background: #bcaaa4; }
.wire-wound-heavy { height: 4px; background: #a1887f; }

.string-label {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    pointer-events: none;
}

.string-lane.vibrating .string-wire {
    animation: stringVibrate 0.1s infinite alternate ease-in-out;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

@keyframes stringVibrate {
    from { transform: translateY(-2px); }
    to { transform: translateY(2px); }
}

/* ==============================================================================
   3. STUDIO DRUM KIT
   ============================================================================== */
.drum-stage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 150px 180px;
    gap: 20px;
    padding: 10px 0;
}

.drum-pad {
    background: #191624;
    border: 2px solid #332b45;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.05s ease, border-color 0.1s ease;
}

.drum-pad:hover {
    border-color: var(--crimson);
    transform: translateY(-2px);
}

.drum-pad.hit {
    transform: scale(0.96);
    border-color: var(--gold);
    box-shadow: 0 0 25px var(--gold-glow);
}

.cymbal-disc {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffecb3 0%, #ffa000 60%, #8c5b00 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffd54f;
}

.hihat-pair {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, #e0f7fa 0%, #00acc1 70%, #006064 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #80deea;
}

.cymbal-bell {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.drumhead {
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #e0e0e0 70%, #9e9e9e 100%);
    border: 5px solid #424242;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.drumhead-center {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #b0bec5;
}

.snare-head {
    border: 5px solid #d32f2f;
}

.kick-drum {
    grid-column: 2;
    grid-row: 2;
}

.kick-front-head {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, #212121 0%, #000 100%);
    border: 6px solid #e53935;
    box-shadow: 0 8px 25px rgba(229, 57, 53, 0.4), inset 0 0 20px #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kick-crest {
    text-align: center;
}

.crest-title {
    display: block;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--crimson);
}

.crest-sub {
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--gold);
}

.pad-caption {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    color: #fff;
}

/* ==============================================================================
   4. SONGS & VISUALIZER
   ============================================================================== */
.songs-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    height: 100%;
}

.jukebox-panel, .visualizer-panel {
    background: rgba(14, 11, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.panel-heading {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.panel-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.panel-subheading {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--gold);
    margin: 14px 0 8px 0;
}

.song-buttons-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.song-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
}

.song-btn:hover {
    background: rgba(229, 57, 53, 0.15);
    border-color: var(--crimson);
}

.song-btn.active {
    background: linear-gradient(90deg, rgba(229, 57, 53, 0.3), transparent);
    border-color: var(--crimson);
}

.song-num {
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--crimson);
    width: 24px;
}

.song-title-text {
    flex: 1;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
}

.song-tempo {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.style-choice-group {
    display: flex;
    gap: 8px;
}

.style-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.style-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

.transport-bar {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.transport-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.play-btn {
    background: linear-gradient(135deg, #00e676, #00b0ff);
    color: #000;
}

.play-btn:hover {
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.5);
    transform: translateY(-1px);
}

.stop-btn {
    background: rgba(229, 57, 53, 0.2);
    border: 1px solid var(--crimson);
    color: var(--crimson);
}

.stop-btn:hover {
    background: var(--crimson);
    color: #fff;
}

/* Visualizer Canvas & Stats */
.vis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

#spectrumCanvas {
    width: 100%;
    height: 220px;
    background: #09070e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    display: block;
}

.vis-hud-stats {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.stat-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}

.stat-val {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 800;
    color: var(--gold);
}

/* Footer */
.studio-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    margin-top: auto;
    font-size: 12px;
    color: var(--text-muted);
}

.foot-keys-guide {
    font-family: var(--font-mono);
    color: var(--gold);
}

/* Responsive */
@media (max-width: 900px) {
    .songs-grid-layout {
        grid-template-columns: 1fr;
    }
    .drum-stage {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
}

/* ==============================================================================
   COMPOSER & STEP SEQUENCER WORKSTATION
   ============================================================================== */
.composer-chassis {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.composer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.transport-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

.save-btn {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    border: 1px solid #4caf50;
    color: white;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.4);
    transition: all 0.2s ease;
}

.save-btn:hover {
    background: linear-gradient(135deg, #388e3c, #2e7d32);
    transform: translateY(-2px);
}

.save-notice {
    margin-left: 10px;
    font-size: 12px;
    color: #4caf50;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.save-notice.show {
    opacity: 1;
}

.tempo-control {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.tempo-control input[type="range"] {
    width: 120px;
    accent-color: var(--gold);
}

.tempo-control span {
    font-family: var(--font-mono);
    color: var(--gold);
    min-width: 60px;
}

/* Sequencer Matrix */
.sequencer-grid-wrapper {
    background: rgba(10, 8, 18, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px;
    overflow-x: auto;
}

.sequencer-timeline {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.track-header-spacer {
    width: 170px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.step-numbers {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 6px;
    flex: 1;
    min-width: 600px;
}

.step-num {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 2px 0;
}

.step-num.beat-marker {
    color: var(--gold);
    border-bottom: 1px solid var(--gold);
}

.sequencer-tracks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.track-row {
    display: flex;
    align-items: center;
}

.track-meta {
    width: 170px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.track-icon {
    font-size: 16px;
}

.track-name {
    color: var(--text-main);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 6px;
    flex: 1;
    min-width: 600px;
}

.step-cell {
    height: 38px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

.step-cell:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Active Step (Note ON) */
.step-cell.active.piano-step {
    background: linear-gradient(135deg, #e53935, #b71c1c);
    border-color: #ff5252;
    box-shadow: 0 0 10px rgba(229, 57, 53, 0.6);
}

.step-cell.active.guitar-step {
    background: linear-gradient(135deg, #ffb300, #ff8f00);
    border-color: #ffd54f;
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.6);
}

.step-cell.active.drum-step {
    background: linear-gradient(135deg, #00e5ff, #00b0ff);
    border-color: #80d8ff;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

/* Current Playback Sweep Highlight */
.step-cell.current-step {
    border-color: #00e5ff !important;
    box-shadow: 0 0 14px #00e5ff !important;
    transform: scale(1.08);
}

/* Live Recorded Notes Tape */
.composer-live-tape {
    background: rgba(15, 12, 24, 0.95);
    border: 1px solid rgba(255, 179, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tape-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tape-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.tape-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.tape-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    align-items: center;
    padding: 8px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-sm);
}

.tape-chip {
    padding: 6px 12px;
    background: rgba(229, 57, 53, 0.15);
    border: 1px solid var(--crimson);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: 0 0 8px rgba(229, 57, 53, 0.3);
    animation: popIn 0.2s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

