/* ===== BROKENEYE - MODERN RESPONSIVE INTERFACE ===== */

:root {
    /* ===== DESIGN TOKENS ===== */
    
    /* Couleurs principales */
    --primary-bg: #0a0a1a;
    --primary-surface: rgba(26, 26, 61, 0.85);
    --primary-surface-hover: rgba(26, 26, 61, 0.95);
    --primary-accent: #5b3cc4;
    --primary-accent-light: #7e57c2;
    --primary-text: #f0f0ff;
    --secondary-text: #a8a8b8;
    --muted-text: #888894;
    
    /* Couleurs d'état */
    --success-color: #4caf50;
    --success-bg: rgba(76, 175, 80, 0.1);
    --error-color: #e53935;
    --error-bg: rgba(229, 57, 53, 0.1);
    --info-color: #2196f3;
    --info-bg: rgba(33, 150, 243, 0.1);
    --warning-color: #ff9800;
    --warning-bg: rgba(255, 152, 0, 0.1);
    
    /* Couleurs néon cyberpunk */
    --neon-cyan: #00ffff;
    --neon-cyan-glow: rgba(0, 255, 255, 0.3);
    --neon-magenta: #ff00ff;
    --neon-magenta-glow: rgba(255, 0, 255, 0.3);
    --neon-purple: #8000ff;
    --neon-blue: #0080ff;
    --neon-green: #00ff80;
    --electric-blue: #0066ff;
    
    /* Système de glassmorphisme */
    --glass-bg-light: rgba(255, 255, 255, 0.05);
    --glass-bg-medium: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: rgba(0, 0, 0, 0.25);
    --glass-backdrop: blur(12px);
    
    /* Espacement et tailles */
    --space-xs: 0.25rem;    /* 4px */
    --space-sm: 0.5rem;     /* 8px */
    --space-md: 0.75rem;    /* 12px */
    --space-lg: 1rem;       /* 16px */
    --space-xl: 1.25rem;    /* 20px */
    --space-2xl: 1.5rem;    /* 24px */
    --space-3xl: 2rem;      /* 32px */
    --space-4xl: 2.5rem;    /* 40px */
    --space-5xl: 3rem;      /* 48px */
    
    /* Rayons de bordure */
    --radius-sm: 0.375rem;  /* 6px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;
    
    /* Typographie */
    --font-family-base: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-md: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.25), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px var(--neon-cyan-glow);
    --shadow-glow-magenta: 0 0 20px var(--neon-magenta-glow);
    
    /* Animations et transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Breakpoints (pour JavaScript/référence) */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    /* Z-index layers */
    --z-behind: -1;
    --z-base: 0;
    --z-elevated: 10;
    --z-overlay: 100;
    --z-modal: 1000;
    --z-toast: 1100;
    --z-tooltip: 1200;
    
    /* Tailles d'éléments interactifs */
    --touch-target-min: 44px;
    --input-height-sm: 36px;
    --input-height-md: 44px;
    --input-height-lg: 52px;
    
    /* Variables dynamiques pour le viewport mobile */
    --vh: 1vh;
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
    --safe-area-left: env(safe-area-inset-left);
    --safe-area-right: env(safe-area-inset-right);
}

/* ===== RESET ET BASE MODERNE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--primary-text);
    background: var(--primary-bg);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

/* Support pour les anciennes propriétés de viewport mobile */
body.mobile-optimized {
    height: calc(var(--vh) * 100);
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
    padding-left: var(--safe-area-left);
    padding-right: var(--safe-area-right);
}

/* Amélioration des éléments interactifs */
button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

input {
    outline: none;
    border: none;
    background: transparent;
}

/* Accessibilité et focus management */
:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* Respect des préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mode contraste élevé */
@media (prefers-contrast: high) {
    :root {
        --primary-text: #ffffff;
        --primary-bg: #000000;
        --primary-surface: #333333;
        --neon-cyan: #ffffff;
        --shadow-glow: 0 0 0 2px #ffffff;
    }
}

/* ===== SYSTÈME D'AURORA BACKGROUND ===== */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-behind);
    overflow: hidden;
    will-change: transform;
}

.aurora-wave {
    position: absolute;
    width: 200%;
    height: 200%;
    opacity: 0.6;
    mix-blend-mode: screen;
    animation: aurora-float 20s infinite ease-in-out;
    will-change: transform;
}

.aurora-wave:nth-child(1) {
    background: radial-gradient(ellipse at 30% 40%, 
        transparent 40%, 
        rgba(0, 255, 255, 0.04) 60%, 
        rgba(255, 0, 255, 0.03) 80%, 
        transparent 100%);
    animation-duration: 25s;
    animation-delay: 0s;
}

.aurora-wave:nth-child(2) {
    background: radial-gradient(ellipse at 70% 60%, 
        transparent 35%, 
        rgba(255, 0, 255, 0.03) 55%, 
        rgba(0, 255, 255, 0.04) 75%, 
        transparent 95%);
    animation-duration: 30s;
    animation-delay: -8s;
}

.aurora-wave:nth-child(3) {
    background: radial-gradient(ellipse at 50% 20%, 
        transparent 30%, 
        rgba(128, 0, 255, 0.025) 50%, 
        rgba(0, 255, 128, 0.03) 70%, 
        transparent 90%);
    animation-duration: 35s;
    animation-delay: -15s;
}

@keyframes aurora-float {
    0%, 100% { 
        transform: translate(-15%, -10%) rotate(0deg) scale(1); 
    }
    25% { 
        transform: translate(10%, -20%) rotate(1deg) scale(1.02); 
    }
    50% { 
        transform: translate(-8%, 15%) rotate(-1deg) scale(0.98); 
    }
    75% { 
        transform: translate(20%, -8%) rotate(0.5deg) scale(1.01); 
    }
}

/* ===== LAYOUT PRINCIPAL AVEC CSS GRID ===== */
.container {
    display: grid;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: var(--space-lg);
    gap: var(--space-lg);
    
    /* Grid layout desktop */
    grid-template-areas: 
        "topbar topbar topbar"
        "history center controls";
    grid-template-columns: minmax(250px, 300px) 1fr minmax(220px, 280px);
    grid-template-rows: auto 1fr;
    
    /* Contraintes de taille */
    max-width: 1600px;
    margin: 0 auto;
    overflow: hidden;
}

/* ===== COMPOSANTS DE BASE ===== */

/* Panel de base avec glassmorphisme */
.panel-base {
    background: var(--glass-bg-medium);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    backdrop-filter: var(--glass-backdrop);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.panel-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--glass-border) 50%, 
        transparent 100%);
}

/* Effet de hover pour les panels interactifs */
.panel-base.interactive {
    transition: all var(--transition-normal);
    cursor: pointer;
}

.panel-base.interactive:hover {
    background: var(--primary-surface-hover);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Scrollbar moderne */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--neon-magenta), var(--neon-cyan));
    box-shadow: var(--shadow-glow);
}

/* ===== TOPBAR MODERNISÉE ===== */
.topbar {
    grid-area: topbar;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-2xl);
    background: var(--primary-accent);
    background: linear-gradient(135deg, 
        var(--primary-accent) 0%, 
        var(--primary-accent-light) 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.topbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%);
    pointer-events: none;
}

.topbar-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Input principal amélioré */
.input-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.input-wrapper {
    position: relative;
}

.input-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--neon-cyan), 
        var(--neon-magenta), 
        var(--neon-cyan));
    border-radius: calc(var(--radius-xl) + 2px);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-normal);
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

#songName {
    width: 100%;
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    background: rgba(42, 42, 80, 0.9);
    border: 2px solid rgba(91, 60, 196, 0.4);
    border-radius: var(--radius-xl);
    color: var(--primary-text);
    min-height: var(--input-height-lg);
    backdrop-filter: var(--glass-backdrop);
    transition: all var(--transition-normal);
}

#songName::placeholder {
    color: var(--secondary-text);
    opacity: 0.7;
}

#songName:focus {
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-glow);
    background: rgba(42, 42, 80, 0.95);
}

#songName:focus + .input-glow {
    opacity: 0.8;
}

/* Barre de progression AutoSwipe */
.autoswipe-progress-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg-medium);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: var(--glass-backdrop);
    transition: all var(--transition-normal);
}

.autoswipe-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--neon-cyan);
}

.autoswipe-label .icon {
    font-size: var(--font-size-md);
    margin-right: var(--space-sm);
}

.time-remaining {
    font-weight: var(--font-weight-bold);
    color: var(--neon-magenta);
    font-size: var(--font-size-xs);
    font-family: var(--font-family-mono);
}

.autoswipe-progress-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.autoswipe-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: var(--radius-sm);
    transition: width 100ms linear;
    position: relative;
    box-shadow: 0 0 12px var(--neon-cyan-glow);
}

.autoswipe-progress-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: inherit;
    border-radius: inherit;
    opacity: 0.5;
    filter: blur(4px);
    z-index: -1;
}

/* ===== PANEL HISTORIQUE ===== */
.left-panel {
    grid-area: history;
    background: var(--glass-bg-medium);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    backdrop-filter: var(--glass-backdrop);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Bouton plein écran historique - caché par défaut */
.history-fullscreen-btn {
    display: none;
    background: var(--glass-bg-medium);
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: var(--neon-cyan);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 10px var(--neon-cyan-glow);
}

.history-fullscreen-btn:hover {
    background: var(--neon-cyan);
    color: var(--primary-bg);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--neon-cyan-glow);
}

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

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--glass-border) 50%, 
        transparent 100%);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.panel-header h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.neon-icon {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px currentColor;
    font-size: var(--font-size-xl);
}

.panel-glow {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--neon-cyan) 50%, 
        transparent 100%);
    border-radius: 1px;
    opacity: 0.6;
}

/* Statistiques de l'historique */
.history-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    flex: 1;
    overflow: hidden;
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--space-sm);
}

.stat-item {
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    transition: all var(--transition-fast);
}

.stat-item:hover {
    background: var(--glass-bg-medium);
    border-color: var(--neon-cyan);
    transform: translateY(-1px);
}

.stat-label {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--secondary-text);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--neon-cyan);
    font-family: var(--font-family-mono);
}

/* Grille d'historique */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: var(--space-sm);
    overflow-y: auto;
    padding-right: var(--space-xs);
}

.history-grid::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.history-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.history-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.history-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--neon-magenta), var(--neon-cyan));
    box-shadow: var(--shadow-glow);
}

.history-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    background: var(--glass-bg-light);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-normal);
}

.history-item:hover {
    transform: scale(1.05) translateY(-2px);
    z-index: var(--z-elevated);
    box-shadow: var(--shadow-lg);
}

.history-item.discovered {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan-glow);
}

.history-item.discovered img {
    filter: brightness(1.1) saturate(1.2) contrast(1.1);
}

.history-item.missed {
    border-color: var(--error-color);
    box-shadow: 0 0 15px rgba(229, 57, 53, 0.3);
}

.history-item.missed img {
    filter: grayscale(50%) brightness(0.7);
}

/* Badges pour les éléments de l'historique */
.history-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    z-index: var(--z-elevated);
    border: 2px solid var(--primary-bg);
    box-shadow: var(--shadow-md);
}

.history-item .discovered-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    z-index: var(--z-elevated);
    border: 2px solid var(--primary-bg);
    box-shadow: var(--shadow-md);
    background: var(--neon-cyan);
    color: var(--primary-bg);
    box-shadow: 0 0 12px var(--neon-cyan-glow);
}

.history-item .missed-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    z-index: var(--z-elevated);
    border: 2px solid var(--primary-bg);
    box-shadow: var(--shadow-md);
    background: var(--error-color);
    color: white;
    box-shadow: 0 0 12px rgba(229, 57, 53, 0.6);
}

/* ===== PANEL CENTRAL - JEU PRINCIPAL ===== */
.center-panel {
    grid-area: center;
    background: var(--glass-bg-medium);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    backdrop-filter: var(--glass-backdrop);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    padding: var(--space-3xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
    text-align: center;
}

.center-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--glass-border) 50%, 
        transparent 100%);
}

/* Conteneur d'album avec effets */
.album-container {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    flex-shrink: 0;
}

.album-glow {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    background: linear-gradient(45deg, 
        var(--neon-cyan), 
        var(--neon-magenta), 
        var(--neon-purple), 
        var(--neon-cyan));
    border-radius: calc(var(--radius-xl) + 12px);
    opacity: 0.4;
    filter: blur(20px);
    z-index: -1;
    animation: album-pulse 4s ease-in-out infinite;
}

@keyframes album-pulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1) rotate(0deg); 
    }
    25% { 
        opacity: 0.5; 
        transform: scale(1.02) rotate(1deg); 
    }
    50% { 
        opacity: 0.4; 
        transform: scale(1.01) rotate(-0.5deg); 
    }
    75% { 
        opacity: 0.6; 
        transform: scale(1.015) rotate(0.5deg); 
    }
}

#thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-xl);
}

.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    border-radius: var(--radius-xl);
    opacity: 0;
    transition: opacity var(--transition-normal);
    backdrop-filter: blur(12px);
}

#thumbnail[style*="blur"] + .album-overlay {
    opacity: 1;
}

.mystery-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    color: var(--neon-cyan);
}

.mystery-icon {
    font-size: var(--font-size-4xl);
    animation: mystery-float 3s ease-in-out infinite;
    text-shadow: 0 0 20px currentColor;
}

.mystery-text {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes mystery-float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    50% { 
        transform: translateY(-8px) rotate(5deg); 
    }
}

/* Informations sur la chanson */
.song-info {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.song-title-container,
.song-artist-container {
    position: relative;
}

.song-title,
.song-artist {
    background: var(--glass-bg-medium);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-2xl);
    font-weight: var(--font-weight-medium);
    color: var(--secondary-text);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--glass-backdrop);
}

.song-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.song-artist {
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Styles pour les emojis et le texte séparés */
.song-emoji {
    font-size: 1.2em;
    flex-shrink: 0;
    opacity: 0.8;
    transition: all var(--transition-fast);
}

.song-text {
    flex: 1;
    min-width: 0; /* Permet la troncature si nécessaire */
    font-weight: inherit;
}

/* Animation spéciale pour les emojis lors de la révélation */
.song-title.revealing .song-emoji,
.song-artist.revealing .song-emoji {
    animation: emoji-bounce 0.4s ease-in-out;
    opacity: 1;
}

.song-title.revealed .song-emoji,
.song-artist.revealed .song-emoji {
    opacity: 1;
    color: var(--neon-magenta);
    text-shadow: 0 0 8px var(--neon-magenta-glow);
}

.song-title.revealed,
.song-artist.revealed {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-glow);
    text-shadow: 0 0 12px currentColor;
    animation: reveal-glow 0.6s ease;
}

/* Animation pour la révélation en cours (classe revealing) */
.song-title.revealing,
.song-artist.revealing {
    animation: reveal-pulse 0.4s ease-in-out;
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-glow);
    text-shadow: 0 0 12px currentColor;
}

@keyframes reveal-glow {
    0% { 
        box-shadow: 0 0 0 rgba(0, 255, 255, 0); 
        transform: scale(1);
        opacity: 0.7;
    }
    30% { 
        box-shadow: 0 0 30px var(--neon-cyan-glow); 
        transform: scale(1.03);
        opacity: 0.9;
    }
    100% { 
        box-shadow: var(--shadow-glow); 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes reveal-pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 255, 255, 0);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 25px var(--neon-cyan-glow);
    }
    100% { 
        transform: scale(1);
        box-shadow: var(--shadow-glow);
    }
}

@keyframes emoji-bounce {
    0% { 
        transform: scale(1);
    }
    30% { 
        transform: scale(1.3);
    }
    60% { 
        transform: scale(1.1);
    }
    100% { 
        transform: scale(1);
    }
}

/* Indicateur de scroll pour mobile */
@media (max-width: 768px) {
    .history-content::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
        opacity: 0.5;
        pointer-events: none;
    }
    
    .history-content {
        position: relative;
    }
    
    /* Améliorer la visibilité des badges sur mobile */
    .history-item .discovered-badge,
    .history-item .missed-badge {
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* ===== MENU ITEMS ===== */
.menu-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-surface);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(91, 60, 196, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    overflow: hidden;
}

.menu-item:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: translateY(-1px);
}

.menu-item.running {
    border-color: var(--neon-magenta);
    background: rgba(255, 0, 255, 0.1);
}

.menu-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.menu-item:hover .menu-glow {
    left: 100%;
}

.menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.menu-text {
    flex: 1;
    font-weight: 500;
}

.autoswipe-status {
    font-size: 16px;
    margin-left: auto;
}

/* ===== PLAYER INFO ===== */
.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-surface);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(91, 60, 196, 0.3);
    margin-bottom: 20px;
}

.player-avatar {
    position: relative;
    width: 48px;
    height: 48px;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: 50%;
    z-index: -1;
    opacity: 0.6;
    animation: avatar-pulse 2s ease-in-out infinite;
}

@keyframes avatar-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.player-details {
    flex: 1;
}

.player-name {
    font-weight: 600;
    color: var(--neon-cyan);
    margin-bottom: 4px;
}

.player-status {
    font-size: 12px;
    color: var(--gray);
}
    
/* ===== UTILS ===== */
.neon-icon {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px currentColor;
}

.text-gradient {
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: var(--glass-bg-medium);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablettes en mode paysage */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 220px 1fr 180px;
        gap: 12px;
        padding: 12px;
    }
    
    .album-container {
        width: 280px;
        height: 280px;
    }
}

/* Tablettes en mode portrait */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 200px 1fr 160px;
        gap: 10px;
        padding: 10px;
    }
    
    .topbar {
        height: 100px;
        padding: 12px 16px;
    }
    
    #songName {
        font-size: 1.1rem;
        padding: 14px 20px;
    }
    
    .album-container {
        width: 250px;
        height: 250px;
    }
    
    .mystery-icon {
        font-size: 36px;
    }
}

/* Transition vers mobile */
@media (max-width: 850px) {
    .container {
        grid-template-columns: 180px 1fr 140px;
        gap: 8px;
        padding: 8px;
    }
    
    .album-container {
        width: 220px;
        height: 220px;
    }
}

/* MOBILE - L'interface se transforme complètement */
@media (max-width: 768px) {
    /* Container principal devient vertical avec input en bas */
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        gap: 0;
        padding: 0;
        height: 100vh;
        position: relative;
    }
    
    /* Topbar se transforme en barre d'input flottante en bas */
    .topbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        grid-row: 3;
        height: auto;
        padding: 12px 15px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        background: rgba(26, 26, 61, 0.95);
        backdrop-filter: blur(15px);
        border-top: 1px solid rgba(91, 60, 196, 0.3);
        z-index: 1000;
    }
    
    .topbar-content {
        gap: 6px;
        max-width: 100%;
        position: relative;
    }
    
    .input-container {
        position: relative;
        width: 100%;
    }
    
    #songName {
        font-size: 16px;
        padding: 14px 20px;
        min-height: 52px;
        width: 100%;
        border-radius: 26px;
        border: 2px solid rgba(91, 60, 196, 0.4);
        background: rgba(26, 26, 61, 0.8);
        backdrop-filter: blur(10px);
    }
    
    #songName:focus {
        border-color: var(--neon-cyan);
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    }
    
    /* AutoSwipe container sort de la topbar et va en haut au centre */
    .autoswipe-progress-container {
        position: fixed !important;
        top: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        min-width: 200px !important;
        max-width: 90% !important;
        padding: 8px 12px !important;
        background: rgba(26, 26, 61, 0.95) !important;
        backdrop-filter: blur(15px) !important;
        border: 1px solid rgba(91, 60, 196, 0.4) !important;
        border-radius: 25px !important;
        z-index: 1001 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
        
        /* Sortir du flux normal de la topbar */
        position: fixed !important;
        bottom: auto !important;
        right: auto !important;
        margin: 0 !important;
    }
    
    .autoswipe-label {
        font-size: 12px;
        text-align: center;
        margin-bottom: 4px;
    }
    
    .autoswipe-progress-bar {
        height: 4px;
        border-radius: 2px;
    }
    
    /* Historique devient compact en haut (plus de marge pour AutoSwipe) */
    .left-panel {
        grid-row: 1;
        min-height: 320px;
        max-height: 400px;
        overflow-y: auto;
        padding: 12px;
        /* margin-top supprimé - l'AutoSwipe est maintenant en position fixed */
        background: rgba(26, 26, 61, 0.9);
        backdrop-filter: blur(15px);
        border-bottom: 2px solid rgba(91, 60, 196, 0.4);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    /* Afficher le bouton plein écran sur mobile */
    .history-fullscreen-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .panel-header {
        justify-content: space-between;
        align-items: center;
    }
    
    .history-content {
        gap: 10px;
    }
    
    .history-stats {
        gap: 10px;
        margin-bottom: 12px;
        /* Améliorer la lisibilité des stats sur mobile */
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item {
        padding: 8px 10px;
        border-radius: var(--radius-md);
    }
    
    .stat-label {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .stat-value {
        font-size: 16px;
        font-weight: var(--font-weight-bold);
    }
    
    /* Grid d'historique optimisé pour mobile avec plus d'espace */
    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 10px;
        max-height: 400px;
        overflow-y: auto;
        padding: 8px;
        /* Améliorer le scroll sur mobile */
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        /* Indicateur de scroll */
        position: relative;
    }
    
    /* Indicateur de scroll pour mobile */
    .history-grid::after {
        content: '';
        position: sticky;
        bottom: 0;
        display: block;
        height: 20px;
        background: linear-gradient(transparent, rgba(26, 26, 61, 0.9));
        pointer-events: none;
        margin: 0 -8px -8px -8px;
    }
    
    /* Améliorer les scrollbars sur mobile */
    .history-grid::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    .history-grid::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
    }
    
    .history-grid::-webkit-scrollbar-thumb {
        background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta));
        border-radius: var(--radius-md);
        box-shadow: 0 0 10px var(--neon-cyan-glow);
    }
    
    .history-grid::-webkit-scrollbar-thumb:hover {
        box-shadow: 0 0 15px var(--neon-cyan-glow);
    }
    
    .history-item {
        border-radius: 8px;
        border-width: 2px;
        min-height: 45px;
        /* Améliorer la visibilité sur mobile */
        transition: all var(--transition-normal);
    }
    
    .history-item:hover {
        transform: scale(1.08) translateY(-3px);
        z-index: var(--z-elevated);
    }
    
    .history-item .discovered-badge,
    .history-item .missed-badge {
        width: 16px;
        height: 16px;
        font-size: 10px;
        top: -5px;
        right: -5px;
        border: 2px solid var(--primary-bg);
    }
    
    /* Panneau principal devient central avec marge pour input du bas */
    .center-panel {
        grid-row: 2;
        padding: 20px 12px;
        padding-bottom: 100px; /* Espace pour l'input du bas */
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .album-container {
        width: 200px;
        height: 200px;
        margin-bottom: 15px;
    }
    
    .mystery-icon {
        font-size: 32px;
    }
    
    .song-title,
    .song-artist {
        padding: 10px 16px;
        font-size: 14px;
        margin-bottom: 8px;
        gap: var(--space-xs); /* Réduire l'espace entre emoji et texte sur mobile */
    }
    
    /* Ajustements pour les emojis sur mobile */
    .song-emoji {
        font-size: 1.1em; /* Légèrement plus petit sur mobile */
    }
    
    .song-text {
        font-size: inherit;
        line-height: 1.3;
    }
    
    /* Right panel en dropdown uniquement en haut à droite */
    .right-panel {
        position: fixed;
        top: 10px;
        right: 10px;
        left: auto;
        width: 50px;
        height: 50px;
        transform: none;
        border-radius: 25px;
        padding: 0;
        background: rgba(26, 26, 61, 0.95);
        backdrop-filter: blur(15px);
        border: 2px solid var(--neon-cyan);
        box-shadow: 0 0 20px var(--neon-cyan-glow);
        z-index: 1000;
        transition: all 0.3s ease;
        overflow: visible;
        cursor: pointer;
    }

    /* Icône du bouton dropdown */
    .right-panel::before {
        content: "⚙️";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 20px;
        z-index: 1001;
        pointer-events: none;
    }

    /* Animation de rotation quand ouvert */
    .right-panel.open::before {
        content: "✖️";
        transform: translate(-50%, -50%) rotate(180deg);
    }

    /* Menu items cachés par défaut */
    .right-panel .menu-items {
        position: absolute;
        top: 60px;
        right: 0;
        min-width: 200px;
        background: rgba(26, 26, 61, 0.98);
        border: 2px solid var(--neon-cyan);
        border-radius: 15px;
        padding: 10px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        backdrop-filter: blur(20px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        z-index: 1001;
        flex-direction: column;
        gap: 8px;
    }

    /* Menu items visibles quand le panel est ouvert */
    .right-panel.open .menu-items {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Style des éléments du menu dropdown */
    .right-panel .menu-item {
        width: 100%;
        height: 40px;
        padding: 0 12px;
        border-radius: 10px;
        background: rgba(91, 60, 196, 0.3);
        border: 1px solid rgba(91, 60, 196, 0.4);
        display: flex;
        align-items: center;
        gap: 10px;
        transition: all 0.3s ease;
        justify-content: flex-start;
    }

    .right-panel .menu-item:hover {
        background: rgba(91, 60, 196, 0.6);
        border-color: var(--neon-cyan);
        box-shadow: 0 0 15px var(--neon-cyan-glow);
        transform: translateX(5px);
    }

    /* Texte visible dans le dropdown */
    .right-panel .menu-text {
        display: block;
        font-size: 14px;
        font-weight: 500;
        color: var(--primary-text);
    }

    /* Icônes dans le dropdown */
    .right-panel .menu-icon {
        font-size: 16px;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Status AutoSwipe dans le dropdown */
    .right-panel .autoswipe-status {
        position: static;
        margin-left: auto;
        background: transparent;
        border: none;
        width: auto;
        height: auto;
        font-size: 14px;
    }

    /* Masquer le header et player info */
    .right-panel .panel-header,
    .right-panel .player-info {
        display: none;
    }
    
    /* Ajustement de l'espace pour la topbar mobile */
    .topbar {
        padding-right: 70px; /* Espace pour le bouton dropdown */
    }

    /* Animation d'apparition des éléments */
    .right-panel .menu-item {
        animation: slideInFromRight 0.3s ease forwards;
        opacity: 0;
    }

    .right-panel.open .menu-item:nth-child(1) { animation-delay: 0.1s; }
    .right-panel.open .menu-item:nth-child(2) { animation-delay: 0.15s; }
    .right-panel.open .menu-item:nth-child(3) { animation-delay: 0.2s; }
    .right-panel.open .menu-item:nth-child(4) { animation-delay: 0.25s; }
    .right-panel.open .menu-item:nth-child(5) { animation-delay: 0.3s; }
    .right-panel.open .menu-item:nth-child(6) { animation-delay: 0.35s; }

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

    /* Overlay pour fermer le dropdown */
    .dropdown-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 999;
        background: rgba(0, 0, 0, 0.3);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .dropdown-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Petits mobiles */
@media (max-width: 480px) {
    .container {
        gap: 0;
        padding: 0;
    }
    
    .topbar {
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    
    #songName {
        font-size: 14px;
        padding: 12px 16px;
        min-height: 48px;
        border-radius: 24px;
    }
    
    .autoswipe-progress-container {
        top: 15px !important;
        min-width: 180px !important;
        padding: 6px 10px !important;
        border-radius: 20px !important;
    }
    
    .autoswipe-label {
        font-size: 11px;
    }
    
    .autoswipe-progress-bar {
        height: 3px;
    }
    
    .album-container {
        width: 160px;
        height: 160px;
        margin-bottom: 10px;
    }
    
    .mystery-icon {
        font-size: 28px;
    }
    
    .song-title,
    .song-artist {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .left-panel {
        min-height: 200px;
        max-height: 280px;
        padding: 10px;
        /* margin-top supprimé - l'AutoSwipe est maintenant en position fixed */
        background: rgba(26, 26, 61, 0.95);
        backdrop-filter: blur(20px);
    }
    
    /* Afficher le bouton plein écran sur petits mobiles aussi */
    .history-fullscreen-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    /* Ajustements spécifiques pour l'historique sur très petits écrans */
    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
        gap: 8px;
        max-height: 200px;
        padding: 6px;
    }
    
    .history-item {
        min-height: 38px;
        border-radius: 6px;
    }
    
    .history-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .stat-item {
        padding: 6px 8px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .center-panel {
        padding: 15px 8px;
        padding-bottom: 90px; /* Ajusté pour input plus petit */
    }
    
    /* Historique ultra-compact pour petits écrans */
    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        gap: 6px;
        max-height: 120px;
        overflow-y: auto;
    }
    
    .history-stats {
        flex-direction: row;
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .stat-item {
        padding: 4px 6px;
        min-width: 0;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .stat-value {
        font-size: 12px;
    }
    
    .history-item {
        border-radius: 4px;
        min-height: 35px;
    }
    
    .history-item .discovered-badge,
    .history-item .missed-badge {
        width: 12px;
        height: 12px;
        font-size: 7px;
        top: -3px;
        right: -3px;
    }
}

/* Mode paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        grid-template-columns: 200px 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .topbar {
        grid-column: 1 / 3;
        height: 60px;
    }
    
    .left-panel {
        grid-row: 2;
        max-height: none;
    }
    
    .center-panel {
        grid-row: 2;
    }
    
    .album-container {
        width: 150px;
        height: 150px;
        margin-bottom: 10px;
    }
}

/* Très petits écrans en paysage */
@media (max-width: 640px) and (orientation: landscape) {
    .album-container {
        width: 120px;
        height: 120px;
    }
    
    .song-title,
    .song-artist {
        padding: 6px 12px;
        font-size: 12px;
        margin-bottom: 6px;
    }
}

/* High DPI displays - optimisations performance */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .aurora-wave {
        will-change: transform;
    }
    
    .album-glow {
        will-change: transform, opacity;
    }
    
    .menu-glow {
        will-change: left;
    }
}

/* ===== OPTIMISATIONS MOBILES AVANCÉES ===== */

/* Support variables CSS pour mobile */
body.mobile-optimized {
    --vh: 1vh;
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
    height: calc(var(--vh, 1vh) * 100);
    /* padding-top supprimé pour éviter l'espace noir en haut */
    padding-bottom: var(--safe-area-bottom);
}

/* Anti-zoom sur focus mobile */
@media screen and (max-width: 768px) {
    /* Suppression de l'espace noir en haut */
    html, body {
        margin: 0;
        padding: 0;
        height: 100vh;
        height: 100dvh; /* Utilise la hauteur dynamique du viewport */
    }
    
    .container {
        height: 100vh;
        height: 100dvh; /* Utilise la hauteur dynamique du viewport */
        padding: 0;
        margin: 0;
    }
    
    input[type="text"], input[type="search"] {
        font-size: 16px !important; /* Empêche le zoom iOS */
        transform-origin: left top;
    }
    
    /* Amélioration tactile */
    button, .menu-item, input, [onclick] {
        min-height: 44px; /* Taille recommandée tactile */
        cursor: pointer;
    }
    
    /* Feedback tactile visuel */
    .menu-item:active,
    button:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Optimisations scroll pour mobile */
    .center-panel {
        overflow: auto;
    }
    
    /* Masquer les barres de défilement en mode mobile */
    *::-webkit-scrollbar {
        width: 0px;
        background: transparent;
    }
}

/* ===== ANIMATIONS RESPONSIVES ===== */

/* Animation d'entrée pour le mobile */
@keyframes mobileSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation pour les éléments du menu mobile */
@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(100px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media screen and (max-width: 768px) {
    .container {
        animation: mobileSlideIn 0.5s ease-out;
    }
    
    .right-panel {
        animation: floatIn 0.6s ease-out 0.3s both;
    }
    
    .menu-item {
        animation: floatIn 0.4s ease-out calc(var(--index, 0) * 0.1s + 0.5s) both;
    }
}

/* ===== DEBUG ET TESTS RESPONSIVES ===== */

/* Classes utilitaires pour tests */
.responsive-debug {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--neon-cyan);
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 9999;
    font-family: monospace;
}

.responsive-debug::before {
    content: 'Desktop';
}

@media screen and (max-width: 1024px) {
    .responsive-debug::before {
        content: 'Tablet';
    }
}

@media screen and (max-width: 768px) {
    .responsive-debug::before {
        content: 'Mobile';
    }
}

@media screen and (max-width: 480px) {
    .responsive-debug::before {
        content: 'Small Mobile';
    }
}

/* ===== ACCESSIBILITÉ ===== */

/* Respect des préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mode haut contraste */
@media (prefers-contrast: high) {
    :root {
        --primary-text: #ffffff;
        --primary-bg: #000000;
        --primary-surface: #333333;
        --neon-cyan: #ffffff;
    }
}

@media (max-width: 420px) and (orientation: portrait) {
    .container {
        grid-template-rows: auto auto 1fr auto;
        grid-template-columns: 1fr;
        height: 100dvh;
    }

    .left-panel {
        grid-row: 1;
        max-height: 100px;
        padding: 6px 10px;
    }

    .autoswipe-progress-container {
        top: 5px !important;
        max-width: 95% !important;
        padding: 4px 8px !important;
    }

    .center-panel {
        grid-row: 3;
        justify-content: flex-start;
        padding: 10px 10px 100px; /* espace pour input clavier */
        overflow-y: auto;
    }

    .album-container {
        width: 140px;
        height: 140px;
        margin-bottom: 10px;
    }

    .song-title, .song-artist {
        font-size: 13px;
        padding: 8px 12px;
        margin-bottom: 6px;
    }

    .topbar {
        grid-row: 4;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 8px 10px;
        background: rgba(26, 26, 61, 0.95);
        backdrop-filter: blur(10px);
        z-index: 999;
        border-top: 1px solid rgba(91, 60, 196, 0.3);
    }

    #songName {
        font-size: 15px;
        padding: 12px 16px;
        min-height: 44px;
        border-radius: 22px;
    }

    .right-panel .menu-item {
        width: 30px;
        height: 30px;
    }

    .history-grid {
        max-height: 90px;
        grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
        gap: 4px;
    }

    .history-item {
        min-height: 30px;
    }

    .history-item .discovered-badge,
    .history-item .missed-badge {
        width: 10px;
        height: 10px;
        font-size: 6px;
    }
}

/* ===== PANEL DE CONTRÔLES (DESKTOP SEULEMENT) ===== */
@media (min-width: 769px) {
    .right-panel {
        grid-area: controls;
        background: var(--glass-bg-medium);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-xl);
        backdrop-filter: var(--glass-backdrop);
        box-shadow: var(--shadow-lg);
        position: relative;
        overflow: hidden;
        padding: var(--space-lg);
        display: flex;
        flex-direction: column;
        gap: var(--space-lg);
    }

    .right-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, 
            transparent 0%, 
            var(--glass-border) 50%, 
            transparent 100%);
    }
}

/* Informations du joueur */
.player-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: all var(--transition-fast);
}

.player-info:hover {
    background: var(--glass-bg-medium);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-glow);
}

.player-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--glass-border);
    transition: all var(--transition-normal);
}

.avatar-glow {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, 
        var(--neon-cyan), 
        var(--neon-magenta));
    border-radius: var(--radius-full);
    z-index: -1;
    opacity: 0.7;
    animation: avatar-pulse 3s ease-in-out infinite;
}

@keyframes avatar-pulse {
    0%, 100% { 
        opacity: 0.5; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
    }
}

.player-details {
    flex: 1;
    min-width: 0; /* Pour le text truncate */
}

.player-name {
    font-weight: var(--font-weight-semibold);
    color: var(--neon-cyan);
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-md);
    text-shadow: 0 0 8px currentColor;
}

.player-status {
    font-size: var(--font-size-sm);
    color: var(--secondary-text);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Éléments de menu améliorés */
.menu-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    user-select: none;
    overflow: hidden;
    min-height: var(--touch-target-min);
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 255, 255, 0.1), 
        transparent);
    transition: left var(--transition-slow);
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover {
    background: var(--glass-bg-medium);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px) scale(1.02);
}

.menu-item:active {
    transform: translateY(0) scale(0.98);
    transition: transform var(--transition-fast);
}

.menu-item.active,
.menu-item.running {
    border-color: var(--neon-magenta);
    background: var(--neon-magenta-glow);
    color: var(--primary-text);
    box-shadow: 0 0 15px var(--neon-magenta-glow);
}

.menu-icon {
    font-size: var(--font-size-lg);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.menu-item:hover .menu-icon {
    transform: scale(1.1) rotate(5deg);
}

.menu-text {
    flex: 1;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-md);
}

.autoswipe-status {
    font-size: var(--font-size-lg);
    margin-left: auto;
    transition: all var(--transition-fast);
}

.menu-item.running .autoswipe-status {
    animation: spin 2s linear infinite;
}

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

/* Styles spéciaux pour certains boutons */
.menu-item.github-btn .menu-icon {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
    filter: brightness(0) invert(1);
    transition: all var(--transition-normal);
}

.menu-item.github-btn:hover .menu-icon {
    filter: brightness(0) invert(1) sepia(1) hue-rotate(180deg) saturate(3);
}

/* ===== SYSTÈME DE POPUPS MODERNISÉ ===== */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-20px) scale(0.9);
    min-width: 280px;
    max-width: 90vw;
    max-height: 80vh;
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    background: var(--glass-bg-medium);
    backdrop-filter: var(--glass-backdrop);
    border: 2px solid var(--glass-border);
    color: var(--primary-text);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: var(--z-toast);
    opacity: 0;
    transition: all var(--transition-bounce);
    overflow-wrap: anywhere;
    font-size: var(--font-size-md);
    line-height: var(--line-height-relaxed);
    pointer-events: none;
}

.popup.show {
    transform: translate(-50%, -50%) translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.popup.success {
    border-color: var(--success-color);
    background: linear-gradient(135deg, var(--success-bg), var(--glass-bg-medium));
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.3), var(--shadow-xl);
}

.popup.error {
    border-color: var(--error-color);
    background: linear-gradient(135deg, var(--error-bg), var(--glass-bg-medium));
    box-shadow: 0 0 30px rgba(229, 57, 53, 0.3), var(--shadow-xl);
}

.popup.info {
    border-color: var(--info-color);
    background: linear-gradient(135deg, var(--info-bg), var(--glass-bg-medium));
    box-shadow: 0 0 30px rgba(33, 150, 243, 0.3), var(--shadow-xl);
}

.popup.warn {
    border-color: var(--warning-color);
    background: linear-gradient(135deg, var(--warning-bg), var(--glass-bg-medium));
    box-shadow: 0 0 30px rgba(255, 152, 0, 0.3), var(--shadow-xl);
}

.popup button {
    margin-top: var(--space-lg);
    background: var(--glass-bg-medium);
    border: 1px solid var(--glass-border);
    color: var(--primary-text);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    min-height: var(--touch-target-min);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    display: block;
    width: 100%;
}

.popup button:hover {
    background: var(--primary-accent);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.popup button:active {
    transform: translateY(0);
}

/* Overlay pour les popups */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: calc(var(--z-toast) - 1);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ===== UTILITIES ET CLASSES UTILITAIRES ===== */
.neon-icon {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px currentColor;
}

.text-gradient {
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: var(--glass-bg-medium);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
}

/* ===== RESPONSIVE DESIGN - MOBILE FIRST ===== */

/* Tablettes grandes (1280px et moins) */
@media (max-width: 1280px) {
    .container {
        grid-template-columns: 220px 1fr 200px;
        padding: var(--space-md);
        gap: var(--space-md);
        max-width: none;
    }
    
    .album-container {
        width: 280px;
        height: 280px;
    }
    
    .topbar {
        padding: var(--space-xl);
        min-height: 100px;
    }
    
    #songName {
        font-size: var(--font-size-lg);
        padding: var(--space-md) var(--space-xl);
    }
}

/* Tablettes en mode portrait (1024px et moins) */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 180px 1fr;
        grid-template-areas: 
            "topbar topbar"
            "history center"
            "controls controls";
        grid-template-rows: auto 1fr auto;
        gap: var(--space-md);
    }
    
    .left-panel {
        padding: var(--space-md);
    }
    
    .menu-items {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-sm);
    }
    
    .menu-item {
        flex: 0 0 auto;
        min-width: 100px;
        justify-content: center;
    }
    
    .menu-text {
        display: none; /* Masquer le texte sur tablette */
    }
    
    .album-container {
        width: 240px;
        height: 240px;
    }
    
    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        max-height: 300px;
    }
}

/* Transition vers mobile (850px et moins) */
@media (max-width: 850px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "topbar"
            "center"
            "history"
            "controls";
        grid-template-rows: auto 1fr auto auto;
        gap: var(--space-sm);
        padding: var(--space-sm);
    }
    
    .topbar {
        padding: var(--space-lg);
        min-height: 80px;
    }
    
    .album-container {
        width: 200px;
        height: 200px;
    }
    
    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        max-height: 180px;
    }
    
    .left-panel {
        padding: var(--space-md);
    }
    
    .menu-items {
        justify-content: space-around;
    }
    
    .menu-item {
        min-width: 80px;
        padding: var(--space-sm);
    }
}

/* Mobile (768px et moins) - Design transformé */
@media (max-width: 768px) {
    body {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }
    
    .container {
        height: 100vh;
        height: 100dvh;
        padding: 0;
        gap: 0;
        grid-template-areas: 
            "history"
            "center"
            "controls"
            "topbar";
        grid-template-rows: auto 1fr auto auto;
        grid-template-columns: 1fr;
    }
    
    /* Tooltips pour menu mobile */
    .menu-item {
        position: relative;
    }
    
    .menu-item::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(-8px);
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: var(--space-xs) var(--space-sm);
        border-radius: var(--radius-md);
        font-size: var(--font-size-xs);
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition-fast);
        z-index: var(--z-tooltip);
    }
    
    .menu-item:hover::after {
        opacity: 1;
        transform: translateX(-50%) translateY(-4px);
    }
    
    /* Noms des éléments de menu pour les tooltips */
    .menu-item.playlist-btn::after { content: 'Playlist'; }
    .menu-item.player-btn::after { content: 'Lecteur'; }
    .menu-item.options-btn::after { content: 'Options'; }
    .menu-item.autoswipe-btn::after { content: 'AutoSwipe'; }
    .menu-item.github-btn::after { content: 'GitHub'; }
    #ReRollDivBtn::after { content: 'Re-roll'; }
    
    /* Topbar devient une barre d'input flottante en bas */
    .topbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: var(--z-modal);
        background: var(--glass-bg-medium);
        backdrop-filter: var(--glass-backdrop);
        border-top: 1px solid var(--glass-border);
        border-radius: 0;
        padding: var(--space-md);
        padding-bottom: calc(var(--space-md) + var(--safe-area-bottom));
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        min-height: auto;
    }
    
    .topbar::before {
        display: none;
    }
    
    .input-container {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    #songName {
        font-size: var(--font-size-md);
        padding: var(--space-md) var(--space-lg);
        min-height: var(--input-height-md);
        border-radius: var(--radius-2xl);
    }
    
    /* AutoSwipe progress flottant en haut */
    .autoswipe-progress-container {
        position: fixed !important;
        top: var(--space-md) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: var(--z-overlay) !important;
        width: auto !important;
        min-width: 200px !important;
        max-width: calc(100% - 2rem) !important;
        margin: 0 !important;
        border-radius: var(--radius-2xl) !important;
        box-shadow: var(--shadow-xl) !important;
    }
    
    /* Historique compact en haut */
    .left-panel {
        grid-area: history;
        padding: var(--space-md);
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--glass-border);
        background: var(--glass-bg-light);
        margin-top: 0px; /* Espace pour AutoSwipe */
        max-height: 140px;
        overflow: hidden;
    }
    
    .history-stats {
        margin-bottom: var(--space-sm);
    }
    
    .stat-item {
        padding: var(--space-sm);
    }
    
    .stat-value {
        font-size: var(--font-size-lg);
    }
    
    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        gap: var(--space-xs);
        max-height: 80px;
    }
    
    /* Panel central adapté */
    .center-panel {
        grid-area: center;
        padding: var(--space-lg) var(--space-md);
        padding-bottom: calc(var(--space-5xl) + 80px); /* Espace pour input */
        border-radius: 0;
        border: none;
        overflow-y: auto;
    }
    
    .album-container {
        width: 180px;
        height: 180px;
    }
    
    .mystery-icon {
        font-size: var(--font-size-3xl);
    }
    
    .song-title,
    .song-artist {
        padding: var(--space-md) var(--space-lg);
        font-size: var(--font-size-md);
    }
}

/* Petits mobiles (480px et moins) */
@media (max-width: 480px) {
    .topbar {
        padding: var(--space-sm);
        padding-bottom: calc(var(--space-sm) + var(--safe-area-bottom));
    }
    
    #songName {
        font-size: var(--font-size-sm);
        padding: var(--space-sm) var(--space-md);
        min-height: var(--input-height-sm);
    }
    
    .autoswipe-progress-container {
        min-width: 180px !important;
        padding: var(--space-sm) !important;
        top: var(--space-sm) !important;
    }
    
    .left-panel {
        margin-top: 50px;
        max-height: 100px;
        padding: var(--space-sm);
    }
    
    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
        max-height: 60px;
    }
    
    .history-item .discovered-badge,
    .history-item .missed-badge {
        width: 12px;
        height: 12px;
        font-size: var(--font-size-xs);
        top: -3px;
        right: -3px;
    }
    
    .album-container {
        width: 140px;
        height: 140px;
    }
    
    .center-panel {
        padding: var(--space-md) var(--space-sm);
    }
    
    .menu-item {
        width: 40px;
        height: 40px;
        border-radius: var(--radius-md);
    }
    
    .menu-icon {
        font-size: var(--font-size-sm);
    }
}

/* Mode paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        grid-template-areas: 
            "history center controls"
            "topbar topbar topbar";
        grid-template-columns: 180px 1fr auto;
        grid-template-rows: 1fr auto;
    }
    
    .left-panel {
        margin-top: 0;
        max-height: none;
        border-bottom: none;
        border-right: 1px solid var(--glass-border);
    }
    
    .menu-items {
        flex-direction: row;
        gap: var(--space-sm);
    }
    
    .menu-item {
        width: 44px;
        height: 44px;
        border-radius: var(--radius-lg);
    }
    
    .center-panel {
        padding-bottom: var(--space-lg);
    }
    
    .autoswipe-progress-container {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        min-width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: var(--radius-lg) !important;
    }
}

/* Performance et optimisations */
@media (max-width: 768px) {
    /* Désactivation des animations sur mobile pour les performances */
    .aurora-wave {
        animation: none;
    }
    
    .album-glow {
        animation: none;
        opacity: 0.2;
    }
    
    /* Masquer les barres de défilement sur mobile */
    * {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    *::-webkit-scrollbar {
        display: none;
    }
    
    /* Optimisations tactiles */
    .menu-item,
    button,
    input {
        -webkit-tap-highlight-color: rgba(0, 255, 255, 0.2);
    }
    
    .menu-item:active {
        transform: scale(0.95);
    }
}

/* Dark mode et préférences utilisateur */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-bg: #050510;
        --primary-surface: rgba(20, 20, 50, 0.9);
    }
}

/* Mode haut contraste */
@media (prefers-contrast: high) {
    :root {
        --glass-bg-medium: rgba(255, 255, 255, 0.15);
        --glass-border: rgba(255, 255, 255, 0.3);
        --shadow-glow: 0 0 0 2px var(--neon-cyan);
    }
    
    .menu-item,
    .stat-item,
    .song-title,
    .song-artist {
        border-width: 2px;
    }
}

/* Support pour les anciennes propriétés et fallbacks */
@supports not (height: 100dvh) {
    body,
    .container {
        height: 100vh;
    }
}

/* ===== MODAL LOCK SYSTEM STYLES ===== */
.modal-locked-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-queue-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--glass-bg-medium);
    border: 2px solid var(--neon-cyan);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    color: var(--neon-cyan);
    font-size: var(--font-size-sm);
    z-index: 10002;
    animation: queue-pulse 2s ease-in-out infinite;
    backdrop-filter: var(--glass-backdrop);
}

.modal-priority-override {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 20px var(--error-color) !important;
    animation: priority-flash 0.5s ease-in-out 3;
}

@keyframes queue-pulse {
    0%, 100% { 
        box-shadow: 0 0 10px var(--neon-cyan-glow); 
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 25px var(--neon-cyan-glow); 
        transform: scale(1.02);
    }
}

@keyframes priority-flash {
    0%, 100% { 
        border-color: var(--error-color);
        box-shadow: 0 0 20px var(--error-color);
    }
    50% { 
        border-color: var(--neon-cyan);
        box-shadow: 0 0 30px var(--neon-cyan-glow);
    }
}

@supports not (backdrop-filter: blur(12px)) {
    .glass-effect,
    .topbar,
    .left-panel,
    .center-panel,
    .right-panel {
        background: var(--primary-surface);
    }
}

/* ===== REVEALATEND STYLES ===== */
.revealing {
    animation: track-reveal 0.6s ease-out forwards;
    position: relative;
}

.revealing::before {
    content: '🎭';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    z-index: 10;
    animation: reveal-icon-pulse 0.8s ease-in-out;
    pointer-events: none;
}

@keyframes track-reveal {
    0% { 
        opacity: 0.3;
        transform: scale(0.95);
        filter: blur(5px) brightness(0.5);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.05);
        filter: blur(2px) brightness(1.2);
        box-shadow: 0 0 25px var(--neon-cyan-glow);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
        filter: blur(0) brightness(1);
        box-shadow: 0 0 15px var(--neon-cyan-glow);
    }
}

@keyframes reveal-icon-pulse {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    30% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
        text-shadow: 0 0 20px var(--neon-magenta);
    }
    70% { 
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    100% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Révélation des éléments texte */
.song-title.revealing,
.song-artist.revealing {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px currentColor;
    animation: text-reveal 0.8s ease-out;
}

@keyframes text-reveal {
    0% { 
        opacity: 0;
        transform: translateY(-20px);
        color: var(--secondary-text);
        text-shadow: none;
    }
    50% { 
        opacity: 0.8;
        transform: translateY(-5px);
        color: var(--neon-cyan);
        text-shadow: 0 0 20px currentColor;
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
        color: var(--neon-cyan);
        text-shadow: 0 0 10px currentColor;
    }
}

/* Album overlay fade out pour révélation */
.album-overlay {
    transition: opacity var(--transition-slow);
}

.album-overlay.revealing {
    opacity: 0 !important;
}
