        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
            background: #000;
            color: #fff;
            min-height: 100vh;
            overflow-x: hidden;
            font-weight: 300;
            letter-spacing: 0.02em;
        }

        .header {
            background: #000;
            padding: 10px 16px 8px;
            text-align: center;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header h1 {
            font-size: 24px;
            font-weight: 300;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            margin: 0 0 6px;
            line-height: 0;
        }

        .header h1 picture,
        .header h1 img.header-wordmark {
            display: inline-block;
            vertical-align: middle;
        }

        .header-wordmark {
            height: 22px;
            width: auto;
            max-width: 90%;
            user-select: none;
        }

        .search-container {
            position: relative;
            max-width: 500px;
            margin: 0 auto;
        }

        .search-input {
            width: 100%;
            padding: 7px 14px;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 0;
            background: transparent;
            color: #fff;
            font-size: 13px;
            font-weight: 300;
            letter-spacing: 0.02em;
        }

        .search-input::placeholder {
            color: rgba(255,255,255,0.5);
            text-transform: uppercase;
            font-size: 12px;
            letter-spacing: 0.1em;
        }

        .search-input:focus {
            outline: none;
            border-color: rgba(255,255,255,0.5);
        }

        .main-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 14px 20px 24px;
        }

        .song-list {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            width: 100%;
        }

        .song-item {
            background: transparent;
            margin: 0;
            padding: 8px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .song-item:hover {
            padding-left: 10px;
        }

        .song-item:hover .song-chords {
            background: rgba(255,255,255,0.2);
            border-color: rgba(255,255,255,0.5);
        }

        .song-title {
            font-size: 16px;
            font-weight: 400;
            margin-bottom: 2px;
            letter-spacing: 0.02em;
        }

        .song-artist {
            color: rgba(255,255,255,0.5);
            font-size: 9px;
            margin-bottom: 3px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .song-chords {
            color: #fff;
            font-size: 11px;
            font-family: 'Courier New', monospace;
            letter-spacing: 0.1em;
            font-weight: 500;
            background: rgba(255,255,255,0.1);
            padding: 4px 8px;
            margin-top: 8px;
            display: inline-block;
            border: 1px solid rgba(255,255,255,0.3);
        }

        .song-view {
            display: none;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .back-button {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            padding: 12px 24px;
            cursor: pointer;
            margin-bottom: 40px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s ease;
            font-weight: 300;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            font-size: 12px;
        }

        .back-button:hover {
            background: #fff;
            color: #000;
        }

        .song-content {
            background: transparent;
            padding: 0;
            margin-bottom: 80px;
            border: none;
        }

        .song-content h2 {
            font-size: 36px;
            margin-bottom: 10px;
            font-weight: 300;
            letter-spacing: 0.02em;
        }

        .song-content .artist {
            color: rgba(255,255,255,0.6);
            margin-bottom: 40px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-size: 13px;
        }

        .lyrics {
            font-size: 16px;
            line-height: 1.4;
            white-space: pre-wrap;
            font-family: 'Courier New', monospace;
            font-weight: 400;
            color: #fff;
        }

        .chord {
            color: #fff;
            font-weight: 600;
            background: rgba(255,255,255,0.2);
            padding: 3px 8px;
            margin: 0 2px;
            border: 1px solid rgba(255,255,255,0.4);
            display: inline-block;
            font-size: 14px;
            transition: all 0.2s ease;
        }

        .chord:hover {
            background: rgba(255,255,255,0.3);
            border-color: rgba(255,255,255,0.6);
            box-shadow: 0 0 10px rgba(255,255,255,0.3);
        }

        .controls {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: #000;
            padding: 20px;
            display: none;
            border-top: 1px solid rgba(255,255,255,0.2);
        }

        .control-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .control-btn {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            padding: 10px 20px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 300;
        }

        .control-btn:hover {
            background: #fff;
            color: #000;
        }

        .download-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.95);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background: #000;
            border: 1px solid rgba(255,255,255,0.2);
            padding: 40px;
            max-width: 400px;
            width: 90%;
            text-align: center;
        }

        .modal-content h3 {
            font-weight: 300;
            font-size: 24px;
            margin-bottom: 20px;
            letter-spacing: 0.02em;
        }

        .modal-content p {
            margin-bottom: 30px;
            color: rgba(255,255,255,0.6);
            font-weight: 300;
        }

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

        .chord-chart-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.98);
            z-index: 1000;
            overflow-y: auto;
            padding: 20px;
        }

        .chord-chart-content {
            background: #000;
            border: 1px solid rgba(255,255,255,0.2);
            max-width: 1200px;
            margin: 0 auto;
            padding: 40px;
        }

        .chord-chart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
        }

        .chord-chart-header h3 {
            font-weight: 300;
            font-size: 28px;
            letter-spacing: 0.1em;
        }

        .close-btn {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            width: 40px;
            height: 40px;
            font-size: 24px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .close-btn:hover {
            background: #fff;
            color: #000;
        }

        .chord-section {
            margin-bottom: 40px;
        }

        .chord-section h4 {
            font-weight: 300;
            font-size: 18px;
            letter-spacing: 0.1em;
            margin-bottom: 20px;
            color: rgba(255,255,255,0.7);
        }

        .chord-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 30px;
        }

        .chord-diagram {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.2);
            padding: 20px;
            text-align: center;
        }

        .chord-name {
            font-size: 24px;
            font-weight: 400;
            margin-bottom: 15px;
            letter-spacing: 0.05em;
        }

        .chord-diagram pre {
            font-family: 'Courier New', monospace;
            font-size: 14px;
            line-height: 1.2;
            color: rgba(255,255,255,0.9);
            text-align: left;
            display: inline-block;
        }

        .features-btn {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            padding: 12px 24px;
            cursor: pointer;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 300;
            transition: all 0.3s ease;
            display: none;
        }

        .features-btn:hover {
            background: #fff;
            color: #000;
        }

        .auto-scroll {
            display: none;
            align-items: center;
            gap: 15px;
            margin-top: 30px;
            justify-content: center;
            padding: 20px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .auto-scroll label {
            text-transform: uppercase;
            font-size: 12px;
            letter-spacing: 0.1em;
            font-weight: 300;
        }

        .speed-control {
            width: 150px;
            background: transparent;
            -webkit-appearance: none;
            appearance: none;
            height: 2px;
            background: rgba(255,255,255,0.2);
            outline: none;
        }

        .speed-control::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 12px;
            height: 12px;
            background: #fff;
            cursor: pointer;
            border-radius: 50%;
        }

        .speed-control::-moz-range-thumb {
            width: 12px;
            height: 12px;
            background: #fff;
            cursor: pointer;
            border-radius: 50%;
        }

        .song-count {
            color: rgba(255,255,255,0.4);
            font-size: 10px;
            margin-top: 4px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 300;
        }

        .header-chord-btn {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            padding: 10px 20px;
            cursor: pointer;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 300;
            transition: all 0.3s ease;
            margin-top: 20px;
        }

        .header-chord-btn:hover {
            background: #fff;
            color: #000;
        }

        .nav-tabs {
            display: flex;
            gap: 12px;
            justify-content: center;
            margin: 8px 0;
        }

        .nav-tab {
            background: transparent;
            border: none;
            color: rgba(255,255,255,0.5);
            padding: 6px 18px;
            cursor: pointer;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 300;
            transition: all 0.3s ease;
            border-bottom: 2px solid transparent;
        }

        .nav-tab:hover {
            color: rgba(255,255,255,0.8);
        }

        .nav-tab.active {
            color: #fff;
            border-bottom-color: #fff;
        }

        .scales-section {
            display: none;
            max-width: 1000px;
            margin: 0 auto;
            padding: 40px 20px;
        }

        .learning-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin-bottom: 40px;
        }

        .learning-card {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.2);
            padding: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .learning-card:hover {
            border-color: rgba(255,255,255,0.5);
            transform: translateY(-2px);
        }

        .learning-card h3 {
            font-size: 20px;
            font-weight: 300;
            letter-spacing: 0.1em;
            margin-bottom: 15px;
            text-transform: uppercase;
        }

        .learning-card p {
            color: rgba(255,255,255,0.6);
            font-size: 14px;
            line-height: 1.6;
        }

        .pentatonic-content {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        .pentatonic-patterns {
            margin: 40px 0;
        }

        .pattern-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 30px;
            margin: 30px 0;
        }

        .pattern-box {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.2);
            padding: 20px;
            text-align: center;
        }

        .pattern-box h4 {
            font-size: 16px;
            font-weight: 300;
            letter-spacing: 0.1em;
            margin-bottom: 15px;
            text-transform: uppercase;
        }

        .fretboard-diagram {
            font-family: 'Courier New', monospace;
            font-size: 12px;
            line-height: 1.2;
            color: #fff;
            white-space: pre;
            margin: 15px 0;
        }

        .scale-notes {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin: 20px 0;
        }

        .scale-note {
            width: 40px;
            height: 40px;
            border: 1px solid rgba(255,255,255,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 400;
        }

        .scale-note.root {
            background: rgba(255,255,255,0.2);
            border-color: #fff;
        }

        /* Guitar Tuner Styles */
        .tuner-section {
            display: none;
            padding: 40px 20px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .tuner-section h2 {
            font-size: 36px;
            font-weight: 300;
            margin-bottom: 10px;
            text-align: center;
            letter-spacing: 0.2em;
            text-transform: uppercase;
        }

        .tuner-section .artist {
            text-align: center;
            margin-bottom: 40px;
            font-size: 16px;
            opacity: 0.8;
            font-weight: 300;
        }

        /* Microphone Tuner Section */
        .mic-tuner {
            display: block;
            margin: 30px 0;
            max-width: 720px;
            margin-left: auto;
            margin-right: auto;
        }

        .mic-tuner.active {
            display: block;
        }

        .mic-controls {
            margin-bottom: 30px;
            text-align: center;
        }

        .mic-button {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            padding: 18px 34px;
            font-size: 18px;
            font-weight: 300;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .mic-button:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.5);
        }

        .mic-button.listening {
            background: #fff;
            color: #000;
            border-color: #fff;
            animation: listening-pulse 2s infinite;
        }

        @keyframes listening-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .tuning-display {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            padding: 32px 24px;
            margin: 20px 0;
            text-align: center;
            border-radius: 18px;
        }

        .detected-note {
            font-size: 56px;
            font-weight: 400;
            color: #fff;
            margin-bottom: 8px;
            min-height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            letter-spacing: 0.1em;
        }

        .detected-note.in-tune {
            color: #9dff9d;
            text-shadow: 0 0 18px rgba(157,255,157,0.35);
        }

        .target-note-display {
            font-size: 14px;
            color: rgba(255,255,255,0.75);
            text-transform: uppercase;
            letter-spacing: 0.12em;
            margin-bottom: 14px;
        }

        .frequency-display {
            font-size: 18px;
            color: rgba(255,255,255,0.7);
            margin-bottom: 22px;
            font-weight: 300;
        }

        .tuning-meter {
            position: relative;
            width: 100%;
            height: 56px;
            background: linear-gradient(to right, 
                rgba(255,100,100,0.3) 0%, 
                rgba(255,200,100,0.3) 25%, 
                rgba(100,255,100,0.3) 45%, 
                rgba(100,255,100,0.3) 55%, 
                rgba(255,200,100,0.3) 75%, 
                rgba(255,100,100,0.3) 100%);
            border: 1px solid rgba(255,255,255,0.2);
            margin: 25px 0;
            overflow: hidden;
            border-radius: 999px;
        }

        .meter-center-band {
            position: absolute;
            top: 6px;
            bottom: 6px;
            left: 46%;
            width: 8%;
            border-radius: 999px;
            background: rgba(170,255,170,0.35);
            border: 1px solid rgba(170,255,170,0.45);
        }

        .meter-needle {
            position: absolute;
            top: 4px;
            left: 50%;
            width: 6px;
            height: calc(100% - 8px);
            background: #fff;
            transform: translateX(-50%);
            transition: left 0.18s ease;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
            border-radius: 999px;
        }

        .meter-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 15px;
            font-size: 12px;
            color: rgba(255,255,255,0.6);
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 300;
        }

        .cents-display {
            font-size: 28px;
            font-weight: 500;
            margin-top: 20px;
            color: #fff;
        }

        .cents-display.sharp {
            color: #ff6666;
        }

        .cents-display.flat {
            color: #ffcc66;
        }

        .cents-display.in-tune {
            color: #66ff66;
        }

        .tuning-status {
            font-size: 16px;
            margin-top: 15px;
            font-weight: 400;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .status-listening {
            color: #6699ff;
        }

        .status-detecting {
            color: #ffcc66;
        }

        .status-tuned {
            color: #66ff66;
        }

        /* Reference Tones Section */
        .reference-tuner {
            display: block;
            max-width: 720px;
            margin-left: auto;
            margin-right: auto;
        }

        .reference-tuner.inactive {
            display: none;
        }

        .reference-heading {
            text-align: center;
            margin: 26px 0 18px;
        }

        .reference-heading h3 {
            font-size: 20px;
            font-weight: 400;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            margin-bottom: 8px;
        }

        .reference-heading p {
            font-size: 14px;
            color: rgba(255,255,255,0.68);
        }

        .volume-control {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 14px;
            margin-bottom: 20px;
        }

        .strings-container {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
            margin-bottom: 30px;
        }

        .string-button {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            border-radius: 18px;
            padding: 18px 16px;
            font-size: 18px;
            font-weight: 400;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }

        .string-button:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.5);
        }

        .string-button.playing {
            background: #fff;
            color: #000;
            border-color: #fff;
        }

        .string-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }

        .string-note {
            font-size: 18px;
            font-weight: 400;
        }

        .string-number {
            background: rgba(255,255,255,0.2);
            color: #fff;
            border: 1px solid rgba(255,255,255,0.3);
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }

        .string-button.playing .string-number {
            background: rgba(0,0,0,0.2);
            color: #000;
            border-color: rgba(0,0,0,0.3);
        }

        .frequency {
            font-size: 12px;
            color: rgba(255,255,255,0.6);
            font-weight: 300;
            text-transform: none;
            letter-spacing: normal;
        }

        .volume-control {
            margin: 20px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
        }

        .volume-control label {
            text-transform: uppercase;
            font-size: 12px;
            letter-spacing: 0.1em;
            font-weight: 300;
        }

        .volume-slider {
            width: 150px;
            background: transparent;
            -webkit-appearance: none;
            appearance: none;
            height: 2px;
            background: rgba(255,255,255,0.2);
            outline: none;
        }

        .volume-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 12px;
            height: 12px;
            background: #fff;
            cursor: pointer;
            border-radius: 50%;
        }

        .volume-slider::-moz-range-thumb {
            width: 12px;
            height: 12px;
            background: #fff;
            cursor: pointer;
            border-radius: 50%;
            border: none;
        }

        .error-message {
            background: rgba(255,100,100,0.1);
            color: #ff6666;
            padding: 15px;
            margin: 15px 0;
            border: 1px solid rgba(255,100,100,0.3);
            text-align: center;
            font-weight: 300;
        }

        /* Practice Section Styles */
        .practice-section {
            display: none;
            padding: 40px 20px;
            max-width: 800px;
            margin: 0 auto;
        }

        .practice-section h2 {
            font-size: 36px;
            font-weight: 300;
            margin-bottom: 10px;
            text-align: center;
            letter-spacing: 0.2em;
            text-transform: uppercase;
        }

        .practice-section .artist {
            text-align: center;
            margin-bottom: 40px;
            font-size: 16px;
            opacity: 0.8;
            font-weight: 300;
        }

        .practice-mode-toggle {
            display: flex;
            justify-content: center;
            gap: 0;
            margin: 30px auto;
            max-width: 600px;
        }

        .practice-mode-button {
            flex: 1;
            padding: 15px 20px;
            border: 1px solid rgba(255,255,255,0.3);
            background: transparent;
            color: #fff;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 300;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-size: 13px;
        }

        .practice-mode-button:not(:last-child) {
            border-right: none;
        }

        .practice-mode-button:hover {
            background: rgba(255,255,255,0.1);
        }

        .practice-mode-button.active {
            background: #fff;
            color: #000;
            border-color: #fff;
        }

        .practice-panel {
            display: none;
            max-width: 600px;
            margin: 30px auto;
        }

        .practice-panel.active {
            display: block;
        }

        /* Backing Track Player */
        .backing-controls {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-bottom: 30px;
        }

        .backing-row {
            display: flex;
            gap: 15px;
            align-items: center;
            justify-content: center;
        }

        .backing-row label {
            font-weight: 300;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-size: 13px;
            min-width: 50px;
        }

        .backing-select {
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            padding: 10px 15px;
            font-size: 14px;
            font-weight: 300;
            cursor: pointer;
            flex: 1;
            max-width: 250px;
        }

        .backing-select option {
            background: #111;
            color: #fff;
        }

        .backing-bpm {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
        }

        .backing-bpm input[type="range"] {
            width: 180px;
            accent-color: #fff;
        }

        .backing-bpm-value {
            font-size: 18px;
            font-weight: 300;
            min-width: 70px;
            text-align: center;
        }

        .backing-play-btn {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            padding: 15px 40px;
            font-size: 16px;
            font-weight: 300;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            transition: all 0.3s ease;
            display: block;
            margin: 0 auto;
        }

        .backing-play-btn:hover {
            background: rgba(255,255,255,0.1);
        }

        .backing-play-btn.playing {
            background: #fff;
            color: #000;
            border-color: #fff;
        }

        .chord-display {
            text-align: center;
            margin: 30px 0;
        }

        .chord-display .current-chord {
            font-size: 72px;
            font-weight: 300;
            letter-spacing: 0.1em;
            transition: opacity 0.15s ease;
        }

        .chord-display .chord-sequence {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        .chord-display .chord-step {
            padding: 8px 14px;
            border: 1px solid rgba(255,255,255,0.15);
            font-size: 14px;
            font-weight: 300;
            opacity: 0.4;
            transition: all 0.2s ease;
        }

        .chord-display .chord-step.active {
            opacity: 1;
            border-color: #fff;
            background: rgba(255,255,255,0.1);
        }

        /* Fretboard Quiz */
        .fretboard-container {
            overflow-x: auto;
            margin: 20px 0;
            padding: 10px 0;
        }

        .fretboard-svg {
            display: block;
            margin: 0 auto;
        }

        .fret-marker {
            cursor: pointer;
            transition: fill 0.15s ease;
        }

        .fret-marker:hover {
            fill: rgba(255,255,255,0.3);
        }

        .fret-marker.correct {
            fill: rgba(100,255,100,0.5);
        }

        .fret-marker.incorrect {
            fill: rgba(255,100,100,0.5);
        }

        .quiz-prompt {
            text-align: center;
            margin: 20px 0;
        }

        .quiz-prompt .target-note {
            font-size: 48px;
            font-weight: 300;
            letter-spacing: 0.1em;
        }

        .quiz-prompt .quiz-instruction {
            font-size: 14px;
            opacity: 0.7;
            font-weight: 300;
            margin-top: 10px;
        }

        .quiz-score {
            text-align: center;
            margin: 20px 0;
            font-size: 16px;
            font-weight: 300;
            opacity: 0.8;
        }

        .quiz-controls {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin: 20px 0;
        }

        .quiz-btn {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            padding: 12px 25px;
            font-size: 14px;
            font-weight: 300;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            transition: all 0.3s ease;
        }

        .quiz-btn:hover {
            background: rgba(255,255,255,0.1);
        }

        .quiz-btn.active {
            background: #fff;
            color: #000;
        }

        /* Ear Trainer */
        .ear-trainer-controls {
            text-align: center;
            margin: 20px 0;
        }

        .ear-play-btn {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            padding: 18px 40px;
            font-size: 18px;
            font-weight: 300;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            transition: all 0.3s ease;
            margin-bottom: 10px;
        }

        .ear-play-btn:hover {
            background: rgba(255,255,255,0.1);
        }

        .ear-direction-toggle {
            display: flex;
            justify-content: center;
            gap: 0;
            margin: 20px auto;
            max-width: 400px;
        }

        .ear-dir-btn {
            flex: 1;
            padding: 10px 15px;
            border: 1px solid rgba(255,255,255,0.3);
            background: transparent;
            color: #fff;
            cursor: pointer;
            font-size: 12px;
            font-weight: 300;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            transition: all 0.3s ease;
        }

        .ear-dir-btn:not(:last-child) {
            border-right: none;
        }

        .ear-dir-btn.active {
            background: #fff;
            color: #000;
            border-color: #fff;
        }

        .interval-choices {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin: 25px 0;
            max-width: 450px;
            margin-left: auto;
            margin-right: auto;
        }

        .interval-btn {
            padding: 14px 10px;
            border: 1px solid rgba(255,255,255,0.3);
            background: transparent;
            color: #fff;
            cursor: pointer;
            font-size: 13px;
            font-weight: 300;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            transition: all 0.2s ease;
        }

        .interval-btn:hover {
            background: rgba(255,255,255,0.1);
        }

        .interval-btn.correct {
            background: rgba(100,255,100,0.2);
            border-color: rgba(100,255,100,0.6);
            color: #66ff66;
        }

        .interval-btn.incorrect {
            background: rgba(255,100,100,0.2);
            border-color: rgba(255,100,100,0.6);
            color: #ff6666;
        }

        .ear-score {
            text-align: center;
            margin: 20px 0;
            font-size: 16px;
            font-weight: 300;
            opacity: 0.8;
        }

        .ear-feedback {
            text-align: center;
            font-size: 18px;
            font-weight: 300;
            min-height: 30px;
            margin: 15px 0;
        }

        /* Metronome Styles */
        .metronome-section {
            display: none;
            padding: 40px 20px;
            max-width: 600px;
            margin: 0 auto;
        }

        .metronome-section h2 {
            font-size: 36px;
            font-weight: 300;
            margin-bottom: 10px;
            text-align: center;
            letter-spacing: 0.2em;
            text-transform: uppercase;
        }

        .metronome-section .artist {
            text-align: center;
            margin-bottom: 40px;
            font-size: 16px;
            opacity: 0.8;
            font-weight: 300;
        }

        .bpm-display {
            text-align: center;
            margin-bottom: 40px;
        }

        .bpm-number {
            font-size: 72px;
            font-weight: 300;
            color: #fff;
            margin-bottom: 10px;
            font-family: 'Courier New', monospace;
            letter-spacing: 0.1em;
        }

        .bpm-label {
            font-size: 18px;
            color: rgba(255,255,255,0.7);
            font-weight: 300;
            text-transform: uppercase;
            letter-spacing: 0.2em;
        }

        .beat-indicator {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 40px;
        }

        .beat-dot {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
            border: 1px solid rgba(255,255,255,0.3);
            transition: all 0.1s ease;
        }

        .beat-dot.active {
            background: #fff;
            box-shadow: 0 0 15px rgba(255,255,255,0.5);
            transform: scale(1.25);
        }

        .beat-dot.accent {
            background: #ff6666;
            box-shadow: 0 0 15px rgba(255,102,102,0.5);
        }

        .metronome-controls {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        .control-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .control-label {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 300;
            color: rgba(255,255,255,0.8);
        }

        .bpm-slider {
            width: 100%;
            height: 2px;
            background: rgba(255,255,255,0.2);
            outline: none;
            -webkit-appearance: none;
            appearance: none;
        }

        .bpm-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            background: #fff;
            cursor: pointer;
            border-radius: 50%;
            box-shadow: 0 0 10px rgba(255,255,255,0.3);
        }

        .bpm-slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            background: #fff;
            cursor: pointer;
            border-radius: 50%;
            border: none;
            box-shadow: 0 0 10px rgba(255,255,255,0.3);
        }

        .slider-labels {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: rgba(255,255,255,0.6);
            margin-top: 5px;
        }

        .input-group {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .bpm-input {
            flex: 1;
            padding: 15px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.2);
            color: #fff;
            text-align: center;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            font-weight: 300;
        }

        .bpm-input:focus {
            outline: none;
            border-color: rgba(255,255,255,0.5);
            background: rgba(255,255,255,0.1);
        }

        .beats-group {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .beats-label {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 300;
            color: rgba(255,255,255,0.8);
        }

        .beats-select {
            padding: 8px 12px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.2);
            color: #fff;
            font-size: 14px;
        }

        .beats-select:focus {
            outline: none;
            border-color: rgba(255,255,255,0.5);
        }

        .preset-buttons {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }

        .preset-btn {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.2);
            color: #fff;
            padding: 15px 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            font-weight: 300;
        }

        .preset-btn:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.4);
        }

        .preset-btn span {
            display: block;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .preset-bpm {
            font-size: 12px;
            color: rgba(255,255,255,0.6);
            margin-top: 5px;
        }

        .main-controls {
            display: flex;
            gap: 15px;
        }

        .play-stop-btn {
            flex: 1;
            padding: 20px;
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            font-size: 16px;
            font-weight: 300;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .play-stop-btn:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.5);
        }

        .play-stop-btn.playing {
            background: #ff6666;
            border-color: #ff6666;
            color: #fff;
        }

        .play-stop-btn.playing:hover {
            background: #ff5555;
        }

        .tap-btn {
            padding: 20px 30px;
            background: transparent;
            border: 1px solid rgba(255,255,255,0.3);
            color: #fff;
            font-size: 16px;
            font-weight: 300;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .tap-btn:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.5);
        }

        .tap-btn.active {
            background: #6699ff;
            border-color: #6699ff;
        }

        .reset-btn {
            width: 100%;
            padding: 15px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.2);
            color: #fff;
            font-size: 14px;
            font-weight: 300;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .reset-btn:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.4);
        }

        /* Splash Screen Styles */
        .splash-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #000;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            cursor: pointer;
            animation: splashFadeIn 0.5s ease-in;
        }

        .splash-screen.fade-out {
            animation: splashFadeOut 0.5s ease-out forwards;
        }

        .splash-content {
            text-align: center;
            animation: splashContentFadeIn 1s ease-in 0.3s both;
        }

        .splash-image {
            max-width: 90%;
            max-height: 70vh;
            width: auto;
            height: auto;
            object-fit: contain;
            margin-bottom: 40px;
        }

        .tap-to-dismiss {
            color: rgba(255,255,255,0.7);
            font-size: 16px;
            font-weight: 300;
            text-transform: uppercase;
            letter-spacing: 0.2em;
            animation: tapToDismissPulse 2s ease-in-out infinite;
        }

        @keyframes splashFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes splashFadeOut {
            from { opacity: 1; }
            to { opacity: 0; }
        }

        @keyframes splashContentFadeIn {
            from { 
                opacity: 0;
                transform: translateY(20px);
            }
            to { 
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes tapToDismissPulse {
            0%, 100% { opacity: 0.7; }
            50% { opacity: 1; }
        }

        @media (max-width: 480px) {
            /* General mobile styles */
            body {
                font-size: 14px;
            }
            
            /* Header improvements */
            .header {
                padding: 6px 10px 6px;
            }

            .header h1 {
                font-size: 16px;
                margin: 0 0 4px;
                letter-spacing: 0.1em;
            }

            .header-wordmark {
                height: 16px;
            }

            /* Navigation tabs */
            .nav-tabs {
                display: grid;
                grid-template-columns: repeat(5, 1fr);
                gap: 4px;
                margin: 4px 0 6px;
            }

            .nav-tab {
                padding: 6px 2px;
                font-size: 9px;
                letter-spacing: 0.03em;
            }

            /* Search and controls */
            .search-input {
                padding: 7px 12px;
                font-size: 13px;
            }

            .header-chord-btn {
                padding: 6px 12px;
                font-size: 11px;
                margin-top: 6px;
            }

            .song-count {
                font-size: 10px;
                margin: 3px 0 0;
            }

            .header-actions {
                margin-top: 6px;
                gap: 5px;
            }

            .header-action-btn {
                padding: 5px 9px;
                font-size: 9px;
            }

            .main-container {
                padding: 8px 14px 24px;
            }
            
            /* Song list */
            .song-list {
                grid-template-columns: 1fr;
                gap: 0;
            }
            
            .song-item {
                padding: 6px 0;
            }
            
            .song-item h3 {
                font-size: 14px;
                margin-bottom: 2px;
            }
            
            .song-item .artist {
                font-size: 9px;
            }
            
            .song-item .chords {
                font-size: 10px;
                margin-top: 3px;
            }
            
            /* Song view */
            .song-content {
                padding: 15px;
            }
            
            .song-content h2 {
                font-size: 24px;
                margin-bottom: 8px;
            }
            
            .song-content .artist {
                font-size: 14px;
                margin-bottom: 20px;
            }
            
            .lyrics {
                font-size: 16px;
                line-height: 1.6;
            }
            
            .chord {
                font-size: 14px;
                padding: 2px 4px;
            }
            
            /* Controls */
            .controls {
                padding: 15px;
                gap: 10px;
            }
            
            .control-btn {
                padding: 10px 15px;
                font-size: 12px;
                min-width: auto;
            }
            
            .back-button {
                padding: 12px 20px;
                font-size: 14px;
                margin: 10px 15px 0;
            }
            
            /* Auto-scroll controls */
            .auto-scroll {
                padding: 15px;
            }
            
            .auto-scroll label {
                font-size: 11px;
                margin-bottom: 8px;
            }
            
            .speed-control {
                margin: 10px 0;
            }
            
            /* Scales section */
            .scales-section {
                padding: 20px 15px;
            }
            
            .scales-section h2 {
                font-size: 28px;
            }
            
            .pentatonic-content {
                padding: 15px;
            }
            
            .scale-diagram {
                overflow-x: auto;
                margin: 15px 0;
            }
            
            .pattern-section h3 {
                font-size: 18px;
            }
            
            .scale-notes {
                gap: 8px;
            }
            
            .scale-note {
                width: 35px;
                height: 35px;
                font-size: 12px;
            }
            
            /* Tuner section */
            .tuner-section {
                padding: 20px 15px;
            }
            
            .tuner-section h2 {
                font-size: 28px;
            }
            
            .mic-button {
                width: 100%;
                padding: 16px 20px;
                font-size: 16px;
            }
            
            .detected-note {
                font-size: 42px;
            }

            .target-note-display {
                font-size: 12px;
            }
            
            .frequency-display {
                font-size: 16px;
            }
            
            .tuning-meter {
                height: 48px;
                margin: 20px 0;
            }

            .cents-display {
                font-size: 24px;
            }

            .strings-container {
                grid-template-columns: 1fr;
            }
            
            .string-button {
                padding: 16px 14px;
                font-size: 16px;
            }
            
            .string-note {
                font-size: 16px;
            }
            
            .string-number {
                width: 25px;
                height: 25px;
                font-size: 12px;
            }
            
            .frequency {
                font-size: 11px;
            }
            
            /* Metronome section */
            .metronome-section {
                padding: 20px 15px;
            }
            
            .metronome-section h2 {
                font-size: 28px;
            }
            
            .bpm-number {
                font-size: 56px;
            }
            
            .beat-dot {
                width: 14px;
                height: 14px;
            }
            
            .bpm-input {
                padding: 12px;
                font-size: 14px;
            }
            
            .preset-buttons {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }
            
            .preset-btn {
                padding: 12px 8px;
            }
            
            .preset-btn span {
                font-size: 12px;
            }
            
            .main-controls {
                flex-direction: column;
                gap: 10px;
            }
            
            .play-stop-btn, .tap-btn {
                padding: 15px;
                font-size: 14px;
            }
            
            .reset-btn {
                padding: 12px;
                font-size: 12px;
            }
            
            /* Splash screen */
            .splash-image {
                max-width: 95%;
                max-height: 60vh;
                margin-bottom: 30px;
            }
            
            .tap-to-dismiss {
                font-size: 14px;
                letter-spacing: 0.15em;
            }
            
            /* Modal improvements */
            .modal-content {
                width: 95%;
                max-width: none;
                margin: 20px auto;
                padding: 20px;
            }
            
            .chord-chart-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 15px;
            }
            
            .chord-diagram {
                padding: 10px;
            }
            
            .chord-name {
                font-size: 14px;
                margin-bottom: 8px;
            }
            
            .chord-diagram pre {
                font-size: 10px;
            }
            
            /* Touch improvements */
            .song-item, .nav-tab, .control-btn, .string-button, 
            .preset-btn, .play-stop-btn, .tap-btn {
                min-height: 44px; /* iOS recommended touch target */
            }
            
            /* Prevent horizontal scroll */
            .container, .main-container {
                overflow-x: hidden;
            }
        }
        
        /* Medium screen adjustments for tablets */
        @media (max-width: 500px) {
            .song-list {
                grid-template-columns: 1fr;
                gap: 0;
            }
            
            .song-item {
                padding: 7px 0;
            }
        }
        
        /* Mobile adjustments for smaller screens */
        @media (max-width: 400px) {
            .header h1 {
                font-size: 14px;
            }

            .header-wordmark {
                height: 14px;
            }

            .nav-tabs {
                grid-template-columns: repeat(5, 1fr);
                gap: 3px;
            }

            .nav-tab {
                padding: 5px 2px;
                font-size: 8px;
            }

            .header-action-btn {
                padding: 4px 7px;
                font-size: 8px;
            }
            
            .song-content h2 {
                font-size: 20px;
            }
            
            .lyrics {
                font-size: 15px;
            }
            
            .bpm-number {
                font-size: 48px;
            }
            
            .detected-note {
                font-size: 28px;
            }
            
            .preset-buttons {
                grid-template-columns: 1fr;
            }
        }

/* =====================================================================
   OpenFret additions: welcome banner, header actions, modals, song badges
   ===================================================================== */

.welcome-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.welcome-banner-content { flex: 1; }

.welcome-banner strong {
    font-weight: 500;
    margin-right: 6px;
}

.welcome-link {
    background: none;
    border: none;
    color: #fff;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
    margin: 0 2px;
}

.welcome-link:hover { color: rgba(255,255,255,0.7); }

.welcome-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.welcome-close:hover { color: #fff; }

/* Header action buttons */
.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 8px;
}

.header-action-btn {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 5px 12px;
    cursor: pointer;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 400;
    transition: all 0.2s ease;
}

.header-action-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.header-action-btn.primary {
    background: #fff;
    color: #000;
}

.header-action-btn.primary:hover {
    background: rgba(255,255,255,0.85);
}

/* Replace the legacy .header-chord-btn so it doesn't fight the new layout */
.header-chord-btn { display: none; }

/* Song badges */
.song-badge {
    display: inline-block;
    font-size: 8px;
    letter-spacing: 0.15em;
    padding: 2px 6px;
    margin-left: 6px;
    vertical-align: middle;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    font-weight: 500;
}

.song-badge.sample {
    background: transparent;
    color: rgba(255,255,255,0.5);
    border-color: rgba(255,255,255,0.2);
}

.song-badge.mine {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.7);
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* Song view license attribution */
.song-license {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
}

/* Generic OpenFret modal (.of-modal) */
.of-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.of-modal-content {
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.2);
    width: 100%;
    max-width: 640px;
    padding: 28px;
    color: #fff;
}

.of-modal-content.of-modal-small { max-width: 460px; }

.of-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.of-modal-header h3 {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.of-form { display: flex; flex-direction: column; gap: 14px; }

.of-field { display: flex; flex-direction: column; gap: 6px; }

.of-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.of-field span {
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}

.of-field input,
.of-field select,
.of-field textarea {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    border-radius: 0;
}

.of-field textarea {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    min-height: 200px;
}

.of-field input:focus,
.of-field select:focus,
.of-field textarea:focus {
    outline: none;
    border-color: rgba(255,255,255,0.7);
}

.of-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.of-form-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    margin-top: 8px;
}

.of-form-hint code {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
}

/* Library menu */
.of-library-stats {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    font-size: 13px;
    line-height: 1.7;
}

.of-library-stats strong {
    font-weight: 500;
    color: #fff;
}

.of-library-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.file-input-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.control-btn.primary {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.control-btn.primary:hover {
    background: rgba(255,255,255,0.85);
}

.control-btn.danger {
    color: #ff8a8a;
    border-color: rgba(255,138,138,0.5);
}

.control-btn.danger:hover {
    background: rgba(255,138,138,0.15);
    border-color: rgba(255,138,138,0.9);
}

/* Help modal */
.of-help-content h4 {
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-top: 20px;
    margin-bottom: 8px;
}

.of-help-content h4:first-child { margin-top: 0; }

.of-help-content p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin-bottom: 8px;
}

.of-help-content pre {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-left: 2px solid rgba(255,255,255,0.3);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #fff;
    overflow-x: auto;
}

.of-confirm-message {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .of-field-row { grid-template-columns: 1fr; }
    .of-library-actions { grid-template-columns: 1fr; }
    .header-actions { gap: 6px; }
    .header-action-btn { padding: 7px 10px; font-size: 10px; }
}

/* =====================================================================
   OpenFret v1.1: empty state, starter packs, wordmark image
   ===================================================================== */

/* Wordmark image in the header (replaces the OPENFRET text h1) */
.header-wordmark {
    max-width: 100%;
    height: auto;
    width: 320px;
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 480px) {
    .header-wordmark { width: 220px; }
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px 80px;
    color: rgba(255,255,255,0.85);
    max-width: 520px;
    margin: 0 auto;
}

.empty-state-wordmark {
    display: block;
    height: 40px;
    width: auto;
    max-width: 70%;
    margin: 0 auto 18px;
    user-select: none;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    opacity: 0.85;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
}

.empty-state-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    margin: 0 auto 20px;
    max-width: 320px;
}

.empty-state-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* Library modal: section headings + starter pack list */
.of-section-heading {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin: 24px 0 10px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding-bottom: 6px;
}

.of-section-heading:first-of-type { margin-top: 8px; }

.of-pack-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.of-pack {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.of-pack-info { flex: 1; min-width: 0; }

.of-pack-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #fff;
}

.of-pack-desc {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255,255,255,0.65);
}

.of-pack .control-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 11px;
}

@media (max-width: 480px) {
    .of-pack {
        flex-direction: column;
        align-items: stretch;
    }
    .of-pack .control-btn { width: 100%; }
}
