 /*
 Settings Button - rechts oben 
.settings-btn {
    position: fixed;
    top: 18%;
    right: 10%;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #007bff;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: background 0.3s;
}

.settings-btn:hover {
    background: #0056b3;
}
*/
/* Debug Log Styling */
.debug-log-container {
    width: 100%;
    margin-top: 10px;
}

.debug-log {
    width: 100%;
    height: 200px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    background-color: #f8f9fa;
    color: #333;
    resize: vertical;
    overflow-y: auto;
    white-space: pre-wrap;
}

.debug-log-controls {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    justify-content: flex-start;
}

.debug-log-controls .setting-btn {
    padding: 4px 12px;
    font-size: 12px;
}

/* Updated 3-Column Layout */
.settings-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 20px;
    margin-top: 20px;
}

.settings-left {
    min-width: 280px;
}

.settings-center {
    min-width: 280px;
}

.settings-right {
    min-width: 350px;
}

/* Responsive für 3-Spalten */
@media (max-width: 1200px) {
    .settings-layout {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    
    .settings-right {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }
    
    .settings-left,
    .settings-center,
    .settings-right {
        min-width: auto;
    }
}
/* Modal Overlay - Basis */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.visible {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

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

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

/* Settings Modal */
.settings-modal {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.settings-section {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.settings-section h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-btn {
    padding: 8px 16px;
    border: 1px solid #007bff;
    border-radius: 4px;
    background: white;
    color: #007bff;
    cursor: pointer;
    transition: all 0.3s;
}

.setting-btn:hover {
    background: #007bff;
    color: white;
}

.setting-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

/* Settings Modal - Fullscreen Layout */
.settings-modal-wide {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    min-height: 100vh;
    overflow-y: auto;
    border-radius: 0;
}

.audio-strings-grid {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.audio-string-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

.audio-string-row label {
    min-width: 20px;
    font-weight: bold;
    color: #333;
}

.audio-string-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.test-audio-btn {
    background: none;
    border: 1px solid #007bff;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 16px;
    min-width: 32px;
    height: 32px;
    transition: background 0.3s;
}

.test-audio-btn:hover {
    background: #007bff;
}

.audio-editor-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.save-btn {
    background: #28a745 !important;
    color: white !important;
}

.reset-btn {
    background: #dc3545 !important;
    color: white !important;
}

/* Color Picker Styling */
#squareColorPicker {
    width: 50px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    padding: 0;
}

#squareColorPicker::-webkit-color-swatch-wrapper {
    padding: 0;
}

#squareColorPicker::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

#squareColorValue {
    min-width: 80px;
    font-weight: bold;
    color: #333;
}

/* Settings Modal Close Button - sichtbar machen */
.modal-header .close-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header .close-btn:hover {
    background: #e0e0e0;
    color: #333;
}
/* Button Mapping Styles */
.button-mapping-grid {
    display: grid;
    gap: 15px;
    margin: 15px 0;
}

.button-mapping-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    flex-wrap: wrap;
}

.button-mapping-row label {
    min-width: 100px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.manual-text {
    line-height: 1.4;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    left: 19%;
 
}

.key-input {
    width: 40px;
    height: 32px;
    text-align: center;
    border: 2px solid #007bff;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    background: white;
    color: #333;
    text-transform: uppercase;
}

.key-input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.key-display {
    flex: 1;
    font-size: 14px;
    color: #666;
    font-style: italic;
    min-width: 180px;
}

.button-mapping-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Key Input Validation */
.key-input.error {
    border-color: #dc3545;
    background-color: #ffe6e6;
}

.key-input.duplicate {
    border-color: #ffc107;
    background-color: #fff3cd;
}

/* Responsive Button Mapping */
@media (max-width: 768px) {
    .button-mapping-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .button-mapping-row label {
        min-width: auto;
    }
    
    .key-display {
        min-width: auto;
        width: 100%;
    }
}

/* Settings Button auch im Training/Pause Modus sichtbar */
.training-container .settings-btn,
.pause-overlay .settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #007bff;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 3000;
    transition: background 0.3s;
    display: block;
}

.training-container .settings-btn:hover,
.pause-overlay .settings-btn:hover {
    background: #0056b3;
}