/* ************************ PIXEL AUDIO STUDIO PRO ************************ */
/* Main application stylesheet - Core UI framework and layout system */
/* This file contains the foundational styles for the Pixel Audio Studio application */

:root {
    /* COLOR SYSTEM - Professional Dark Theme */
    --bg-darkest: #0f0f1b;       /* Deep background */
    --bg-dark: #1a1a2e;          /* Primary surface */
    --bg-medium: #16213e;        /* Secondary surface */
    --bg-light: #1e293b;         /* Tertiary surface */

    /* ACCENT COLORS - Cyberpunk/Terminal Inspired */
    --accent-primary: #00ff41;   /* Terminal Green */
    --accent-secondary: #ff006e; /* Neon Pink */
    --accent-tertiary: #00d9ff;  /* Cyan */

    /* TEXT & BORDERS */
    --text-primary: #e0e7ff;     /* Primary text */
    --text-secondary: #94a3b8;   /* Secondary text */
    --border-color: #2d3748;     /* Border color */

    /* LAYOUT DIMENSIONS */
    --header-height: 48px;
    --icon-rail-width: 48px;
    --tools-width: 320px;
    --side-panel-width: 340px;
    --border-glow: rgba(0, 255, 65, 0.3);

    --tile-dim: 32;
    /* The number of logical pixels across the tile */
    --pixel-size: 16px;
}

/* ============================================= */
/* GLOBAL RESET & BASE STYLES */
/* ============================================= */
* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-darkest);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* GLOBAL: Hide Tooltips Class (Toggled via JS) */
body.tooltips-hidden .info-icon {
    display: none !important;
}

/* CRT SCANLINE OVERLAY - Retro terminal effect */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,255,65,0.02) 2px, rgba(0,255,65,0.02) 4px);
    pointer-events: none;
    z-index: 999;
}

/* ============================================= */
/* HEADER COMPONENT */
/* ============================================= */
header {
    height: var(--header-height);
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
    z-index: 50;
}

.logo-area { display: flex; align-items: baseline; gap: 8px; }

.logo-area h1 {
    font-family: 'Press Start 2P', 'Inter', sans-serif;
    font-size: 16px;
    font-weight: normal;
    color: transparent;
    background-image: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary), var(--accent-primary));
    background-size: 200%;
    background-position: 0% 50%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animate-background 2s infinite alternate linear;
}

/* Masked text background animation */
@keyframes animate-background {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Subtle logo glow animation */
@keyframes subtleGlow {
    0% {
        text-shadow: 0 0 8px var(--border-glow);
        color: var(--accent-primary);
    }
    50% {
        text-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
        color: rgba(0, 255, 65, 0.9);
    }
    100% {
        text-shadow: 0 0 15px var(--border-glow);
        color: var(--accent-primary);
    }
}
.badge {
    font-size: 10px;
    background: var(--accent-secondary);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}
.header-controls { display: flex; align-items: center; gap: 8px; }
.separator { width: 1px; height: 20px; background: var(--border-color); margin: 0 8px; }
#icon-sidebar .separator { width: 80%; height: 1px; background: var(--border-color); margin: 8px auto; }
.sidebar-spacer { flex: 1; min-height: 20px; }

/* Header Button System */
.header-btn, .tool-btn {
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap;
    min-width: fit-content;
}
.header-btn:hover, .tool-btn:hover { background: var(--bg-light); color: var(--text-primary); }
.header-btn.primary { background: var(--accent-secondary); border-color: var(--accent-secondary); color: white; }
.header-btn.action { color: var(--accent-tertiary); border-color: var(--accent-tertiary); background: transparent; }

/* Style for when audio is ready/enabled */
.header-btn.action.audio-ready {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Ensure header action buttons show both icon and text */
.header-btn.action i {
    margin-right: 6px;
    font-size: 12px;
}

.header-btn.action span {
    font-size: 11px;
    font-weight: 600;
}

/* Header controls container */
.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-dark);
    padding-bottom: 4px;
}

/* Ensure header controls don't overflow */
.header-controls::-webkit-scrollbar {
    height: 4px;
}

.header-controls::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 2px;
}

.header-controls::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 2px;
}

/* Ensure buttons don't get squashed */
.header-btn, .tool-btn {
    flex-shrink: 0;
}

/* Specific button widths for consistency */
#loadProject, #saveProject, #exportMixBtn, #saveToBrowserBtn {
    min-width: 120px;
    justify-content: center;
}

/* Folder Controls in Layers Panel */
.folder-controls {
    display: flex;
    gap: 4px;
    margin-left: auto;
    margin-right: 10px;
    align-items: center;
}

.folder-btn {
    width: 24px;
    height: 24px;
    padding: 2px;
    font-size: 0.7rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-btn:hover {
    background: var(--bg-medium);
    border-color: var(--text-secondary);
}

.folder-btn i {
    font-size: 0.8rem;
}

/* ============================================= */
/* MAIN LAYOUT STRUCTURE */
/* ============================================= */
main {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* ============================================= */
/* ICON RAIL (Left Sidebar) */
/* ============================================= */
#icon-sidebar {
    width: var(--icon-rail-width);
    background: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 40;
}

.icon-tab-btn {
    width: 100%;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    position: relative; /* For tooltip positioning */
}
/* Enhanced sidebar category tab styling */
.category-sidebar-tab {
    position: relative;
}

.category-sidebar-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.category-sidebar-tab.active {
    background: var(--bg-medium);
    border-left: 3px solid var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.1);
}

.category-sidebar-tab.active i {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 4px rgba(0, 255, 65, 0.5));
}

/* Sidebar Tooltip Styling */
[data-tooltip-right]:hover::after {
    content: attr(data-tooltip-right);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #000;
    color: var(--accent-tertiary);
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 1000;
    margin-left: 8px;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* ============================================= */
/* MIDDLE WORKSPACE AREA */
/* ============================================= */
#workspace-area {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* ============================================= */
/* FIXED TOOLS PANEL (Left Panel) */
/* ============================================= */
#fixed-tools-panel {
    width: var(--tools-width);
    background: var(--bg-medium);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 12px;
    flex-shrink: 0;
}

.tools-header {
    font-size: 12px;
    font-weight: bold;
    color: var(--accent-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    text-align: center;
}

/* CONTROL SECTIONS - Reusable component for grouped controls */
.control-section {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: opacity 0.3s ease;
}
.control-section.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(0.8);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
}
.control-section.minimized .section-header { border-bottom: none; }
.control-section.minimized .section-body { display: none; }

.label-group { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; }
.info-icon { color: var(--text-secondary); cursor: help; opacity: 0.5; font-size: 12px; }
.info-icon:hover { opacity: 1; color: var(--accent-tertiary); }
.toggle-sect-btn { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; font-size: 10px; padding: 2px 6px; }
.toggle-sect-btn:hover { color: #fff; }

.section-body { padding: 10px; }

/* -- SETTINGS PANEL SPECIFIC STYLES -- */
#panel-settings .control-section {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.section-label {
    display: block;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--accent-tertiary);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

/* -- PRESET CATEGORY HEADERS -- */
/* Styled to match .section-header */
.preset-category {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
    border-radius: 4px;

    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;

    margin-top: 16px;
    margin-bottom: 8px;
}
.preset-category:first-of-type {
    margin-top: 0;
}

/* -- CUSTOM TICK BOXES -- */
.checkbox-group { display: flex; align-items: center; gap: 10px; min-height: 24px;}
.checkbox-group input[type="checkbox"] { display: none; }
.checkbox-group input[type="checkbox"] + label {
    position: relative; padding-left: 24px; cursor: pointer;
    font-weight: bold; color: var(--text-secondary); font-size: 11px; user-select: none;
}
.checkbox-group input[type="checkbox"] + label::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px; border: 1px solid var(--border-color); border-radius: 3px; background: var(--bg-darkest); transition: all 0.2s;
}
.checkbox-group input[type="checkbox"]:checked + label { color: var(--accent-primary); }
.checkbox-group input[type="checkbox"]:checked + label::before {
    background: var(--accent-primary); border-color: var(--accent-primary); box-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

/* Inputs & Labels */
.control-group { margin-bottom: 8px; }
.control-group.mt-1 { margin-top: 8px; }
label { font-size: 11px; color: var(--text-secondary); display: block; margin-bottom: 4px; }
.value { float: right; color: var(--accent-primary); font-family: monospace; font-size: 10px; }

input[type="range"] { width: 100%; -webkit-appearance: none; background: transparent; }
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 12px; width: 12px;
    background: var(--accent-primary); border-radius: 50%; margin-top: -4px;
    cursor: pointer; box-shadow: 0 0 5px var(--accent-primary);
}
input[type="range"]::-webkit-slider-runnable-track { width: 100%; height: 4px; background: #333; border-radius: 2px; }
select { width: 100%; background: var(--bg-darkest); color: var(--text-primary); border: 1px solid var(--border-color); padding: 4px; border-radius: 4px; font-size: 11px; }

/* Settings Inputs */
.input-full { width: 100%; background: #000; border: 1px solid var(--border-color); color: var(--accent-primary); padding: 8px; border-radius: 4px; }

/* ============================================= */
/* CENTER STACK (Main Content Area) */
/* ============================================= */
#center-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg-darkest);
    padding: 12px;
    gap: 12px;
}

/* OSCILLOSCOPE VISUALIZER */
#oscilloscope-container {
    height: 180px;
    background: var(--bg-darkest);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.vis-header {
    padding: 10px 16px;
    font-size: 10px;
    color: var(--accent-tertiary);
    background: var(--bg-dark);
    font-family: 'Press Start 2P';
    border-bottom: 1px solid var(--border-color);
}
.canvas-holder {
    flex: 1;
    background-image:
        linear-gradient(var(--bg-darkest) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-darkest) 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: #050505;
    position: relative;
}
#waveform-preview { width: 100%; height: 100%; display: block; }

/* TIMELINE SYSTEM */
#timeline-container {
    flex: 1;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex; flex-direction: column;
    position: relative;
    min-height: 200px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.timeline-controls {
    height: 48px;
    padding: 0 16px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}
.transport { display: flex; gap: 8px; }
.transport button {
    height: 30px; padding: 0 14px;
    border-radius: 4px; border: 1px solid var(--border-color);
    background: var(--bg-medium); color: var(--text-primary); cursor: pointer;
    font-size: 10px; display: flex; align-items: center; gap: 6px;
}
.transport button:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.transport button.accent-btn { background: rgba(0,255,65,0.1); border-color: var(--accent-primary); color: var(--accent-primary); }

.time-settings { font-size: 11px; color: var(--text-secondary); display: flex; gap: 8px; align-items: center; }
.time-settings input { background: #000; border: 1px solid var(--border-color); color: var(--accent-tertiary); width: 44px; padding: 4px; border-radius: 3px; }

.undo-redo { display: flex; gap: 6px; }
.undo-redo button {
    width: 30px; height: 30px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.undo-redo button:hover { color: #fff; border-color: #fff; background: var(--bg-light); }

.timeline-canvas-wrapper { flex: 1; background: var(--bg-darkest); overflow: hidden; position: relative; }
#timeline-canvas { width: 100%; height: 100%; display: block; }

/* ============================================= */
/* SIDE PANEL (Right Panel - Slides In) */
/* ============================================= */
#side-panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: var(--side-panel-width);
    background: var(--bg-medium);
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 100;
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
}

/* Enhanced slide animations with opacity */
#side-panel {
    opacity: 0;
    transform: translateX(100%);
    transition:
        transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
        opacity 0.2s ease-out;
}

#side-panel.open {
    transform: translateX(0);
    opacity: 1;
}

/* Close animation */
#side-panel.closing {
    transform: translateX(100%);
    opacity: 0;
    transition:
        transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1),
        opacity 0.15s ease-out;
}

/* Side panel overlay - closes panel when clicking outside */
#side-panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#side-panel-overlay.visible {
    display: block;
    opacity: 1;
}

.panel-content { display: none; height: 100%; flex-direction: column; padding: 15px; overflow-y: auto; }
.panel-content.active { display: flex; }
.panel-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.panel-title-row h3 { font-size: 14px; text-transform: uppercase; color: var(--accent-tertiary); letter-spacing: 1px; }

.panel-title-with-button {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-title-with-button h3 {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--accent-tertiary);
    letter-spacing: 1px;
    margin: 0;
}

/* Current Collection Display */
.current-collection-display {
    padding: 8px 12px;
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.collection-label {
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent-tertiary);
    width: 100%;
    text-align: left;
}

.collection-dropdown {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Collection dropdown styling */
.collection-dropdown {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    flex: 1;
    min-width: 150px;
    max-width: 250px;
    transition: all 0.2s;
}

.collection-dropdown:hover {
    border-color: var(--accent-tertiary);
}

.collection-dropdown:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 4px var(--accent-primary);
}

.collection-dropdown option {
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 6px 10px;
}

.collection-dropdown option:hover {
    background: var(--bg-medium);
}

.scroll-list { flex: 1; overflow-y: auto; }
.layer-item { background: var(--bg-dark); border: 1px solid var(--border-color); padding: 10px; margin-bottom: 8px; border-radius: 6px; display: flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.layer-item.active { border-color: var(--accent-primary); background: rgba(0, 255, 65, 0.08); }

/* Layer actions container - horizontal alignment */
.layer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding-left: 10px;
}

/* Layer action icons with hover effects */
.layer-actions i {
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Copy icon styling */
.layer-actions .fa-copy {
    color: var(--accent-tertiary);
}
.layer-actions .fa-copy:hover {
    color: var(--text-primary);
    background: rgba(0, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Delete icon styling */
.layer-actions .fa-trash {
    color: #f44336;
}
.layer-actions .fa-trash:hover {
    color: #fff;
    background: rgba(244, 67, 54, 0.2);
    transform: scale(1.1);
}

/* Layer visibility button */
.layer-vis-btn {
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 4px;
}
.layer-vis-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}
.layer-vis-btn.hidden-layer {
    color: #f44336;
}

/* Layer name input styling */
.layer-name-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--text-primary);
    width: 100%;
    font-size: 11px;
    padding: 4px;
    outline: none;
    transition: border-color 0.2s;
}
.layer-name-input:focus {
    border-color: var(--accent-tertiary);
    background: rgba(255, 255, 255, 0.05);
}
.layer-name-input {
    background: transparent; border: none; border-bottom: 1px solid transparent; color: var(--text-primary);
    width: 100%; font-size: 11px; padding: 4px; outline: none; transition: border-color 0.2s;
}
.layer-name-input:focus { border-color: var(--accent-tertiary); background: rgba(255,255,255,0.05); }

/* Collection name input styling - matches layer name input */
.collection-name-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--text-primary);
    font-size: 11px;
    padding: 4px;
    outline: none;
    transition: border-color 0.2s;
    flex: 1;
    margin-left: 8px;
    min-width: 100px;
}
.collection-name-input:focus {
    border-color: var(--accent-tertiary);
    background: rgba(255, 255, 255, 0.05);
}

.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preset-btn { background: var(--bg-dark); border: 1px solid var(--border-color); color: var(--text-secondary); padding: 12px; font-size: 11px; cursor: pointer; border-radius: 6px; text-align: left; transition: all 0.2s; }
.preset-btn:hover { border-color: var(--accent-tertiary); color: var(--accent-tertiary); transform: translateY(-1px); }
.small-btn { border: none; background: var(--accent-primary); color: #000; border-radius: 3px; width: 24px; height: 24px; cursor: pointer; }

/* Layer Folders in Layers Panel (Pixel3D-style) */
.layer-folder-item {
    margin-bottom: 4px;
    border-radius: 4px;
    overflow: hidden;
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
}

.folder-header:hover {
    background: var(--bg-light);
}

.folder-icon {
    color: #a855f7;
    font-size: 0.8rem;
}

.folder-name {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 2px;
}

.folder-name:focus {
    background: var(--bg-dark);
    border-color: var(--border-color);
    outline: none;
}

.folder-actions {
    display: flex;
    gap: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.layer-folder-item:hover .folder-actions {
    opacity: 1;
}

.folder-btn {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 2px;
    background: transparent;
    border: none;
}

.folder-btn:hover {
    color: var(--text-primary);
}

.folder-toggle-btn {
    color: var(--text-secondary);
}

.folder-delete-btn:hover {
    color: var(--accent-secondary);
}

.folder-contents {
    padding-left: 12px;
    margin-top: 2px;
}

.folder-select-dropdown {
    position: absolute;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 0;
    z-index: 1000;
    min-width: 150px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-size: 0.7rem;
}

.dropdown-header {
    padding: 4px 8px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item {
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.new-folder-item {
    color: var(--accent-primary);
    font-weight: 600;
}

.drag-over {
    background: var(--bg-medium);
    border-color: var(--accent-primary);
}

.dragging {
    opacity: 0.5;
    background: var(--bg-medium);
    border: 1px dashed var(--accent-primary);
}

.layer-item:hover {
    border-color: var(--text-secondary);
}

.layer-item.selected {
    border-color: var(--accent-tertiary);
    background: rgba(0, 217, 255, 0.05);
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.1);
}

.layer-icon {
    color: var(--accent-tertiary);
    font-size: 0.8rem;
    width: 20px;
    text-align: center;
}

.layer-name {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    font-size: 0.7rem;
    padding: 1px 3px;
    border-radius: 2px;
}

.layer-name:focus {
    background: var(--bg-dark);
    border-color: var(--border-color);
    outline: none;
}

.layer-actions {
    display: flex;
    gap: 4px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.layer-folder-item:hover .layer-actions {
    opacity: 1;
}

.layer-btn {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 2px;
}

.layer-btn:hover {
    color: var(--text-primary);
}

.layer-btn.delete:hover {
    color: var(--accent-secondary);
}

/* Collections Groups in Layers Panel (Pixel3D-style) */
.layer-group-folder {
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.group-folder-header {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.group-folder-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.group-folder-icon {
    color: var(--accent-tertiary);
    font-size: 12px;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.group-folder-icon.fa-folder-open {
    color: var(--accent-primary);
}

.group-folder-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    margin-left: 8px;
}

.group-layer-count {
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.toggle-group-folder {
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.toggle-group-folder:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-primary);
}

.group-folder-layers {
    padding: 8px 12px;
    background: var(--bg-darkest);
    border-top: 1px solid var(--border-color);
}

.add-layer-to-group-btn {
    width: 100%;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-layer-to-group-btn:hover {
    background: var(--bg-medium);
    border-color: var(--accent-tertiary);
    color: var(--accent-tertiary);
}

.add-layer-to-group-btn i {
    font-size: 11px;
}

/* Close Button Styling */
.close-settings {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    /* Slightly smaller icon */
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s;
}

.close-settings:hover {
    color: var(--accent-secondary);
}

/* ============================================= */
/* BUTTON SYSTEM - Standardized across application */
/* ============================================= */

/* Full width buttons in settings */
.full-btn {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.full-btn:hover {
    background: var(--bg-medium);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.full-btn.secondary {
    border-style: dashed;
    opacity: 0.8;
}

.full-btn.secondary:hover {
    opacity: 1;
    border-color: var(--accent-tertiary);
    color: var(--accent-tertiary);
}

/* Button styling - using exact pixelTilemaps styles */
.btn {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--bg-medium);
    border-color: var(--text-secondary);
}

.btn.primary {
    background: var(--accent-primary);
    color: #000;
    border: none;
    font-weight: 600;
}

.btn.secondary {
    border-style: dashed;
    opacity: 0.8;
}

.btn.secondary:hover {
    opacity: 1;
    border-color: var(--accent-tertiary);
    color: var(--accent-tertiary);
}

/* Disabled button styling */
.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-medium);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn.btn-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-medium);
    border-color: var(--border-color);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Specific button styles for settings modal buttons */
#exportDefaultsBtn, #saveToBrowserBtn, #loadFromBrowserBtn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

#exportDefaultsBtn:hover, #saveToBrowserBtn:hover, #loadFromBrowserBtn:hover {
    background: var(--bg-medium);
    border-color: var(--text-secondary);
}

#loadFromBrowserBtn.secondary {
    border-style: dashed;
    opacity: 0.8;
}

#loadFromBrowserBtn.secondary:hover {
    opacity: 1;
    border-color: var(--accent-tertiary);
    color: var(--accent-tertiary);
}

/* Button icon styling */
#exportDefaultsBtn i, #saveToBrowserBtn i, #loadFromBrowserBtn i {
    font-size: 0.9rem;
}

/* ============================================= */
/* PANEL TOGGLE BUTTON (Right Side) */
/* ============================================= */
#panel-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 60px;
    background-color: var(--accent-primary);
    color: #000;
    border: none;
    border-radius: 5px 0 0 5px;
    cursor: pointer;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -2px 0 5px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

#panel-toggle:hover {
    background-color: var(--accent-tertiary);
    transform: translateY(-50%) scale(1.05);
}

#panel-toggle i {
    font-size: 14px;
}

/* ============================================= */
/* MUSIC GRID SPECIFIC SIDE PANEL */
/* ============================================= */
#side-panel {
    width: var(--side-panel-width);
    background-color: var(--bg-medium);
    padding: 1rem;
    overflow-y: auto;
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    z-index: 100;
    transition: right 0.3s ease;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

#side-panel.visible {
    right: var(--side-panel-width);
    opacity: 1;

}

/* Sound properties panel styling */
#sound-properties {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-dark);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-height) - 2rem);
}

/* Conditional settings display */
.strudel-settings {
    display: none;
}

.tonejs-settings {
    display: block;
}

#sound-properties.strudel-mode .strudel-settings {
    display: block;
}

#sound-properties.strudel-mode .tonejs-settings {
    display: none;
}

#sound-properties .property-group {
    margin-bottom: 1rem;
}

#sound-properties label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#sound-properties .value {
    display: inline-block;
    margin-left: 0.5rem;
    font-weight: bold;
    color: var(--accent-primary);
    font-family: monospace;
}

#sound-properties select,
#sound-properties input[type="range"] {
    width: 100%;
    padding: 6px;
    background-color: var(--bg-darkest);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    margin-top: 4px;
}

#sound-properties input[type="range"] {
    -webkit-appearance: none;
    height: 4px;
    background: var(--bg-darkest);
    border-radius: 2px;
}

#sound-properties input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -4px;
}

#sound-properties select {
    padding: 6px 10px;
    font-size: 11px;
}

/* Play controls styling */
.play-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.play-controls button {
    flex: 1;
    padding: 8px;
    background-color: var(--accent-primary);
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    transition: all 0.2s;
}

.play-controls button:hover {
    background-color: var(--accent-tertiary);
    transform: translateY(-1px);
}

.play-controls button i {
    margin-right: 6px;
}

/* Music grid container */
#music-grid-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
    width: calc(100vw - var(--icon-rail-width) - var(--tools-width));
}

.grid-header {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Music grid styling */
#music-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    background-color: var(--bg-dark);
    border-radius: 6px;
    padding: 10px;
    position: relative;
    border: 1px solid var(--border-color);
}

.grid-quarter {
    background-color: var(--bg-medium);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border: 1px solid var(--border-color);
}

.grid-quarter.highlight {
    background-color: rgba(0, 255, 65, 0.1);
    border-color: var(--accent-primary);
}

/* Instrument styling */
.instrument {
    width: 50px;
    height: 50px;
    background-color: var(--accent-secondary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: bold;
    cursor: grab;
    position: absolute;
    user-select: none;
    border: 2px solid transparent;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.instrument.dragging {
    cursor: grabbing;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.instrument.selected {
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Instrument panel styling */
#instrument-panel {
    width: 250px;
    background-color: var(--bg-medium);
    padding: 1rem;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

/* Category tabs - Hidden since we moved to sidebar */
.category-tabs {
    display: none;
}

/* Category tab styles - Hidden since moved to sidebar */
.category-tab {
    display: none;
}

.category-tab:hover {
    display: none;
}

.category-tab.active {
    display: none;
}

.category-content {
    display: none;
}

.category-content.active {
    display: block;
}

.instrument-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.instrument-item {
    padding: 0.5rem;
    background-color: var(--bg-dark);
    border-radius: 4px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.instrument-item:hover {
    background-color: var(--bg-light);
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.instrument-item.dragging {
    opacity: 0.5;
    background-color: var(--bg-medium);
}

.instrument-icon {
    font-size: 1.2rem;
    color: var(--accent-tertiary);
}

.instrument-item span {
    font-size: 11px;
    color: var(--text-primary);
}

/* Sample Subgroups */
.sample-subgroup {
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
}

.sample-group-header {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: var(--bg-medium);
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.sample-group-header:hover {
    background: var(--bg-light);
}

.sample-group-header .instrument-icon {
    color: var(--accent-tertiary);
    font-size: 14px;
    margin-right: 8px;
}

.sample-group-header span {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sample-group-instruments {
    display: none;
    padding: 8px 0;
}

.sample-subgroup.expanded .sample-group-instruments {
    display: block;
}

.sample-subgroup.expanded .expand-icon {
    transform: rotate(90deg);
}

.sample-group-instruments .instrument-item {
    padding: 8px 16px;
    margin: 0;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sample-group-instruments .instrument-item:last-child {
    border-bottom: none;
}

.sample-group-instruments .instrument-item:hover {
    background: var(--bg-medium);
    transform: none;
}

.sample-group-instruments .instrument-icon {
    font-size: 14px;
    margin-right: 10px;
}

.sample-group-instruments .instrument-item span {
    font-size: 11px;
}

/* Drum Machine Categories */
.drum-machine-category {
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
}

.drum-machine-header {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: var(--bg-medium);
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.drum-machine-header:hover {
    background: var(--bg-light);
}

.drum-machine-header .instrument-icon {
    color: var(--accent-tertiary);
    font-size: 14px;
    margin-right: 8px;
}

.drum-machine-header span {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.expand-icon {
    color: var(--text-secondary);
    font-size: 12px;
    transition: transform 0.2s ease;
}

.drum-machine-instruments {
    display: none;
    padding: 8px 0;
}

.drum-machine-category.expanded .drum-machine-instruments {
    display: block;
}

.drum-machine-category.expanded .expand-icon {
    transform: rotate(90deg);
}

.drum-machine-instruments .instrument-item {
    padding: 8px 16px;
    margin: 0;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.drum-machine-instruments .instrument-item:last-child {
    border-bottom: none;
}

.drum-machine-instruments .instrument-item:hover {
    background: var(--bg-medium);
    transform: none;
}

.drum-machine-instruments .instrument-icon {
    font-size: 14px;
    margin-right: 10px;
}

.drum-machine-instruments .instrument-item span {
    font-size: 11px;
}

/* Group Toggle Icons */
.group-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.group-toggle:hover {
    background: var(--bg-light);
    border-color: var(--accent-primary);
}

.group-toggle i {
    font-size: 10px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.group-toggle:hover i {
    color: var(--accent-primary);
}

/* Updated instrument group header styling */
.instrument-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.instrument-group-header:hover {
    background: var(--bg-light);
}

.instrument-group-header .instrument-icon {
    color: var(--accent-tertiary);
    font-size: 14px;
    margin-right: 8px;
}

.instrument-group-header span {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Group instruments container styling */
.group-instruments {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

/* Group collapse/expand functionality */
.instrument-group:not(.expanded) .group-instruments {
    display: none;
}

.instrument-group.expanded .group-instruments {
    display: flex;
}

/* Node type styling with color coding */
.node-DrumSymbol .node-title {
    border-left: 4px solid #00d9ff;
}

.node-Instrument .node-title {
    border-left: 4px solid #00d9ff;
}

.node-Repeater .node-title {
    border-left: 4px solid #ff006e;
}

.node-Group .node-title {
    border-left: 4px solid #8b5cf6;
}

.node-Chance .node-title {
    border-left: 4px solid #00ff41;
}

.node-Effect .node-title {
    border-left: 4px solid #9400d3;
}

.node-Generator .node-title {
    border-left: 4px solid #ffa500;
}

.node-Transform .node-title {
    border-left: 4px solid #ffa500;
}

.node-Output .node-title {
    border-left: 4px solid #666;
}

/* Connection Ports */
.connection-port {
    background: #374151;
    border: 2px solid #4b5563;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    position: absolute;
    cursor: crosshair;
    transition: all 0.2s;
    z-index: 20;
}

.node-input {
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
}

.node-input:hover {
    background: #00ff41;
    border-color: #00ff41;
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.node-output {
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
}

.node-output:hover {
    background: #00d9ff;
    border-color: #00d9ff;
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* Connection Lines */
.connection-line {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.connection-path {
    stroke: #475569;
    stroke-width: 3;
    fill: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: stroke 0.2s;
}

.connection-path:hover {
    stroke: #00ff41;
    stroke-width: 4;
}

.connection-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.connection-path-preview {
    stroke: #00ff41;
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 5,5;
    animation: dash 1s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -10;
    }
}

/* Node Properties Panel */
#node-properties {
    color: #e0e7ff;
}

.node-info {
    background: #0f0f1b;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #374151;
}

.node-info h3 {
    color: #00d9ff;
    margin: 0 0 8px 0;
    font-size: 16px;
}

.node-id {
    color: #94a3b8;
    font-size: 12px;
    margin: 0;
}

.property-section {
    background: #0f0f1b;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #374151;
    overflow: hidden;
}

.property-section h4 {
    background: #1a1a2e;
    color: #00ff41;
    margin: 0;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #374151;
}

.property-controls {
    padding: 15px;
}

.property-control {
    margin-bottom: 15px;
}

.property-control:last-child {
    margin-bottom: 0;
}

.property-control label {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Knob and Slider Controls */
.knob-container,
.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.knob,
.slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #374151;
    outline: none;
}

.knob::-webkit-slider-thumb,
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00ff41;
    cursor: pointer;
    border: 2px solid #0f0f1b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.knob::-moz-range-thumb,
.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00ff41;
    cursor: pointer;
    border: 2px solid #0f0f1b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.knob-value,
.slider-value {
    color: #00d9ff;
    font-size: 12px;
    font-weight: 600;
    min-width: 50px;
    text-align: right;
    font-family: 'Courier New', monospace;
}

/* Select Control */
.select {
    width: 100%;
    padding: 8px 12px;
    background: #1a1a2e;
    border: 1px solid #374151;
    border-radius: 6px;
    color: #e0e7ff;
    font-size: 13px;
    cursor: pointer;
}

.select:focus {
    border-color: #00ff41;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 255, 65, 0.2);
}

/* Toggle Control */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 12px;
    padding: 4px 0;
    min-height: 24px;
    position: relative;
}

.toggle {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 22px;
    background: #374151;
    border-radius: 11px;
    transition: background 0.2s;
    flex-shrink: 0;
    border: 1px solid #4b5563;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #94a3b8;
    top: 1px;
    left: 1px;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle:checked + .toggle-slider {
    background: #00ff41;
    border-color: #00ff41;
}

.toggle:checked + .toggle-slider::before {
    transform: translateX(22px);
    background: #0f0f1b;
}

/* Toggle text wrapper for better spacing */
.toggle-text {
    flex: 1;
    user-select: none;
    line-height: 1.3;
}

/* Number and Text Inputs */
.number-input,
.text-input {
    width: 100%;
    padding: 8px 12px;
    background: #1a1a2e;
    border: 1px solid #374151;
    border-radius: 6px;
    color: #e0e7ff;
    font-size: 13px;
}

.number-input:focus,
.text-input:focus {
    border-color: #00ff41;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 255, 65, 0.2);
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-input {
    -moz-appearance: textfield;
}

/* Node Property Values Display */
.property-value {
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    margin: 2px 0;
    font-size: 10px;
    color: #00d9ff;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: default;
    transition: all 0.2s;
}

.property-value:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.5);
    transform: translateX(2px);
}

.property-value[data-property="effect"] {
    background: rgba(148, 0, 211, 0.1);
    border-color: rgba(148, 0, 211, 0.3);
    color: #9400d3;
}

.property-value[data-property="effect"]:hover {
    background: rgba(148, 0, 211, 0.2);
    border-color: rgba(148, 0, 211, 0.5);
}

.property-value[data-property="pattern"] {
    background: rgba(255, 0, 110, 0.1);
    border-color: rgba(255, 0, 110, 0.3);
    color: #ff006e;
}

.property-value[data-property="pattern"]:hover {
    background: rgba(255, 0, 110, 0.2);
    border-color: rgba(255, 0, 110, 0.5);
}

.property-value[data-property="pitch"] {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.3);
    color: #00ff41;
}

.property-value[data-property="pitch"]:hover {
    background: rgba(0, 255, 65, 0.2);
    border-color: rgba(0, 255, 65, 0.5);
}



/* ============================================= */
/* NODE EDITOR SPECIFIC STYLES */
/* ============================================= */

/* Info Panel for Node Legend */
.info-panel {
    background: var(--bg-dark);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.info-panel h3 {
    color: var(--accent-tertiary);
    margin: 0 0 12px 0;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-panel p {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 8px 0;
    line-height: 1.4;
}

/* Node Legend Styles */
.node-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 11px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
}

/* Node Type Color Coding */
.legend-instrument { background: #00d9ff; }
.legend-note { background: #9400d3; }
.legend-rest { background: #666; }
.legend-multiplier { background: #ff006e; }
.legend-stack { background: #00ff41; }
.legend-parallel { background: #ffa500; }
.legend-group { background: #8b5cf6; }



/* Status Message */
.status-message {
    position: absolute;
    bottom: 100px;
    left: 40px;
    background: rgba(26, 26, 46, 0.9);
    color: var(--text-secondary);
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 6px;
    font-size: 12px;
    z-index: 100;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

/* ============================================= */
/* FOOTER - STRUDEL PATTERN GENERATOR */
/* ============================================= */

.strudel-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.strudel-input-section h3 {
    color: var(--accent-tertiary);
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.strudel-input-section h3 i {
    font-size: 16px;
}

.input-group {
    margin-bottom: 15px;
}

#strudel-example-input {
    width: 100%;
    background: var(--bg-darkest);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    transition: all 0.2s;
}

#strudel-example-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 255, 65, 0.2);
}

#strudel-example-input::placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

.example-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.example-btn {
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px 8px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

.example-btn:hover {
    background: var(--bg-light);
    border-color: var(--accent-tertiary);
    color: var(--accent-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.2);
}

.example-btn i {
    font-size: 16px;
    margin-bottom: 2px;
}

.example-btn span {
    font-weight: 600;
    font-size: 11px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .strudel-footer {
        padding: 15px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #generate-from-strudel {
        justify-content: center;
    }
    
    .example-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .example-btn {
        min-width: 90px;
        padding: 10px 6px;
    }
}
