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

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

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid #4a90e2;
    outline-offset: 2px;
}

/* Achievements Button */
.achievements-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Help/Tour Button */
.tour-btn-help {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.achievements-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.achievements-btn:active {
    transform: scale(0.95);
}

/* Section Practice Controls */
.section-practice-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 5px;
    margin-top: 10px;
}

.section-input {
    width: 100px;
    padding: 5px;
    background: #2a2a2a;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
}

/* Achievement Animations */
@keyframes achievementPop {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes achievementPopOut {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #4a90e2;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

/* Song Banner */
.song-banner {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%);
    padding: 15px 40px;
    border-radius: 8px;
    border: 2px solid #ab47bc;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.5);
    transition: opacity 0.3s;
}

.song-banner.hidden {
    opacity: 0;
    pointer-events: none;
}

#song-title {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Key Indicator */
.key-indicator {
    position: absolute;
    bottom: 200px;
    left: 20px;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 5;
}

.key-indicator.hidden {
    opacity: 0;
}

/* Countdown */
.countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
}

.countdown.hidden {
    display: none;
}

#countdown-number {
    font-size: 120px;
    font-weight: bold;
    color: #4a90e2;
    text-shadow: 
        0 0 20px rgba(74, 144, 226, 0.8),
        0 0 40px rgba(74, 144, 226, 0.6),
        0 0 60px rgba(74, 144, 226, 0.4);
    animation: countdownPulse 1s ease-out;
}

@keyframes countdownPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Notes Falling Area */
.notes-area {
    flex: 1;
    position: relative;
    background: #1a1a1a;
    overflow: hidden;
}

#notes-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Piano Container */
.piano-container {
    height: 200px;
    background: #2a2a2a;
    position: relative;
    overflow: hidden;
}

#piano-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Tabs */
.tabs {
    background: #1a1a1a;
    display: flex;
    gap: 0;
    border-bottom: 2px solid #333;
}

.tab-btn {
    background: #2a2a2a;
    color: #aaa;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #333;
    color: #fff;
}

.tab-btn.active {
    background: #1a1a1a;
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.tab-content {
    display: none;
    background: #1a1a1a;
    padding: 20px;
    min-height: 200px;
    max-height: calc(100vh - 350px);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.tab-content.active {
    display: block;
}

/* Custom scrollbar for tab content */
.tab-content::-webkit-scrollbar {
    width: 8px;
}

.tab-content::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

/* Library Tab */
.library-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.library-search, .search-input {
    flex: 1;
    padding: 10px 35px 10px 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    width: 100%;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
    z-index: 5;
}

.clear-search-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.clear-search-btn:active {
    transform: scale(0.9);
}

.library-search:focus, .search-input:focus {
    outline: none;
    border-color: #4a90e2;
}

.difficulty-filter {
    padding: 10px 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px 5px 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 450px);
}

/* Custom scrollbar for library grid */
.library-grid::-webkit-scrollbar {
    width: 8px;
}

.library-grid::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.library-grid::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

.library-grid::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

.song-card {
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    position: relative;
}

.song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.3);
    border-color: #4a90e2;
}

.delete-song-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(244, 67, 54, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.song-card:hover .delete-song-btn {
    opacity: 1;
}

.delete-song-btn:hover {
    background: rgba(244, 67, 54, 1);
    transform: scale(1.1);
}

.delete-song-btn:active {
    transform: scale(0.95);
}

.delete-song-btn span {
    display: block;
    margin-top: -2px;
}

.song-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 12px;
}

.song-info {
    padding: 15px;
}

.song-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-difficulty {
    display: flex;
    align-items: center;
    gap: 5px;
}

.difficulty-stars {
    color: #ffd700;
    font-size: 14px;
}

.difficulty-label {
    font-size: 12px;
    color: #888;
    margin-left: 5px;
}

/* Search Tab */
.search-header {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-results-header {
    padding: 15px;
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #444;
}

.results-stats {
    color: #aaa;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    margin-top: 20px;
}

.pagination-btn {
    padding: 10px 20px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: #357abd;
}

.pagination-btn:disabled {
    background: #444;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-info {
    color: #aaa;
    font-size: 14px;
    padding: 0 15px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-btn {
    padding: 10px 20px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #357abd;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    max-height: calc(100vh - 450px);
}

/* Custom scrollbar for search results */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

.search-difficulty-filter {
    padding: 10px 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    min-width: 150px;
    cursor: pointer;
}

.search-difficulty-filter:focus {
    outline: none;
    border-color: #4a90e2;
}

.search-result-item {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    border: 1px solid #444;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
    border-color: #4a90e2;
}

.search-result-main {
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 1;
}

.search-result-cover img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.search-result-artist {
    font-size: 14px;
    color: #aaa;
    white-space: pre-line;
    line-height: 1.6;
}

.search-result-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.result-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-result-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 12px;
    color: #bbb;
    align-items: center;
}

.difficulty-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: capitalize;
    font-size: 12px;
    background: #555;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.difficulty-badge.easy {
    background: #2e7d32;
}

.difficulty-badge.medium {
    background: #f9a825;
    color: #1b1b1b;
}

.difficulty-badge.hard {
    background: #c62828;
}

.difficulty-badge.loading {
    background: #4a4a4a;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.difficulty-badge.difficulty-clickable {
    cursor: pointer;
}

.difficulty-badge.difficulty-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.difficulty-info-icon {
    font-size: 10px;
    opacity: 0.8;
}

/* Difficulty Modal Styles */
.difficulty-modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.difficulty-summary {
    margin-bottom: 20px;
}

.difficulty-level-display {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.difficulty-level-name {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.difficulty-stars-display {
    font-size: 24px;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.difficulty-score {
    font-size: 14px;
    opacity: 0.9;
}

.difficulty-factors {
    margin: 20px 0;
}

.difficulty-factors h3 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 18px;
}

.factors-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.difficulty-factor-item {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4a90e2;
}

.factor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.factor-name {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.factor-score {
    font-weight: bold;
    color: #4a90e2;
    font-size: 14px;
}

.factor-bar-container {
    height: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.factor-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.factor-description {
    font-size: 12px;
    color: #aaa;
    font-style: italic;
}

.difficulty-explanation {
    margin-top: 25px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 8px;
    border-left: 4px solid #4a90e2;
}

.difficulty-explanation h4 {
    margin-bottom: 10px;
    color: #fff;
    font-size: 16px;
}

.difficulty-explanation p {
    margin-bottom: 10px;
    color: #ccc;
    font-size: 14px;
}

.difficulty-explanation ul {
    margin-left: 20px;
    color: #ccc;
    font-size: 13px;
}

.difficulty-explanation li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Piano Feedback Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

#piano-feedback-overlay {
    animation: fadeIn 0.3s ease-in;
}

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

.source-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: capitalize;
    font-size: 11px;
    background: #3a3a3a;
    color: #aaa;
    border: 1px solid #555;
    margin-left: auto;
}

.spinner-inline {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.download-btn {
    padding: 8px 16px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #45a049;
}

.download-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

.preview-btn {
    padding: 8px 16px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.preview-btn:hover {
    background: #1976d2;
}

.preview-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

.preview-btn.preview-active {
    background: #f44336;
    animation: pulse 1.5s ease-in-out infinite;
}

.preview-btn.preview-active:hover {
    background: #d32f2f;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.view-artist-btn {
    padding: 8px 16px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.view-artist-btn:hover {
    background: #357abd;
}

.view-artist-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progress Indicators */
.progress-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #ccc;
}

.progress-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-message {
    font-size: 14px;
    margin-top: 10px;
}

.progress-percent {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.progress-bar-container {
    padding: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #00bcd4);
    transition: width 0.3s ease;
}

.progress-bar-text {
    text-align: center;
    font-size: 12px;
    color: #888;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Controls */
.controls {
    background: #1a1a1a;
    padding: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    border-top: 2px solid #333;
}

.input-mode-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-mode-controls label {
    font-size: 14px;
    color: #ccc;
}

.input-mode-select {
    padding: 8px 12px;
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.input-mode-select:hover {
    background: #3a3a3a;
    border-color: #4a90e2;
}

.input-mode-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

.practice-mode-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.practice-mode-controls label {
    font-size: 14px;
    color: #ccc;
}

.practice-mode-select {
    padding: 8px 12px;
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.practice-mode-select:hover {
    background: #3a3a3a;
    border-color: #4a90e2;
}

.practice-mode-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

.visual-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.visual-controls label {
    font-size: 14px;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.visual-controls input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4a90e2;
}

/* Load File Tab */
.load-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.file-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    border: none;
}

.file-label:hover {
    background: linear-gradient(135deg, #357abd 0%, #2a5f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.file-label:active {
    transform: translateY(0);
}

.file-label-icon {
    font-size: 18px;
}

.file-label-text {
    font-size: 14px;
}

.loaded-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    flex: 1;
}

.loaded-file-info.hidden {
    display: none;
}

.loaded-file-name {
    flex: 1;
    color: #fff;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clear-file-btn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.clear-file-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Song Progress Bar */
.song-progress-container {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border-radius: 12px;
    border: 1px solid #333;
}

.song-progress-container.hidden {
    display: none;
}

.song-progress-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.song-progress-time {
    color: #4a90e2;
    font-weight: 600;
    font-size: 14px;
    min-width: 45px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.song-progress-bar-wrapper {
    flex: 1;
}

.song-progress-bar {
    width: 100%;
    height: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid #444;
}

.song-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2 0%, #357abd 100%);
    border-radius: 4px;
    transition: width 0.1s linear;
    width: 0%;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.playback-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.control-btn {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.control-btn:hover:not(:disabled) {
    background: #357abd;
}

.control-btn:disabled {
    background: #2a2a2a;
    color: #666;
    cursor: not-allowed;
}

.control-btn-exit {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    margin-left: 10px;
    position: relative;
}

.control-btn-exit:hover:not(:disabled) {
    background: linear-gradient(135deg, #e0485c 0%, #e083f0 100%);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.control-btn-exit.hidden {
    display: none;
}

@media (max-width: 768px) {
    .playback-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-btn-exit {
        margin-left: 0;
        margin-top: 10px;
    }
}

.speed-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.speed-controls label {
    margin-right: 10px;
}

.speed-btn {
    background: #3a3a3a;
    color: white;
    border: 1px solid #555;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.speed-btn:hover {
    background: #4a4a4a;
}

.speed-btn.active {
    background: #4a90e2;
    border-color: #4a90e2;
}

.simplification-controls {
    display: flex !important;
    align-items: center;
    gap: 10px;
    visibility: visible !important;
    opacity: 1 !important;
}

.simplification-controls label {
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
}

.simplification-slider {
    width: 150px;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.simplification-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    transition: background 0.3s;
}

.simplification-slider::-webkit-slider-thumb:hover {
    background: #357abd;
}

.simplification-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    border: none;
    transition: background 0.3s;
}

.simplification-slider::-moz-range-thumb:hover {
    background: #357abd;
}

.simplification-value {
    color: #fff;
    font-size: 14px;
    min-width: 45px;
    text-align: left;
}

.volume-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.volume-controls label {
    margin-right: 0;
    font-size: 14px;
}

.volume-slider {
    width: 120px;
    height: 6px;
    background: #3a3a3a;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #4a90e2;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: #357abd;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #4a90e2;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: background 0.3s;
}

.volume-slider::-moz-range-thumb:hover {
    background: #357abd;
}

.volume-value {
    min-width: 40px;
    font-size: 12px;
    color: #aaa;
    text-align: right;
}

/* Modal */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #2a2a2a;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

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

.modal-content h2 {
    margin-bottom: 20px;
    color: #4a90e2;
}

#stats-content {
    line-height: 1.8;
}

.stat-item {
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border-radius: 12px;
    border: 1px solid #333;
    display: flex;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 5px;
}

.stat-content {
    flex: 1;
}

.stat-item h3 {
    color: #4a90e2;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

.stat-item p {
    color: #ccc;
    margin: 8px 0;
}

/* Best Score Styles */
.stat-item.best-score {
    background: linear-gradient(135deg, #2d5016 0%, #1a3310 100%);
    border: 2px solid #4caf50;
}

.stat-item.best-score.new-best {
    background: linear-gradient(135deg, #4caf50 0%, #2d7d32 100%);
    border: 2px solid #66bb6a;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
}

.stat-value {
    font-size: 1.1em;
    color: #fff;
}

.celebration {
    color: #4caf50 !important;
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 10px;
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Performance Overview Styles */
.stat-item.performance-overview {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a1a1a 100%);
    border: 1px solid #4a90e2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.stat-metric {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #333;
    transition: background 0.2s;
}

.stat-metric:hover {
    background: rgba(0, 0, 0, 0.5);
}

.metric-label {
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
}

/* Challenging Notes Styles */
.stat-item.challenging-notes {
    background: linear-gradient(135deg, #3d1a1a 0%, #1a1a1a 100%);
    border: 1px solid #ff6b6b;
}

.notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.note-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
    transition: background 0.2s;
}

.note-item:hover {
    background: rgba(0, 0, 0, 0.5);
}

.note-name {
    font-weight: bold;
    color: #fff;
    font-size: 1.1em;
}

.note-errors {
    color: #ff6b6b;
    font-weight: 600;
}

/* Recommendations Styles */
.stat-item.recommendations {
    background: linear-gradient(135deg, #2a1a3d 0%, #1a1a1a 100%);
    border: 1px solid #9c27b0;
}

.advice-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.advice-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 4px solid;
    transition: transform 0.2s, box-shadow 0.2s;
}

.advice-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.advice-item.high-priority {
    border-left-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.advice-item.medium-priority {
    border-left-color: #ffa500;
    background: rgba(255, 165, 0, 0.1);
}

.advice-item.low-priority {
    border-left-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}

.advice-icon {
    font-size: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.advice-content {
    flex: 1;
}

.advice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.advice-type {
    font-weight: 600;
    color: #4a90e2;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.advice-priority {
    font-size: 0.8em;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.advice-item.high-priority .advice-priority {
    background: #ff6b6b;
    color: #fff;
}

.advice-item.medium-priority .advice-priority {
    background: #ffa500;
    color: #fff;
}

.advice-item.low-priority .advice-priority {
    background: #4ecdc4;
    color: #fff;
}

.advice-message {
    color: #ddd;
    line-height: 1.6;
    margin: 0;
}

/* Export Section Styles */
.stat-item.export-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #555;
}

.export-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.export-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.export-btn:active {
    transform: translateY(0);
}

.export-btn.json-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
}

.export-btn.json-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, #2a5f8f 100%);
}

.export-btn.csv-btn {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
}

.export-btn.csv-btn:hover {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
}

/* Practice Exercises Styles */
.stat-item.practice-exercises {
    background: linear-gradient(135deg, #1a3a2a 0%, #1a1a1a 100%);
    border: 1px solid #4caf50;
}

.practice-intro {
    color: #ccc;
    margin-bottom: 20px;
    font-size: 0.95em;
    line-height: 1.6;
}

.exercises-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.exercise-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border-left: 4px solid #4caf50;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.exercise-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.5);
}

.exercise-item.high-priority {
    border-left-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.exercise-item.high-priority:hover {
    background: rgba(255, 107, 107, 0.15);
}

.exercise-item.medium-priority {
    border-left-color: #ffa500;
    background: rgba(255, 165, 0, 0.1);
}

.exercise-item.medium-priority:hover {
    background: rgba(255, 165, 0, 0.15);
}

.exercise-item.low-priority {
    border-left-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}

.exercise-item.low-priority:hover {
    background: rgba(78, 205, 196, 0.15);
}

.exercise-header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.exercise-icon {
    font-size: 2.5em;
    line-height: 1;
    flex-shrink: 0;
}

.exercise-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exercise-title {
    color: #4a90e2;
    font-size: 1.2em;
    font-weight: 600;
    margin: 0;
}

.exercise-description {
    color: #ddd;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
}

.exercise-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.exercise-time {
    color: #aaa;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.exercise-priority {
    font-size: 0.8em;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.exercise-item.high-priority .exercise-priority {
    background: #ff6b6b;
    color: #fff;
}

.exercise-item.medium-priority .exercise-priority {
    background: #ffa500;
    color: #fff;
}

.exercise-item.low-priority .exercise-priority {
    background: #4ecdc4;
    color: #fff;
}

.exercise-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exercise-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
}

.exercise-btn:active {
    transform: translateY(0);
}

.exercise-btn:focus-visible {
    outline: 3px solid #4caf50;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        justify-content: center;
    }
    
    .advice-item {
        flex-direction: column;
        text-align: center;
    }
    
    .advice-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .export-btn {
        width: 100%;
        justify-content: center;
    }
    
    .exercise-item {
        padding: 15px;
    }
    
    .exercise-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .exercise-meta {
        justify-content: center;
        flex-direction: column;
        gap: 8px;
    }
    
    .exercise-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Tour Guide Styles */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.tour-overlay.hidden {
    display: none;
}

.tour-modal {
    position: fixed;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    height: auto;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    border: 2px solid #4a90e2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden; /* Prevent modal itself from scrolling */
}

.tour-modal.hidden {
    display: none !important;
}

.tour-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 85vh;
    overflow: hidden;
}

.tour-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2a2a2a 100%);
    border-radius: 12px 12px 0 0;
    flex-shrink: 0; /* Prevent header from shrinking */
    min-height: 60px; /* Ensure header has minimum height */
}

.tour-header h2 {
    margin: 0;
    color: #4a90e2;
    font-size: 1.5em;
}

.tour-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.tour-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tour-body {
    padding: 25px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    line-height: 1.6;
    min-height: 0; /* Important for flex scrolling */
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #4a90e2 #1a1a1a;
}

.tour-body::-webkit-scrollbar {
    width: 10px;
}

.tour-body::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.5);
    border-radius: 5px;
    margin: 5px 0;
}

.tour-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-radius: 5px;
    border: 2px solid rgba(26, 26, 26, 0.3);
}

.tour-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #357abd 0%, #2a5f8f 100%);
}

.tour-body p {
    color: #ddd;
    margin-bottom: 15px;
}

.tour-body ul {
    color: #ddd;
    margin-left: 20px;
    margin-bottom: 15px;
}

.tour-body li {
    margin-bottom: 8px;
}

.tour-body strong {
    color: #4a90e2;
}

.tour-body kbd {
    background: linear-gradient(135deg, #333 0%, #222 100%);
    border: 1px solid #555;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0 2px;
}

.tour-body .tip {
    background: rgba(78, 205, 196, 0.1);
    border-left: 4px solid #4ecdc4;
    padding: 12px;
    margin-top: 15px;
    border-radius: 4px;
}

/* Keyboard Mapping Guide */
.keyboard-mapping-guide {
    margin-top: 15px;
}

.keyboard-mapping-guide h4 {
    color: #4a90e2;
    margin-bottom: 15px;
}

.keyboard-layout {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.keyboard-row {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.keyboard-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.keyboard-row strong {
    display: block;
    color: #4a90e2;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.key-group {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.key-note {
    display: block;
    color: #aaa;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
    margin-top: 5px;
}

.tour-footer {
    padding: 20px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 12px 12px;
    flex-wrap: wrap;
    gap: 15px;
    flex-shrink: 0; /* Prevent footer from shrinking */
    min-height: 80px; /* Ensure footer has minimum height */
}

.tour-progress {
    color: #aaa;
    font-size: 0.9em;
}

.tour-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tour-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.2s;
}

.tour-btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
}

.tour-btn-primary:hover {
    background: linear-gradient(135deg, #357abd 0%, #2a5f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.tour-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
    border: 1px solid #555;
}

.tour-btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: #777;
}

.tour-btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tour-btn-link {
    background: none;
    color: #4a90e2;
    text-decoration: underline;
}

.tour-btn-link:hover {
    color: #357abd;
}

/* Responsive Tour */
@media (max-width: 768px) {
    .tour-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .tour-header h2 {
        font-size: 1.2em;
    }
    
    .tour-body {
        padding: 15px;
        max-height: calc(90vh - 140px); /* Reserve space for header and footer */
    }
    
    .tour-footer {
        flex-direction: column;
        align-items: stretch;
        min-height: 100px; /* More space on mobile */
    }
    
    .tour-buttons {
        justify-content: stretch;
    }
    
    .tour-btn {
        flex: 1;
    }
    
    .key-group {
        justify-content: center;
    }
    
    /* Adjust button positions on mobile */
    .achievements-btn {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .tour-btn-help {
        top: 10px;
        left: 10px;
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    /* Responsive progress bar */
    .song-progress-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .song-progress-time {
        min-width: auto;
        font-size: 12px;
    }
    
    .load-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .file-controls {
        flex-direction: column;
        align-items: stretch;
    }
}
