/* Global Variables & Theme Config */
:root {
    --bg-primary: #0a0c10;
    --bg-secondary: #12161f;
    --bg-panel: rgba(22, 28, 38, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f3f6;
    --text-secondary: #8c9ba5;
    
    /* Neon Cyan (Default Theme) */
    --neon-color: #00f0ff;
    --neon-glow: 0 0 15px rgba(0, 240, 255, 0.5), 0 0 30px rgba(0, 240, 255, 0.2);
    --neon-dim: rgba(0, 240, 255, 0.15);
    
    --key-white-bg: linear-gradient(to bottom, #ffffff 0%, #e8ebee 85%, #d5dadf 100%);
    --key-white-active: linear-gradient(to bottom, #d5dadf 0%, #aab2ba 100%);
    --key-black-bg: linear-gradient(180deg, #1b2027 0%, #0d0f12 100%);
    --key-black-active: linear-gradient(180deg, #0d0f12 0%, #000000 100%);
    
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

/* Theme Classes */
body.theme-neon-pink {
    --neon-color: #ff007f;
    --neon-glow: 0 0 15px rgba(255, 0, 127, 0.5), 0 0 30px rgba(255, 0, 127, 0.2);
    --neon-dim: rgba(255, 0, 127, 0.15);
}

body.theme-neon-gold {
    --neon-color: #ffb700;
    --neon-glow: 0 0 15px rgba(255, 183, 0, 0.5), 0 0 30px rgba(255, 183, 0, 0.2);
    --neon-dim: rgba(255, 183, 0, 0.15);
}

/* Reset and Layout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-drag: none;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(20, 30, 48, 0.4) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(10, 15, 30, 0.6) 0px, transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Welcome Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 7, 10, 0.95);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.overlay.hide {
    opacity: 0;
    visibility: hidden;
}

.overlay-content {
    text-align: center;
    padding: 40px;
    border-radius: 20px;
    background: rgba(18, 22, 31, 0.6);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
}

.synth-logo {
    margin-bottom: 25px;
}

.synth-logo h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
    margin-top: 15px;
}

.wave-icon-animate {
    font-size: 3.5rem;
    color: var(--neon-color);
    text-shadow: var(--neon-glow);
    animation: wavePulse 2s infinite ease-in-out;
}

@keyframes wavePulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 25px var(--neon-color); }
}

.overlay-content p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.overlay-content .subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.glow-button {
    background: transparent;
    color: #ffffff;
    border: 2px solid var(--neon-color);
    padding: 15px 35px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--neon-glow), inset 0 0 10px var(--neon-dim);
}

.glow-button:hover {
    background: var(--neon-color);
    color: #000000;
    box-shadow: 0 0 25px var(--neon-color);
    transform: translateY(-2px);
}

.glow-button:active {
    transform: translateY(1px);
}

/* App Container Layout */
.app-container {
    width: 96vw;
    height: 94vh;
    max-width: 1400px;
    max-height: 850px;
    display: flex;
    flex-direction: column;
    background: rgba(10, 12, 16, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* App Header */
.app-header {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    background: rgba(18, 22, 31, 0.5);
}

.app-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.app-header .logo i {
    color: var(--neon-color);
    text-shadow: var(--neon-glow);
}

.app-header .logo .highlight {
    color: var(--neon-color);
    text-shadow: var(--neon-glow);
}

.global-controls {
    display: flex;
    align-items: center;
    gap: 25px;
}

.control-group-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-group-inline label {
    font-size: 0.8rem;
    font-family: var(--font-heading);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

select {
    background: #171d28;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus, select:hover {
    border-color: var(--neon-color);
    box-shadow: 0 0 10px var(--neon-dim);
}

.theme-selector {
    display: flex;
    gap: 8px;
}

.theme-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: #1e2530;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.theme-btn.active {
    border-color: #ffffff;
    transform: scale(1.1);
}

.theme-btn .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.theme-btn .dot.cyan { background-color: #00f0ff; }
.theme-btn .dot.pink { background-color: #ff007f; }
.theme-btn .dot.gold { background-color: #ffb700; }

/* Synthesizer Control Panel / Rack */
.synth-rack {
    flex: 1;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr 1fr;
    gap: 15px;
    padding: 15px;
    overflow-y: auto;
    background-color: rgba(6, 8, 12, 0.4);
}

/* Individual Rack Panel Card */
.rack-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.02);
    min-height: 220px;
}

.panel-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header h3 i {
    color: var(--neon-color);
    font-size: 0.85rem;
}

/* SECTION 1: Visualizer Panel */
.visualizer-panel {
    display: flex;
    flex-direction: column;
}

.visualizer-toggle {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.visualizer-toggle button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.visualizer-toggle button.active-mode {
    background: var(--neon-color);
    color: #000000;
    box-shadow: var(--neon-glow);
}

.canvas-container {
    flex: 1;
    background: #06080b;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Volume Slider styling */
.volume-slider-container {
    margin-top: 12px;
}

.volume-slider-container label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Studio Sliders Custom Styling */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #0f131a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    outline: none;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 22px;
    border-radius: 3px;
    background: linear-gradient(to bottom, #d0d7de, #808890);
    border: 1px solid #40454c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    position: relative;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--neon-color);
    border-color: var(--neon-color);
    box-shadow: var(--neon-glow);
}

input[type="range"]:focus {
    border-color: rgba(255, 255, 255, 0.15);
}

.display-val {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--neon-color);
    min-width: 45px;
    text-align: right;
    text-shadow: var(--neon-glow);
}

/* SECTION 2: ADSR Envelope Panel */
.knobs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
}

.knob-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
}

.knob-control label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.knob-control input[type="range"] {
    width: 80%;
}

.knob-control .display-val {
    margin-top: 6px;
    text-align: center;
    min-width: auto;
}

/* SECTION 3: Filter & Spatial Effects */
.fx-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.fx-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fx-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fx-label-row label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* SECTION 4: Drum Machine & Rhythms */
.rhythm-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    justify-content: space-between;
}

.rhythm-select-row {
    display: flex;
    gap: 8px;
}

.rhythm-select-row select {
    flex: 1;
}

.rhythm-btn {
    background: #171d28;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.rhythm-btn:hover:not(:disabled) {
    border-color: var(--neon-color);
    color: var(--neon-color);
    box-shadow: var(--neon-glow);
}

.rhythm-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.rhythm-btn.active-rhythm {
    background: var(--neon-color);
    color: #000000;
    border-color: var(--neon-color);
    box-shadow: var(--neon-glow);
}

.rhythm-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tempo-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.tempo-row input[type="range"] {
    flex: 1;
}

.drum-pads {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.drum-pad {
    background: linear-gradient(135deg, #1d2533 0%, #151a24 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.1s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.drum-pad:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.drum-pad.active {
    background: var(--neon-color);
    border-color: var(--neon-color);
    box-shadow: var(--neon-glow);
}

.drum-pad.active .pad-label,
.drum-pad.active .key-shortcut {
    color: #000000;
    text-shadow: none;
}

.pad-label {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-primary);
}

.key-shortcut {
    font-size: 0.55rem;
    color: var(--text-secondary);
}

.drum-tip {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

/* SECTION 5: Recorder Panel */
.recorder-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    justify-content: space-between;
}

.record-buttons {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 6px;
}

.rec-btn {
    border: 1px solid var(--border-color);
    padding: 10px 4px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.68rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    background-color: #171d28;
    color: var(--text-primary);
}

.rec-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.rec-btn.btn-red:hover:not(:disabled) {
    border-color: #ff3b30;
    color: #ff453a;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.3);
}

.rec-btn.btn-red.recording {
    background: #ff3b30;
    color: #ffffff;
    border-color: #ff3b30;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.6);
    animation: pulseRed 1s infinite alternate;
}

@keyframes pulseRed {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

.rec-btn.btn-green:hover:not(:disabled) {
    border-color: #34c759;
    color: #30d158;
    box-shadow: 0 0 10px rgba(52, 199, 89, 0.3);
}

.rec-btn.btn-green.playing {
    background: #34c759;
    color: #ffffff;
    border-color: #34c759;
    box-shadow: 0 0 15px rgba(52, 199, 89, 0.6);
}

.rec-btn.btn-grey:hover:not(:disabled) {
    border-color: var(--text-primary);
}

.record-status-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #8c9ba5;
    transition: background-color 0.3s ease;
}

.status-dot.active {
    background-color: #ff3b30;
    box-shadow: 0 0 8px #ff3b30;
}

#rec-timer {
    margin-left: auto;
    font-family: var(--font-heading);
    font-weight: 700;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--neon-color);
    text-decoration: none;
    border: 1px solid var(--neon-dim);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    background: var(--neon-dim);
}

.download-link:hover:not(.disabled-link) {
    background: var(--neon-color);
    color: #000000;
    box-shadow: var(--neon-glow);
    border-color: var(--neon-color);
}

.download-link.disabled-link {
    opacity: 0.3;
    pointer-events: none;
    border-color: var(--border-color);
    background: transparent;
    color: var(--text-secondary);
}

/* Musical Keyboard Container */
.keyboard-container {
    border-top: 1px solid var(--border-color);
    background: #11141a;
    padding: 15px 25px 25px 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.keyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.keyboard-info {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.keyboard-info i {
    color: var(--neon-color);
}

.keyboard-octave-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.keyboard-octave-nav button {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.keyboard-octave-nav button.active-sub-mode {
    background: var(--neon-color);
    color: #000000;
    border-color: var(--neon-color);
    box-shadow: var(--neon-glow);
}

/* Keyboard Drawing */
.keyboard {
    position: relative;
    height: 220px;
    width: 100%;
    display: flex;
    background: #090b0e;
    border-radius: 12px;
    padding: 4px;
    box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.8), 0 4px 10px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Base Key styling */
.key {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 15px;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.05s ease, box-shadow 0.05s ease;
}

.key span {
    font-size: 0.65rem;
    font-weight: 700;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.key .label-key {
    display: none;
    font-family: var(--font-heading);
    opacity: 0.8;
}

.keyboard.show-keys .label-key {
    display: inline;
}

.keyboard.show-keys .label-note {
    display: none;
}

/* White Keys (15 total) */
.key.white {
    width: calc(100% / 15);
    height: 100%;
    background: var(--key-white-bg);
    border-right: 1px solid #c2c9d0;
    color: #2c3540;
    z-index: 1;
}

.key.white:last-child {
    border-right: none;
}

.key.white:hover {
    background: linear-gradient(to bottom, #ffffff 0%, #f1f3f5 85%, #e1e6eb 100%);
}

.key.white.active {
    background: var(--key-white-active);
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.2);
    border-bottom: 5px solid var(--neon-color);
    transform: translateY(2px);
    color: #000;
}

/* Black Keys */
.key.black {
    position: absolute;
    width: calc((100% / 15) * 0.64);
    height: 60%;
    background: var(--key-black-bg);
    border: 1px solid #000000;
    color: #a0aab5;
    z-index: 2;
    border-radius: 0 0 4px 4px;
    box-shadow: 2px 5px 8px rgba(0, 0, 0, 0.5), inset 0 2px 2px rgba(255,255,255,0.15);
    padding-bottom: 10px;
}

.key.black:hover {
    background: linear-gradient(180deg, #252b34 0%, #13161a 100%);
}

.key.black.active {
    background: var(--key-black-active);
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.6), 0 2px 3px rgba(0, 0, 0, 0.4);
    border-bottom: 3px solid var(--neon-color);
    transform: translateY(1px);
    color: #ffffff;
    text-shadow: var(--neon-glow);
}

.key.black span {
    font-size: 0.55rem;
}

/* Scrollbars for rack */
.synth-rack::-webkit-scrollbar {
    width: 6px;
}

.synth-rack::-webkit-scrollbar-track {
    background: transparent;
}

.synth-rack::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.synth-rack::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Responsive / Screen Scaling */
@media (max-width: 1200px) {
    .synth-rack {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        overflow-y: auto;
    }
    .app-container {
        height: 96vh;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .synth-rack {
        grid-template-columns: 1fr;
    }
    .app-header {
        padding: 0 15px;
    }
    .keyboard-container {
        padding: 10px;
    }
    .keyboard {
        height: 160px;
    }
    .key span {
        font-size: 0.5rem;
    }
    .key.black span {
        font-size: 0.45rem;
    }
}

/* ---------------- PLAYFUL KIDS THEME (RENKLİ ÇOCUK MODU) ---------------- */
body.theme-kids {
    --bg-primary: #e0f2fe;
    --bg-secondary: #fef9c3;
    --bg-panel: rgba(255, 255, 255, 0.95);
    --border-color: #cbd5e1;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --neon-color: #ec4899; /* Playful Pink Accent */
    --neon-glow: 0 4px 12px rgba(236, 72, 153, 0.3);
    --neon-dim: rgba(236, 72, 153, 0.1);
    --font-body: 'Fredoka', sans-serif;
    --font-heading: 'Fredoka', sans-serif;
}

/* Background gradient for kids theme */
body.theme-kids {
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(186, 230, 253, 0.7) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(254, 240, 138, 0.7) 0%, transparent 40%),
        linear-gradient(135deg, #bae6fd 0%, #fef08a 100%);
    font-weight: 600;
}

/* Logo & Welcome Overlay */
body.theme-kids #welcome-overlay {
    background-color: rgba(224, 242, 254, 0.96);
}

body.theme-kids .overlay-content {
    background: #ffffff;
    border: 4px solid #f472b6;
    box-shadow: 0 15px 35px rgba(244, 114, 182, 0.25);
    color: #1e293b;
}

body.theme-kids .synth-logo h1 {
    color: #0f172a;
    font-weight: 700;
}

body.theme-kids .wave-icon-animate {
    color: #ec4899;
    animation: waveBounce 1.5s infinite alternate ease-in-out;
}

@keyframes waveBounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-10px) scale(1.08); }
}

body.theme-kids .glow-button {
    background: #ec4899;
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 0 #db2777, 0 12px 20px rgba(236, 72, 153, 0.4);
    font-weight: 700;
}

body.theme-kids .glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 0 #db2777, 0 15px 25px rgba(236, 72, 153, 0.5);
    background: #f43f5e;
}

body.theme-kids .glow-button:active {
    transform: translateY(4px);
    box-shadow: 0 4px 0 #db2777;
}

/* App Container */
body.theme-kids .app-container {
    background: rgba(255, 255, 255, 0.85);
    border: 5px solid #f472b6;
    border-radius: 32px;
    box-shadow: 0 25px 60px rgba(244, 114, 182, 0.15);
}

body.theme-kids .app-header {
    background: #ffffff;
    border-bottom: 2px solid #f1f5f9;
}

body.theme-kids .app-header .logo {
    color: #0f172a;
}

/* Theme selector dot */
.theme-btn .dot.kids {
    background: linear-gradient(45deg, #ff9aa2, #ffb7b2, #ffd97d, #b5e2fa, #c7ceea);
}

/* Select Box */
body.theme-kids select {
    background: #ffffff;
    color: #1e293b;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
}

body.theme-kids select:focus, body.theme-kids select:hover {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

/* Rack Layout */
body.theme-kids .synth-rack {
    background-color: #f8fafc;
}

body.theme-kids .rack-panel {
    background: #ffffff;
    border: 3px solid #e2e8f0;
    box-shadow: 0 6px 0 #cbd5e1, 0 8px 16px rgba(0,0,0,0.02);
    border-radius: 24px;
}

body.theme-kids .panel-header {
    border-bottom: 2px solid #f1f5f9;
}

body.theme-kids .panel-header h3 {
    color: #475569;
    font-size: 0.85rem;
}

/* Visualizer Canvas */
body.theme-kids .canvas-container {
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
}

body.theme-kids .visualizer-toggle {
    background: #e2e8f0;
    border: none;
}

body.theme-kids .visualizer-toggle button {
    color: #475569;
}

body.theme-kids .visualizer-toggle button.active-mode {
    background: #ec4899;
    color: #ffffff;
    box-shadow: none;
}

/* Custom Sliders for Kids (Happy balloon style) */
body.theme-kids input[type="range"] {
    background: #e2e8f0;
    height: 10px;
    border-radius: 5px;
    border: none;
}

body.theme-kids input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ec4899;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.1s ease;
}

body.theme-kids input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #f43f5e;
}

body.theme-kids .display-val {
    color: #ec4899;
    text-shadow: none;
}

body.theme-kids .knob-control {
    background: #f8fafc;
    border: 2px solid #f1f5f9;
}

/* Toy MPC Drum Pads for Kids */
body.theme-kids .drum-pad {
    border: none;
    box-shadow: 0 4px 0 #94a3b8;
}

body.theme-kids .drum-pad[data-drum="kick"] { background: #fca5a5; }
body.theme-kids .drum-pad[data-drum="snare"] { background: #fde047; }
body.theme-kids .drum-pad[data-drum="hihat"] { background: #86efac; }
body.theme-kids .drum-pad[data-drum="clap"] { background: #93c5fd; }

body.theme-kids .drum-pad:hover {
    filter: brightness(1.05);
}

body.theme-kids .drum-pad:active {
    transform: translateY(4px);
    box-shadow: none;
}

body.theme-kids .drum-pad.active {
    background: #ec4899 !important;
}

body.theme-kids .pad-label {
    color: #1e293b;
}

/* Studio Recorder */
body.theme-kids .rec-btn {
    background-color: #f1f5f9;
    color: #475569;
    border: 2px solid #cbd5e1;
}

body.theme-kids .record-status-container {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
}

/* Keyboard Container */
body.theme-kids .keyboard-container {
    background: #ffffff;
    border-top: 3px solid #f1f5f9;
}

body.theme-kids .keyboard-octave-nav button {
    background: #e2e8f0;
    color: #475569;
    border: none;
}

body.theme-kids .keyboard-octave-nav button.active-sub-mode {
    background: #ec4899;
    color: #ffffff;
}

/* Playful Rainbow Keyboard Layout */
body.theme-kids .keyboard {
    background: #f8fafc;
    border: 3px solid #cbd5e1;
    height: 240px;
    box-shadow: none;
}

/* Kids Rainbow White Keys */
body.theme-kids .key.white {
    border-right: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 6px 0 #94a3b8;
    color: #1e293b;
    margin: 0 2px;
}

body.theme-kids .key.white[data-note="C4"] { background: #ffadad; }
body.theme-kids .key.white[data-note="D4"] { background: #ffd6a5; }
body.theme-kids .key.white[data-note="E4"] { background: #fdffb6; }
body.theme-kids .key.white[data-note="F4"] { background: #caffbf; }
body.theme-kids .key.white[data-note="G4"] { background: #9bf6ff; }
body.theme-kids .key.white[data-note="A4"] { background: #a0c4ff; }
body.theme-kids .key.white[data-note="B4"] { background: #bdb2ff; }
body.theme-kids .key.white[data-note="C5"] { background: #ffc6ff; }
body.theme-kids .key.white[data-note="D5"] { background: #ff9aa2; }
body.theme-kids .key.white[data-note="E5"] { background: #ffd97d; }
body.theme-kids .key.white[data-note="F5"] { background: #c8e7ff; }
body.theme-kids .key.white[data-note="G5"] { background: #b5e2fa; }
body.theme-kids .key.white[data-note="A5"] { background: #c7ceea; }
body.theme-kids .key.white[data-note="B5"] { background: #ffb7b2; }
body.theme-kids .key.white[data-note="C6"] { background: #ffd97d; }

body.theme-kids .key.white:hover {
    filter: brightness(1.03);
}

body.theme-kids .key.white.active {
    background: #ffffff !important;
    border-bottom: 8px solid #ec4899;
    box-shadow: 0 2px 0 #94a3b8;
    transform: translateY(4px);
    color: #ec4899;
}

/* Kids Round Black Keys */
body.theme-kids .key.black {
    background: #334155;
    border-radius: 0 0 12px 12px;
    border: 2px solid #1e293b;
    color: #ffffff;
    box-shadow: 0 6px 0 #1e293b;
}

body.theme-kids .key.black:hover {
    background: #475569;
}

body.theme-kids .key.black.active {
    background: #0f172a;
    border-bottom: 4px solid #ec4899;
    transform: translateY(3px);
    box-shadow: 0 2px 0 #1e293b;
}
