body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    font-size: 12px;
    color: #d4d4d4;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 10px;
    box-sizing: border-box;
}

.header {
    color: #569cd6;
    text-align: center;
    margin-bottom: 10px;
}

.header pre {
    margin: 0;
    line-height: 1.2;
    font-size: 11px;
    color: #4ec9b0;
}

.footer {
    color: #608b4e;
    text-align: center;
    margin-top: 10px;
}

.footer pre {
    margin: 0;
    line-height: 1.2;
    font-size: 10px;
}

.main-content {
    display: flex;
    flex: 1;
    gap: 15px;
    overflow: hidden;
}

/* Control Panel */
.control-panel {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 10px;
}

.panel-section {
    border: 1px solid #3e3e42;
    padding: 10px;
    background-color: #252526;
    border-radius: 4px;
}

.section-title {
    color: #4ec9b0;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    font-size: 11px;
}

.control-group {
    margin-bottom: 12px;
}

.control-group label {
    display: block;
    color: #9cdcfe;
    margin-bottom: 4px;
    font-size: 11px;
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    background-color: #1e1e1e;
    color: #d4d4d4;
    border: 1px solid #3e3e42;
    padding: 4px;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 11px;
    border-radius: 2px;
}

.control-group select {
    cursor: pointer;
}

/* Instrument row with mute checkbox */
.instrument-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.instrument-row select {
    flex: 1;
}

.mute-label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #9cdcfe;
    font-size: 10px;
    cursor: pointer;
    white-space: nowrap;
    margin: 0;
}

.mute-checkbox {
    cursor: pointer;
    width: 14px;
    height: 14px;
    accent-color: #569cd6;
}

.mute-label:hover {
    color: #4ec9b0;
}

/* Volume sliders */
.volume-slider {
    width: 100%;
    margin-top: 4px;
}

.volume-slider::-webkit-slider-thumb {
    background: #4ec9b0;
}

.volume-slider::-moz-range-thumb {
    background: #4ec9b0;
}

.volume-slider:hover::-webkit-slider-thumb {
    background: #569cd6;
}

.volume-slider:hover::-moz-range-thumb {
    background: #569cd6;
}

.control-group select:hover {
    border-color: #569cd6;
}

.control-group select:focus,
.control-group input:focus {
    outline: none;
    border-color: #569cd6;
    box-shadow: 0 0 0 1px #569cd6;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #3e3e42;
    outline: none;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #569cd6;
    cursor: pointer;
    border: none;
    border-radius: 50%;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #569cd6;
    cursor: pointer;
    border: none;
    border-radius: 50%;
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: #4ec9b0;
}

input[type="range"]:hover::-moz-range-thumb {
    background: #4ec9b0;
}

/* Buttons */
.action-btn,
.theme-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 6px;
    background-color: #0e639c;
    color: #ffffff;
    border: 1px solid #1177bb;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    border-radius: 4px;
}

.action-btn:hover:not(:disabled),
.theme-btn:hover {
    background-color: #1177bb;
    border-color: #1890d0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(17, 119, 187, 0.3);
}

.action-btn:active:not(:disabled),
.theme-btn:active {
    background-color: #0d5a8f;
    transform: translateY(1px);
    box-shadow: none;
}

.action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #3e3e42;
    background-color: #2d2d30;
    color: #6e6e6e;
}

.theme-btn {
    font-size: 10px;
    padding: 6px;
    background-color: #264f78;
    border-color: #2d5a7f;
}

.theme-btn:hover {
    background-color: #2d5a7f;
    border-color: #366c9f;
}

.status-display {
    background-color: #1e1e1e;
    border: 1px solid #3e3e42;
    padding: 8px;
    min-height: 60px;
    color: #ce9178;
    font-size: 10px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-radius: 2px;
}

/* Staff Display - Now Song Structure Display */
.staff-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 2px solid #3e3e42;
    background-color: #1e1e1e;
    overflow: hidden;
    border-radius: 4px;
}

.staff-content {
    flex: 1;
    margin: 0;
    padding: 15px;
    overflow: auto;
    color: #d4d4d4;
    font-size: 11px;
    line-height: 1.3;
    font-family: 'Courier New', 'Consolas', monospace;
}

/* Interactive Block Styles */
.song-structure-wrapper {
    color: #d4d4d4;
}

.structure-header,
.structure-blocks pre,
.song-stats,
.current-section-details {
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.block-wrapper {
    position: relative;
}

.block-content-row {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.block-info {
    display: flex;
    align-items: center;
    flex: 1;
    transition: background-color 0.2s;
}

.block-info:hover {
    background-color: #2d2d30;
}

.block-controls {
    margin: 0 10px;
}

.block-btn {
    background-color: #2d2d30;
    color: #d4d4d4;
    border: 1px solid #3e3e42;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    font-family: 'Courier New', 'Consolas', monospace;
    transition: all 0.15s ease;
    min-width: 28px;
}

.block-btn:hover {
    background-color: #3e3e42;
    border-color: #569cd6;
}

.block-btn:active {
    transform: scale(0.95);
}

.block-inc:hover {
    background-color: #107c10;
    border-color: #16a316;
    color: white;
}

.block-dec:hover {
    background-color: #a80000;
    border-color: #d13438;
    color: white;
}

.block-delete {
    margin-left: 8px;
}

.block-delete:hover {
    background-color: #a80000;
    border-color: #d13438;
}

.block-repeat {
    display: inline-block;
    color: #4ec9b0;
    font-weight: bold;
    font-size: 11px;
}

/* Add Block Button */
.add-block-container {
    margin-top: 10px;
}

.add-block-row {
    position: relative;
}

.add-block-btn {
    background: linear-gradient(135deg, #0e639c 0%, #1177bb 100%);
    color: white;
    border: 1px solid #1177bb;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Courier New', 'Consolas', monospace;
    transition: all 0.15s ease;
}

.add-block-btn:hover {
    background: linear-gradient(135deg, #1177bb 0%, #1890d0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(17, 119, 187, 0.4);
}

.add-block-btn:active {
    transform: translateY(1px);
}

.add-block-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: #252526;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 180px;
}

.dropdown-option {
    display: block;
    width: 100%;
    background-color: transparent;
    color: #d4d4d4;
    border: none;
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 12px;
    transition: background-color 0.15s;
}

.dropdown-option:hover {
    background-color: #2d2d30;
    color: #4ec9b0;
}

.dropdown-option:first-child {
    border-radius: 4px 4px 0 0;
}

.dropdown-option:last-child {
    border-radius: 0 0 4px 4px;
}

/* Scrollbar styling - VS Code style */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #424242;
    border: 3px solid #1e1e1e;
    border-radius: 7px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4e4e4e;
}

::-webkit-scrollbar-corner {
    background: #1e1e1e;
}

/* Animation for playing state */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.playing {
    animation: pulse 1s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .control-panel {
        width: 100%;
        max-height: 300px;
    }
    
    body, html {
        overflow: auto;
    }
    
    .container {
        height: auto;
        min-height: 100vh;
    }
}

/* Selection styling - VS Code colors */
::selection {
    background-color: #264f78;
    color: #ffffff;
}

::-moz-selection {
    background-color: #264f78;
    color: #ffffff;
}

/* Focus indicators */
button:focus,
select:focus,
input:focus {
    outline: none;
    border-color: #569cd6;
    box-shadow: 0 0 0 1px #569cd6;
}

/* Blink effect for status updates */
@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.5; }
}

.blink {
    animation: blink 0.4s ease-in-out 3;
}

/* Enhanced button styles for different actions */
#generateBtn {
    background: linear-gradient(135deg, #0e639c 0%, #1177bb 100%);
}

#playBtn {
    background: linear-gradient(135deg, #107c10 0%, #16a316 100%);
    border-color: #16a316;
}

#playBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a316 0%, #1bc71b 100%);
    border-color: #1bc71b;
}

#stopBtn {
    background: linear-gradient(135deg, #a80000 0%, #d13438 100%);
    border-color: #d13438;
}

#stopBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #d13438 0%, #e81123 100%);
    border-color: #e81123;
}

#mutateBtn {
    background: linear-gradient(135deg, #8a2be2 0%, #9d4edd 100%);
    border-color: #9d4edd;
}

#mutateBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #9d4edd 0%, #b565f5 100%);
    border-color: #b565f5;
}

#analysisBtn {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    border-color: #f1c40f;
}

#analysisBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f1c40f 0%, #f9e79f 100%);
    border-color: #f9e79f;
}
