/* === ESTILOS MAESTROS (V-DEFINITIVA - PREMIUM, SCROLL FIX & GAMEPLAY ORIGINAL) === */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;600;700;900&family=Nunito:wght@700;900&display=swap');

:root {
    /* Paleta UI Dark-Premium */
    --bg-color: #07070a; 
    --bg-panel: #111116;
    --accent: #ff0055; /* Rosa Neón del Logo */
    --blue: #00e5ff;   /* Cyan de la UI */
    --gold: #FFD700;
    
    /* COLORES ORIGINALES DEL GAMEPLAY RESTAURADOS */
    --sick: #00FFFF; 
    --good: #12FA05; 
    --bad: #FFD700; 
    --miss: #F9393F;
    
    --lane-width: 25%; 
    --track-alpha: 0.15;
    --judge-y: 40%; 
    --judge-x: 50%; 
    --judge-s: 1; 
    --judge-op: 1;
    --note-op: 1; 
    --note-scale: 1;
}

* { box-sizing: border-box; user-select: none; outline: none; -webkit-tap-highlight-color: transparent; }

/* Scrollbar Personalizada para que las listas largas se vean premium */
*::-webkit-scrollbar { width: 8px; }
*::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
*::-webkit-scrollbar-thumb:hover { background: var(--blue); }

body { margin: 0; background: var(--bg-color); color: white; font-family: 'Chakra Petch', sans-serif; overflow: hidden; height: 100vh; width: 100vw; }

/* === ANIMACIONES === */
@keyframes slideIn { 0% { transform: translateX(100px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { 0% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(100px); opacity: 0; } }
@keyframes popIn { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulseBtn { 0% { box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.6); } 70% { box-shadow: 0 0 0 15px rgba(0, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }
@keyframes pulseCombo { 0% { transform: scale(1); text-shadow: 0 0 15px var(--blue); } 50% { transform: scale(1.15); filter: brightness(1.3); text-shadow: 0 0 40px var(--blue); } 100% { transform: scale(1); text-shadow: 0 0 15px var(--blue); } }
.pulse { animation: pulseCombo 0.1s ease-out; }
@keyframes floatNote { 0%, 100% { transform: translateY(0) scale(var(--note-scale)); filter: drop-shadow(0 0 5px rgba(0,229,255,0.4)); } 50% { transform: translateY(-10px) scale(var(--note-scale)); filter: drop-shadow(0 10px 15px rgba(0,229,255,0.8)); } }

/* === OVERLAYS Y CARGA === */
#loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(7,7,10,0.98); z-index: 99999; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#mobile-pause-btn { display: none; }
.loader { border: 6px solid #222; border-top: 6px solid var(--accent); border-radius: 50%; width: 70px; height: 70px; animation: spin 1s linear infinite; margin-bottom: 20px; box-shadow: 0 0 30px rgba(255,0,85,0.5); }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#loading-text { font-size: 1.5rem; font-weight: 900; color: var(--accent); letter-spacing: 2px; text-transform: uppercase; text-shadow: 0 0 15px rgba(255,0,85,0.4); }

#notification-area { position: fixed; top: 20px; right: 20px; z-index: 200000; display: flex; flex-direction: column; gap: 12px; pointer-events: none; width: 350px; }
.notify-card { background: rgba(17,17,22,0.98); border-left: 6px solid var(--accent); border-radius: 12px; padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,0.9); pointer-events: auto; animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); color:white; border: 1px solid #333; backdrop-filter: blur(10px); }
.notify-title { font-weight:900; margin-bottom:6px; color:var(--accent); text-transform:uppercase; font-size: 1rem; }
.notify-body { font-size:0.95rem; font-family:'Nunito'; color: #ccc; line-height: 1.4; }
.notify-actions { margin-top:12px; display:flex; gap:10px; }

/* === LAYOUT PRINCIPAL === */
#menu-container { display: flex; width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 100; transition: 0.4s; }
#menu-container.hidden { opacity: 0; pointer-events: none; transform: scale(1.05); filter: blur(15px); }

#bg-layer { position: absolute; top:0; left:0; width:100%; height:100%; z-index: 0; pointer-events: none; background: radial-gradient(circle at center, #15151e 0%, #050508 100%); overflow: hidden; }
#bg-video, #bg-image { width: 100%; height: 100%; object-fit: cover; opacity: 0.25; position: absolute; top:0; left:0; transition: opacity 0.5s; filter: brightness(0.6) grayscale(0.2); mix-blend-mode: screen; }

.sidebar { width: 340px; background: rgba(10,10,14,0.95); border-right: 1px solid #222; display: flex; flex-direction: column; padding: 30px; gap: 20px; z-index: 101; position: absolute; top:0; left:0; height:100%; box-shadow: 15px 0 50px rgba(0,0,0,0.8); backdrop-filter: blur(15px); }
.content-area { margin-left: 340px; height: 100%; width: calc(100% - 340px); position: relative; display:flex; flex-direction:column; }
.top-bar { height: 100px; border-bottom: 1px solid #222; display: flex; align-items: center; padding: 0 50px; background: linear-gradient(to bottom, rgba(10,10,14,0.9), transparent); justify-content: space-between; z-index: 102; }

/* === BRAND & PERFIL === */
.brand { font-size: 2.5rem; font-weight: 900; letter-spacing: 1px; color: white; display: flex; align-items: center; gap: 15px; margin-bottom: 10px; line-height: 1; text-shadow: 0 0 20px rgba(255,255,255,0.4); }

.user-card { background: #13141c; padding: 15px 20px; border-radius: 18px; border: 1px solid var(--blue); display: flex; align-items: center; gap: 15px; cursor: pointer; transition: 0.3s; position: relative; overflow: hidden; box-shadow: 0 0 15px rgba(0, 229, 255, 0.15); }
.user-card:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(0, 229, 255, 0.4); background: #1a1b26; border-color: white; }
.u-avatar { width: 60px; height: 60px; border-radius: 14px; background: #222; background-size: cover; background-position: center; border: 2px solid var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.5rem; box-shadow: 0 0 15px rgba(0,229,255,0.4); transition: 0.3s; }
.user-card:hover .u-avatar { transform: scale(1.05) rotate(-5deg); }
.u-info div:first-child { font-weight: 900; font-size: 1.3rem; color:white; }
.u-info div:last-child { color: var(--blue); font-weight: bold; font-size: 0.9rem; margin-top: 4px; letter-spacing: 1px; }

/* === BOTONES & NAVEGACIÓN === */
.nav-section { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; flex: 1; }
.nav-btn { padding: 15px; background: transparent; border: none; color: #888; text-align: left; font-family: inherit; font-size: 1.1rem; font-weight: 800; cursor: pointer; border-radius: 12px; transition:0.3s; display: flex; gap: 15px; align-items: center; }
.nav-btn:hover { color: white; background: rgba(255,255,255,0.05); padding-left: 25px; }
.nav-btn.active { color: white; background: linear-gradient(90deg, rgba(0, 229, 255, 0.15), transparent); border-left: 5px solid var(--blue); padding-left: 25px; box-shadow: inset 10px 0 30px -10px rgba(0,229,255,0.3); text-shadow: 0 0 15px var(--blue); }

.import-btn { margin-top: auto; padding: 20px; border-radius: 14px; background: var(--accent); color: white; font-weight: 900; cursor: pointer; text-align: center; border:none; font-family: inherit; box-shadow: 0 5px 25px rgba(255, 0, 85, 0.4); transition: 0.3s; font-size: 1.1rem; text-transform: uppercase; animation: pulseBtn 2s infinite; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.import-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 40px rgba(255, 0, 85, 0.7); filter: brightness(1.2); }

.news-btn { background: #111; border: 1px solid #333; color: #aaa; margin-top: 15px; padding: 14px; font-size: 0.9rem; text-align: center; border-radius: 12px; cursor: pointer; transition: 0.3s; font-weight:bold; width: 100%; }
.news-btn:hover { background: #222; color: white; border-color: var(--blue); }

.search-inp { width: 500px; background: #0a0a0e; border: 1px solid #333; padding: 18px 25px; color: white; border-radius: 16px; font-weight: bold; font-size: 1.1rem; transition: 0.3s; font-family: 'Nunito'; }
.search-inp:focus { border-color: var(--blue); box-shadow: 0 0 25px rgba(0,229,255,0.3); outline: none; background: #111116; }

button.action { width: 100%; padding: 18px; border-radius: 12px; background: white; color: black; font-weight: 900; text-transform: uppercase; font-size: 1.1rem; transition:0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); border:none; cursor:pointer; box-shadow: 0 5px 20px rgba(255,255,255,0.2); letter-spacing: 1px; }
button.action:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 30px rgba(255,255,255,0.4); }
button.action.btn-acc { background: var(--blue); color: black; box-shadow: 0 5px 20px rgba(0,229,255,0.4); }
button.action.btn-acc:hover { background: white; }
button.secondary { background: #1a1a24; color: white; border: 1px solid #333; box-shadow: none; margin-top: 10px; }
button.secondary:hover { border-color: white; background: #222; transform: none; }

.btn-small { padding: 10px 20px; border-radius: 8px; border: none; font-weight: 900; cursor: pointer; font-size: 0.85rem; margin-left:5px; transition:0.3s; text-transform: uppercase; }
.btn-acc { background: var(--good); color: black; box-shadow: 0 5px 15px rgba(18, 250, 5, 0.3); }
.btn-add { background: var(--blue); color: black; box-shadow: 0 5px 15px rgba(0, 229, 255, 0.3); }
.btn-chat { background: var(--gold); color: black; box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3); }
.btn-small:hover { transform: translateY(-2px); filter: brightness(1.2); }

/* === GAME HUD === */
#game-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 50; display: none; perspective: 1000px; overflow: hidden; background: radial-gradient(circle at center, #111 0%, #000 100%); }
#top-progress-bar { position: absolute; top: 0; left: 0; width: 100%; height: 6px; background: #111; z-index: 500; }
#top-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--accent)); width: 0%; transition: width 0.1s linear; box-shadow: 0 0 15px var(--accent); }
#top-progress-time { position: absolute; top: 15px; right: 30px; font-size: 1.4rem; font-weight: 900; text-shadow: 0 2px 10px black; z-index: 501; font-family: 'Chakra Petch'; }

#ig-profile { position: absolute; top: 80px; left: 40px; display: flex; align-items: center; gap: 15px; opacity: 1; z-index: 550; background: rgba(0,0,0,0.7); padding: 10px 20px; border-radius: 50px; border: 1px solid #333; backdrop-filter: blur(5px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
#ig-av { width: 50px; height: 50px; border-radius: 50%; background: #333; background-size: cover; border: 2px solid white; }
#ig-name { font-weight: 900; font-size: 1.4rem; text-shadow: 0 2px 5px black; color: white; }

#track { position: relative; z-index: 100; width: 100%; max-width: 700px; height: 120%; margin: 0 auto; background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%); border-left: 1px solid rgba(255,255,255,0.05); border-right: 1px solid rgba(255,255,255,0.05); transform-origin: 50% 100%; transform-style: preserve-3d; transform: rotateX(0deg); box-shadow: inset 0 -200px 150px -100px rgba(0,0,0,0.5); }
#track.middle-scroll { max-width: 600px; position: absolute; left: 50%; transform: translateX(-50%) rotateX(0deg); border: none; background: rgba(0,0,0,0.6); mask-image: none; backdrop-filter: blur(5px); }

#combo-container { position: absolute; top: 40%; right: 12%; transform: translateY(-50%); text-align: center; z-index: 400; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.combo-val { font-size: 10rem; font-weight: 900; line-height: 0.9; color: white; text-shadow: 0 0 50px rgba(0, 229, 255, 0.6), 5px 5px 0px #000; font-family: 'Chakra Petch'; transition: transform 0.05s; }
.combo-label { font-size: 2rem; color: var(--blue); font-weight: 900; letter-spacing: 6px; margin-bottom: 5px; text-shadow: 0 0 20px var(--blue); }

.hud-extra { position: absolute; bottom: 40px; right: 50px; text-align: right; pointer-events: none; z-index: 400; display:flex; flex-direction:column; align-items:flex-end; }
.hud-fc { font-size: 4rem; font-weight: 900; letter-spacing: 5px; text-shadow: 0 0 20px currentColor; margin-bottom: 5px; animation: floatNote 3s infinite ease-in-out; }
.hud-mean { font-size: 1.5rem; font-weight: bold; color: #ddd; background: rgba(0,0,0,0.8); padding: 8px 20px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); font-family: 'Nunito'; backdrop-filter: blur(5px); }

#hud { position: absolute; left: 40px; top: 50%; transform: translateY(-50%); text-align: left; pointer-events: none; z-index: 300; display: flex; align-items: center; gap: 30px; }
.score-val { font-size: 5rem; font-weight: 900; line-height: 1; text-shadow: 0 0 40px rgba(255,255,255,0.3); color: white; }
.acc-val { font-size: 2.8rem; color: var(--blue); font-weight: 900; text-shadow: 0 0 30px rgba(0,229,255,0.5); }
.stats-col { display: flex; flex-direction: column; gap: 8px; text-shadow: 0 2px 15px black; align-items: flex-start; }
.stat-item { font-weight: 900; font-size: 1.5rem; opacity: 0.95; display: flex; gap: 15px; color: #eee; }
.health-bar { width: 18px; height: 600px; background: rgba(0,0,0,0.8); border: 2px solid #333; border-radius: 10px; position: relative; overflow: hidden; box-shadow: 0 0 30px black, inset 0 0 10px black; order: -1; backdrop-filter: blur(5px); }
.health-fill { width: 100%; height: 50%; position: absolute; bottom: 0; background: linear-gradient(to top, var(--miss), var(--bad), var(--good), var(--sick)); transition: height 0.1s linear; box-shadow: 0 0 20px var(--sick); }

/* === ARREGLO PERFECTO DEL SPLASH === */
.arrow-wrapper { position: absolute; width: var(--lane-width); height: 120px; display: flex; align-items: center; justify-content: center; z-index: 150; will-change: top, opacity; }
.arrow-svg { width: 85%; height: 85%; overflow: visible; filter: drop-shadow(0 0 8px rgba(0,0,0,0.6)); position:relative; z-index:2; opacity: var(--note-op); transform: scale(var(--note-scale)); transition: filter 0.1s; }
.arrow-path { stroke: white; stroke-width: 5; fill-opacity: 1; paint-order: stroke; }
.sustain-trail { position: absolute; width: 45%; opacity: 0.8; z-index: 1; background: currentColor; box-shadow: 0 0 25px currentColor; border-radius: 6px; left: 50%; transform: translateX(-50%); }
.hold-down .sustain-trail { bottom: 50%; transform-origin: bottom center; }
.hold-up .sustain-trail { top: 50%; transform-origin: top center; }

.receptor { z-index: 200; opacity: 0.9; transform-style: preserve-3d; transform: scale(var(--note-scale)); transition: all 0.08s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.receptor.pressed { opacity: 1 !important; transform: scale(calc(var(--note-scale) * 0.85)) !important; filter: brightness(2) drop-shadow(0 0 35px var(--active-c)) !important; }
.receptor.pressed path { fill: rgba(255,255,255,0.4) !important; stroke: var(--active-c) !important; stroke-width: 6; }
.lane-flash { position: absolute; top: 0; width: var(--lane-width); height: 100%; background: linear-gradient(to top, var(--c), transparent); opacity: 0; pointer-events: none; transition: opacity 0.05s; z-index: 10; mix-blend-mode: screen; }
.lane-flash.active { opacity: 0.6; }

/* FIX SPLASH: Centrado perfecto con box-shadow en lugar de SVG border */
.splash-wrapper {
    position: absolute; pointer-events: none; z-index: 500;
    width: 150px; height: 150px; transform: translate(-50%, -50%);
    display: flex; justify-content: center; align-items: center;
}
.splash { 
    position: absolute; width: 140px; height: 140px; border-radius: 50%; 
    border: solid var(--c); z-index: 300; pointer-events: none; 
    animation: splashAnim 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; 
    top: 50%; left: 50%; margin-top: -70px; margin-left: -70px; 
    opacity: 0; box-shadow: 0 0 30px var(--c), inset 0 0 15px var(--c); 
}
@keyframes splashAnim { 
    0% { transform: scale(0.3); opacity: 1; border-width: 12px; } 
    100% { transform: scale(2.2); opacity: 0; border-width: 0px; } 
}

.splash-oppa { 
    position: absolute; width: 140px; height: 140px; border-radius: 50%; 
    border: solid var(--c); z-index: 800; pointer-events: none; 
    animation: splashAnim 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; 
    top: 50%; left: 50%; margin-top: -70px; margin-left: -70px;
    box-shadow: 0 0 25px var(--c); background: transparent;
}

.judge-pop { position: absolute; left: var(--judge-x); top: var(--judge-y); transform: translate(-50%, -50%) scale(var(--judge-s)); opacity: var(--judge-op); font-size: 8rem; font-weight: 900; z-index: 400; animation: fadeUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; text-shadow: 0 5px 40px rgba(0,0,0,0.8); -webkit-text-stroke: 2px rgba(255,255,255,0.3); font-family: 'Chakra Petch'; }
@keyframes fadeUp { 0% { opacity: 0; transform: translate(-50%, 20px) scale(0.8); } 30% { opacity: var(--judge-op); transform: translate(-50%, 0) scale(1.3); } 100% { opacity: 0; transform: translate(-50%, -80px) scale(1); filter: blur(3px); } }

/* === SOLUCIÓN MAESTRA PARA SCROLL EN MODALES === */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 10000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(10px); }

/* Se añadió FLEX y MAX-HEIGHT para arreglar el problema de bajar mucho */
.modal-panel { 
    background: var(--bg-panel); border: 1px solid #333; 
    padding: 40px; border-radius: 20px; width: 800px; max-width: 95%; 
    max-height: 85vh; /* ALTURA MÁXIMA FIJA */
    display: flex; flex-direction: column; /* PARA QUE LO DE ADENTRO SCROLLEE */
    box-shadow: 0 20px 80px rgba(0,0,0,1); animation: popIn 0.3s; 
    border-top: 4px solid var(--blue); 
}

/* Evitamos que el título o los botones se encojan */
.modal-panel > .m-title,
.modal-panel > button.action.secondary, 
.modal-panel > .modal-buttons-row,
.modal-panel > .ranked-toggle { 
    flex-shrink: 0; 
}
.modal-panel > button.action.secondary { margin-top: 25px; }
.m-title { font-size: 2.5rem; font-weight: 900; text-align: center; text-transform: uppercase; margin-bottom: 25px; letter-spacing: 2px; border-bottom: 2px solid #222; padding-bottom: 10px; color:white; }

/* CONTENEDORES QUE SÍ HACEN SCROLL INTERNO (Tienda, Amigos, Lobbies) */
.shop-grid, .friend-list, #lobby-list, .rank-table { 
    overflow-y: auto; 
    flex: 1; 
    min-height: 0; 
    padding-right: 10px; 
    margin-bottom: 10px;
}

/* Modal Settings Ancho (Se respeta su estructura original) */
.settings-panel { width: 1200px !important; max-width: 98vw; height: 750px; padding: 0; display: flex; flex-direction: column; overflow: hidden; background: #0a0a0e; border-radius: 20px; border: 1px solid #333; }
.settings-header { padding: 25px 40px; border-bottom: 1px solid #222; background: #07070a; display:flex; justify-content:space-between; align-items:center; }
.settings-layout { display: flex; flex: 1; overflow: hidden; }
.settings-sidebar { width: 260px; background: #08080a; border-right: 1px solid #222; display: flex; flex-direction: column; padding-top: 20px; flex-shrink: 0; }
.settings-content { flex: 1; padding: 40px; overflow-y: auto; background: var(--bg-color); position: relative; }
.settings-preview { width: 350px; background: #050505; border-left: 1px solid #222; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; box-shadow: inset 10px 0 50px rgba(0,0,0,0.8); }

.set-tab-btn { padding: 20px 30px; border: none; background: transparent; color: #666; text-align: left; font-weight: 900; cursor: pointer; transition: 0.3s; font-size: 1.1rem; display: flex; align-items: center; text-transform: uppercase; letter-spacing: 1px; border-left: 5px solid transparent; margin-bottom: 5px; }
.set-tab-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.set-tab-btn.active { background: rgba(0, 229, 255, 0.1); color: white; border-left-color: var(--blue); text-shadow: 0 0 15px rgba(0,229,255,0.5); }

.set-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid #222; margin-bottom: 5px; min-height: 60px; transition: 0.3s; }
.set-row:hover { background: rgba(255,255,255,0.02); padding: 18px 15px; border-radius: 12px; }
.set-label { font-weight: 800; font-size: 1.1rem; color: #ddd; font-family: 'Nunito'; }

.preview-box { width: 240px; height: 360px; border: 2px solid #333; border-radius: 20px; position: relative; background: linear-gradient(to bottom, #111, #000); overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 40px rgba(0,0,0,0.7); }
.preview-note { width: 100px; height: 100px; position: relative; animation: floatNote 2s infinite ease-in-out; }
.preview-title { font-size: 1.4rem; font-weight: 900; margin-bottom: 25px; color: var(--blue); text-transform: uppercase; letter-spacing: 4px; }

.toggle-switch { width: 70px; height: 34px; border-radius: 17px; border: none; font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.3s; font-family: 'Chakra Petch'; font-size: 0.9rem; position: relative; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); }
.toggle-switch.on { background: var(--good); color: black; box-shadow: 0 0 15px rgba(18, 250, 5, 0.4); }
.toggle-switch.off { background: #222; color: #666; border: 1px solid #444; }
input[type="range"] { accent-color: white; width: 220px; cursor: pointer; height: 6px; border-radius: 3px; background: #333; appearance: none; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; background: var(--blue); border-radius: 50%; cursor: pointer; box-shadow: 0 0 15px var(--blue); transition: 0.2s; }
.num-input { background: #111; border: 1px solid #444; color: white; width: 70px; padding: 8px; text-align: center; font-weight: bold; border-radius: 8px; font-size: 1rem; }

/* === FIX: EL REGRESO DE LOS CUADROS NEÓN DE DIFICULTAD (4K, 6K...) === */
.diff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; flex-shrink: 0; }
.diff-card { 
    background: rgba(0,0,0,0.6); 
    border: 2px solid currentColor; /* Absorben el color que les diste en el HTML */
    padding: 30px 10px; text-align: center; 
    border-radius: 16px; cursor: pointer; transition: 0.3s; 
    position: relative; overflow: hidden; 
    box-shadow: inset 0 0 20px currentColor, 0 5px 15px rgba(0,0,0,0.5);
    color: inherit; /* Heredan el color */
}
.diff-card:hover { transform: translateY(-8px) scale(1.05); background: rgba(255,255,255,0.1); box-shadow: 0 10px 40px currentColor; }
.diff-num { font-size: 5rem; font-weight: 900; line-height: 1; z-index: 2; position: relative; text-shadow: 0 0 15px currentColor; transition: 0.3s; }
.diff-label { font-size: 1.2rem; font-weight: 900; margin-top: 10px; letter-spacing: 2px; z-index: 2; position: relative; transition: 0.3s; }
.diff-bg-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-20deg); font-size: 8rem; opacity: 0.1; font-weight: 900; z-index: 1; pointer-events: none; }

.song-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 30px; padding: 50px; overflow-y: auto; }
.beatmap-card { background: #121216; height: 230px; border-radius: 18px; overflow: hidden; position: relative; cursor: pointer; border: 1px solid #2a2a35; transition: 0.3s; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.beatmap-card:hover { transform: translateY(-8px) scale(1.02); border-color: var(--blue); box-shadow: 0 15px 40px rgba(0, 229, 255, 0.3); z-index: 10; }
.bc-bg { width: 100%; height: 100%; background-size: cover; background-position: center; transition: 0.4s; filter: brightness(0.5); }
.beatmap-card:hover .bc-bg { transform: scale(1.1); filter: brightness(0.9); }
.bc-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 25px 20px 20px; background: linear-gradient(to top, rgba(0,0,0,0.95) 20%, transparent); pointer-events: none; }
.bc-title { font-weight: 900; font-size: 1.8rem; text-shadow: 0 2px 10px black; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-meta { font-size: 0.95rem; color: #ccc; margin-top: 5px; font-weight: bold; }
.card-badges { display: flex; gap: 5px; margin-top: 10px; }
.key-badge { background: rgba(0,0,0,0.8); border: 1px solid #444; border-radius: 6px; padding: 3px 8px; font-size: 0.75rem; font-weight: 900; color: #888; }
.key-badge.active { border-color: var(--blue); color: var(--blue); background: rgba(0, 229, 255, 0.1); box-shadow: 0 0 10px rgba(0,229,255,0.3); }

/* === CHAT Y LOBBY === */
#chat-overlay-container { position: fixed; bottom: 0; right: 20px; z-index: 10000; display: flex; gap: 10px; align-items: flex-end; pointer-events: none; }
.chat-window { width: 320px; background: rgba(15,15,20,0.95); border: 1px solid #333; border-radius: 12px 12px 0 0; display: flex; flex-direction: column; pointer-events: auto; box-shadow: 0 0 40px rgba(0,0,0,0.8); transition: 0.3s; backdrop-filter: blur(10px); }
.chat-window.minimized { height: 50px; overflow: hidden; }
.cw-header { background: #1a1a24; padding: 15px; cursor: pointer; border-bottom: 1px solid #333; font-weight: 900; display: flex; justify-content: space-between; align-items: center; color: var(--blue); }
.cw-body { height: 300px; overflow-y: auto; padding: 15px; font-size: 0.95rem; background: #050508; }
.cw-input-area { display: flex; border-top: 1px solid #333; }
.cw-input { flex: 1; background: #111; border: none; padding: 15px; color: white; font-family: 'Nunito'; font-size: 1rem; outline: none; }
.cw-msg { margin-bottom: 8px; word-wrap: break-word; }
.cw-msg b { color: var(--accent); margin-right: 5px; }

.lobby-box { background: #111; padding: 20px; border-radius: 12px; border: 1px solid #333; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; transition: 0.2s; cursor: pointer; flex-shrink:0; }
.lobby-box:hover { border-color: var(--blue); transform: translateX(5px); background: #1a1a24; }
.multi-p-card { text-align: center; background: rgba(0,0,0,0.8); padding: 15px; border-radius: 12px; border: 1px solid #444; min-width: 140px; }
.multi-p-card.is-me { border-color: var(--blue); box-shadow: 0 0 15px rgba(0,229,255,0.2); }
.multi-p-name { font-weight: 900; font-size: 1.1rem; color: white; margin-bottom: 5px; }
.multi-p-score { font-size: 1.8rem; font-weight: 900; line-height: 1; color: var(--blue); }

/* === TIENDA MEJORADA (SCROLL ARREGLADO) === */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; padding: 5px; }
.shop-item { background: #111; border: 1px solid #333; border-radius: 16px; padding: 20px; text-align: center; transition: 0.3s; display: flex; flex-direction: column; align-items: center; position: relative; }
.shop-item:hover { transform: translateY(-5px); border-color: var(--gold); background: #161616; box-shadow: 0 10px 25px rgba(255, 215, 0, 0.15); }
.shop-preview-box { width: 70px; height: 70px; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, #222, transparent 70%); border-radius: 50%; border: 1px solid #333; }
.shop-name { font-weight: 900; font-size: 1.1rem; color: white; margin-bottom: 5px; }
.shop-desc { font-size: 0.85rem; color: #aaa; margin-bottom: 10px; height: 35px; overflow: hidden; line-height: 1.2; }
.shop-price { font-weight: 900; color: var(--gold); margin-top: auto; padding-top: 10px; font-size: 1.1rem; }
.shop-item .btn-add { width: 100%; margin-top: 15px; padding: 12px; }

.tag-fix { background: #222; color: #aaa; border: 1px solid #444; font-size: 0.7rem; padding: 3px 6px; border-radius: 4px; font-weight: bold; }
.tag-cust { background: rgba(0,229,255,0.1); color: var(--blue); border: 1px solid var(--blue); font-size: 0.7rem; padding: 3px 6px; border-radius: 4px; font-weight: bold; }
.tag-ui { background: rgba(255, 0, 85, 0.1); color: var(--accent); border: 1px solid var(--accent); font-size: 0.7rem; padding: 3px 6px; border-radius: 4px; font-weight: bold; }

/* === PERFIL, AMIGOS Y RESULTADOS === */
.xp-container { width: 100%; background: #000; height: 12px; border-radius: 6px; margin-top: 10px; overflow: hidden; border: 1px solid #333; position:relative; }
.xp-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--accent)); width: 0%; transition: width 0.5s; box-shadow: 0 0 10px var(--blue); }
.xp-text { font-size: 0.85rem; color: #888; text-align: right; margin-top: 5px; font-weight: bold; font-family:'Nunito'; }

.login-box { width: 500px; text-align: center; border: 1px solid #333; padding: 40px; margin: auto; }
.prof-av-big { display:block; width: 150px; height: 150px; border-radius: 20px; border: 4px solid var(--blue); margin: 0 auto 25px; background: #222; background-size: cover; box-shadow: 0 0 40px rgba(0,229,255,0.3); cursor: pointer; position: relative; overflow: hidden; transition: 0.3s; }
.prof-av-big:hover { transform: scale(1.05); }
.prof-av-big:hover::after { content:'CAMBIAR'; position:absolute; bottom:0; left:0; width:100%; height:40px; background:rgba(255,255,255,0.9); color:black; font-weight:900; display:flex; align-items:center; justify-content:center; font-size:0.9rem; }
.log-inp { width: 100%; background: #0a0a0e; border: 1px solid #333; padding: 18px; border-radius: 12px; color: white; font-weight: bold; margin-bottom: 15px; text-align: center; font-size: 1.2rem; transition: 0.3s; }
.log-inp:focus { border-color: var(--blue); }

.friend-row { display: flex; justify-content: space-between; align-items: center; padding: 15px; background: #111; margin-bottom: 10px; border-radius: 12px; border: 1px solid #333; transition:0.3s; cursor:pointer; flex-shrink: 0; }
.friend-row:hover { background: #1a1a24; border-color:var(--blue); transform: translateX(5px); }
.friend-row-name { color:white; font-weight:bold; flex:1; margin-left:15px; font-size: 1.1rem; }
.f-row-av { width:45px; height:45px; border-radius:10px; background-size:cover; background-position: center; background-color:#333; border:1px solid #555; }

/* FIX MENÚ DE PAUSA (CRISTAL PREMIUM) */
#modal-pause .modal-panel { background: rgba(10,10,15,0.95); border-top: 4px solid var(--blue); }
#modal-pause div[style*="grid"] { background: rgba(0,0,0,0.5); padding: 25px; border-radius: 16px; border: 1px solid #222; gap: 20px !important; }
#modal-pause div[style*="color:var"] { background: rgba(255,255,255,0.03); padding: 15px; border-radius: 10px; font-weight: 900; border: 1px solid currentColor; box-shadow: inset 0 0 15px rgba(0,0,0,0.5); }

/* RANKING TABLA ORIGINAL RESTAURADA */
.rank-table { display: block; width: 100%; border-collapse: separate; border-spacing: 0 10px; margin-top: 15px; font-size: 1.1rem; }
.rank-table th { text-align: left; padding: 12px; border-bottom: 2px solid var(--accent); color: var(--blue); }
.rank-table td { padding: 15px; background: rgba(0,0,0,0.6); font-weight: bold; vertical-align: middle; border-top: 1px solid #333; border-bottom: 1px solid #333; }
.rank-table td:first-child { border-left: 1px solid #333; border-radius: 10px 0 0 10px; }
.rank-table td:last-child { border-right: 1px solid #333; border-radius: 0 10px 10px 0; }
.rank-row-me td { background: rgba(255, 0, 85, 0.15); border-color: var(--accent); }
.rank-av { width:40px; height:40px; border-radius:10px; background-size:cover; background-color:#222; border:2px solid var(--blue); display:inline-block; margin-right:12px; vertical-align:middle; }

.res-rank { font-size: 14rem; font-weight: 900; line-height: 1; margin: 20px 0; text-shadow: 0 0 80px currentColor; animation: popIn 0.5s ease-out; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; flex-shrink: 0; }
.res-card { background: #111; border: 1px solid #333; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; align-items: center; position: relative; }
.modal-buttons-row { display: flex; flex-direction: column; gap: 15px; margin-top: 30px; width: 100%; }
.modal-buttons-row button { width: 100%; padding: 18px; font-size: 1.2rem; margin: 0; justify-content: center; }

.kb-tabs { display: flex; gap: 15px; margin-bottom: 30px; justify-content: center; flex-shrink: 0;}
.kb-tab { padding: 12px 25px; background: #111; border: 1px solid #333; border-radius: 10px; cursor: pointer; font-weight: 900; color: #666; transition: 0.3s; min-width: 80px; text-align: center; }
.kb-tab.active { background: var(--blue); color: black; border-color: var(--blue); box-shadow: 0 0 20px rgba(0,229,255,0.4); transform: scale(1.05); }
.lane-cfg-box { background: #0a0a0e; padding: 40px 20px; border-radius: 20px; border: 1px solid #222; text-align: center; box-shadow: inset 0 0 50px black; }
.lanes-view { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.l-col { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.key-bind { width: 70px; height: 70px; background: #111; border: 2px solid #333; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.8rem; cursor: pointer; transition: 0.3s; }
.key-bind.listening { border-color: var(--accent); color: var(--accent); animation: pulseBtn 1s infinite; }
.shape-indicator { width: 55px; height: 55px; display:flex; align-items:center; justify-content:center; cursor: pointer; transition: 0.3s; border: 1px solid transparent; border-radius: 10px; }
.shape-indicator:hover { border-color: white; transform: scale(1.1); background: rgba(255,255,255,0.05); }
.shape-svg-icon { width: 100%; height: 100%; fill: #666; transition:0.3s; }
.shape-indicator:hover .shape-svg-icon { fill: white; }
.col-pk { width: 70px; height: 30px; border: 1px solid white; background: none; cursor: pointer; padding: 0; border-radius: 6px; }

.ranked-toggle { margin-top: 30px; display: flex; align-items: center; justify-content: center; gap: 15px; background: #111; padding: 20px; border-radius: 15px; border: 1px solid #333; width: fit-content; margin-left: auto; margin-right: auto; }
.ranked-toggle label { font-size: 1.2rem; font-weight: 900; cursor: pointer; }
.fp-stat-box { background:#111; padding:15px; border-radius:12px; text-align: center; font-weight: bold; color: #aaa; border: 1px solid #333; }
.fp-stat-box span { font-size: 1.4rem; color: white; display: block; margin-top: 5px; }
.fp-actions { display:flex; gap:10px; margin-top:20px; }
.fp-actions button { flex:1; padding:15px; font-size:1.1rem; }

/* === MULTIPLAYER HOST PANEL === */
.host-panel-compact { padding: 0 !important; width: 750px !important; overflow: hidden; background: #0a0a0e; border-radius: 20px; border: 1px solid #333; }
.hp-header { height: 160px; background-size: cover; background-position: center; position: relative; display: flex; align-items: flex-end; padding: 25px; border-bottom: 2px solid var(--blue); }
.hp-header::before { content:''; position:absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(to top, #0a0a0e 0%, rgba(0,0,0,0.3) 100%); z-index: 1; }
.hp-title-info { position: relative; z-index: 2; }
.hp-song-title { font-size: 2.2rem; font-weight: 900; text-shadow: 0 4px 15px black; line-height: 1.1; }
.hp-meta { color: #ddd; font-weight: bold; font-size: 1.1rem; margin-top: 5px; }
.hp-body { padding: 0; display: flex; height: 300px; background: #050508; }
.hp-config-col { width: 35%; display: flex; flex-direction: column; gap: 15px; background: #0a0a0e; padding: 25px; border-right: 1px solid #222; }
.hp-players-col { width: 65%; padding: 25px; overflow-y: auto; }
.hp-section-title { font-weight: 900; color: var(--blue); margin-bottom: 10px; text-transform: uppercase; font-size: 0.9rem; }
.hp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; }
.hp-footer { padding: 20px 25px; background: #111; border-top: 1px solid #222; display: flex; justify-content: flex-end; gap: 15px; align-items: center; }

#vs-hud { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); width: 260px; display: flex; flex-direction: column; gap: 10px; z-index: 800; pointer-events: none; }
.ml-row { position: relative; display: flex; align-items: center; background: rgba(20, 20, 25, 0.9); border: 1px solid #333; border-radius: 10px; padding: 10px; height: 60px; width: 100%; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.ml-row.is-me { border-color: var(--blue); background: rgba(0, 229, 255, 0.1); transform: scale(1.02); }
.ml-row[data-rank="1"] { border-color: var(--gold); box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
.ml-pos { font-size: 1.2rem; font-weight: 900; width: 35px; text-align: center; color: #888; margin-right: 5px; }
.ml-row[data-rank="1"] .ml-pos { color: var(--gold); text-shadow: 0 0 10px var(--gold); }
.ml-av { width: 35px; height: 35px; background-size: cover; background-position: center; border-radius: 8px; margin-right: 10px; background-color: #222; border: 1px solid #444; }
.ml-info { flex: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.ml-name { font-size: 0.9rem; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #ddd; }
.ml-score { font-size: 1.1rem; font-weight: 900; color: white; }

/* === EFECTOS DE CÁMARA MANTENIDOS INTACTOS === */
.bg-bump-1 { transform: translateZ(0) scale(1.15) translate(-15px, 10px) rotate(-1.5deg) !important; filter: brightness(0.6) contrast(1.2) !important; }
.bg-bump-2 { transform: translateZ(0) scale(1.15) translate(15px, -10px) rotate(1.5deg) !important; filter: brightness(0.6) contrast(1.2) !important; }
.bg-bump-3 { transform: translateZ(0) scale(1.2) translateY(15px) !important; filter: brightness(0.7) saturate(1.5) !important; }

#subtitles-container { position: absolute; bottom: 15%; width: 100%; text-align: center; z-index: 450; pointer-events: none; display: none; perspective: 800px; }
#subtitles-text { font-size: 3.5rem; font-weight: 900; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5); background: linear-gradient(to right, #ffffff, var(--blue), var(--accent)); -webkit-background-clip: text; background-clip: text; display: inline-block; padding: 10px 40px; filter: drop-shadow(0px 10px 20px rgba(0,0,0,0.8)); text-transform: uppercase; }
@keyframes subPop { 0% { transform: rotateX(40deg) translateY(20px) scale(0.9); opacity: 0; filter: blur(5px); } 40% { transform: rotateX(-5deg) translateY(-5px) scale(1.05); opacity: 1; filter: blur(0px); } 100% { transform: rotateX(0deg) translateY(0) scale(1); opacity: 1; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.8)); } }
.rotating-note .arrow-svg { animation: spinNote 1s linear infinite; }
@keyframes spinNote { 100% { transform: scale(var(--note-scale)) rotate(360deg); } }

/* ==========================================================================
   🛠️ FIX DE UPLOADCARE (SOLUCIÓN AL ERROR DE SUBIDA EN PC Y CELULAR)
   ========================================================================== */

/* 1. Obligamos a la ventana de la nube a irse hasta el frente absoluto */
.uploadcare--dialog, 
.uploadcare--widget, 
.uploadcare--panel {
    z-index: 9999999 !important; 
    position: fixed !important;
}

/* 2. Anulamos los efectos de cristal o animaciones que rompían su contenedor */
.uploadcare--dialog__container {
    transform: none !important;
    filter: none !important;
    backdrop-filter: none !important;
}

/* 3. Evitamos que el modo de celular aplaste la ventana de subida */
@media (max-width: 800px) {
    .uploadcare--dialog {
        width: 100vw !important;
        height: 100vh !important;
        max-height: none !important;
        top: 0 !important;
        left: 0 !important;
    }
}
/* ==========================================================================
   📱 PORT MÓVIL DEFINITIVO (COPIA SOLO ESTO AL FINAL DE TU STYLE.CSS)
   ========================================================================== */

/* FIX UPLOADCARE (Asegura que funcione subir canciones) */
.uploadcare--dialog { z-index: 9999999 !important; position: fixed !important; }
.uploadcare--dialog__container { transform: none !important; filter: none !important; backdrop-filter: none !important; }

/* FIX SUBTÍTULOS (Para que salgan por detrás de las notas) */
#subtitles-container { z-index: 40 !important; }
/* Modifica esto en tu style.css */
@media (max-width: 800px) {
    .song-card, .beatmap-card {
        width: 100% !important; /* Asegura que no se salgan de la pantalla */
        height: auto !important;
        min-height: 120px;
    }
    .settings-panel {
        width: 98vw !important;
        height: 90vh !important;
    }
    /* El editor debe rotar o compactarse */
    #editor-layer {
        flex-direction: column !important;
    }
}

@media (max-width: 800px) {
    /* 1. SCROLL DESBLOQUEADO Y ESTRUCTURA SANA */
    html, body { height: auto !important; overflow: auto !important; overflow-x: hidden !important; }
    #menu-container { flex-direction: column; display: flex; position: relative; height: auto; overflow: visible; }
    
    /* 2. MENÚ LATERAL Y PERFIL */
    .sidebar { width: 100%; height: auto; position: relative; padding: 15px; border-right: none; border-bottom: 2px solid var(--accent); flex-shrink: 0; z-index: 10; background: rgba(10,10,15,0.98); }
    .user-card { margin-bottom: 10px; width: 100%; position: relative !important; transform: none !important; right: auto; bottom: auto; }
    .top-bar .user-card { display: none; } 
    
    .nav-section { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
    .nav-btn { padding: 10px 5px; font-size: 0.8rem; flex-direction: column; gap: 4px; border-radius: 8px; justify-content: center; text-align: center; }
    .nav-btn.active { border-left: none; border-bottom: 3px solid var(--blue); }
    .import-btn { padding: 12px; font-size: 0.95rem; margin-top: 10px; }
    
    /* 3. LISTA DE CANCIONES Y BUSCADOR */
    .content-area { width: 100%; margin-left: 0; display: flex; flex-direction: column; overflow: visible; height: auto; }
    .top-bar { height: auto; padding: 15px; flex-direction: column; align-items: stretch; gap: 10px; }
    .search-inp { width: 100%; font-size: 1rem; padding: 12px; margin: 0; }
    
    .song-grid { grid-template-columns: 1fr; padding: 15px; gap: 15px; overflow: visible; }
    .beatmap-card { height: 150px; }
    
    /* 4. MODALES, TIENDA Y CONFIGURACIONES (Ajustados con scroll) */
    .modal-panel, .settings-panel, .host-panel-compact { 
        width: 95% !important; max-width: 95% !important; 
        height: auto !important; max-height: 85vh !important; 
        padding: 15px !important; display: block !important; 
        overflow-y: auto !important; border-radius: 15px; 
    }
    
    .m-title { font-size: 1.3rem !important; margin-bottom: 10px !important; text-align: center; }
    
    /* Dificultades (Fix botones cortados 4K/6K) */
    .diff-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
    #diff-song-cover { height: 120px !important; min-height: 120px !important; border-radius: 10px; margin-bottom: 10px; }
    .diff-num { font-size: 2.5rem; }
    .diff-card { padding: 15px 5px; }
    
    /* Ajustes (Scroll de lado a lado en pestañas) */
    .settings-layout { display: flex; flex-direction: column; }
    .settings-sidebar { width: 100% !important; display: flex; flex-direction: row; overflow-x: auto; border-right: none !important; border-bottom: 1px solid #333 !important; padding-bottom: 8px !important; margin-bottom: 10px; flex-shrink: 0; }
    .set-tab-btn { padding: 8px 12px !important; font-size: 0.85rem !important; white-space: nowrap; border-left: none !important; border-bottom: 2px solid transparent; }
    .set-tab-btn.active { border-bottom: 2px solid var(--blue); }
    .settings-content { padding: 0 !important; overflow: visible !important; }
    .settings-preview { display: none !important; }
    
    /* Tienda Compacta */
    .shop-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 5px; }
    .shop-item { padding: 10px; border-radius: 10px; }
    .shop-preview-box { width: 40px; height: 40px; margin-bottom: 5px; }
    .shop-name { font-size: 0.8rem; margin-bottom: 4px; }
    .shop-desc { font-size: 0.7rem; height: 28px; line-height: 1.1; margin-bottom: 5px; }
    
    /* Botones de Pausa y Resultados */
    .modal-buttons-row { display: flex; flex-direction: column; margin-top: 15px; }
    .modal-buttons-row button { width: 100%; margin: 5px 0; padding: 12px; font-size: 1rem; }
    
    /* 5. GAMEPLAY MÓVIL */
    #ig-profile { display: none !important; } 
    
    /* Stats más pequeñas para no tapar notas */
    .stats-col { transform: scale(0.65); transform-origin: top left; margin-top: -10px; gap: 4px; }
    .hud-extra { transform: scale(0.65); transform-origin: bottom right; bottom: 5px; right: 5px; }
    
    #mobile-pause-btn { display: flex !important; top: 10px; right: 10px; width: 40px; height: 40px; font-size: 1.2rem; }
    
    #track { width: 90%; max-width: 100%; border: none; }
    #track.middle-scroll { max-width: 90%; }
    
    #hud { top: 10px; left: 10px; right: 10px; width: auto; flex-direction: row; justify-content: space-between; align-items: flex-start; z-index: 600; }
    .score-val { font-size: 1.5rem; order: 2; text-shadow: 0 2px 5px black; }
    .acc-val { font-size: 1.2rem; order: 1; }
    
    #combo-container { top: 30%; right: 50%; transform: translateX(50%); opacity: 0.3; z-index: 50; pointer-events: none; }
    .combo-val { font-size: 4.5rem; }
    
    .health-bar { position: fixed; right: 0; left: auto; top: 0; width: 5px; height: 100vh; z-index: 800; background: rgba(0,0,0,0.5); border: none; }
    .judge-pop { font-size: 3.5rem; top: 40%; }
}

/* FIX INFALIBLE PARA UPLOADCARE */
.uploadcare--dialog { 
    z-index: 9999999 !important; 
    position: fixed !important; 
}
.uploadcare--dialog__container { 
    transform: none !important; 
    filter: none !important; 
    backdrop-filter: none !important; 
}

/* === FONDO DE PARTIDA (CON EFECTOS Y SUBTÍTULOS) === */
#game-bg-container {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    z-index: 10; /* Detrás de la pista de notas (z-index 100), pero visible */
    pointer-events: none;
    overflow: hidden;
}

#game-bg-img {
    width: 100%; 
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.3; /* Transparencia para que no distraiga de las notas */
    filter: blur(4px) brightness(0.6); /* Desenfoque estilo profesional */
    transform: scale(1.05); /* Escalado extra para que no se vean bordes negros si la cámara tiembla */
    transition: transform 0.1s ease-out, filter 0.1s ease-out;
}

/* === ESTILOS DEL BUSCADOR UNIFICADO Y OSU === */
.filter-btn {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.filter-btn:hover { background: rgba(255,255,255,0.1); }
.filter-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}
.filter-btn[data-val="osu"].active {
    background: #ff66aa;
    color: #fff;
    border-color: #ff66aa;
}

/* Aura Rosa para tarjetas Osu */
.song-card.osu-card {
    border-color: #ff66aa;
    box-shadow: 0 0 15px rgba(255, 102, 170, 0.2);
}
.song-card.osu-card:hover {
    box-shadow: 0 0 25px rgba(255, 102, 170, 0.6);
    transform: translateY(-5px) scale(1.02);
}

/* Insignia especial de Osu */
.diff-badge.osu-badge {
    border-color: #ff66aa !important;
    color: #ff66aa !important;
    box-shadow: 0 0 8px rgba(255,102,170,0.4);
    background: rgba(255,102,170,0.1);
}

/* === ESTILO UNIFICADO PARA CARTAS OSU! === */
.song-card.osu-card-style {
    border: 2px solid rgba(255, 102, 170, 0.4);
    box-shadow: 0 0 15px rgba(255, 102, 170, 0.15);
}
.song-card.osu-card-style:hover {
    border-color: #ff66aa;
    box-shadow: 0 0 25px rgba(255, 102, 170, 0.6);
    transform: translateY(-5px) scale(1.02);
}
.diff-badge.badge-osu {
    border-color: #ff66aa !important;
    color: #ff66aa !important;
    background: rgba(255,102,170,0.1);
    box-shadow: 0 0 8px rgba(255,102,170,0.4);
}

/* === EDITOR STUDIO === */
.ed-lane {
    position: absolute;
    top: 0;
    height: 100%;
    border-right: 1px dashed #333;
    pointer-events: none;
}
.ed-note {
    position: absolute;
    height: 20px;
    background: #00FFFF;
    border: 2px solid white;
    border-radius: 4px;
    box-shadow: 0 0 10px #00FFFF;
    cursor: pointer;
    z-index: 50;
    transform: translateY(-50%); /* Centra la nota en el clic */
    transition: transform 0.1s;
}
.ed-note:hover {
    transform: translateY(-50%) scale(1.1);
    background: #ff66aa;
    box-shadow: 0 0 15px #ff66aa;
}

/* === ADAPTACIÓN MÓVIL PARA EL SÚPER PERFIL Y MENÚS === */
@media (max-width: 768px) {
    /* Los modales ya no tendrán ancho fijo, usarán el 95% de la pantalla */
    .modal-panel {
        width: 95% !important;
        max-width: 100% !important;
        padding: 15px !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Acomodar el Avatar y el Nombre al centro */
    .profile-header-flex {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }
    .profile-header-flex > div {
        text-align: center !important;
        padding-bottom: 0 !important;
    }
    #p-av-big {
        width: 110px !important;
        height: 110px !important;
        margin: -50px auto 15px auto !important; /* Centrado y superpuesto al banner */
    }
    #p-name {
        font-size: 2.2rem !important;
    }

    /* La cuadrícula de 4 stats pasa a ser de 2 en 2 para que quepan */
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Las tarjetas de Skins y Marcos se apilan una debajo de otra */
    .profile-equip-flex {
        flex-direction: column !important;
    }
    
    /* Textos más legibles en tarjetas de ranking/amigos */
    .rank-card-text { font-size: 1rem !important; }
}

/* === ESTILOS PARA ESTADO ONLINE === */
.status-dot {
    width: 14px; height: 14px; border-radius: 50%; display: inline-block;
    border: 2px solid #111; margin-right: 8px; vertical-align: middle;
}
.status-online { background-color: var(--good); box-shadow: 0 0 10px var(--good); }
.status-offline { background-color: #555; }

/* === ARREGLOS MÓVILES DEFINITIVOS === */
@media (max-width: 800px) {
    /* Forzar que las tarjetas de Osu y Ajustes no se salgan de la pantalla */
    .song-card, .beatmap-card { width: 100% !important; height: auto !important; min-height: 140px; }
    .settings-panel { width: 95vw !important; height: 85vh !important; }
    
    /* Reparación del Editor Studio para Celular */
    #editor-layer { flex-direction: column !important; }
    #editor-layer > div:nth-child(2) { flex-direction: column !important; overflow-y: auto; }
    #editor-layer .width-250px { width: 100% !important; padding: 15px !important; border-right: none !important; border-bottom: 2px solid #333; }
    #ed-scroll-area { min-height: 400px; width: 100%; overflow-x: auto; }
    #ed-grid, #ed-playhead { width: 100% !important; min-width: 320px; }
    
    /* El Ranking también debe encogerse */
    .rank-table td, .rank-table th { padding: 10px 5px !important; font-size: 0.9rem; }
    .ml-info .ml-name { font-size: 0.8rem; }
}

/* Brillo animado para el mejor jugador del mundo */
.top1-glow {
    animation: gold-pulse 2s infinite alternate;
    box-shadow: 0 0 10px #FFD700;
}

@keyframes gold-pulse {
    from { box-shadow: 0 0 10px #FFD700; border-color: #FFD700; }
    to { box-shadow: 0 0 30px #FFD700, 0 0 50px #FFA500; border-color: #FFF; }
}

#top-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px; /* Delgadita para no estorbar */
    background: rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

#top-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff66aa, #00ffff);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    transition: width 0.1s linear; /* Movimiento suave */
}

#top-progress-time {
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 14px;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,1);
    z-index: 1000;
}
/* =========================================
   EFECTOS ÉPICOS PERFIL TOP 1-3
========================================= */
@keyframes floatBadge {
    0% { transform: translateY(0px) rotate(-15deg) scale(1); }
    50% { transform: translateY(-10px) rotate(-10deg) scale(1.1); }
    100% { transform: translateY(0px) rotate(-15deg) scale(1); }
}

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

/* Clases dinámicas inyectadas por JS */
.epic-top-1 #p-header-bg { border-bottom: 4px solid #FFD700; box-shadow: 0 15px 50px rgba(255, 215, 0, 0.4); }
.epic-top-1 #p-name { 
    background: linear-gradient(90deg, #FFF, #FFD700, #FFA500, #FFD700, #FFF); 
    background-size: 200% auto;
    -webkit-background-clip: text; 
    color: transparent !important; 
    animation: textShine 3s linear infinite; 
}
.epic-top-1 #p-top-badge { color: #FFD700; filter: drop-shadow(0 0 20px rgba(255,215,0,0.8)); }

.epic-top-2 #p-header-bg { border-bottom: 4px solid #C0C0C0; box-shadow: 0 15px 40px rgba(192, 192, 192, 0.3); }
.epic-top-2 #p-name { color: #E0E0E0 !important; text-shadow: 0 0 15px rgba(192,192,192,0.6); }
.epic-top-2 #p-top-badge { color: #C0C0C0; filter: drop-shadow(0 0 15px rgba(192,192,192,0.8)); }

.epic-top-3 #p-header-bg { border-bottom: 4px solid #CD7F32; box-shadow: 0 15px 30px rgba(205, 127, 50, 0.3); }
.epic-top-3 #p-name { color: #CD7F32 !important; text-shadow: 0 0 15px rgba(205,127,50,0.6); }
.epic-top-3 #p-top-badge { color: #CD7F32; filter: drop-shadow(0 0 15px rgba(205,127,50,0.8)); }

/* =========================================
   DISEÑO COMPETITIVO (LOBBIES)
========================================= */
.comp-lobby-card {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.comp-lobby-card::before {
    content: ''; position: absolute; left: 0; top: 0; width: 5px; height: 100%;
    background: var(--accent); box-shadow: 0 0 15px var(--accent);
}
.comp-lobby-card:hover {
    transform: translateX(10px) scale(1.02);
    border-color: var(--accent);
    box-shadow: -5px 10px 30px rgba(255, 102, 170, 0.2);
}

/* =========================================
   ANIMACIONES ÉPICAS DEL PERFIL
========================================= */
/* Entrada del modal dando un salto 3D */
@keyframes epicModalEnter {
    0% { transform: scale(0.7) translateY(100px) rotateX(15deg); opacity: 0; }
    60% { transform: scale(1.02) translateY(-10px) rotateX(-2deg); opacity: 1; filter: drop-shadow(0 20px 30px rgba(0,0,0,0.8)); }
    100% { transform: scale(1) translateY(0) rotateX(0deg); }
}

/* Latido brillante de la medalla Top */
@keyframes pulseBadge {
    0% { transform: scale(1) rotate(-8deg); }
    50% { transform: scale(1.15) rotate(-4deg); filter: brightness(1.3); }
    100% { transform: scale(1) rotate(-8deg); }
}

/* Aplicar la entrada a todos los perfiles */
#modal-profile .modal-panel {
    animation: epicModalEnter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    transform-style: preserve-3d;
}

/* Base de la Medalla de Rango */
#p-top-badge {
    animation: pulseBadge 2s infinite alternate ease-in-out;
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    border-radius: 12px;
    font-family: 'Impact', sans-serif;
    letter-spacing: 1px;
}

/* 👑 TOP 1 - EL REY ABSOLUTO */
.epic-top-1 #p-top-badge {
    background: linear-gradient(135deg, #FFDF00, #D4AF37, #FFF, #FFDF00);
    background-size: 200% auto;
    border: 3px solid #FFF;
    box-shadow: 0 0 40px #FFDF00, inset 0 0 15px rgba(255,255,255,0.8);
    color: #000;
}
.epic-top-1 #p-av-big { box-shadow: 0 0 50px #FFD700, inset 0 0 20px #FFD700 !important; border-color: #FFD700 !important; }

/* 🥈 TOP 2 - LA PLATA */
.epic-top-2 #p-top-badge {
    background: linear-gradient(135deg, #E0E0E0, #9E9E9E, #FFF);
    border: 3px solid #FFF;
    box-shadow: 0 0 30px #C0C0C0, inset 0 0 15px rgba(255,255,255,0.8);
    color: #000;
}

/* 🥉 TOP 3 - EL BRONCE */
.epic-top-3 #p-top-badge {
    background: linear-gradient(135deg, #CD7F32, #8B4513, #CD7F32);
    border: 3px solid #FFD700;
    box-shadow: 0 0 25px #CD7F32, inset 0 0 10px rgba(255,255,255,0.5);
    color: #FFF;
}


/* =========================================
   SISTEMA DE TAGS (TÍTULOS)
========================================= */
.player-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    vertical-align: middle;
    margin-left: 15px;
    transform: skewX(-10deg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Tags de Ranking (No se compran, se ganan) */
.tag-top1 { background: linear-gradient(90deg, #FFDF00, #D4AF37); color: black; border: 2px solid #FFF; animation: pulseBadge 2s infinite; }
.tag-top2 { background: linear-gradient(90deg, #E0E0E0, #9E9E9E); color: black; border: 2px solid #FFF; }
.tag-top3 { background: linear-gradient(90deg, #CD7F32, #8B4513); color: white; border: 2px solid #FFD700; }

/* Tags de la Tienda (16 Épicos) */
.tag-demon { background: #000; color: #ff0000; border: 1px solid #ff0000; box-shadow: 0 0 10px #ff0000; }
.tag-godhand { background: linear-gradient(90deg, #00ffff, #ffffff); color: #000; font-style: italic; }
.tag-cyberpunk { background: #fcee0a; color: #00f0ff; border: 2px solid #ff003c; border-radius: 0; transform: skewX(0); }
.tag-rhythm { background: linear-gradient(45deg, #ff66aa, #aa66ff); color: white; }
.tag-hacker { background: #000; color: #0f0; font-family: monospace; border: 1px dashed #0f0; }
.tag-legend { background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c); color: black; }
.tag-ghost { background: transparent; color: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.3); text-shadow: 0 0 5px white; }
.tag-toxic { background: #9400D3; color: #32CD32; border: 2px solid #32CD32; }
.tag-ninja { background: #111; color: #fff; border-left: 4px solid #fff; border-right: 4px solid #fff; }
.tag-star { background: #0a0a0a; color: #FFD700; background-image: radial-gradient(#FFD700 1px, transparent 1px); background-size: 5px 5px; }
.tag-blood { background: #300; color: #f00; border-bottom: 3px solid #f00; border-radius: 0; }
.tag-ice { background: linear-gradient(to bottom, #fff, #87CEFA); color: #000; }
.tag-fire { background: linear-gradient(to top, #ff4500, #ff8c00, #ffd700); color: #000; }
.tag-void { background: #050505; color: #555; box-shadow: inset 0 0 10px #000; }
.tag-pro { background: #2196F3; color: white; border-radius: 20px; transform: skewX(0); }
.tag-vip { background: linear-gradient(90deg, #FF69B4, #FF1493); color: white; border: 2px dotted #fff; }

/* Tag Custom (Lo editará el JS dinámicamente) */
.tag-custom { border: 2px solid white; color: white; }

/* =========================================
   SISTEMA DE CLANES 🛡️
========================================= */
.clan-tag {
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--c, #fff);
    color: var(--c, #fff);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 0.9rem;
    margin-right: 10px;
    box-shadow: 0 0 8px var(--c, #fff);
    text-transform: uppercase;
    display: inline-block;
    vertical-align: middle;
}

.clan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.clan-box {
    background: linear-gradient(145deg, #111, #0a0a0a);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.clan-box::before {
    content: ''; position: absolute; left: 0; top: 0; width: 4px; height: 100%;
    background: var(--c, var(--accent)); box-shadow: 0 0 15px var(--c, var(--accent));
}

.clan-upgrade {
    background: #1a1a1a;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.clan-upgrade button { padding: 5px 10px; font-size: 0.8rem; }

/* =========================================
   PARCHE DE UI: Z-INDEX, ANIMACIONES Y SCROLLS
========================================= */
/* 1. Modales siempre por encima de la barra superior */
.modal-overlay { z-index: 99999 !important; }

/* 2. Ocultar la barra de scroll fea del menú lateral pero permitir scrollear */
.sidebar { overflow-y: auto; -ms-overflow-style: none; scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }

/* 3. Animación de la Campana de Notificaciones */
@keyframes ringBell {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50% { transform: rotate(15deg); }
    20%, 40% { transform: rotate(-15deg); }
    60% { transform: rotate(0deg); }
}
#notif-bell { 
    animation: ringBell 5s infinite; 
    transform-origin: top center; 
    display: inline-block; 
    transition: transform 0.2s;
}
#notif-bell:hover { transform: scale(1.2); }

/* 4. Reparar el Modal del Perfil (Permitir Scroll interno sin desbordar) */
#modal-profile .modal-panel { 
    max-height: 90vh !important; 
    overflow-y: auto !important; 
    overflow-x: hidden; 
    padding-bottom: 20px; 
}
#modal-profile .modal-panel::-webkit-scrollbar { width: 8px; }
#modal-profile .modal-panel::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* 5. Asegurar que la Foto de Perfil no sea cuadrada */
#p-av-big { border-radius: 20px !important; overflow: hidden; }

/* 6. Animación suave para botones */
.action, .filter-btn, .nav-btn, .clan-box { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.action:active { transform: scale(0.95); }

/* =========================================
   SISTEMA DE ADMINISTRADOR (GOD MODE) 🚨
========================================= */
/* Pantalla de Mantenimiento (Cubre todo) */
#maintenance-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 0, 0, 0.98); z-index: 9999999;
    display: none; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; backdrop-filter: blur(10px);
}
.maint-icon { font-size: 6rem; animation: pulseBadge 2s infinite; filter: drop-shadow(0 0 20px #ff003c); }
.maint-title { color: #ff003c; font-size: 4rem; font-weight: 900; margin-top: 20px; text-transform: uppercase; letter-spacing: 5px; }
.maint-desc { color: #ccc; font-size: 1.2rem; max-width: 600px; margin-top: 15px; }

/* El Modal del Admin */
.admin-panel-container { border: 2px solid #ff003c !important; box-shadow: 0 0 30px rgba(255, 0, 60, 0.4) !important; }
.admin-header { background: linear-gradient(90deg, #300, #ff003c); padding: 20px; text-align: center; border-bottom: 2px solid #ff003c; }
.admin-section { background: #111; padding: 20px; border-radius: 8px; border-left: 4px solid #ff003c; margin-bottom: 15px; }

/* Notificación Global (Anuncio del Admin) */
#global-announcement {
    position: fixed; top: -150px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(to right, #ff003c, #aa0022);
    color: white; padding: 20px 40px; border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 40px rgba(255,0,60,0.6); z-index: 999999;
    text-align: center; font-weight: bold; border: 2px solid #ffaa00; border-top: none;
    transition: top 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   PARCHE VISUAL: PAUSA, RESULTADOS Y ALERTA NEÓN
========================================= */

/* 1. Viñeta de Muerte Inminente (Pulsating Red) */
#near-death-vignette {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 700; /* Debajo de las notas, pero sobre el HUD */
    pointer-events: none; opacity: 0;
    box-shadow: inset 0 0 150px 50px #F9393F; /* Rojo agresivo */
    transition: opacity 0.3s ease;
}
#near-death-vignette.danger-active {
    animation: vignettePulse 1.5s infinite ease-in-out;
}
@keyframes vignettePulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.8; }
}

/* 2. Rediseño de Modales (Pausa y Resultados) */
.modal-overlay { z-index: 99999 !important; }

#modal-pause .modal-panel, #modal-res .modal-panel {
    width: 600px; padding: 0; background: #0a0a0a;
    border-radius: 15px; border: 2px solid var(--accent);
    box-shadow: 0 0 50px rgba(255,102,170,0.3);
    overflow: hidden;
}

/* Encabezados de Modal */
.modal-neon-header {
    background: linear-gradient(180deg, #111, #0a0a0a);
    padding: 20px 30px; border-bottom: 2px solid var(--accent);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-neon-title { margin:0; color:white; font-weight:900; font-size:1.8rem; text-shadow: 0 0 10px white; }

/* Contenido y Botones */
.modal-neon-content { padding: 30px; text-align: center; }
.modal-neon-buttons { padding: 20px 30px; background: #080808; border-top: 1px solid #222; display: flex; gap: 10px; }
.modal-neon-buttons .action { flex: 1; }

/* Estilos Específicos de Resultados */
#modal-res .modal-neon-header { border-bottom-color: var(--gold); }
#modal-res .rank-big { font-size: 6rem !important; font-weight: 900; }
#modal-res #res-score { font-size: 4rem; font-weight: 900; }
#modal-res #winner-msg { font-size: 2rem; color: #12FA05; margin-bottom: 20px; text-transform: uppercase; font-weight: 900; }
#modal-res #loser-msg { font-size: 2rem; color: #F9393F; margin-bottom: 20px; text-transform: uppercase; font-weight: 900;}

/* Cajas de Estadísticas */
.res-stats-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:10px; margin-bottom:25px; }
.res-stat-box { background:#111; padding:15px; border-radius:8px; border:1px solid #333; font-weight:bold; }

/* === DISEÑO DE TARJETAS DE CANCIONES (ULTRA-PREMIUM) === */
.song-card {
    background: #0f0f13 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    position: relative;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

/* Efecto de degradado suave para legibilidad del texto */
.song-info {
    z-index: 2;
    background: linear-gradient(0deg, 
        rgba(7, 7, 10, 1) 0%, 
        rgba(7, 7, 10, 0.8) 40%, 
        transparent 100%) !important;
    padding: 20px 15px 15px 15px !important;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

/* Brillo dinámico en hover */
.song-card:hover {
    border-color: var(--blue) !important;
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.2) !important;
}

/* Estilo para las insignias (Badges) */
.diff-badge {
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
}

/* Ajuste especial para tarjetas de Osu! */
.osu-card-style:hover {
    border-color: #ff66aa !important;
    box-shadow: 0 15px 45px rgba(255, 102, 170, 0.3) !important;
}

/* =========================================
   REWORK DEL MENÚ LATERAL (SIDEBAR PRO)
========================================= */
#sidebar {
    padding: 20px 15px; /* Más espacio interior */
    display: flex;
    flex-direction: column;
    gap: 8px; /* Espaciado uniforme entre botones */
}

/* Estilo base para los botones del menú */
.sidebar-btn, .menu-item {
    background: transparent !important; /* Quitamos el azul feo */
    border: none !important;
    color: #ccc;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Efecto Hover: Desplazamiento y resplandor lateral */
.sidebar-btn:hover, .menu-item:hover {
    color: white;
    transform: translateX(10px); /* Se mueve a la derecha suavemente */
    background: linear-gradient(90deg, rgba(255, 102, 170, 0.15), transparent) !important;
    text-shadow: 0 0 10px rgba(255, 102, 170, 0.5);
}

/* El borde de luz que aparece a la izquierda al hacer hover */
.sidebar-btn::before, .menu-item::before {
    content: ''; position: absolute; left: 0; top: 0;
    width: 4px; height: 100%;
    background: var(--accent, #ff66aa);
    transform: scaleY(0); transition: 0.3s;
    border-radius: 4px;
}
.sidebar-btn:hover::before, .menu-item:hover::before {
    transform: scaleY(1);
    box-shadow: 0 0 15px var(--accent, #ff66aa);
}

/* Estado Activo */
.sidebar-btn.active, .menu-item.active {
    color: white;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.2), transparent) !important;
}
.sidebar-btn.active::before, .menu-item.active::before {
    transform: scaleY(1);
    background: #00ffff;
    box-shadow: 0 0 15px #00ffff;
}

/* =========================================
   MEGA-PANEL DE AJUSTES
========================================= */
.settings-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    height: 600px;
    background: rgba(10, 10, 15, 0.95);
    border-radius: 15px;
    border: 1px solid #333;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.settings-tabs {
    background: #0a0a0a; border-right: 1px solid #222;
    display: flex; flex-direction: column; padding: 20px 10px; gap: 5px;
}

.set-tab-btn {
    background: none; border: none; color: #888; text-align: left;
    padding: 15px 20px; font-size: 1.1rem; font-weight: 900;
    border-radius: 10px; cursor: pointer; transition: 0.2s;
}

.set-tab-btn:hover { background: #111; color: white; }
.set-tab-btn.active { background: #ff66aa22; color: #ff66aa; border-left: 4px solid #ff66aa; }

.settings-content { padding: 30px; overflow-y: auto; }
.set-section { display: none; animation: fadeIn 0.3s forwards; }
.set-section.active { display: block; }

.set-row {
    display: flex; justify-content: space-between; align-items: center;
    background: #111; padding: 15px 20px; border-radius: 10px;
    margin-bottom: 10px; border: 1px solid #222; transition: 0.2s;
}
.set-row:hover { border-color: #444; background: #151515; }
.set-label { font-size: 1.1rem; font-weight: bold; color: white; }
.set-sub { font-size: 0.8rem; color: #888; font-weight: normal; margin-top: 5px; }

/* Controles de Input Modernos */
.set-input { background: #000; border: 1px solid #333; color: white; padding: 10px; border-radius: 8px; font-weight: bold; outline: none; transition: 0.2s; }
.set-input:focus { border-color: #00ffff; box-shadow: 0 0 10px rgba(0,255,255,0.3); }


/* =========================================
   SIDEBAR Y UI DEL CREATOR STUDIO PRO
========================================= */
#ed-grid {
    position: relative;
    background: repeating-linear-gradient(
        0deg,
        #000,
        #000 19px,
        #111 20px
    );
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.ed-lane {
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    border-right: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.01);
}

.ed-note {
    position: absolute;
    height: 10px;
    border-radius: 4px;
    box-shadow: 0 0 15px currentColor;
    border: 1px solid white;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.1s;
}

.ed-note:hover {
    transform: scale(1.1);
    filter: brightness(1.5);
}

#ed-playhead {
    pointer-events: none;
    transition: none;
}

button, a, .receptor, .song-card {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
/* Efecto de cristal para la barra lateral */
#editor-layer > div:first-child {
    backdrop-filter: blur(10px);
    background: rgba(10,10,15,0.8) !important;
}

/* ==========================================================
   DISEÑO NEÓN PARA PESTAÑAS DE LA TIENDA
   ========================================================== */
.store-tabs-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.store-tab {
    background: transparent;
    border: 2px solid #555;
    border-radius: 20px;
    padding: 8px 25px;
    font-weight: 900;
    font-family: sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.store-tab:hover {
    transform: scale(1.05);
}

/* Colores específicos por categoría */
.store-tab[onclick*="'all'"] { border-color: #ffffff; color: #ffffff; }
.store-tab[onclick*="'all'"].active { background: #ffffff; color: #000000; box-shadow: 0 0 15px rgba(255,255,255,0.6); }

.store-tab[onclick*="'skin'"] { border-color: #ff007f; color: #ff007f; }
.store-tab[onclick*="'skin'"].active { background: #ff007f; color: #ffffff; box-shadow: 0 0 15px rgba(255,0,127,0.6); }

.store-tab[onclick*="'tag'"] { border-color: #BD00FF; color: #BD00FF; }
.store-tab[onclick*="'tag'"].active { background: #BD00FF; color: #ffffff; box-shadow: 0 0 15px rgba(189,0,255,0.6); }

.store-tab[onclick*="'ui'"] { border-color: #00e5ff; color: #00e5ff; }
.store-tab[onclick*="'ui'"].active { background: #00e5ff; color: #000000; box-shadow: 0 0 15px rgba(0,229,255,0.6); }

.store-tab[onclick*="'track'"] { border-color: #FF0033; color: #FF0033; }
.store-tab[onclick*="'track'"].active { background: #FF0033; color: #ffffff; box-shadow: 0 0 15px rgba(255,0,51,0.6); }

.store-tab[onclick*="'hit_fx'"] { border-color: #FFD700; color: #FFD700; }
.store-tab[onclick*="'hit_fx'"].active { background: #FFD700; color: #000000; box-shadow: 0 0 15px rgba(255,215,0,0.6); }
