/* Guitar Fretboard Trainer Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #eee;
    --text-muted: #888;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, #0f0f1a 100%);
    color: var(--text-color);
    min-height: 100vh;
}

#app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.app-header h1 {
    font-size: 1.5rem;
    background: linear-gradient(90deg, #f39c12, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-toggle select {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #2a2a4a;
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-secondary {
    background: #555;
    color: white;
}

/* Game Controls Bar */
.game-controls-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px 15px;
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 10px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.control-group select {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #2a2a4a;
    color: var(--text-color);
    font-size: 0.9rem;
}

.btn-nav {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #4a4a6a, #3a3a5a);
    border: 1px solid #555;
    color: var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: linear-gradient(180deg, #5a5a7a, #4a4a6a);
    border-color: var(--secondary-color);
}

/* Score Display */
.score-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px 15px;
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 10px;
}

.score-item {
    text-align: center;
    min-width: 70px;
}

.score-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
    text-transform: uppercase;
}

.score-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--warning-color);
}

/* Question Area */
.question-area {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--warning-color);
}

/* Note Buttons */
.note-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.note-btn {
    width: 65px;
    height: 42px;
    border: 2px solid #444;
    border-radius: 8px;
    background: linear-gradient(180deg, #3a3a5a, #2a2a4a);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.note-btn:hover {
    background: linear-gradient(180deg, #4a4a6a, #3a3a5a);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.note-btn.correct {
    background: var(--success-color);
    border-color: var(--success-color);
}

.note-btn.incorrect {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

/* Feedback */
.feedback {
    min-height: 30px;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.feedback.correct {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
}

.feedback.incorrect {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

/* Fretboard container */
#fretboardContainer {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    min-height: 320px;
    position: relative;
    touch-action: none;
    user-select: none;
    cursor: pointer;
}

#fretboardContainer:active {
    cursor: grabbing;
}

#fretboardContainer.dragging {
    cursor: grabbing;
}

#fretboardContainer.panning {
    cursor: grab;
}

#fretboardCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(50, 50, 80, 0.9);
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.zoom-btn:hover {
    background: rgba(70, 70, 110, 0.95);
    transform: scale(1.05);
}

.zoom-btn:active {
    transform: scale(0.95);
}

/* Pan Hint */
.pan-hint {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #aaa;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.pan-hint .mobile-hint {
    display: none;
}

.pan-hint .desktop-hint {
    display: inline;
}

/* Show mobile hint on touch devices */
@media (hover: none) and (pointer: coarse) {
    .pan-hint .desktop-hint {
        display: none;
    }
    .pan-hint .mobile-hint {
        display: inline;
    }
}

.pan-hint.hidden {
    opacity: 0;
}
/* Make sure modals appear above everything */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}


.modal-content {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.auth-tabs {
    display: flex;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background: #333;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:first-child {
    border-radius: 5px 0 0 5px;
}

.tab-btn:last-child {
    border-radius: 0 5px 5px 0;
}

.tab-btn.active {
    background: var(--secondary-color);
    color: white;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #2a2a4a;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.auth-message {
    margin-top: 8px;
    padding: 8px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9rem;
}

.auth-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

.auth-message.success {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
}

#playAsGuest {
    width: 100%;
    margin-top: 12px;
}

/* Game Results Modal */
.game-results-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.game-results {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.game-results h2 {
    margin-bottom: 15px;
    color: var(--warning-color);
}

.results-grade {
    font-size: 4rem;
    font-weight: bold;
    margin: 15px 0;
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.result-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 10px;
}

.result-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.result-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-color);
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100%;
    background: var(--card-bg);
    padding: 20px;
    transition: right 0.3s ease;
    z-index: 500;
    overflow-y: auto;
}

.settings-panel.active {
    right: 0;
}

.settings-panel h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.setting-group {
    margin-bottom: 15px;
}

.setting-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.setting-group select {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #2a2a4a;
    color: var(--text-color);
}

.setting-group input[type="checkbox"] {
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .app-header h1 {
        font-size: 1.3rem;
    }

    .header-controls {
        flex-direction: column;
        gap: 8px;
    }

    .game-controls-bar {
        gap: 8px;
        padding: 8px 10px;
    }

    .control-group {
        gap: 4px;
    }

    .control-group label {
        font-size: 0.75rem;
    }

    .control-group select {
        padding: 5px 8px;
        font-size: 0.85rem;
    }

    .score-display {
        gap: 10px;
        padding: 8px 10px;
    }

    .score-item {
        min-width: 55px;
    }

    .score-value {
        font-size: 1rem;
    }

    .note-btn {
        width: 52px;
        height: 38px;
        font-size: 0.8rem;
    }

    #fretboardContainer {
        min-height: 260px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    #app {
        padding: 5px;
    }

    .game-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        justify-content: space-between;
    }

    .score-display {
        flex-wrap: wrap;
    }

    .score-item {
        flex: 1 1 30%;
    }

    #fretboardContainer {
        min-height: 220px;
    }

    .note-btn {
        width: 46px;
        height: 35px;
        font-size: 0.7rem;
    }

    .note-buttons {
        gap: 4px;
    }

    .question-text {
        font-size: 1.1rem;
    }
}

/* Learning Mode Panel - just the buttons */
.learn-mode-panel {
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a2e 100%);
    border-radius: 12px;
    padding: 15px 20px;
    margin: 10px 0;
    border: 1px solid #3a3a5a;
}

.learn-mode-header {
    text-align: center;
    margin-bottom: 12px;
}

.learn-mode-header h3 {
    color: #ffcc00;
    margin: 0 0 5px 0;
    font-size: 1.2em;
}

.learn-mode-header p {
    color: #aaa;
    margin: 0;
    font-size: 0.85em;
}

/* Learning Mode Info Panel - Below Fretboard */
.learn-mode-info-panel {
    background: linear-gradient(135deg, #1a2a3a 0%, #162030 100%);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 10px;
    border: 1px solid #2a4a5a;
    color: #ccc;
    font-size: 0.95em;
}

.learn-mode-info-panel strong {
    color: #00ccff;
}

.learn-mode-info-panel .positions-list {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.learn-mode-info-panel .string-positions {
    padding: 8px 12px;
    background: rgba(0, 170, 255, 0.1);
    border-radius: 6px;
    border-left: 3px solid #00aaff;
}

.learn-mode-info-panel .string-name {
    font-weight: bold;
    color: #ffcc00;
}

.learn-note-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.learn-note-btn {
    padding: 12px 16px;
    border: 2px solid #555;
    border-radius: 8px;
    background: linear-gradient(180deg, #3a3a5a 0%, #2a2a4a 100%);
    color: #fff;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.learn-note-btn:hover {
    background: linear-gradient(180deg, #4a4a6a 0%, #3a3a5a 100%);
    border-color: #ffcc00;
    transform: translateY(-2px);
}

.learn-note-btn.active {
    background: linear-gradient(180deg, #00aaff 0%, #0077cc 100%);
    border-color: #00ccff;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.5);
}

.learn-mode-info {
    text-align: center;
    color: #ccc;
    font-size: 0.95em;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    min-height: 30px;
}

.learn-mode-info strong {
    color: #00ccff;
}

.positions-list {
    margin-top: 12px;
    text-align: left;
}

.string-positions {
    padding: 5px 10px;
    margin: 4px 0;
    background: rgba(0, 170, 255, 0.1);
    border-radius: 4px;
    border-left: 3px solid #00aaff;
}

.string-name {
    font-weight: bold;
    color: #ffcc00;
}

/* Mode Selection Modal */
.mode-select-content {
    text-align: center;
    max-width: 500px;
}

.mode-select-content h2 {
    color: #ffcc00;
    margin-bottom: 10px;
}

.mode-select-content p {
    color: #aaa;
    margin-bottom: 25px;
}

.mode-choice-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 30px;
    border: 3px solid #444;
    border-radius: 16px;
    background: linear-gradient(180deg, #2a2a4a 0%, #1a1a2e 100%);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.mode-choice-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mode-choice-btn.learning:hover {
    border-color: #00ccff;
    box-shadow: 0 10px 30px rgba(0, 204, 255, 0.3);
}

.mode-choice-btn.testing:hover {
    border-color: #ffcc00;
    box-shadow: 0 10px 30px rgba(255, 204, 0, 0.3);
}

.mode-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.mode-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 8px;
}

.mode-choice-btn.learning .mode-title {
    color: #00ccff;
}

.mode-choice-btn.testing .mode-title {
    color: #ffcc00;
}

.mode-desc {
    font-size: 0.85em;
    color: #888;
    max-width: 150px;
}

/* Learning Mode Topic Selector */
.learn-topic-selector {
    margin-top: 10px;
}

.learn-topic-selector label {
    color: #aaa;
    margin-right: 8px;
}

.learn-topic-selector select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #2a2a4a;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
}

.learn-section {
    margin-top: 15px;
}

.learn-section-desc {
    color: #aaa;
    margin-bottom: 12px;
    font-size: 0.9em;
}

/* Chord buttons */
.learn-chord-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.learn-chord-btn {
    padding: 12px 20px;
    border: 2px solid #555;
    border-radius: 8px;
    background: linear-gradient(180deg, #3a3a5a 0%, #2a2a4a 100%);
    color: #fff;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.learn-chord-btn:hover {
    background: linear-gradient(180deg, #4a4a6a 0%, #3a3a5a 100%);
    border-color: #ffcc00;
    transform: translateY(-2px);
}

.learn-chord-btn.active {
    background: linear-gradient(180deg, #ff9900 0%, #cc7700 100%);
    border-color: #ffcc00;
    box-shadow: 0 0 15px rgba(255, 153, 0, 0.5);
}

/* Key selector */
.learn-key-selector {
    margin-bottom: 12px;
}

.learn-key-selector label {
    color: #aaa;
    margin-right: 8px;
}

.learn-key-selector select {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background: #2a2a4a;
    color: #fff;
    font-size: 0.95em;
}

/* Triad and Scale selectors */
.learn-triad-selectors,
.learn-scale-selectors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.learn-selector-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.learn-selector-group label {
    color: #aaa;
    font-size: 0.9em;
}

.learn-selector-group select {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background: #2a2a4a;
    color: #fff;
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .learn-triad-selectors,
    .learn-scale-selectors {
        flex-direction: column;
        align-items: stretch;
    }

    .learn-selector-group {
        justify-content: space-between;
    }
}

/* Chord button wrapper with Roman numeral */
.chord-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.roman-numeral {
    font-size: 0.85em;
    font-weight: bold;
    color: #ffcc00;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    min-height: 1.2em;
}

/* Adjust chord buttons container for the wrappers */
.learn-chord-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

/* Triad Legend */
.triad-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.legend-color.root {
    background: #ff6600;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.7);
}

.legend-color.third {
    background: #00ccff;
    box-shadow: 0 0 10px rgba(0, 204, 255, 0.7);
}

.legend-color.fifth {
    background: #cc66ff;
    box-shadow: 0 0 10px rgba(204, 102, 255, 0.7);
}

.legend-label {
    font-size: 0.9em;
    color: #ddd;
}

.legend-note {
    font-weight: bold;
    color: #fff;
}

.legend-interval {
    color: #aaa;
    font-size: 0.85em;
}

/* Leaderboard Modal */
.leaderboard-modal-content {
    max-width: 600px;
    width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger-color);
}

.leaderboard-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.leaderboard-filters select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #2a2a4a;
    color: var(--text-color);
    font-size: 0.9rem;
    flex: 1;
    min-width: 120px;
}

.leaderboard-content {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.leaderboard-table th {
    background: #1a1a3a;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.leaderboard-table tr:hover {
    background: rgba(52, 152, 219, 0.1);
}

.leaderboard-table .rank {
    width: 50px;
    text-align: center;
}

.leaderboard-table .rank-1 { color: #ffd700; font-weight: bold; }
.leaderboard-table .rank-2 { color: #c0c0c0; font-weight: bold; }
.leaderboard-table .rank-3 { color: #cd7f32; font-weight: bold; }

.leaderboard-table .score {
    font-weight: bold;
    color: var(--success-color);
}

.user-rank-display {
    margin-top: 20px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.15);
    border-radius: 8px;
    text-align: center;
}

.user-rank-display.hidden {
    display: none;
}

.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* Preferences Modal */
.preferences-modal-content {
    max-width: 500px;
    width: 90%;
}

.preferences-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pref-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
}

.pref-section h3 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--secondary-color);
}

.pref-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pref-group:last-child {
    margin-bottom: 0;
}

.pref-group label {
    font-size: 0.95rem;
}

.pref-group select {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #2a2a4a;
    color: var(--text-color);
    min-width: 150px;
}

.pref-group.checkbox {
    justify-content: flex-start;
}

.pref-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.pref-group.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.pref-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.pref-message {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
}

.pref-message.success {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
}

.pref-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

/* User streak display in header */
#userStreakDisplay {
    font-size: 0.9rem;
    color: #f39c12;
    margin-right: 10px;
}

/* Custom Tuning Modal Styles */
.tuning-strings {
    margin: 15px 0;
}

.string-tuning-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.string-tuning-row label {
    flex: 0 0 120px;
    font-size: 0.9em;
}

.tuning-note-select {
    flex: 1;
    max-width: 150px;
    padding: 6px 10px;
    background: #2a2a3e;
    border: 1px solid #3a3a5e;
    border-radius: 4px;
    color: #fff;
}

.form-hint {
    color: #888;
    font-size: 0.85em;
    margin-bottom: 10px;
}

.btn-small {
    padding: 4px 10px;
    font-size: 1.1em;
    margin-left: 8px;
}

/* ... existing styles ... */

/* Subscription UI Styles */
.premium-locked {
    position: relative;
    opacity: 0.7;
}

.premium-locked::after {
    content: '🔒';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.premium-option {
    color: #888 !important;
    font-style: italic;
}

.subscribe-btn {
    background: linear-gradient(135deg, #ffd700, #ffaa00) !important;
    color: #1a1a2e !important;
    font-weight: bold;
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

.subscription-prompt {
    max-width: 450px;
    text-align: center;
}

.subscription-prompt h2 {
    color: #ffd700;
    margin-bottom: 15px;
}

.subscription-features {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.subscription-features h4 {
    margin-bottom: 10px;
    color: #ffcc00;
}

.subscription-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subscription-features li {
    padding: 5px 0;
    color: #ccc;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Tuning selector locked state */
#tuningSelect option:disabled {
    color: #666;
    background: rgba(0, 0, 0, 0.2);
}

/* Custom Tuning Button */
.btn-custom-tuning {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(180deg, #3a5a3a, #2a4a2a);
    border: 1px solid #4a7a4a;
    color: #8f8;
    font-size: 0.85em;
    transition: all 0.2s ease;
}

.btn-custom-tuning:hover {
    background: linear-gradient(180deg, #4a6a4a, #3a5a3a);
    border-color: #6a9a6a;
    transform: translateY(-1px);
}

.btn-custom-tuning .btn-icon {
    font-size: 1.1em;
}

.btn-custom-tuning .btn-text {
    font-weight: 500;
}

/* Locked state for custom tuning button */
.btn-custom-tuning.premium-locked {
    background: linear-gradient(180deg, #4a4a5a, #3a3a4a);
    border-color: #5a5a6a;
    color: #aaa;
    cursor: pointer;
}

.btn-custom-tuning.premium-locked .btn-icon::after {
    content: '';
}

.btn-custom-tuning.premium-locked .btn-text::before {
    content: '🔒 ';
}

.btn-custom-tuning.premium-locked:hover {
    background: linear-gradient(180deg, #5a5a6a, #4a4a5a);
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Remove the generic ::after for this specific button */
.btn-custom-tuning.premium-locked::after {
    content: none;
}