body {
    font-family: Arial, sans-serif;
    margin: 10px;
    padding: 0;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    min-height: 95vh;
}

#status {
    padding: 5px 10px;
    margin-bottom: 5px;
    background: #e0f2e9;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.version-info {
    font-size: 10px;
    color: #666;
    display: flex;
    gap: 15px;
}

.version-info span {
    white-space: nowrap;
}

.main-container {
    display: flex;
    flex: 1;
    gap: 10px;
}

#sequencer-main {
    flex: 1;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    min-height: 380px;
    overflow-y: auto;
}

.midi-panel {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.midi-monitor {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 250px;
    overflow-y: auto;
    padding: 8px;
}

.midi-monitor h3 {
    margin: 0 0 5px 0;
    padding-bottom: 3px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.midi-message {
    background: #e8f4ff;
    padding: 5px;
    margin: 3px 0;
    border-radius: 3px;
    font-size: 0.85em;
}

#midi-input-monitor .midi-message {
    background: #e8f4ff;
}

#midi-output-monitor .midi-message {
    background: #fff0e8;
}

.device-list {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 10px;
}

.control-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    margin-top: 10px;
}

.control-group {
    margin-bottom: 8px;
    min-width: 180px;
    flex: 1;
    margin-right: 5px;
}

.control-group label {
    display: block;
    margin-bottom: 2px;
    font-weight: bold;
    font-size: 13px;
}

.control-group select {
    width: 100%;
    max-width: 280px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
}

.control-group input[type="number"] {
    width: 90px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Remove spinner buttons for Chrome, Safari, Edge, Opera */
.control-group input[type="number"]::-webkit-outer-spin-button,
.control-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.control-group input[type="number"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 3px rgba(76, 175, 80, 0.3);
}

.control-group input[type="number"]:hover {
    border-color: #4CAF50;
}

/* Style for the note value selector */
#note-value-select {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

#note-value-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 3px rgba(76, 175, 80, 0.3);
}

#note-value-select option {
    padding: 5px;
}

/* New styles for chord progression */
.section-container {
    background: #fff;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
}

.section-container h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    font-size: 15px;
}

.chord-progression {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: flex-start;
}

.chord-slot {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.chord-slot.active-chord {
    background: #e3f2fd;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.chord-slot.active-chord select {
    border-color: #2196F3;
}

.chord-slot select {
    padding: 3px;
    border: 1px solid #ccc;
    border-radius: 3px;
    transition: border-color 0.3s ease;
    font-size: 13px;
}

.chord-notes-display {
    font-size: 0.8em;
    color: #666;
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px dashed #ccc;
    cursor: help;
}

.chord-slot .remove-chord {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ff5252;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

#add-chord {
    height: 40px;
    width: 40px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 20px;
    cursor: pointer;
    align-self: center;
}

/* Sequencer grid styles */
.sequencer-grid {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.grid-header {
    display: flex;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.header-cell {
    width: 100px;
    padding: 8px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #ddd;
}

.header-steps {
    display: flex;
    flex: 1;
}

.step-header {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    border-right: 1px solid #ddd;
    font-size: 12px;
}

.grid-row {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.row-label {
    width: 100px;
    padding: 8px;
    font-weight: bold;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 60px;
}

.row-label-header {
    display: flex;
    align-items: center;
    gap: 5px;
}

.row-label-buttons {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.row-reset,
.row-randomize {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.row-reset:hover,
.row-randomize:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.row-reset:active,
.row-randomize:active {
    background-color: rgba(0, 0, 0, 0.2);
}

.row-cells {
    display: flex;
    flex: 1;
}

.sequencer-cell {
    flex: 1;
    height: 30px;
    border-right: 1px solid #ddd;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.sequencer-cell.active {
    background-color: #4CAF50;
}

/* For pitch row - different visualization */
.grid-row[data-param="pitch"] .sequencer-cell {
    background: linear-gradient(to top, #f9f9f9, #f9f9f9);
    height: 60px;
    position: relative;
    overflow: visible;
}

.grid-row[data-param="pitch"] .sequencer-cell:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background-color: #ccc;
    z-index: 1;
}

.grid-row[data-param="pitch"] .sequencer-cell .value-indicator {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.grid-row[data-param="pitch"] .sequencer-cell.active {
    background: linear-gradient(to top, #4CAF50, #81C784);
}

.sequencer-cell .value-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(33, 150, 243, 0.3);
    pointer-events: none;
}

.playback-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 5px 8px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
}

.transport-buttons {
    display: flex;
    gap: 10px;
}

.pattern-controls {
    display: flex;
    gap: 10px;
}

#record-button {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#record-button.active {
    background: #d32f2f;
}

#clear-pattern, #randomize-pattern {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

#clear-pattern:hover, #randomize-pattern:hover {
    background: #1976D2;
}

#record-button:hover {
    background: #d32f2f;
}

/* For active step indication during playback */
.step-header.current {
    background-color: #FFD54F;
    font-weight: bold;
}

.sequencer-cell.current {
    box-shadow: inset 0 0 0 2px #FF9800;
}

/* Pitch Cell styling */
.pitch-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 60px;
    border-right: 1px solid #ddd;
    position: relative;
    cursor: ns-resize;
    user-select: none;
    overflow: visible;
}

.pitch-cell.current {
    box-shadow: inset 0 0 0 2px #FF9800;
}

.pitch-cell.dragging {
    background-color: rgba(76, 175, 80, 0.1);
}

.pitch-cell.dragging .pitch-handle {
    background-color: #2E7D32;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Value indicators */
.pitch-value, .velocity-value, .length-value {
    position: absolute;
    top: 2px;
    font-size: 10px;
    font-weight: bold;
    color: rgba(51, 51, 51, 0.7);
    background: rgba(240, 240, 240, 0.5);
    border-radius: 2px;
    padding: 1px 3px;
    width: 24px;
    text-align: center;
    z-index: 3;
    transition: all 0.2s ease;
}

/* Hover states */
.pitch-cell:hover .pitch-value,
.velocity-cell:hover .velocity-value,
.length-cell:hover .length-value {
    color: rgba(51, 51, 51, 0.9);
    background: rgba(240, 240, 240, 0.85);
}

/* Dragging states */
.pitch-cell.dragging .pitch-value,
.velocity-cell.dragging .velocity-value,
.length-cell.dragging .length-value {
    color: rgba(51, 51, 51, 1);
    background: rgba(240, 240, 240, 0.95);
}

/* Handle styling */
.pitch-handle {
    position: absolute;
    width: 90%;
    height: 6px;
    background: #4CAF50;
    border-radius: 4px;
    left: 5%;
    transform: translateY(-50%);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.7);
}

/* Background indicator for positive and negative values */
.pitch-indicator {
    position: absolute;
    width: 100%;
    background: rgba(33, 150, 243, 0.2);
    left: 0;
    z-index: 1;
}

/* Zero line indicator */
.pitch-cell:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background-color: #999;
    z-index: 1;
}

/* Hide old sliders */
.pitch-slider {
    display: none;
}

/* Velocity Cell styling */
.velocity-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 60px;
    border-right: 1px solid #ddd;
    position: relative;
    cursor: ns-resize;
    user-select: none;
    overflow: hidden;
}

.velocity-cell.current {
    box-shadow: inset 0 0 0 2px #FF9800;
}

.velocity-cell.dragging {
    background-color: rgba(33, 150, 243, 0.1);
}

/* Velocity value styling handled in the consolidated styles above */

/* Handle styling */
.velocity-handle {
    position: absolute;
    width: 90%;
    height: 5px;
    background: #2196F3;
    border-radius: 3px;
    left: 5%;
    bottom: 0;
    transform: translateY(-50%);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.7);
    max-bottom: 0;
    max-top: calc(100% - 8px);
}

.velocity-cell.dragging .velocity-handle {
    background-color: #1565C0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Background indicator */
.velocity-indicator {
    position: absolute;
    width: 100%;
    bottom: 0;
    background: rgba(33, 150, 243, 0.2);
    left: 0;
    z-index: 1;
    max-height: calc(100% - 4px);
}

/* Length Cell styling */
.length-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 50px;
    border-right: 1px solid #ddd;
    position: relative;
    cursor: ew-resize;
    user-select: none;
    overflow: hidden;
}

.length-cell.current {
    box-shadow: inset 0 0 0 2px #FF9800;
}

.length-cell.dragging {
    background-color: rgba(255, 152, 0, 0.1);
}

/* Length value styling handled in the consolidated styles above */

/* Handle styling */
.length-handle {
    position: absolute;
    height: 70%;
    width: 5px;
    background: #FF9800;
    border-radius: 3px;
    top: 15%;
    right: 0;
    transform: translateX(-50%);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.7);
    max-right: 0;
}

.length-cell.dragging .length-handle {
    background-color: #EF6C00;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Background indicator */
.length-indicator {
    position: absolute;
    height: 70%;
    top: 15%;
    background: rgba(255, 152, 0, 0.2);
    left: 0;
    z-index: 1;
}

/* Center line for length */
.length-cell:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #ddd;
    z-index: 1;
}

/* Remove the double-click tooltip */
.pitch-cell:before,
.velocity-cell:before,
.length-cell:before {
    display: none;
}

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

.record-step-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #f44336;
    border-radius: 50%;
    margin-left: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.record-step-indicator.active {
    opacity: 1;
    animation: blink-record 0.5s infinite;
}

@keyframes blink-record {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.step-header.record-step {
    background-color: rgba(244, 67, 54, 0.3);
    box-shadow: inset 0 0 0 2px #f44336;
    position: relative;
}

.step-header.current.record-step {
    background-color: #f57c00;
}

.pitch-cell.record-step,
.velocity-cell.record-step,
.length-cell.record-step {
    box-shadow: inset 0 0 0 2px #f44336;
    background-color: rgba(244, 67, 54, 0.05);
}

/* Add a pulsing indicator for the current record step */
.pitch-cell.record-step:after,
.velocity-cell.record-step:after,
.length-cell.record-step:after {
    content: '⬤';
    position: absolute;
    left: 4px;
    bottom: 4px;
    color: #f44336;
    font-size: 8px;
    opacity: 1;
    animation: pulse-dot 1s infinite;
    z-index: 5;
}

@keyframes pulse-dot {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Chord sequencer toggle styles */
.chord-toggle-container {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 5px;
}

.toggle-label {
    font-size: 14px;
    color: #333;
}

.toggle-desc {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-left: 5px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4CAF50;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

#chord-record-button {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#chord-record-button:hover {
    background: #d32f2f;
}

#chord-record-button.active {
    background: #d32f2f;
    animation: blink-record 1s infinite;
}

/* Version footer styles - keeping for reference but will be unused */
.version-footer {
    font-size: 10px;
    color: #999;
    text-align: right;
    padding: 5px 10px;
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.version-footer span {
    white-space: nowrap;
}

/* Help button */
.help-button {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    font-weight: 500;
}

.help-button:hover {
    background: #45a049;
}

/* Buy Me a Coffee button adjustments - base styles */
.bmc-btn {
    min-width: 160px !important;
    padding: 3px 12px !important;
    height: 32px !important;
    line-height: normal !important;
    background-color: #fff5eb !important;
    font-size: 13px !important;
    border: 1px solid #666666 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

.bmc-btn:hover {
    background-color: #fff0e0 !important;
}

/* Center the emoji and text within the button */
.bmc-btn-text {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

/* Target the coffee emoji specifically */
.bmc-btn svg {
    margin-right: -4px !important;
}

/* Ensure the container in the help overlay maintains the same styling */
.support-section .bmc-btn {
    margin: 0 auto !important;
}

/* Remove any default margins that might affect centering */
.bmc-btn img {
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    left: 4px !important;
}

.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Help overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.overlay.active {
    display: flex;
}

.overlay-content {
    background: white;
    margin: 10% auto;
    padding: 15px;
    border-radius: 5px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    position: relative;
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.overlay-header h2 {
    margin: 0;
    color: #333;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-button:hover {
    color: #333;
}

.help-content {
    padding: 20px;
}

/* Additional help content styling */
.help-content h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
}

.help-content h4 {
    color: #4CAF50;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
}

.help-content p {
    margin: 5px 0 10px;
    line-height: 1.4;
}

.help-content ul {
    margin: 5px 0 10px;
    padding-left: 20px;
}

.help-content li {
    margin-bottom: 3px;
    line-height: 1.4;
}

.help-content strong {
    font-weight: 600;
    color: #333;
}

/* Cookie Notice Styles */
.cookie-content {
    padding: 0 20px 20px;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.cookie-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

#accept-cookies {
    background-color: #4CAF50;
    color: white;
}

#accept-cookies:hover {
    background-color: #3e8e41;
}

#reject-cookies {
    background-color: #f44336;
    color: white;
}

#reject-cookies:hover {
    background-color: #d32f2f;
}

.cookie-button:active {
    transform: scale(0.98);
}

/* Header row styling */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.header-row h2 {
    margin: 0;
    font-size: 18px;
}

/* Control row styling */
.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
}

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

/* Section header row */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.section-header-row h3 {
    margin: 0;
    padding: 0;
    border: none;
}

/* Move playback controls up next to the section header */
.section-header-row .playback-controls {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

/* Chord options layout */
.chord-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 8px;
}

/* Help button styles consolidated at top */

/* Adjust for playback controls in header */
.transport-buttons, .pattern-controls {
    display: flex;
    gap: 5px;
}

#record-button, #clear-pattern, #randomize-pattern {
    padding: 4px 8px;
    font-size: 12px;
}

/* Make the cookie notice more compact */
.cookie-content p {
    margin: 5px 0;
    font-size: 13px;
}

.cookie-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

#midi-input-monitor .device-list {
    display: none;
}

/* Adjust the messages container to take full height since device list is hidden */
#midi-input-monitor .messages {
    height: calc(100% - 25px); /* Subtracting the header height */
    overflow-y: auto;
}

/* Adjust Buy Me a Coffee button to be more subtle */
.bmc-btn {
    min-width: unset !important;
    padding: 3px 12px !important;
    height: 32px !important;
    line-height: normal !important;
    background-color: #fff5eb !important;
    font-size: 13px !important;
    border: 1px solid #666666 !important;
}

.bmc-btn:hover {
    background-color: #fff0e0 !important;
}

/* Help button styles consolidated at top */

.help-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.help-footer h4 {
    color: #333;
    margin-bottom: 10px;
}

.help-footer a {
    color: #4CAF50;
    text-decoration: none;
}

.help-footer a:hover {
    text-decoration: underline;
}

.support-section {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    text-align: center;
}

.support-section p {
    margin-bottom: 15px;
    color: #666;
}

.support-section .bmc-btn {
    display: inline-flex !important;
    margin: 0 auto !important;
    min-width: 160px !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

/* Buy Me a Coffee button adjustments - base styles */
.bmc-btn {
    min-width: 160px !important;
    padding: 3px 12px !important;
    height: 32px !important;
    line-height: normal !important;
    background-color: #fff5eb !important;
    font-size: 13px !important;
    border: 1px solid #666666 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

.bmc-btn:hover {
    background-color: #fff0e0 !important;
}

/* Center the emoji and text within the button */
.bmc-btn-text {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

/* Target the coffee emoji specifically */
.bmc-btn svg {
    margin-right: -4px !important;
}

/* Ensure the container in the help overlay maintains the same styling */
.support-section .bmc-btn {
    margin: 0 auto !important;
}

/* Remove any default margins that might affect centering */
.bmc-btn img {
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    left: 4px !important;
}

#midi-input-monitor .device-list {
    display: none;
}

/* Adjust the messages container to take full height since device list is hidden */
#midi-input-monitor .messages {
    height: calc(100% - 25px); /* Subtracting the header height */
    overflow-y: auto;
}

/* Adjust Buy Me a Coffee button to be more subtle */
.bmc-btn {
    min-width: unset !important;
    padding: 3px 12px !important;
    height: 32px !important;
    line-height: normal !important;
    background-color: #fff5eb !important;
    font-size: 13px !important;
    border: 1px solid #666666 !important;
}

.bmc-btn:hover {
    background-color: #fff0e0 !important;
}

/* Help button styles consolidated at top */

/* Power Button Styles */
.power-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
}

.power-group .toggle-label {
    color: #666;
    font-size: 14px;
}

/* Settings Section in Help Overlay */
.settings-section {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group h5 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.setting-group p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 14px;
}

.setting-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.setting-controls label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin: 0;
}

.setting-controls input[type="number"] {
    width: 60px;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.setting-controls input[type="number"]:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(102, 102, 102, 0.2);
}

/* Keyboard Monitor Styles */
.keyboard-container {
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fafafa;
    overflow: hidden;
}

.keyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #f2f2f2;
    cursor: default;
    user-select: none;
}

.keyboard-header span {
    font-weight: 600;
    color: #333;
}

.toggle-button {
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
}

.toggle-button:hover {
    background: #45a049;
}

.keyboard-container.collapsed .keyboard {
    display: none;
}

.keyboard {
    display: flex;
    position: relative;
    padding: 1px 2px 4px 2px;
    height: 28px;
    overflow: hidden;
    user-select: none;
}

.white-key {
    position: relative;
    width: 24px;
    height: 26px;
    margin: 0 1px;
    background: #fff;
    border: 1px solid #999;
    border-radius: 0 0 4px 4px;
    box-sizing: border-box;
    z-index: 1;
}

.white-key.active {
    background: #4CAF50;
}

.black-key {
    position: relative;
    width: 12px;
    height: 13px;
    margin: 0 -6px 0 -6px;
    background: #000;
    border: 1px solid #333;
    border-radius: 0 0 3px 3px;
    z-index: 2;
}

.black-key.active {
    background: #4CAF50;
}

.keyboard-container.hidden {
    display: none;
} 