:root {
    --primary-color: #5D5CDE;
    --bg-light: #FFFFFF;
    --bg-dark: #181818;
}

body {
    background-color: var(--bg-light);
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

body.dark {
    background-color: var(--bg-dark);
    color: #e0e0e0;
}

.container-fluid {
    height: 100vh;
    padding: 15px;
}

.controls-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark .controls-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.keyboard-container {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
}

body.dark .keyboard-container {
    background: rgba(0, 0, 0, 0.2);
}

.note-button {
    min-width: 40px;
    height: 60px;
    border: 2px solid var(--primary-color);
    background: rgba(93, 92, 222, 0.1);
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 10px;
    transition: all 0.1s ease;
    user-select: none;
    touch-action: manipulation;
    margin: 1px;
    flex-shrink: 0;
}

.note-button:hover {
    background: rgba(93, 92, 222, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(93, 92, 222, 0.3);
}

.note-button.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(93, 92, 222, 0.5);
}

.nb-special {
    background-color: rgba(99, 0, 96, 0.1);
    border-color: rgb(153, 48, 159);
}

.nb-major, .nb-minor {
    width: 120px !important;
}

.nb-pentatonic-major, .nb-pentatonic-minor {
    width: 168px !important;
}

.nb-whole-tone {
    width: 140px !important;
} 

.nb-chromatic {
    width: 70px !important;
}

.nb-15-tet {
    width: 56px !important;
}

.nb-19-tet {
    width: 44px !important;
}

.nb-24-tet {
    width: 44px !important;
}

.nb-31-tet {
    width: 40px !important;
}

.octave-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    height: calc((100% - 32px) / 4);
}

.octave-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
    min-width: 60px;
    width: 60px;
    flex-shrink: 0;
}

.notes-container {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    align-items: center;
    padding: 5px 0;
}

.notes-container::-webkit-scrollbar {
    height: 6px;
}

.notes-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.notes-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.form-select, .form-range {
    font-size: 16px;
}

.form-select {
    border: 2px solid var(--primary-color);
    border-radius: 8px;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(93, 92, 222, 0.25);
}

body.dark .form-select {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border-color: var(--primary-color);
}

body.dark .form-select option {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-icon {
    color: var(--primary-color);
    font-size: 18px;
}

.row>* {
    margin-top: 0;
}

@media (max-width: 768px) {
    .note-button {
        font-size: 10px;
        margin: 1px;
    }
    
    .controls-panel {
        padding: 15px;
    }
    
    .octave-label {
        min-width: 30px;
        font-size: 12px;
    }
}