/* 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);
    flex-wrap: nowrap;
}

.app-header .logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.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;
    white-space: nowrap;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Secondary Navigation Bar */
.secondary-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 10px;
}
/* Logo styles */
.logo-link {
    text-decoration: none;
}

.header-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .header-logo {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .header-logo {
        height: 32px;
    }
}

.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;
    max-width: 100%;
}

/* Instrument and Tuning Row - constrained width */
.instrument-tuning-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 100%;
}

.instrument-tuning-row .control-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0; /* Allow shrinking */
}

.instrument-tuning-row label {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.instrument-tuning-row select {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #2a2a4a;
    color: var(--text-color);
    font-size: 0.9rem;
    min-width: 120px;
    max-width: 200px;
}

/* Tuning Actions Dropdown */
.tuning-actions-dropdown {
    position: relative;
    display: inline-block;
}

.tuning-actions-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    min-width: 180px;
    padding: 5px 0;
    margin-top: 4px;
}

.tuning-actions-menu.show {
    display: block;
}

.tuning-action-item {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.tuning-action-item:hover {
    background: rgba(52, 152, 219, 0.2);
}

.tuning-action-item:disabled {
    color: #666;
    cursor: not-allowed;
}

/* View Toggle Button */
.btn-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(180deg, #3a3a5a, #2a2a4a);
    border: 1px solid #555;
    border-radius: 5px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-toggle:hover {
    background: linear-gradient(180deg, #4a4a6a, #3a3a5a);
    border-color: var(--secondary-color);
}

.btn-toggle.active {
    background: linear-gradient(180deg, #3498db, #2980b9);
    border-color: #3498db;
}

.btn-toggle .toggle-icon {
    font-size: 1rem;
}

.btn-toggle .toggle-text {
    white-space: nowrap;
}

.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 {
    height: 600px;
    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;
    /* Use crosshair for precise clicking - hotspot is exactly centered */
    cursor: crosshair;
}

#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;
    }
}


/* 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 adjustments for controls */
@media (max-width: 768px) {
    .app-header {
        padding: 8px 10px;
        gap: 8px;
    }

    .app-header .logo-link {
        flex: 0 1 auto;
    }

    .app-header h1 {
        font-size: 1rem;
        display: none; /* Hide title text on small screens, keep logo */
    }

    .header-logo {
        height: 40px;
    }

    .header-controls {
        gap: 6px;
    }

    .header-controls .btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .secondary-nav {
        flex-wrap: wrap;
        gap: 6px;
    }

    .game-controls-bar {
        padding: 8px 10px;
        gap: 10px;
    }

    .instrument-tuning-row {
        width: 100%;
        gap: 8px;
    }

    .instrument-tuning-row .control-item {
        width: 100%;
        flex-wrap: nowrap;
    }

    .instrument-tuning-row label {
        min-width: 70px;
        text-align: right;
    }

    .instrument-tuning-row select {
        flex: 1;
        min-width: 0;
        max-width: none;
    }

    .btn-toggle {
        width: 100%;
        justify-content: center;
    }

    .test-controls-bar {
        flex-direction: column;
        gap: 8px;
    }

    .test-controls-bar .control-group {
        width: 100%;
        justify-content: space-between;
    }

    .test-controls-bar .control-group label {
        min-width: 70px;
        text-align: right;
    }

    .test-controls-bar .control-group select {
        flex: 1;
    }

    .test-controls-bar #startGame {
        width: 100%;
    }

    /* Tuning dropdown on mobile */
    .tuning-actions-menu {
        right: auto;
        left: 0;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        display: none;
    }

    .header-logo {
        height: 32px;
    }

    .header-controls .btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }

    /* Hide button text, show only icons on very small screens */
    .header-controls .btn-secondary {
        padding: 6px 8px;
    }

    .instrument-tuning-row label {
        font-size: 0.8rem;
        min-width: 60px;
    }

    .instrument-tuning-row select {
        font-size: 0.85rem;
        padding: 5px 8px;
    }

    .btn-toggle {
        padding: 8px;
        font-size: 0.85rem;
    }

    .btn-custom-tuning .btn-text {
        display: none;
    }

    .btn-custom-tuning .btn-icon {
        margin-right: 0;
    }

    #app {
        padding: 5px;
    }

    .game-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        justify-content: space-between;
    }

    .score-display {
        flex-wrap: wrap;
        gap: 10px;
        padding: 8px 10px;
    }

    .score-item {
        flex: 1 1 30%;
        min-width: 55px;
    }

    .score-value {
        font-size: 1rem;
    }

    #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;
}

/* Subscription modal instrument list */
.subscription-features ul.instrument-list {
    margin-left: 20px;
    margin-top: 5px;
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px 15px;
}

.subscription-features ul.instrument-list li {
    font-size: 0.9em;
    color: #ccc;
}

/* 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;
}

/* ========== PEDAL STEEL CONTROLS ========== */
.pedal-steel-controls {
    display: none;
    background: linear-gradient(135deg, #2d1f3d 0%, #1a1a2e 100%);
    border-radius: 0 0 12px 12px;
    padding: 12px 15px;
    margin: 0;
    border: 1px solid #4a3a5a;
    border-top: none;
    /* Position it to connect with the fretboard container above */
    margin-top: -10px;
    position: relative;
    z-index: 5;
}

.pedal-steel-controls.visible {
    display: block;
}

.pedal-steel-controls h4 {
    display: none; /* Hide header to save space */
}

.pedal-lever-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.pedal-group,
.knee-lever-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.pedal-group h5,
.knee-lever-group h5 {
    color: #888;
    font-size: 0.7em;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.pedal-buttons,
.knee-lever-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

/* Pedal button - compact style */
.pedal-btn {
    width: 44px;
    height: 50px;
    border: 2px solid #555;
    border-radius: 6px 6px 10px 10px;
    background: linear-gradient(180deg, #4a4a5a 0%, #2a2a3a 50%, #3a3a4a 100%);
    color: #fff;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow:
            0 3px 0 #1a1a2a,
            0 5px 8px rgba(0, 0, 0, 0.3);
}

.pedal-btn:hover {
    background: linear-gradient(180deg, #5a5a6a 0%, #3a3a4a 50%, #4a4a5a 100%);
    border-color: #777;
}

.pedal-btn.active {
    background: linear-gradient(180deg, #cc6600 0%, #993300 50%, #aa4400 100%);
    border-color: #ff9933;
    box-shadow:
            0 1px 0 #662200,
            0 0 12px rgba(255, 153, 0, 0.5);
    transform: translateY(2px);
}

/* Knee lever button */
.knee-lever-btn {
    width: 38px;
    height: 30px;
    border: 2px solid #444;
    border-radius: 5px;
    background: linear-gradient(180deg, #3a3a4a 0%, #2a2a3a 100%);
    color: #aaa;
    font-size: 0.65em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s ease;
}

.knee-lever-btn:hover {
    background: linear-gradient(180deg, #4a4a5a 0%, #3a3a4a 100%);
    border-color: #666;
    color: #fff;
}

.knee-lever-btn.active {
    background: linear-gradient(180deg, #0088cc 0%, #005588 100%);
    border-color: #00aaff;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

/* Inline effect display */
.pedal-effect-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: 20px;
    min-width: 200px;
}

.pedal-effect-info .effect-label {
    color: #666;
    font-size: 0.75em;
    font-style: italic;
}

.pedal-effect-info .effect-changes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pedal-effect-info .effect-change {
    padding: 3px 8px;
    background: rgba(255, 153, 0, 0.15);
    border-radius: 4px;
    font-size: 0.8em;
    border: 1px solid rgba(255, 153, 0, 0.3);
}

.pedal-effect-info .effect-change .string-num {
    color: #ffcc00;
    font-weight: bold;
}

.pedal-effect-info .effect-change .note-from {
    color: #ff8888;
    text-decoration: line-through;
    opacity: 0.7;
}

.pedal-effect-info .effect-change .note-arrow {
    color: #888;
    margin: 0 2px;
}

.pedal-effect-info .effect-change .note-to {
    color: #88ff88;
    font-weight: bold;
}

/* Combination presets - horizontal compact */
.pedal-combinations {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pedal-combinations h5 {
    display: none;
}

.combination-buttons {
    display: flex;
    gap: 5px;
}

.combination-btn {
    padding: 4px 8px;
    border: 1px solid #444;
    border-radius: 4px;
    background: linear-gradient(180deg, #2a2a3a 0%, #1a1a2a 100%);
    color: #999;
    font-size: 0.7em;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.combination-btn:hover {
    border-color: #cc99ff;
    color: #cc99ff;
}

.combination-btn.active {
    border-color: #cc99ff;
    background: linear-gradient(180deg, #663399 0%, #442266 100%);
    color: #fff;
}

/* Make fretboard container connect with pedal controls */
#fretboardContainer.has-pedal-controls {
    border-radius: 15px 15px 0 0;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .pedal-lever-row {
        gap: 15px;
        flex-direction: column;
    }

    .pedal-group h5,
    .knee-lever-group h5 {
        writing-mode: horizontal-tb;
        transform: none;
    }

    .pedal-effect-info {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }

    .pedal-combinations {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }
}

.pedal-combinations h5 {
    color: #888;
    font-size: 0.75em;
    text-transform: uppercase;
    margin: 0 0 8px 0;
    text-align: center;
}

.combination-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.combination-btn {
    padding: 6px 12px;
    border: 1px solid #444;
    border-radius: 5px;
    background: linear-gradient(180deg, #2a2a3a 0%, #1a1a2a 100%);
    color: #aaa;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s;
}

.combination-btn:hover {
    border-color: #cc99ff;
    color: #cc99ff;
    background: linear-gradient(180deg, #3a2a4a 0%, #2a1a3a 100%);
}

.combination-btn.active {
    border-color: #cc99ff;
    background: linear-gradient(180deg, #663399 0%, #442266 100%);
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pedal-lever-row {
        gap: 15px;
    }

    .pedal-btn {
        width: 44px;
        height: 52px;
        font-size: 1em;
    }

    .knee-lever-btn {
        width: 40px;
        height: 32px;
        font-size: 0.7em;
    }
}

/* Pedal Steel Controls - Overlay inside fretboard area */
#pedalSteelControls.pedal-steel-controls {
    display: none;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 100;
    max-width: 90%;
    box-sizing: border-box;
}

#pedalSteelControls.pedal-steel-controls.visible {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

/* Mobile-specific pedal steel controls */
@media (max-width: 768px) {
    #pedalSteelControls.pedal-steel-controls {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
        border-radius: 10px;
    }

    #pedalSteelControls.pedal-steel-controls.visible {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Move pedal controls outside the fretboard on mobile */
    #fretboardContainer.has-pedal-controls {
        margin-bottom: 0;
    }

    .pedal-lever-row {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .pedal-group,
    .knee-lever-group {
        width: 100%;
        justify-content: center;
    }

    .pedal-group h5,
    .knee-lever-group h5 {
        writing-mode: horizontal-tb;
        transform: none;
        margin-bottom: 6px;
    }

    .pedal-buttons,
    .knee-lever-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pedal-btn {
        width: 40px;
        height: 45px;
        font-size: 0.9em;
    }

    .knee-lever-btn {
        width: 36px;
        height: 28px;
        font-size: 0.6em;
    }

    .pedal-effect-info {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .pedal-combinations {
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }

    .combination-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Drag handle adjustments for mobile */
    .pedal-drag-handle {
        padding: 8px 12px;
        font-size: 0.7em;
        position: relative;
    }

    /* Don't use fixed positioning on mobile by default */
    #pedalSteelControls.pedal-steel-controls:not(.user-positioned) {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
    }
}

@media (max-width: 480px) {
    #pedalSteelControls.pedal-steel-controls {
        padding: 10px;
    }

    .pedal-btn {
        width: 36px;
        height: 40px;
        font-size: 0.85em;
    }

    .knee-lever-btn {
        width: 32px;
        height: 26px;
        font-size: 0.55em;
    }

    .pedal-effect-info .effect-change {
        font-size: 0.7em;
        padding: 2px 6px;
    }

    .combination-btn {
        padding: 3px 6px;
        font-size: 0.65em;
    }
}

/* Make fretboard container position relative for absolute positioning */
#fretboardContainer {
    position: relative;
}

/* Instrument Lock Banner */
.instrument-lock-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 10px 20px;
    margin-bottom: 10px;
    color: #ffd700;
    font-size: 14px;
}

.instrument-lock-banner .lock-icon {
    font-size: 18px;
}

.instrument-lock-banner .lock-message {
    flex: 1;
}

/* Premium option styling in dropdowns */
.premium-option {
    color: #888;
    font-style: italic;
}

/* Guest Feature Prompt Modal */
.guest-prompt {
    max-width: 450px;
}

.guest-prompt h2 {
    color: #4a90d9;
    margin-bottom: 15px;
}

.guest-features {
    text-align: left;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.guest-features h4 {
    color: #ffcc00;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.guest-features ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.guest-features li {
    padding: 4px 0;
    color: #ccc;
    font-size: 0.9em;
}

/* Preview mode / disabled buttons */
.learn-note-btn.disabled,
.learn-chord-btn.disabled,
#showTriadBtn.disabled,
#showScaleBtn.disabled,
#startGame.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Preview mode banner styling */
.instrument-lock-banner .lock-message strong {
    color: #ffcc00;
}

/* Manage Subscription Button */
.manage-subscription-btn {
    background: #2a2a4e;
    border: 1px solid #00ccff;
    color: #00ccff;
}

.manage-subscription-btn:hover {
    background: #3a3a6e;
    border-color: #00ffff;
    color: #00ffff;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid #333;
}

.app-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

.app-footer a:hover {
    text-decoration: underline;
}

/* ========== ADVERTISEMENT STYLES ========== */

/* Base ad container */
.ad-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

/* Hide ads for premium users (controlled via JS) */
body.premium-user .ad-container {
    display: none !important;
}

/* Footer Ad */
.ad-footer {
    margin: 20px auto 15px;
    max-width: 728px;
    min-height: 90px;
    padding: 10px;
}

/* Sidebar Ads - Only visible on wide screens */
.ad-sidebar {
    display: none;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    min-height: 600px;
    z-index: 50;
    padding: 10px;
}

.ad-sidebar-left {
    left: 10px;
}

.ad-sidebar-right {
    right: 10px;
}

/* Show sidebar ads only on screens wide enough (1600px+) */
@media (min-width: 1600px) {
    .ad-sidebar {
        display: block;
    }

    /* Adjust main app container to not overlap with sidebar ads */
    #app {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Even wider screens - larger sidebar ads */
@media (min-width: 1800px) {
    .ad-sidebar {
        width: 300px;
    }

    .ad-sidebar-left {
        left: 20px;
    }

    .ad-sidebar-right {
        right: 20px;
    }
}

/* Responsive footer ad */
@media (max-width: 768px) {
    .ad-footer {
        max-width: 100%;
        min-height: 50px;
        margin: 15px 10px;
    }
}

/* Small label for ad transparency */
.ad-container::before {
    content: 'Advertisement';
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    opacity: 0.6;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid #333;
}

/* Pedal Steel Chord Voicings */
.pedal-steel-voicings {
    margin-top: 10px;
}

.voicing-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.voicing-card:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-left-color: #ffcc00 !important;
}

.voicing-card.selected {
    border-left-color: #88ff88 !important;
    background: rgba(136, 255, 136, 0.1) !important;
}

/* Guest prompt pricing preview */
.pricing-preview {
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a2e 100%);
    border: 1px solid #ffcc00;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.pricing-preview h4 {
    color: #ffcc00;
    margin: 0 0 10px 0;
}

.pricing-info {
    color: #fff;
    margin: 0;
}

.price-option {
    display: inline-block;
}

.price-divider {
    color: #666;
    margin: 0 10px;
}

.save-text {
    color: #4ade80;
    font-size: 0.85em;
}

/* ========== LEGEND STYLES FOR TRIADS, CHORDS, AND SCALES ========== */
.chord-scale-legend,
.triad-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Triad/Chord colors */
.legend-color.root { background: #ff6600; box-shadow: 0 0 6px #ff6600; }
.legend-color.third { background: #00ccff; box-shadow: 0 0 6px #00ccff; }
.legend-color.fifth { background: #cc66ff; box-shadow: 0 0 6px #cc66ff; }
.legend-color.seventh { background: #66ff66; box-shadow: 0 0 6px #66ff66; }

/* Scale colors - extended palette for 7 degrees */
.legend-color.scale-1 { background: #ff6600; box-shadow: 0 0 6px #ff6600; } /* Root */
.legend-color.scale-2 { background: #00ccff; box-shadow: 0 0 6px #00ccff; } /* 2nd */
.legend-color.scale-3 { background: #cc66ff; box-shadow: 0 0 6px #cc66ff; } /* 3rd */
.legend-color.scale-4 { background: #ffcc00; box-shadow: 0 0 6px #ffcc00; } /* 4th */
.legend-color.scale-5 { background: #66ff66; box-shadow: 0 0 6px #66ff66; } /* 5th */
.legend-color.scale-6 { background: #ff66b2; box-shadow: 0 0 6px #ff66b2; } /* 6th */
.legend-color.scale-7 { background: #66ffff; box-shadow: 0 0 6px #66ffff; } /* 7th */

.legend-label {
    font-size: 0.9em;
    color: #fff;
}

.legend-note {
    font-weight: bold;
}

.legend-interval {
    color: #aaa;
    font-size: 0.85em;
}

/* Chord Answer Buttons for Name the Chord game mode */
.chord-answer-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.chord-btn {
    min-width: 70px;
    height: 42px;
    border: 2px solid #444;
    border-radius: 8px;
    background: linear-gradient(180deg, #3a3a5a, #2a2a4a);
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 12px;
}

.chord-btn:hover {
    background: linear-gradient(180deg, #4a4a6a, #3a3a5a);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.chord-btn.correct {
    background: var(--success-color);
    border-color: var(--success-color);
}

.chord-btn.incorrect {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

/* Responsive adjustments for chord buttons */
@media (max-width: 768px) {
    .chord-btn {
        min-width: 60px;
        height: 38px;
        font-size: 0.85rem;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .chord-btn {
        min-width: 52px;
        height: 35px;
        font-size: 0.75rem;
        padding: 0 8px;
    }

    .chord-answer-buttons {
        gap: 4px;
    }
}

/* Pedal Steel Game Info */
.pedal-info {
    display: block;
    font-size: 0.85em;
    color: #ffcc00;
    margin-top: 5px;
    font-weight: normal;
}

#questionText .pedal-info {
    background: rgba(255, 204, 0, 0.15);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 8px;
}

/* Game-controlled pedal buttons - subtle pulse animation */
.pedal-btn.game-controlled,
.knee-lever-btn.game-controlled {
    pointer-events: none; /* Prevent clicking during game */
    opacity: 0.9;
}

.pedal-btn.game-controlled.active,
.knee-lever-btn.game-controlled.active {
    animation: gamePedalPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.6);
}

@keyframes gamePedalPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 16px rgba(255, 204, 0, 0.8);
    }
}

/* Triad Answer Buttons */
.triad-answer-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}

.triad-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.triad-btn {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid #444;
    border-radius: 6px;
    background: linear-gradient(145deg, #2a2a4a, #1a1a3e);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.triad-btn:hover {
    background: linear-gradient(145deg, #3a3a5a, #2a2a4e);
    border-color: #666;
    transform: translateY(-2px);
}

.triad-btn.minor {
    border-color: #00ccff;
}

.triad-btn.diminished {
    border-color: #ff6666;
}

.triad-btn.augmented {
    border-color: #cc66ff;
}

.triad-btn.correct {
    background: linear-gradient(145deg, #2d5a2d, #1a4a1a) !important;
    border-color: #4caf50 !important;
    animation: pulse-correct 0.3s ease;
}

.triad-btn.incorrect {
    background: linear-gradient(145deg, #5a2d2d, #4a1a1a) !important;
    border-color: #f44336 !important;
    animation: shake 0.3s ease;
}

/* Scale Answer Buttons */
.scale-answer-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    align-items: center;
}

.scale-root-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.scale-row-label {
    color: #aaa;
    font-size: 13px;
    margin-right: 8px;
}

.scale-root-btn {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: bold;
    border: 2px solid #555;
    border-radius: 4px;
    background: linear-gradient(145deg, #333, #222);
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.scale-root-btn:hover {
    background: linear-gradient(145deg, #444, #333);
    border-color: #666;
}

.scale-root-btn.active {
    background: linear-gradient(145deg, #ff6600, #cc5500);
    border-color: #ff8833;
    color: #fff;
}

.scale-root-btn.correct {
    background: linear-gradient(145deg, #2d5a2d, #1a4a1a) !important;
    border-color: #4caf50 !important;
}

.scale-root-btn.incorrect {
    background: linear-gradient(145deg, #5a2d2d, #4a1a1a) !important;
    border-color: #f44336 !important;
}

.scale-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.scale-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid #444;
    border-radius: 6px;
    background: linear-gradient(145deg, #2a2a4a, #1a1a3e);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.scale-btn:hover {
    background: linear-gradient(145deg, #3a3a5a, #2a2a4e);
    border-color: #666;
    transform: translateY(-2px);
}

.scale-btn.major {
    border-color: #ff6600;
}

.scale-btn.minor {
    border-color: #00ccff;
}

.scale-btn.mode {
    border-color: #cc66ff;
}

.scale-btn.correct {
    background: linear-gradient(145deg, #2d5a2d, #1a4a1a) !important;
    border-color: #4caf50 !important;
    animation: pulse-correct 0.3s ease;
}

.scale-btn.incorrect {
    background: linear-gradient(145deg, #5a2d2d, #4a1a1a) !important;
    border-color: #f44336 !important;
    animation: shake 0.3s ease;
}

.hint-text {
    font-size: 0.85em;
    color: #aaa;
    font-weight: normal;
}

/* Leaderboard Tabs */
.leaderboard-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.lb-tab {
    background: #2a2a3e;
    border: none;
    color: #888;
    padding: 10px 16px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lb-tab:hover {
    background: #3a3a5e;
    color: #fff;
}

.lb-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.leaderboard-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #1a1a2e;
    border-radius: 8px;
}

.leaderboard-filters .filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaderboard-filters label {
    color: #aaa;
    font-size: 13px;
}

.leaderboard-filters select {
    background: #2a2a3e;
    border: 1px solid #444;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
}

/* Leaderboard Table Enhancements */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    background: #2a2a3e;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #aaa;
    font-size: 12px;
    text-transform: uppercase;
}

.leaderboard-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #333;
}

.leaderboard-table tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

.leaderboard-table .rank {
    font-weight: bold;
    width: 50px;
}

.leaderboard-table .rank-1 { color: #ffd700; }
.leaderboard-table .rank-2 { color: #c0c0c0; }
.leaderboard-table .rank-3 { color: #cd7f32; }

.leaderboard-table .score {
    font-weight: bold;
    color: #667eea;
}

.user-rank-display {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.user-rank-display.hidden {
    display: none;
}


/* Modal Help Links */
.modal-help-links {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #444;
    text-align: center;
    font-size: 14px;
    color: #888;
}

.modal-help-links span {
    color: #888;
}

.modal-help-links a {
    color: #00ccff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.modal-help-links a:hover {
    color: #66e0ff;
    text-decoration: underline;
}

.modal-help-links .link-divider {
    margin: 0 10px;
    color: #555;
}

/* Mode select modal specific help links */
.mode-select-content .modal-help-links {
    margin-top: 25px;
}

.next-question-btn {
    margin-left: 10px;
    padding: 5px 15px;
    font-size: 0.9em;
    cursor: pointer;
}

.feedback .next-question-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    border-radius: 4px;
}

.feedback .next-question-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Hide "Find the Note" game mode option on mobile devices */
@media (max-width: 768px) {
    #gameMode option[value="find_note"] {
        display: none;
    }
}

/* Custom Tuning Modal - Wider with scrolling */
#customTuningModal .modal-content {
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Ensure the form content doesn't overflow */
#customTuningForm {
    padding-right: 10px; /* Space for scrollbar */
}

/* Scrollbar styling for the modal */
#customTuningModal .modal-content::-webkit-scrollbar {
    width: 8px;
}

#customTuningModal .modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

#customTuningModal .modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 204, 0, 0.5);
    border-radius: 4px;
}

#customTuningModal .modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 204, 0, 0.7);
}

/* Firefox scrollbar */
#customTuningModal .modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 204, 0, 0.5) rgba(0, 0, 0, 0.2);
}

/* Pedal Steel Configuration Styles */
#pedalSteelConfigSection {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

#pedalSteelConfigSection h3 {
    margin: 0 0 15px 0;
    color: #ffcc00;
    font-size: 1.1em;
}

#pedalSteelConfigSection h4 {
    margin: 15px 0 10px 0;
    color: #ccc;
    font-size: 0.95em;
}

.control-config-list {
    margin-bottom: 10px;
}

.control-config-row {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
}

.control-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.control-header .control-id {
    width: 60px;
    text-align: center;
    font-weight: bold;
}

.control-header .control-name {
    flex: 1;
}

.control-effects {
    padding-left: 15px;
}

.effect-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 4px 0;
    font-size: 0.9em;
}

.effect-row span {
    color: #888;
}

.effect-row select {
    padding: 4px 8px;
    font-size: 0.9em;
}

.effect-string {
    width: 90px;
}

.effect-semitones {
    width: 60px;
}

.add-effect {
    margin-top: 6px;
    margin-left: 15px;
}

.btn-tiny {
    padding: 2px 8px;
    font-size: 0.8em;
    line-height: 1.2;
}

.tuning-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.tuning-input-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tuning-input-row label {
    font-size: 0.85em;
    color: #aaa;
}

.tuning-input-row select {
    padding: 6px 8px;
}

.tuning-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.tuning-controls .btn-small {
    padding: 4px 8px;
    font-size: 0.85em;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Pedal Steel Draggable Controls */
.pedal-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(to bottom, #3a3a4a, #2a2a3a);
    border-bottom: 1px solid #444;
    cursor: grab;
    user-select: none;
    font-size: 0.75em;
    color: #888;
    letter-spacing: 2px;
    border-radius: 8px 8px 0 0;
}

.pedal-drag-handle:active {
    cursor: grabbing;
}

#pedalSteelControls.dragging {
    opacity: 0.9;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#pedalSteelControls.user-positioned {
    /* Override default positioning when user has moved it */
    transform: none !important;
}

.pedal-minimize-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: #444;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pedal-minimize-btn:hover {
    background: #555;
}

#pedalSteelControls.minimized .pedal-group,
#pedalSteelControls.minimized .pedal-effect-info {
    display: none !important;
}

#pedalSteelControls.minimized {
    min-width: auto;
    width: auto;
}

#pedalSteelControls.minimized .pedal-drag-handle {
    border-radius: 8px;
    border-bottom: none;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .pedal-drag-handle {
        padding: 10px 16px;
        font-size: 0.8em;
    }

    #pedalSteelControls {
        max-width: 95vw;
        max-height: 50vh;
        overflow-y: auto;
    }

    #pedalSteelControls.user-positioned {
        max-height: 60vh;
    }
}

/* Transpose buttons */
.learn-key-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.transpose-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1;
    border-radius: 50%;
    background: var(--accent-color, #4a90d9);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.transpose-btn:hover {
    background: var(--accent-hover, #3a7bc8);
    transform: scale(1.1);
}

.transpose-btn:active {
    transform: scale(0.95);
}

/* Intervals Mode Panel */
.learn-note-mode-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.learn-note-mode-selector label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.learn-note-mode-selector select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #2a2a4a;
    color: var(--text-color);
    font-size: 0.9rem;
}

.intervals-mode-panel {
    padding: 15px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.intervals-key-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.intervals-key-selector label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.intervals-key-selector select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #2a2a4a;
    color: var(--text-color);
    font-size: 0.95rem;
    min-width: 150px;
}

.intervals-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.interval-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.interval-toggle-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    border: 2px solid #444;
    border-radius: 8px;
    background: #2a2a4a;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 65px;
}

.interval-toggle-btn .interval-note {
    font-size: 1.1rem;
    font-weight: bold;
}

.interval-toggle-btn .interval-degree {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.interval-toggle-btn:hover {
    border-color: #666;
    transform: translateY(-2px);
}

.interval-toggle-btn.active {
    border-width: 3px;
}

/* Scale degree colors matching scale highlighting */
.interval-toggle-btn.active[data-degree="1"] {
    background: rgba(255, 102, 0, 0.3);
    border-color: #ff6600;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.4);
}

.interval-toggle-btn.active[data-degree="2"] {
    background: rgba(0, 204, 255, 0.3);
    border-color: #00ccff;
    box-shadow: 0 0 10px rgba(0, 204, 255, 0.4);
}

.interval-toggle-btn.active[data-degree="3"] {
    background: rgba(204, 102, 255, 0.3);
    border-color: #cc66ff;
    box-shadow: 0 0 10px rgba(204, 102, 255, 0.4);
}

.interval-toggle-btn.active[data-degree="4"] {
    background: rgba(255, 204, 0, 0.3);
    border-color: #ffcc00;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
}

.interval-toggle-btn.active[data-degree="5"] {
    background: rgba(102, 255, 102, 0.3);
    border-color: #66ff66;
    box-shadow: 0 0 10px rgba(102, 255, 102, 0.4);
}

.interval-toggle-btn.active[data-degree="6"] {
    background: rgba(255, 102, 178, 0.3);
    border-color: #ff66b2;
    box-shadow: 0 0 10px rgba(255, 102, 178, 0.4);
}

.interval-toggle-btn.active[data-degree="7"] {
    background: rgba(102, 255, 255, 0.3);
    border-color: #66ffff;
    box-shadow: 0 0 10px rgba(102, 255, 255, 0.4);
}

.interval-presets {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding-top: 10px;
    border-top: 1px solid #333;
}

.preset-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.interval-preset-btn {
    padding: 5px 10px;
    font-size: 0.8rem;
    background: #3a3a5a;
    border: 1px solid #555;
}

.interval-preset-btn:hover {
    background: #4a4a6a;
    border-color: var(--secondary-color);
}

/* Mobile responsiveness for intervals panel */
@media (max-width: 600px) {
    .interval-toggles {
        gap: 6px;
    }

    .interval-toggle-btn {
        padding: 8px 10px;
        min-width: 55px;
    }

    .interval-toggle-btn .interval-note {
        font-size: 1rem;
    }

    .interval-presets {
        gap: 5px;
    }

    .interval-preset-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}

/* Scale degree colors for legends */
.legend-color.scale-1 { background: #ff6600; }
.legend-color.scale-2 { background: #00ccff; }
.legend-color.scale-3 { background: #cc66ff; }
.legend-color.scale-4 { background: #ffcc00; }
.legend-color.scale-5 { background: #66ff66; }
.legend-color.scale-6 { background: #ff66b2; }
.legend-color.scale-7 { background: #66ffff; }