/* Modern Futuristic Virtual Marimba Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --accent-gradient: linear-gradient(135deg, #8e44ad 0%, #3498db 100%);
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #2c3e50;
    --text-secondary: #666;
    --shadow-primary: 0 20px 60px rgba(31, 38, 135, 0.3);
    --shadow-hover: 0 30px 80px rgba(31, 38, 135, 0.4);
    --border-radius: 20px;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Universal hidden class for consistent element hiding */
.hidden {
    display: none !important;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(45deg, #0f0f0f, #1a1a2e, #16213e);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease infinite;
    margin-bottom: 20px;
}

.loading-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

.loading-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.loading-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(102, 126, 234, 0.6);
    border-radius: 50%;
    animation: floatParticle 4s infinite linear;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* Main Body Styles */
body {
    margin: 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', Arial, sans-serif;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 226, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #16213e 100%);
    background-attachment: fixed;
    color: #fff;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px circle at 50% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
    animation: ambientPulse 8s ease-in-out infinite;
}

@keyframes ambientPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Ambient Particles */
.ambient-particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; }
.particle:nth-child(9) { left: 90%; animation-delay: 16s; }

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Header Navigation */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

.header-nav.hidden {
    transform: translateY(-100%);
}

.nav-button {
    padding: 10px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
}

/* Main Container */
.main-container {
    padding-top: 65px;
    padding-bottom: 5px;
    padding-left: 15px;
    padding-right: 15px;
    height: calc(100vh - 110px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Page Title */
.page-title {
    text-align: center;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease infinite;
    margin: 40px 0 60px 0;
    letter-spacing: -0.02em;
}

/* Marimba Container - Full Width Design */
.marimba-container {
    width: 100%;
    max-width: none;
    padding: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: calc(100vh - 110px);
}

.marimba-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        rgba(102, 126, 234, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(118, 75, 162, 0.1) 100%);
    pointer-events: none;
}

/* Marimba Controls */
.marimba-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 3;
}

/* Settings Dropdown */
.settings-dropdown-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    z-index: 2000;
}

.settings-toggle {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.settings-toggle:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.settings-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.settings-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 350px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 60px rgba(31, 38, 135, 0.3);
    padding: 20px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2001;
}

/* Marimba Type button and dropdown should be lowest priority */
#marimba-type-toggle {
    z-index: 1999;
}

#marimba-type-dropdown {
    z-index: 2000;
}

/* Marimba Settings dropdown should be higher than Learn How to Play */
#settings-dropdown {
    z-index: 2002;
}

/* Keep Learn How to Play dropdown above keys */
#songs-dropdown {
    z-index: 3000;
}

#songs-toggle,
#songs-toggle.settings-toggle,
#songs-toggle ~ * {
    z-index: 2500;
}

.settings-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.song-browser {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 340px;
    backdrop-filter: blur(6px);
}

.song-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 8px 14px;
    color: rgba(255, 255, 255, 0.8);
}

.song-search-icon {
    font-size: 0.95rem;
}

.song-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.song-category-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 6px;
}

.song-category-list::-webkit-scrollbar {
    width: 6px;
}

.song-category-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.song-category {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.song-category.hidden {
    display: none;
}

.song-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-badge {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 2px 10px;
    letter-spacing: 1px;
}

.song-item-group {
    display: grid;
    gap: 8px;
}

.song-item {
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.song-item:hover {
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(102, 126, 234, 0.18);
}

.song-item.selected {
    border-color: rgba(102, 126, 234, 0.85);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.25));
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.25);
}

.song-item.coming-soon {
    cursor: default;
    opacity: 0.5;
    border-style: dashed;
    pointer-events: none;
}

.song-item.hidden {
    display: none;
}

.song-empty-state {
    text-align: center;
    font-size: 0.9rem;
    padding: 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.song-select-native {
    display: none;
}

.play-mode-toggle,
.rumble-toggle {
    position: relative;
    width: 120px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.play-mode-toggle:hover,
.rumble-toggle:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 54px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow:
        0 4px 12px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.play-mode-toggle[data-mode="hover"] .toggle-slider {
    transform: translateX(57px);
    background: linear-gradient(135deg, #8e44ad 0%, #3498db 100%);
    box-shadow:
        0 4px 12px rgba(52, 152, 219, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.rumble-toggle[data-rumble="on"] .toggle-slider {
    transform: translateX(57px);
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    box-shadow:
        0 4px 12px rgba(231, 76, 60, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.toggle-text-left,
.toggle-text-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toggle-text-left {
    left: 15px;
}

.toggle-text-right {
    right: 15px;
}

.play-mode-toggle[data-mode="click"] .toggle-text-left {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.play-mode-toggle[data-mode="hover"] .toggle-text-right {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.rumble-toggle[data-rumble="off"] .toggle-text-left {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.rumble-toggle[data-rumble="on"] .toggle-text-right {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.mode-description,
.rumble-description,
.speed-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Speed Control */
.speed-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

/* Speed Labels */
.speed-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
    padding: 0 5px;
}

.speed-label-left,
.speed-label-center,
.speed-label-right {
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.speed-label-left {
    color: #4ade80; /* Green for slow */
}

.speed-label-center {
    color: #fbbf24; /* Yellow for medium */
}

.speed-label-right {
    color: #f87171; /* Red for fast */
}

#rumble-speed {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

#rumble-speed::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

#rumble-speed::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    border: none;
}

#rumble-speed-display {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(243, 156, 18, 0.2) 100%);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    padding: 4px 8px;
    backdrop-filter: blur(5px);
}

/* Metronome Indicator */
.metronome-indicator {
    position: relative;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(41, 128, 185, 0.05) 100%);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 5;
    cursor: pointer;
}

.metronome-indicator.active {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.3) 0%, rgba(41, 128, 185, 0.2) 100%);
    border-color: rgba(52, 152, 219, 0.6);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.tab-key {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(41, 128, 185, 0.1) 100%);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.8rem;
    margin-right: 4px;
    transition: all 0.3s ease;
}

.metronome-indicator.active .tab-key {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.4) 0%, rgba(41, 128, 185, 0.3) 100%);
    border-color: rgba(52, 152, 219, 0.7);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.5);
}

/* TRG Style Indicator */
.trg-style-indicator {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 5;
}

.trg-style-indicator.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 165, 0, 0.2) 100%);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.caps-key {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.1) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.8rem;
    margin-right: 4px;
    transition: all 0.3s ease;
}

.trg-style-indicator.active .caps-key {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4) 0%, rgba(255, 165, 0, 0.3) 100%);
    border-color: rgba(255, 215, 0, 0.7);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
}

/* Shift Rumble Indicator */
.shift-rumble-indicator {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 5;
}

.shift-rumble-indicator.active {
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.3) 0%, rgba(52, 152, 219, 0.2) 100%);
    border-color: rgba(142, 68, 173, 0.5);
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
    transform: translateY(-2px);
}

.shift-key {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.8rem;
    margin-right: 4px;
    transition: all 0.3s ease;
}

.shift-rumble-indicator.active .shift-key {
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.4) 0%, rgba(52, 152, 219, 0.3) 100%);
    border-color: rgba(142, 68, 173, 0.6);
    color: white;
    box-shadow: 0 2px 8px rgba(142, 68, 173, 0.4);
}

/* Ctrl Hover Indicator */
.ctrl-hover-indicator {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 5;
}

.ctrl-hover-indicator.active {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(39, 174, 96, 0.2) 100%);
    border-color: rgba(46, 204, 113, 0.5);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    transform: translateY(-2px);
}

.ctrl-key {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.8rem;
    margin-right: 4px;
    transition: all 0.3s ease;
}

.ctrl-hover-indicator.active .ctrl-key {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.4) 0%, rgba(39, 174, 96, 0.3) 100%);
    border-color: rgba(46, 204, 113, 0.6);
    color: white;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.4);
}

/* Help Icon for Indicators */
.help-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 17px;
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    cursor: help;
    margin-left: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    position: relative;
}

.help-icon:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    color: white;
}

/* Custom Tooltip - Position to the right */
.help-icon::after {
    content: attr(title);
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 1000;
    line-height: 1.4;
    text-align: left;
}

.help-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Tooltip Arrow - Point to the left */
.help-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(100% + 2px);
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid rgba(0, 0, 0, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 1001;
}

.help-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Marimba Keys Container */
.marimba-keys {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    margin: 20px auto 40px auto;
    max-width: 100%;
    position: relative;
    z-index: 2;
    flex-wrap: nowrap;
    padding: 0 20px;
}

/* Individual Marimba Keys */
.marimba-note {
    min-width: 70px;
    width: 70px;
    flex-shrink: 0;
    height: clamp(180px, 25vh, 280px);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12px;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    user-select: none;
    backdrop-filter: blur(5px);
}

.marimba-note::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    border-radius: 10px;
    pointer-events: none;
}

.marimba-note span {
    font-weight: 700;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    z-index: 3;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.marimba-note:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 255, 255, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.marimba-note:active,
.marimba-note.played {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 20px 50px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
    animation: noteGlow 0.6s ease-out;
}

.marimba-note.highlight {
    animation: highlight 0.8s ease;
}

@keyframes noteGlow {
    0% {
        box-shadow:
            0 20px 50px rgba(255, 255, 255, 0.6),
            0 0 60px rgba(255, 255, 255, 0.8);
    }
    100% {
        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.3),
            inset 0 2px 0 rgba(255, 255, 255, 0.2);
    }
}

@keyframes highlight {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow:
            0 0 50px rgba(102, 126, 234, 0.8),
            0 20px 40px rgba(102, 126, 234, 0.4);
        transform: translateY(-12px) scale(1.1);
    }
}

/* Super Soprano Extension Button */
.soprano-extension-btn {
    align-self: center;
    margin: 0 10px;
    flex-shrink: 0;
}

.soprano-extension-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* Controls Section */
.controls-section {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(25px);
    padding: 30px;
    margin: 40px auto;
    max-width: 1200px;
    box-shadow: var(--shadow-primary);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: start;
}

.control-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group h3 {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 5px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
}

.btn-accent {
    background: var(--accent-gradient);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

/* Form Controls */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-gradient);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

input[type="text"], select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    margin: 8px 0;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Cheat Sheet Toggle */
.cheat-sheet-toggle {
    text-align: center;
    margin: 15px 0 10px 0;
}

.toggle-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.toggle-button:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.toggle-icon {
    font-size: 0.9rem;
}

/* Cheat Sheet Container */
.cheat-sheet-container {
    margin-top: 10px;
    padding: 15px 0;
    transition: all 0.3s ease;
    opacity: 1;
    max-height: 100px;
    overflow: hidden;
}

.cheat-sheet-container.hidden {
    opacity: 0;
    max-height: 0;
    padding: 0;
    margin-top: 0;
}

.cheat-sheet {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.cheat-keys {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cheat-key {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    position: relative;
    line-height: 1;
}

.cheat-key small {
    font-size: 0.6rem;
    opacity: 0.8;
    margin-top: 1px;
    opacity: 0.8;
}

.cheat-key:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Musical Note Animation */
.musical-note {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    pointer-events: none;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    animation: noteFloat 2s ease-out forwards;
}

@keyframes noteFloat {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: translateY(-20px) translateX(var(--random-x, 10px)) scale(1.2) rotate(5deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) translateX(calc(var(--random-x, 10px) + 20px)) scale(0.5) rotate(25deg);
    }
}

.musical-note.note-1 {
    animation-delay: 0s;
    color: #ff6b6b;
}

.musical-note.note-2 {
    animation-delay: 0.1s;
    color: #4ecdc4;
}

.musical-note.note-3 {
    animation-delay: 0.2s;
    color: #45b7d1;
}

.musical-note.note-4 {
    animation-delay: 0.3s;
    color: #f9ca24;
}

.musical-note.note-5 {
    animation-delay: 0.4s;
    color: #6c5ce7;
}

/* Recording Controls Overlay */
.recording-controls-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.record-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.record-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Recording Timer */
.recording-timer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 15px 20px;
    border: 2px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.timer-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 600;
}

.record-dot {
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse-record 1s infinite;
}

@keyframes pulse-record {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.timer-text {
    font-size: 1.1rem;
    color: #ef4444;
    font-weight: 700;
}

.timer-duration {
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
    color: #fff;
}

.stop-timer-btn {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stop-timer-btn:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-1px);
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 2px solid #667eea;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #8e44ad;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.recordings-count {
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    white-space: nowrap;
}

/* Saved Recordings List */
.saved-recordings-list {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #667eea transparent;
}

.saved-recordings-list::-webkit-scrollbar {
    width: 8px;
}

.saved-recordings-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.saved-recordings-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.saved-recordings-list::-webkit-scrollbar-thumb:hover {
    background: #8e44ad;
}

.no-recordings {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-recordings-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-recordings-text {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #888;
}

.no-recordings-subtitle {
    font-size: 1rem;
    opacity: 0.7;
}

/* Recording Item */
.recording-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recording-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    border-left-color: #8e44ad;
}

.recording-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 15px;
}

.recording-title {
    color: #fff;
    margin: 0;
    flex: 1;
    font-weight: 600;
    font-size: 1.2rem;
}

.recording-actions {
    display: flex;
    gap: 8px;
}

.recording-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.recording-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Action Buttons */
.btn-action {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action.btn-play {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-action.btn-play:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-action.btn-download {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-action.btn-download:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-action.btn-rename {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-action.btn-rename:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-action.btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-action.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Current Recording Display */
.current-recording-display {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 22, 40, 0.95));
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    border: 2px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-body {
    padding: 25px 30px;
}

.modal-info {
    margin-bottom: 25px;
}

.recording-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    flex: 1;
}

.stat-label {
    display: block;
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
}

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

.input-group label {
    display: block;
    color: white;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #8e44ad;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.2);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.input-help {
    margin-top: 6px;
    color: #ccc;
    font-size: 0.85rem;
    font-style: italic;
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 30px 30px;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 120px;
    padding: 12px 24px;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .recording-controls-overlay {
        top: 15px;
        left: 15px;
    }

    .record-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .recording-timer {
        padding: 12px 16px;
    }

    .timer-content {
        gap: 8px;
    }

    .search-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        min-width: auto;
        width: 100%;
    }

    .recording-item {
        padding: 15px;
    }

    .recording-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .recording-actions {
        justify-content: center;
    }

    .recording-meta {
        justify-content: center;
        text-align: center;
    }

    .recording-controls {
        justify-content: center;
    }

    .recording-stats {
        flex-direction: column;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Recording Management Styles */
.recording-management {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 30px auto;
    box-shadow: var(--shadow-primary);
    max-width: 1200px;
}

.recording-controls {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.recording-input-group input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 2px solid #667eea;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.recording-input-group input:focus {
    outline: none;
    border-color: #8e44ad;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.recording-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.recording-status {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.recording-status.info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.recording-status.success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.recording-status.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.recording-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.recording-library {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 25px;
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

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

.library-controls select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #667eea;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.library-controls select option {
    background: #2a2a2a;
    color: white;
}

.recordings-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #667eea transparent;
}

.recordings-list::-webkit-scrollbar {
    width: 8px;
}

.recordings-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.recordings-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.recordings-list::-webkit-scrollbar-thumb:hover {
    background: #8e44ad;
}

.recording-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    position: relative;
}

.recording-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.recording-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
}

.recording-header h5 {
    color: #fff;
    margin: 0;
    flex: 1;
    font-weight: 600;
    font-size: 1.1rem;
}

.recording-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 35px;
    height: 30px;
}

.btn-small.btn-primary {
    background: #667eea;
    color: white;
}

.btn-small.btn-primary:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

.btn-small.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-small.btn-danger:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.recording-info {
    color: #ccc;
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recording-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.loading-recordings {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-style: italic;
}

/* Enhanced button styles */
.btn.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn.btn-success:disabled {
    background: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .recording-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .recording-input-group input {
        min-width: auto;
        width: 100%;
    }

    .library-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .library-controls {
        justify-content: center;
    }

    .recording-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .recording-actions {
        justify-content: center;
    }

    .recording-info {
        justify-content: center;
        text-align: center;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 60px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Learning Mode */
.learning-container {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(25px);
    padding: 30px;
    margin: 40px auto;
    max-width: 1200px;
    box-shadow: var(--shadow-primary);
    display: none;
}

.learning-container.active {
    display: block;
}

.song-display {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 1.2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.note-highlight {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Recording Display */
.recording-display {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    min-height: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: monospace;
}

.recorded-note {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    margin: 2px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-nav {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .marimba-controls {
        margin-bottom: 20px;
    }

    .hover-toggle-container {
        flex-direction: column;
        gap: 12px;
        padding: 15px 20px;
        text-align: center;
    }

    .play-mode-toggle {
        width: 100px;
        height: 35px;
    }

    .toggle-slider {
        width: 45px;
        height: 27px;
    }

    .play-mode-toggle[data-mode="hover"] .toggle-slider {
        transform: translateX(50px);
    }

    .toggle-text-left {
        left: 12px;
        font-size: 0.8rem;
    }

    .toggle-text-right {
        right: 12px;
        font-size: 0.8rem;
    }

    .mode-description {
        font-size: 0.85rem;
    }

    .marimba-keys {
        gap: 4px;
        margin: 15px auto 20px auto;
    }

    .marimba-note {
        width: clamp(35px, 8vw, 50px);
        height: clamp(120px, 20vh, 180px);
    }

    .controls-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cheat-keys {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }

    .cheat-key {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .footer-buttons {
        flex-direction: column;
        align-items: center;
    }

    .main-container {
        padding-top: 120px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
        margin: 20px 0 40px 0;
    }

    .marimba-container {
        padding: 20px 10px;
        margin: 30px 0;
    }

    .controls-section, .cheat-sheet, .learning-container {
        margin: 20px 10px;
        padding: 20px 15px;
    }

    .cheat-key {
        width: 45px;
        height: 45px;
    }
}

/* Custom Song Dropdown Styling */
#song-select {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

#song-select:hover {
    border-color: rgba(102, 126, 234, 0.5) !important;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

#song-select:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 12px 40px rgba(102, 126, 234, 0.3);
    outline: none;
}

#song-select option {
    background: rgba(0, 0, 0, 0.95) !important;
    color: white !important;
    padding: 12px 16px !important;
    font-weight: 500 !important;
    border: none !important;
}

#song-select option:hover {
    background: rgba(102, 126, 234, 0.2) !important;
}

/* Learning Display System */
.learning-display-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(20px);
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 25px 80px rgba(31, 38, 135, 0.25);
}

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

.learning-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    color: white;
    font-size: 14px;
    opacity: 0.9;
    min-width: 50px;
}

.notes-display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.note-group {
    display: flex;
    gap: 10px;
}

.note-item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.learning-feedback {
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    margin-top: -10px;
    margin-bottom: 15px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.learning-feedback.success {
    color: #4ade80;
    opacity: 1;
}

.learning-feedback.error {
    color: #f87171;
    opacity: 1;
}

.current-note.error {
    box-shadow: 0 0 25px rgba(248, 113, 113, 0.5);
    animation: noteErrorPulse 0.4s ease;
}

@keyframes noteErrorPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Previous notes styling */
.previous-note {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    transform: scale(0.7);
    opacity: 0.6;
}

/* Next notes styling */
.next-note {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    transform: scale(0.8);
    opacity: 0.8;
}

/* Current note styling - THE STAR! */
.current-note {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    color: white;
    font-size: 36px;
    transform: scale(1);
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.4);
    animation: currentNotePulse 2s infinite ease-in-out;
    flex-direction: column;
    gap: 5px;
}

.note-text {
    font-size: 36px;
    font-weight: bold;
    z-index: 2;
}

.note-key-hint {
    font-size: 12px;
    opacity: 0.9;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 2;
}

/* Animated pulse background */
.note-pulse {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: pulseRing 2s infinite;
}

/* Sparkle animations */
.note-sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    font-size: 20px;
    animation: sparkleFloat 3s infinite ease-in-out;
}

.sparkle-1 {
    top: -10px;
    right: -10px;
    animation-delay: 0s;
}

.sparkle-2 {
    bottom: -10px;
    left: -10px;
    animation-delay: 1s;
}

.sparkle-3 {
    top: 50%;
    right: -15px;
    animation-delay: 2s;
}

.learning-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.stat-item {
    color: white;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Animations */
@keyframes currentNotePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 20px 40px rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 25px 50px rgba(255, 107, 107, 0.6);
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes sparkleFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-10px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-5px) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-15px) rotate(270deg);
        opacity: 1;
    }
}

/* Success animation when note is played correctly */
@keyframes noteSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); background: linear-gradient(135deg, #4CAF50, #45a049); }
    100% { transform: scale(1); }
}

.note-success {
    animation: noteSuccess 0.6s ease;
}

/* Error animation when wrong note is played */
@keyframes noteError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.note-error {
    animation: noteError 0.5s ease;
    background: linear-gradient(135deg, #f44336, #d32f2f) !important;
}

/* =============================================
   DIFFICULTY MODE SYSTEM
   ============================================= */

/* ---------- Difficulty Selector Panel (in modal) ---------- */
.difficulty-selector {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
    border-radius: 0 0 16px 16px;
}
.diff-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.diff-selected-song {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 10px;
    font-weight: 600;
}
.diff-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.diff-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.05);
    color: white;
    font-family: inherit;
    transition: all 0.18s;
    min-width: 88px;
    flex: 1;
    gap: 3px;
    position: relative;
}
.diff-btn:hover:not(:disabled) {
    border-color: rgba(255,255,255,0.45);
    transform: translateY(-2px);
    background: rgba(255,255,255,0.1);
}
.diff-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}
.diff-btn.completed {
    border-color: #4ade80;
    background: rgba(74,222,128,0.08);
}
.diff-btn[data-diff="legendary"] {
    border-color: rgba(251,191,36,0.4);
    background: rgba(251,191,36,0.06);
}
.diff-btn[data-diff="legendary"]:hover:not(:disabled) {
    border-color: gold;
    background: rgba(251,191,36,0.12);
}
.diff-icon { font-size: 1.3rem; }
.diff-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.diff-desc {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
    line-height: 1.3;
}
.diff-badge-status {
    position: absolute;
    top: 5px;
    right: 7px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Mobile difficulty picker overlay */
.diff-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.diff-picker-sheet {
    background: linear-gradient(135deg, #1a1a3e, #0d0d22);
    border: 1px solid rgba(102,126,234,0.3);
    border-radius: 20px 20px 0 0;
    padding: 20px 20px 32px;
    width: 100%;
    max-width: 500px;
}
.diff-picker-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}
.diff-picker-song {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 16px;
}
.diff-picker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.diff-picker-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.05);
    color: white;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
}
.diff-picker-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}
.diff-picker-btn.completed {
    border-color: #4ade80;
}
.diff-picker-btn[data-diff="legendary"] {
    border-color: rgba(251,191,36,0.4);
}
.diff-picker-btn .diff-icon { font-size: 1.4rem; }
.diff-picker-btn .diff-label {
    font-size: 0.85rem;
    font-weight: 700;
}
.diff-picker-btn .diff-desc {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
}
.diff-picker-btn .diff-badge-status {
    position: absolute;
    top: 6px;
    right: 9px;
    font-size: 0.72rem;
}
.diff-picker-cancel {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: rgba(255,255,255,0.6);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ---------- Countdown Overlay ---------- */
.countdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 99000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(5px);
}
.countdown-number {
    font-size: 130px;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 60px rgba(102,126,234,0.7), 0 0 20px rgba(255,255,255,0.4);
    animation: countdownPop 0.85s ease forwards;
    user-select: none;
}
.countdown-number.go {
    font-size: 80px;
    color: #4ade80;
    text-shadow: 0 0 40px rgba(74,222,128,0.6);
}
@keyframes countdownPop {
    0%   { transform: scale(0.2); opacity: 0; }
    45%  { transform: scale(1.18); opacity: 1; }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

/* ---------- Legendary Strikes ---------- */
.legendary-strikes {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    border: 1px solid rgba(251,191,36,0.3);
}
.strikes-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: gold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#strikes-display {
    font-size: 1rem;
    letter-spacing: 2px;
}
.strike-used {
    filter: grayscale(1) opacity(0.25);
}

/* ---------- Difficulty Badge in Learning Display ---------- */
.difficulty-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 7px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}
.difficulty-badge.easy     { background: rgba(34,197,94,0.2);    color: #4ade80;  border: 1px solid rgba(34,197,94,0.4);  }
.difficulty-badge.medium   { background: rgba(245,158,11,0.2);   color: #fbbf24;  border: 1px solid rgba(245,158,11,0.4); }
.difficulty-badge.hard     { background: rgba(239,68,68,0.2);    color: #f87171;  border: 1px solid rgba(239,68,68,0.4);  }
.difficulty-badge.legendary{ background: rgba(251,191,36,0.15);  color: gold;     border: 1px solid rgba(251,191,36,0.45);}

/* ---------- Easy mode: dim non-active notes ---------- */
.marimba-note.easy-mode-dim {
    opacity: 0.38;
    transition: opacity 0.3s ease;
}
.marimba-note.learning-active {
    opacity: 1 !important;
}

/* ---------- Inactivity fade ---------- */
.marimba-note.inactivity-fade {
    opacity: 0 !important;
    transition: opacity 1.5s ease;
}

/* ---------- Hard/Legendary: hide notes timeline + hints only ---------- */
/* Progress bar, progress text, and RP pot remain visible in all modes */
.learning-display-container.hard-mode .notes-display-row,
.learning-display-container.hard-mode #learning-feedback {
    display: none !important;
}
/* Mobile equivalents */
.mobile-learning-interface.hard-mode .li-notes-area,
.mobile-learning-interface.hard-mode #learning-note-hint {
    display: none !important;
}

/* ---------- Legendary mode: hide tempo section ---------- */
.learning-display-container.legendary-mode #tempo-control-container {
    display: none !important;
}
.mobile-learning-interface.legendary-mode #learning-tempo-section {
    display: none !important;
}

/* ---------- No-mistake bonus notification extra line ---------- */
.rpt-bonus-line {
    color: #fbbf24;
    font-size: 0.82rem;
    margin: 3px 0;
}

/* ---------- Difficulty progress indicators in modal song list ---------- */
.song-diff-progress {
    display: flex;
    gap: 2px;
    margin-left: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}
.sdp-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
}
.sdp-dot.done { background: #4ade80; border-color: #4ade80; }
.sdp-dot.done[data-d="medium"] { background: #fbbf24; border-color: #fbbf24; }
.sdp-dot.done[data-d="hard"]   { background: #f87171; border-color: #f87171; }
.sdp-dot.done[data-d="legendary"] { background: gold; border-color: gold; }

/* ---------- Begin Legendary button ---------- */
.begin-legendary-btn {
    display: block;
    width: 100%;
    padding: 10px 20px;
    margin-top: 8px;
    background: linear-gradient(135deg, #78350f, #92400e);
    border: 2px solid gold;
    border-radius: 12px;
    color: gold;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}
.begin-legendary-btn:hover {
    background: linear-gradient(135deg, #92400e, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(251,191,36,0.3);
}
#begin-legendary-btn-mobile {
    display: none;
    width: auto;
}
