/* ========================================
   Web Harmonium - Improved Responsive CSS
   ======================================== */

/* CSS Variables - Light Theme */
:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8ecf0;
    --text-primary: #1a1a2e;
    --text-secondary: #333340;
    --text-muted: #5a5a6a;
    
    --accent-primary: #3d6385;
    --accent-secondary: #4a7a9e;
    --accent-gradient: linear-gradient(135deg, #3d6385 0%, #4a7a9e 100%);
    
    --border-color: #ccc;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --overlay-color: rgba(0, 0, 0, 0.5);
    
    --white-key: #ffffff;
    --white-key-pressed: #c8dae8;
    --black-key: #2c3e50;
    --black-key-pressed: #3d6385;
    --highlight-key: #ffd700;
    
    --slider-track: #d0d0d0;
    --slider-thumb: #3d6385;
    
    --btn-primary: #3d6385;
    --btn-primary-hover: #2d5375;
    --btn-secondary: #e8ecf0;
    
    --header-bg: linear-gradient(135deg, #3d6385 0%, #2d5375 100%);
    --header-text: #ffffff;
    
    --sidebar-bg: #ffffff;
}

/* Dark Theme */
body.dark-theme {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    --accent-primary: #79c0ff;
    --accent-secondary: #a5d6ff;
    
    --border-color: #30363d;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --overlay-color: rgba(0, 0, 0, 0.7);
    
    --white-key: #f0f6fc;
    --white-key-pressed: #79c0ff;
    --black-key: #0d1117;
    --black-key-pressed: #388bfd;
    
    --slider-track: #30363d;
    --slider-thumb: #79c0ff;
    
    --btn-primary: #238636;
    --btn-primary-hover: #2ea043;
    --btn-secondary: #21262d;
    
    --header-bg: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    
    --sidebar-bg: #161b22;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Breadcrumb Navigation - Compact Top Bar */
.breadcrumb {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    padding: 6px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    font-size: 12px;
}

.breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    color: var(--text-muted);
    font-size: 11px;
}

.breadcrumb a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
}

.breadcrumb a:hover {
    color: var(--accent-secondary);
    background: var(--accent-primary);
    color: white;
}

.breadcrumb li[aria-current="page"] {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 2px 4px;
}

/* Collapsible Notation Panel */
.notation-panel {
    margin: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.notation-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.notation-panel-header:hover {
    background: var(--accent-primary);
    color: white;
}

.notation-panel-header .toggle-icon {
    transition: transform 0.3s ease;
}

.notation-panel.open .notation-panel-header .toggle-icon {
    transform: rotate(180deg);
}

.notation-panel-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.notation-panel.open .notation-panel-content {
    max-height: 500px;
}

.notation-panel-inner {
    padding: 16px;
}

.notation-section {
    margin-bottom: 16px;
}

.notation-section:last-child {
    margin-bottom: 0;
}

.notation-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notation-text, .lyrics-text {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: var(--bg-tertiary);
    padding: 12px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Part Selector */
.part-selector {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.part-selector h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--accent-primary);
}

.part-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.part-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.part-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.part-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Load Notes Section */
.load-notes-section {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.load-notes-section h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text-primary);
}

.load-notes-hint {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.notation-input {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

.notation-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.notation-input::placeholder {
    color: var(--text-muted);
}

.load-notes-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.notes-preview {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.notes-preview h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--accent-primary);
}

.preview-notes {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 8px;
    word-break: break-all;
}

.preview-lyrics {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    font-style: italic;
}

/* Song List - Grid View */
.demo-song-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}

.demo-song-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-song-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.demo-song-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    font-weight: 500;
}

/* Practice buttons row */
.song-play-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--header-text);
}

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

.notation-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
}

.notation-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notation-toggle span {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

.notation-toggle .active {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--header-text);
    font-size: 1.2rem;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
}

/* Loading Screen */
.load-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.5s ease;
}

.load-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.load-content {
    text-align: center;
    padding: 40px;
}

.load-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--accent-primary);
}

.load-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.load-btn {
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    background: #2d5375;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.load-btn:hover {
    transform: scale(1.05);
    background: var(--btn-primary-hover);
}

.load-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Main App */
.main-app {
    margin-top: 86px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 86px);
}

.main-app.hidden {
    display: none;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 260px;
    margin-right: 280px;
}

.site-footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

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

/* Sidebar */
.sidebar {
    position: fixed;
    top: 86px;
    left: 0;
    width: 260px;
    height: calc(100vh - 86px);
    background: var(--sidebar-bg);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 900;
    box-shadow: 2px 0 10px var(--shadow-color);
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 899;
}

.sidebar.open + .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.sidebar-nav {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--accent-primary);
    color: white;
}

.nav-btn.active {
    background: var(--accent-primary);
    color: white;
}

/* Content Area */
.content {
    flex: 1;
    padding: 16px;
    padding-bottom: 40px;
    overflow-x: hidden;
    overflow-y: auto;
    margin-left: 0;
    min-height: calc(100vh - 86px);
}

@media (min-width: 769px) {
    .content {
        margin-left: 260px;
        margin-right: 280px;
    }
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

.section.active > *:first-child {
    margin-top: 0;
}

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

/* Pitch Visualizer */
.pitch-visualizer {
    position: relative;
    width: 100%;
    height: 120px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#pitchCanvas {
    width: 100%;
    height: 100%;
}

.pitch-label {
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Simple Harmonium - Clean & Responsive */
.harmonium {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px var(--shadow-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.keys {
    position: relative;
    display: flex;
    min-width: 400px;
    height: 260px;
    background: linear-gradient(to bottom, #1a1a1a, #2a2a2a);
    border-radius: 8px;
    padding: 15px 10px 10px 10px;
}

/* White keys */
.keys .white {
    flex: 1;
    height: 100%;
    background: linear-gradient(to bottom, #f5f5f5, #ffffff);
    border: 1px solid #ccc;
    border-radius: 0 0 6px 6px;
    margin: 0 1px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.keys .white:hover {
    background: linear-gradient(to bottom, #eee, #f8f8f8);
}

.keys .white:active,
.keys .white.pressed {
    background: linear-gradient(to bottom, #ddd, #eee);
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.2);
}

/* Black keys - slimmer for white key visibility */
.keys .black {
    position: absolute;
    width: 3.5%;
    height: 62%;
    top: 15px;
    background: linear-gradient(to bottom, #333, #111);
    border-radius: 0 0 4px 4px;
    cursor: pointer;
    z-index: 2;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.keys .black:hover {
    background: linear-gradient(to bottom, #444, #222);
}

.keys .black:active,
.keys .black.pressed {
    background: linear-gradient(to bottom, #222, #111);
    height: 60%;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

/* Black key positions - centered between white keys */
.keys .pos-1 { left: calc(6.25% * 1 - 1.75%); }
.keys .pos-2 { left: calc(6.25% * 2 - 1.75%); }
.keys .pos-3 { left: calc(6.25% * 3 - 1.75%); }
.keys .pos-4 { left: calc(6.25% * 5 - 1.75%); }
.keys .pos-5 { left: calc(6.25% * 6 - 1.75%); }
.keys .pos-6 { left: calc(6.25% * 8 - 1.75%); }
.keys .pos-7 { left: calc(6.25% * 9 - 1.75%); }
.keys .pos-8 { left: calc(6.25% * 10 - 1.75%); }
.keys .pos-9 { left: calc(6.25% * 12 - 1.75%); }
.keys .pos-10 { left: calc(6.25% * 13 - 1.75%); }
.keys .pos-11 { left: calc(6.25% * 15 - 1.75%); }

/* Note labels on white keys */
.keys .note-label {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: bold;
    color: #5a7fa0;
    pointer-events: none;
}

/* Key labels (keyboard shortcuts) on keys */
.keys .key-hint {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: bold;
    color: #666;
    pointer-events: none;
    text-shadow: 0 0 2px rgba(255,255,255,0.8);
}

.keys .black .key-hint {
    color: #aaa;
    font-size: 9px;
    top: 5px;
}

/* Practice Type Selector */
.practice-type-selector {
    margin-bottom: 20px;
}

.practice-type-selector h3 {
    margin-bottom: 12px;
}

.practice-types {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.type-btn {
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.type-btn:hover {
    border-color: var(--accent-secondary);
}

.type-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.demo-song-btn {
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
    transition: all 0.2s;
}

.demo-song-btn:hover {
    border-color: var(--accent-secondary);
}

.demo-song-btn.active {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(107,76,154,0.1), rgba(139,108,186,0.1));
}

/* Song Progress */
.song-play-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.song-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--slider-track);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 60px;
}

/* MIDI Upload */
.midi-upload-section {
    margin-bottom: 20px;
}

.midi-upload-section h3 {
    margin-bottom: 12px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--accent-primary);
    background: rgba(107, 76, 154, 0.05);
}

.upload-box {
    color: var(--text-secondary);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.midi-info {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Keyboard hint */
.keyboard-hint {
    text-align: center;
    padding: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.keyboard-hint kbd {
    display: inline-block;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 2px;
}

/* Desktop - Big keyboard */
@media (min-width: 1200px) {
    .keys {
        height: 260px;
        max-width: 100%;
    }
    
    .keys .note-label {
        font-size: 14px;
        bottom: 15px;
    }
    
    .keys .key-hint {
        font-size: 13px;
        top: 10px;
    }
    
    .keys .black .key-hint {
        font-size: 11px;
    }
}

/* Laptop */
@media (min-width: 768px) and (max-width: 1199px) {
    .keys {
        height: 240px;
    }
    
    .keys .note-label {
        font-size: 13px;
        bottom: 12px;
    }
    
    .keys .key-hint {
        font-size: 12px;
    }
}

/* Tablet */
@media (max-width: 767px) {
    .keys {
        height: 180px;
    }
    
    .keys .note-label {
        font-size: 10px;
        bottom: 8px;
    }
    
    .keys .key-hint {
        font-size: 9px;
        top: 5px;
    }
    
    .keys .black .key-hint {
        font-size: 8px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .keys {
        height: 140px;
        min-width: 350px;
    }
    
    .keys .note-label {
        font-size: 8px;
        bottom: 5px;
    }
    
    .keys .key-hint {
        display: none;
    }
}

/* Piano Set (ul) - user's exact CSS */
.set {
    height: 18.875em;
    width: 100%;
    margin: 0 auto;
    padding: 3em 0 0 3em;
    position: relative;
    border: 1px solid #160801;
    border-radius: 1em;
    background: linear-gradient(to bottom right, rgba(0,0,0,0.1), rgba(0,0,0,0));
    box-shadow: 0 0 30px rgba(0,0,0,0.3) inset, 0 5px 15px rgba(0,0,0,0.2);
    list-style: none;
    overflow: visible;
}

.set li {
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
    float: left;
    transition: all 0.05s ease;
}

/* White keys - user's exact CSS */
.set .white {
    height: 16em;
    width: 3.5em;
    z-index: 1;
    border-left: 1px solid #bbb;
    border-bottom: 1px solid #bbb;
    border-radius: 0 0 5px 5px;
    box-shadow: -1px 0 0 rgba(255,255,255,0.8) inset, 
                0 0 5px #ccc inset, 
                0 0 3px rgba(0,0,0,0.2);
    background: linear-gradient(to bottom, #eee 0%, #fff 100%);
    cursor: pointer;
}

.set .white:hover {
    background: linear-gradient(to bottom, #f5f5f5 0%, #fff 100%);
}

.set .white:active,
.set .white.pressed {
    border-top: 1px solid #777;
    border-left: 1px solid #999;
    border-bottom: 1px solid #999;
    box-shadow: 2px 0 3px rgba(0,0,0,0.1) inset, 
                -5px 5px 20px rgba(0,0,0,0.2) inset, 
                0 0 3px rgba(0,0,0,0.2);
    background: linear-gradient(to bottom, #fff 0%, #e9e9e9 100%);
}

/* Black keys - user's exact CSS */
.set .black {
    height: 8em;
    width: 2em;
    margin: 0 0 0 -1em;
    z-index: 2;
    border: 1px solid #000;
    border-radius: 0 0 3px 3px;
    box-shadow: -1px -1px 2px rgba(255,255,255,0.2) inset, 
                0 -5px 2px 3px rgba(0,0,0,0.6) inset, 
                0 2px 4px rgba(0,0,0,0.5);
    background: linear-gradient(45deg, #222 0%, #555 100%);
    cursor: pointer;
}

.set .black:hover {
    background: linear-gradient(45deg, #333 0%, #666 100%);
}

.set .black:active,
.set .black.pressed {
    box-shadow: -1px -1px 2px rgba(255,255,255,0.2) inset, 
                0 -2px 2px 3px rgba(0,0,0,0.6) inset, 
                0 1px 2px rgba(0,0,0,0.5);
    background: linear-gradient(to right, #444 0%, #222 100%);
}

/* Position black keys using left offset */
.set .black {
    position: absolute;
    top: 3em;
    margin: 0;
}

/* Position each black key relative to the ul container */
.set .cs { left: calc(3em + (100% - 3em) / 7 * 1 - 1em); }
.set .ds { left: calc(3em + (100% - 3em) / 7 * 2 - 1em); }
.set .fs { left: calc(3em + (100% - 3em) / 7 * 4 - 1em); }
.set .gs { left: calc(3em + (100% - 3em) / 7 * 5 - 1em); }
.set .as { left: calc(3em + (100% - 3em) / 7 * 6 - 1em); }

.set li:first-child {
    border-radius: 5px 0 5px 5px;
}

.set li:last-child {
    border-radius: 0 5px 5px 5px;
}

/* Key labels */
.set .key-label {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: bold;
    color: #555;
    pointer-events: none;
    user-select: none;
}

.set .black .key-label {
    color: #888;
    font-size: 8px;
    bottom: 5px;
}

.set .note-label {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    color: #5a7fa0;
    pointer-events: none;
    user-select: none;
}

.key-label {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    pointer-events: none;
    user-select: none;
}

.key-label-white {
    fill: #333;
}

.key-label-black {
    fill: #aaa;
}

.key-label-note {
    fill: #5a7fa0;
    font-weight: bold;
}

.keyboard-hint {
    text-align: center;
    padding: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

kbd {
    display: inline-block;
    padding: 3px 6px;
    font-family: monospace;
    font-size: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 1px;
}

/* Current Notes Display */
.current-notes {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    box-shadow: 0 4px 16px var(--shadow-color);
    z-index: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.current-notes.active {
    opacity: 1;
    visibility: visible;
}

/* Control Panel */
.control-panel {
    width: 280px;
    background: var(--bg-secondary);
    padding: 20px;
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 100;
}

@media (min-width: 769px) {
    .control-panel {
        position: fixed;
        right: 0;
        top: 86px;
        height: calc(100vh - 86px);
    }
    
    .content {
        margin-right: 280px;
    }
}

.control-panel h3 {
    font-size: 1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-primary);
}

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

.control-group > label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 8px;
    background: var(--slider-track);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* Chrome, Safari, Edge */
.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--slider-thumb);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-secondary);
}

/* Firefox */
.slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--slider-thumb);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.slider-container input[type="range"]::-moz-range-thumb:hover {
    background: var(--accent-secondary);
}

.slider-container input[type="range"]::-moz-range-track {
    background: var(--slider-track);
    border-radius: 4px;
    height: 8px;
}

#volumeValue {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    min-width: 45px;
    text-align: right;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--slider-track);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .slider {
    background: var(--accent-primary);
}

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

.toggle-switch.small {
    width: 40px;
    height: 22px;
}

.toggle-switch.small .slider:before {
    height: 16px;
    width: 16px;
}

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

/* Transpose Control */
.transpose-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 8px 12px;
}

.transpose-control span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-primary);
    min-width: 30px;
    text-align: center;
}

.adj-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--btn-primary);
    color: white;
    font-size: 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.adj-btn:hover {
    background: var(--btn-primary-hover);
}

/* BPM Control */
.bpm-control {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bpm-control input[type="range"] {
    width: 100%;
    height: 8px;
    background: var(--slider-track);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.bpm-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--slider-thumb);
    border-radius: 50%;
    cursor: pointer;
}

.bpm-control input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--slider-thumb);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.bpm-control input[type="range"]::-moz-range-track {
    background: var(--slider-track);
    border-radius: 4px;
    height: 8px;
}

#bpmValue {
    font-size: 0.8rem;
    color: var(--accent-primary);
    min-width: 70px;
    text-align: right;
}

/* MIDI */
.midi-indicator {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.midi-indicator.connected {
    color: #27ae60;
}

.refresh-midi {
    background: var(--btn-secondary);
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 8px;
}

.midi-select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* Songs Section */
.songs-section h2,
.practice-section h2 {
    margin-bottom: 20px;
}

.song-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.song-tab {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.song-tab:hover {
    background: var(--accent-secondary);
    color: white;
}

.song-tab.active {
    background: var(--accent-primary);
    color: white;
}

.songs-container {
    margin-bottom: 20px;
}

.song-category {
    display: none;
}

.song-category.active {
    display: block;
}

.song-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.song-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.song-info {
    flex: 1;
}

.song-info h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.song-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.play-song-btn {
    padding: 8px 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.play-song-btn:hover {
    background: var(--btn-primary-hover);
}

/* Playback Controls */
.playback-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 24px;
    background: var(--btn-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.speed-control label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

#speedValue {
    font-size: 0.9rem;
    color: var(--accent-primary);
    min-width: 45px;
}

.loop-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.loop-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

/* Practice Section */
.practice-area {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
}

.pattern-selector {
    margin-bottom: 24px;
}

.pattern-selector h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.pattern-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pattern-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pattern-btn:hover {
    background: var(--accent-secondary);
    color: white;
}

.pattern-btn.active {
    background: var(--accent-primary);
    color: white;
}

.practice-display {
    text-align: center;
    padding: 30px;
    margin-bottom: 24px;
}

.current-note {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 16px;
    min-height: 70px;
}

.note-sequence {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.note-item {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.note-item.active {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

.note-item.completed {
    background: #27ae60;
    color: white;
}

/* Suggestion Box */
.suggestion-box {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
}

.suggestion-next {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.suggestion-next .label {
    font-size: 1rem;
    color: var(--text-secondary);
}

.suggestion-next .value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-primary);
    background: var(--bg-tertiary);
    padding: 8px 20px;
    border-radius: 8px;
}

.suggestion-next .key-hint {
    font-size: 1rem;
    font-family: monospace;
    background: var(--accent-primary);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: bold;
}

#suggestionResult {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

#suggestionResult.correct {
    background: #27ae60;
    color: white;
}

#suggestionResult.wrong {
    background: #e74c3c;
    color: white;
}

/* Practice Harmonium Keyboard */
.practice-harmonium {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.practice-keys {
    position: relative;
    display: flex;
    min-width: 300px;
    height: 140px;
    background: linear-gradient(to bottom, #1a1a1a, #2a2a2a);
    border-radius: 6px;
    padding: 10px 6px 6px 6px;
}

.practice-keys .white {
    flex: 1;
    height: 100%;
    background: linear-gradient(to bottom, #f5f5f5, #ffffff);
    border: 1px solid #ccc;
    border-radius: 0 0 4px 4px;
    margin: 0 1px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: all 0.1s;
}

.practice-keys .white:hover {
    background: linear-gradient(to bottom, #eee, #f8f8f8);
}

.practice-keys .white.correct {
    background: linear-gradient(to bottom, #27ae60, #2ecc71) !important;
}

.practice-keys .white.wrong {
    background: linear-gradient(to bottom, #e74c3c, #c0392b) !important;
}

.practice-keys .white.expected {
    box-shadow: 0 0 10px #ffd700, inset 0 0 10px rgba(255, 215, 0, 0.3);
    border: 2px solid #ffd700;
}

.practice-keys .black {
    position: absolute;
    width: 3%;
    height: 60%;
    top: 10px;
    background: linear-gradient(to bottom, #333, #111);
    border-radius: 0 0 3px 3px;
    cursor: pointer;
    z-index: 2;
}

.practice-keys .black.correct {
    background: linear-gradient(to bottom, #27ae60, #1a8a4a) !important;
}

.practice-keys .black.wrong {
    background: linear-gradient(to bottom, #e74c3c, #a93226) !important;
}

.practice-keys .black.expected {
    box-shadow: 0 0 10px #ffd700;
    border: 1px solid #ffd700;
}

/* Practice black key positions */
.practice-keys .pos-1 { left: calc(6.25% * 1 - 1.5%); }
.practice-keys .pos-2 { left: calc(6.25% * 2 - 1.5%); }
.practice-keys .pos-3 { left: calc(6.25% * 3 - 1.5%); }
.practice-keys .pos-4 { left: calc(6.25% * 5 - 1.5%); }
.practice-keys .pos-5 { left: calc(6.25% * 6 - 1.5%); }
.practice-keys .pos-6 { left: calc(6.25% * 8 - 1.5%); }
.practice-keys .pos-7 { left: calc(6.25% * 9 - 1.5%); }
.practice-keys .pos-8 { left: calc(6.25% * 10 - 1.5%); }
.practice-keys .pos-9 { left: calc(6.25% * 12 - 1.5%); }
.practice-keys .pos-10 { left: calc(6.25% * 13 - 1.5%); }
.practice-keys .pos-11 { left: calc(6.25% * 15 - 1.5%); }

.practice-keys .note-label {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: bold;
    color: #5a7fa0;
    pointer-events: none;
}

.practice-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.practice-btn {
    padding: 14px 32px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.practice-btn.secondary {
    background: var(--btn-secondary);
    color: var(--text-primary);
}

/* Mobile Controls */
.control-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(90, 127, 160, 0.4);
    z-index: 800;
}

.mobile-controls {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    z-index: 799;
}

.mobile-controls.show {
    display: block;
}

.mobile-control-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

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

.mobile-volume {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.mobile-volume label {
    font-size: 1.25rem;
}

.mobile-volume input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--slider-track);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.mobile-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--slider-thumb);
    border-radius: 50%;
    cursor: pointer;
}

.mobile-volume input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--slider-thumb);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.mobile-volume input[type="range"]::-moz-range-track {
    background: var(--slider-track);
    border-radius: 3px;
    height: 6px;
}

#mobileVolumeValue {
    font-size: 0.85rem;
    color: var(--accent-primary);
    min-width: 40px;
}

.mobile-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mobile-control label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mini-adj {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-adj button {
    width: 28px;
    height: 28px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.mini-adj span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

/* Responsive */
@media (min-width: 769px) {
    /* Always show sidebar on desktop */
    .sidebar {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
    }
    
    .menu-btn {
        display: none;
    }
    
    /* Adjust main content to account for sidebar and control panel */
    .content {
        margin-left: 260px;
        margin-right: 280px;
    }
}

@media (max-width: 768px) {
    .control-panel {
        display: none;
    }
    
    .content {
        margin-right: 0;
        height: calc(100vh - 86px);
        overflow-y: auto;
    }
    
    .site-footer {
        margin-left: 0;
        margin-right: 0;
    }
    
    .control-toggle {
        display: block;
    }
    
    .pitch-visualizer {
        height: 100px;
    }
    
    .current-note {
        font-size: 2.5rem;
    }
    
    .note-item {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 0.95rem;
    }
    
    .notation-toggle span {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .sidebar {
        width: 240px;
    }
    
    .content {
        padding: 12px;
    }
    
    .pitch-visualizer {
        height: 80px;
    }
    
    .song-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .playback-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .speed-control {
        flex-direction: column;
        align-items: stretch;
    }
    
    .current-notes {
        bottom: 130px;
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    kbd {
        padding: 2px 4px;
        font-size: 0.65rem;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .header {
        height: 48px;
    }
    
    .main-app {
        margin-top: 48px;
    }
    
    .sidebar {
        top: 48px;
        height: calc(100vh - 48px);
    }
    
    .pitch-visualizer {
        height: 60px;
    }
    
    .current-notes {
        display: none;
    }
    
    .mobile-controls {
        position: relative;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .white-key:hover,
    .black-key:hover {
        fill: inherit;
    }
    
    .play-song-btn:hover,
    .practice-btn:hover,
    .control-btn:hover {
        transform: none;
    }
}

/* ========================================
   SEO Content Section
   ======================================== */

.seo-content {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 20px auto;
    background: var(--bg-secondary);
    border-radius: 12px;
}

/* Desktop: Add margins to account for fixed sidebars */
@media (min-width: 769px) {
    .seo-content {
        margin-left: 280px;
        margin-right: 300px;
        max-width: calc(100% - 580px);
    }
}

.seo-content h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.seo-content h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 600;
}

.seo-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1rem;
}

.seo-content ul {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 25px;
}

.seo-content li {
    margin-bottom: 8px;
}

.seo-content strong {
    color: var(--text-primary);
}

/* SEO Footer */
.seo-footer {
    background: var(--bg-tertiary);
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

/* Desktop: Add margins to SEO footer */
@media (min-width: 769px) {
    .seo-footer {
        margin-left: 280px;
        margin-right: 300px;
    }
}

.seo-footer-content {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #2c5a7c;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.footer-section a:hover {
    color: #1d4a6a;
    text-decoration: underline;
}

.footer-bottom {
    max-width: 100%;
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: #4a4a5a;
    font-size: 0.9rem;
    margin: 0;
}

/* Mobile SEO Footer */
@media (max-width: 768px) {
    .seo-content {
        padding: 25px 15px;
        margin: 10px;
    }
    
    .seo-content h2 {
        font-size: 1.4rem;
    }
    
    .seo-content h3 {
        font-size: 1.2rem;
    }
    
    .seo-footer {
        margin: 0;
        padding: 30px 15px;
    }
    
    .seo-footer-content {
        grid-template-columns: 1fr;
    }
}

/* Ensure proper z-index stacking */
.main-app {
    position: relative;
    z-index: 1;
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
