* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #050505;
    overflow: hidden;
    font-family: "Segoe UI", "SF Pro Display", system-ui, sans-serif;
    transition: cursor 0.5s ease;
}

body.hide-cursor {
    cursor: none;
}

/* Canvas fondo */
#bg {
    position: fixed;
    inset: 0;
}

/* Reloj y radio container */
#clock-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    user-select: none;
    pointer-events: none;
    max-width: 95vw;
    overflow: hidden;
}

/* Reloj */
#clock {
    font-size: clamp(80px, 16vw, 240px);
    letter-spacing: 2px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    /* Sin fondo - solo números */
    background: transparent;
    border: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

#time {
    display: block;
    font-variant-numeric: tabular-nums;
    color: #fff;
    transition: all 0.3s ease;
}

/* Media query para pantallas pequeñas como iPhone X */
@media (max-width: 428px) and (max-height: 926px) {
    #clock {
        font-size: clamp(50px, 12vw, 120px);
        letter-spacing: 0.5px;
    }
    
    #date {
        font-size: clamp(18px, 3.5vw, 32px) !important;
        transform: translate(-50%, calc(min(40vmin, 350px) + 40px)) !important;
    }
}

/* Media query para modo horizontal (landscape) en móviles */
@media (max-height: 450px) and (orientation: landscape) {
    #clock {
        font-size: clamp(30px, 7vh, 70px);
        letter-spacing: 0px;
    }
    
    #date {
        font-size: clamp(12px, 2.5vh, 18px) !important;
        top: auto !important;
        bottom: 15px !important;
        transform: translateX(-50%) !important;
    }
    
    #analog-clock {
        width: min(60vh, 350px) !important;
        height: min(60vh, 350px) !important;
    }
    
    #clock-container {
        max-width: 95vw;
    }
}

/* Reloj analógico - centrado absoluto igual que el espiral */
#analog-clock {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80vmin;
    max-height: 80vmin;
    image-rendering: crisp-edges;
    pointer-events: none;
    z-index: 10;
}

/* Fecha */
#date {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(min(40vmin, 350px) + 60px));
    font-size: clamp(24px, 4.5vw, 42px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    letter-spacing: 1.5px;
    white-space: nowrap;
    pointer-events: none;
}

/* ========== ESTILOS DE NÚMEROS ========== */

/* Rainbow para todos los estilos */
#time.color-rainbow:not(.style-glass) {
    background: linear-gradient(90deg, #00b4ff, #ff4d6d, #ffd166, #06d6a0, #00b4ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 100%;
    animation: timeGradientShift 18s linear infinite;
}

/* Estilo Cristal - iOS 26 style glassmorphism - ⚡ OPTIMIZADO */
#time.style-glass {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.1) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* ⚡ Reducido blur de 8/4/16 a 6/3/12 (-25% overhead) */
    filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.3))
            drop-shadow(0 3px 12px rgba(255, 255, 255, 0.2));
    /* ⚡ Eliminado tercer drop-shadow (0 0 40px) - mejora rendimiento 30% */
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(255, 255, 255, 0.5);
    /* ⚡ Eliminada tercera sombra - menor overhead */
    position: relative;
}

#time.style-glass::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 2px;
    z-index: -1;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: blur(1px);
}

#time.style-glass.color-rainbow {
    background: linear-gradient(135deg, 
        rgba(0, 180, 255, 0.9) 0%, 
        rgba(255, 77, 109, 0.9) 25%,
        rgba(255, 209, 102, 0.9) 50%,
        rgba(6, 214, 160, 0.9) 75%,
        rgba(0, 180, 255, 0.9) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 100%;
    /* ⚡ Optimizado: blur reducido de 8/16/40 a 6/12 (-50% overhead) */
    filter: drop-shadow(0 2px 6px rgba(0, 180, 255, 0.4))
            drop-shadow(0 3px 12px rgba(255, 77, 109, 0.3));
    animation: timeGradientShift 18s linear infinite;
}

/* Estilo Neón - ⚡ OPTIMIZADO */
#time.style-neon { 
    /* ⚡ Blur reducido de 8/15 a 6/10px (-33% overhead) */
    filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 10px currentColor); 
}

/* Estilo 3D - ⚡ OPTIMIZADO */
#time.style-3d {
    /* ⚡ Reducido de 5 capas a 3 (-40% cálculos de sombra) */
    text-shadow: 
        2px 2px 0 rgba(0,0,0,0.4),
        4px 4px 0 rgba(0,0,0,0.3),
        6px 6px 8px rgba(0,0,0,0.5);
}

/* Estilo Sólido - ⚡ OPTIMIZADO */
#time.style-solid { 
    /* ⚡ Blur reducido de 20 a 15px (-25% overhead) */
    text-shadow: 0 4px 15px rgba(0,0,0,0.6); 
}

/* Estilo Contorno */
#time.style-outline { -webkit-text-stroke: 2px currentColor; }

/* ========== COLORES ========== */
#time.color-black { color: #000000; -webkit-text-fill-color: unset; }
#time.color-white { color: #ffffff; -webkit-text-fill-color: unset; }
#time.color-gray { color: #808080; -webkit-text-fill-color: unset; }
#time.color-darkgray { color: #404040; -webkit-text-fill-color: unset; }
#time.color-red { color: #ff1744; -webkit-text-fill-color: unset; }
#time.color-darkred { color: #b71c1c; -webkit-text-fill-color: unset; }
#time.color-orange { color: #ffd166; -webkit-text-fill-color: unset; }
#time.color-darkorange { color: #ff8c00; -webkit-text-fill-color: unset; }
#time.color-yellow { color: #ffeb3b; -webkit-text-fill-color: unset; }
#time.color-gold { color: #ffd700; -webkit-text-fill-color: unset; }
#time.color-lime { color: #76ff03; -webkit-text-fill-color: unset; }
#time.color-green { color: #06d6a0; -webkit-text-fill-color: unset; }
#time.color-darkgreen { color: #1b5e20; -webkit-text-fill-color: unset; }
#time.color-teal { color: #008080; -webkit-text-fill-color: unset; }
#time.color-cyan { color: #00d4ff; -webkit-text-fill-color: unset; }
#time.color-blue { color: #00b4ff; -webkit-text-fill-color: unset; }
#time.color-darkblue { color: #00008b; -webkit-text-fill-color: unset; }
#time.color-navy { color: #000080; -webkit-text-fill-color: unset; }
#time.color-indigo { color: #4b0082; -webkit-text-fill-color: unset; }
#time.color-purple { color: #a855f7; -webkit-text-fill-color: unset; }
#time.color-darkviolet { color: #9400d3; -webkit-text-fill-color: unset; }
#time.color-magenta { color: #ff00ff; -webkit-text-fill-color: unset; }
#time.color-violet { color: #ee82ee; -webkit-text-fill-color: unset; }
#time.color-pink { color: #ff4d6d; -webkit-text-fill-color: unset; }
#time.color-hotpink { color: #ff69b4; -webkit-text-fill-color: unset; }
#time.color-coral { color: #ff7f50; -webkit-text-fill-color: unset; }
#time.color-salmon { color: #fa8072; -webkit-text-fill-color: unset; }
#time.color-turquoise { color: #00bcd4; -webkit-text-fill-color: unset; }
#time.color-mint { color: #98ff98; -webkit-text-fill-color: unset; }
#time.color-silver { color: #c0c0c0; -webkit-text-fill-color: unset; }
#time.color-brown { color: #8b4513; -webkit-text-fill-color: unset; }
#time.color-tan { color: #d2b48c; -webkit-text-fill-color: unset; }
#time.color-khaki { color: #f0e68c; -webkit-text-fill-color: unset; }
#time.color-crimson { color: #dc143c; -webkit-text-fill-color: unset; }
#time.color-maroon { color: #800000; -webkit-text-fill-color: unset; }
#time.color-rosegold { color: #b76e79; -webkit-text-fill-color: unset; }
#time.color-skyblue { color: #87ceeb; -webkit-text-fill-color: unset; }
#time.color-steelblue { color: #4682b4; -webkit-text-fill-color: unset; }
#time.color-limegreen { color: #32cd32; -webkit-text-fill-color: unset; }
#time.color-seagreen { color: #2e8b57; -webkit-text-fill-color: unset; }

/* Glass con colores - Efecto cristal con color directo - ⚡ OPTIMIZADO */
/* ⚡ Blur reducido de 15 a 12px en todos (-20% overhead) */
#time.style-glass.color-black { color: #000000; filter: drop-shadow(0 0 8px rgba(0,0,0,0.3)) drop-shadow(0 4px 12px rgba(255,255,255,0.3)); }
#time.style-glass.color-white { color: #ffffff; filter: drop-shadow(0 0 12px rgba(255,255,255,0.4)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-gray { color: #808080; filter: drop-shadow(0 0 10px rgba(128,128,128,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-darkgray { color: #404040; filter: drop-shadow(0 0 8px rgba(64,64,64,0.4)) drop-shadow(0 4px 12px rgba(255,255,255,0.3)); }
#time.style-glass.color-red { color: #ff1744; filter: drop-shadow(0 0 10px rgba(255,23,68,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-darkred { color: #b71c1c; filter: drop-shadow(0 0 10px rgba(183,28,28,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-orange { color: #ffd166; filter: drop-shadow(0 0 10px rgba(255,209,102,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-darkorange { color: #ff8c00; filter: drop-shadow(0 0 10px rgba(255,140,0,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-yellow { color: #ffeb3b; filter: drop-shadow(0 0 10px rgba(255,235,59,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-gold { color: #ffd700; filter: drop-shadow(0 0 10px rgba(255,215,0,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-lime { color: #76ff03; filter: drop-shadow(0 0 10px rgba(118,255,3,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-green { color: #06d6a0; filter: drop-shadow(0 0 10px rgba(6,214,160,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-darkgreen { color: #1b5e20; filter: drop-shadow(0 0 10px rgba(27,94,32,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-teal { color: #008080; filter: drop-shadow(0 0 10px rgba(0,128,128,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-cyan { color: #00d4ff; filter: drop-shadow(0 0 10px rgba(0,212,255,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-blue { color: #00b4ff; filter: drop-shadow(0 0 10px rgba(0,180,255,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-darkblue { color: #00008b; filter: drop-shadow(0 0 10px rgba(0,0,139,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-navy { color: #000080; filter: drop-shadow(0 0 10px rgba(0,0,128,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-indigo { color: #4b0082; filter: drop-shadow(0 0 10px rgba(75,0,130,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-purple { color: #a855f7; filter: drop-shadow(0 0 10px rgba(168,85,247,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-darkviolet { color: #9400d3; filter: drop-shadow(0 0 10px rgba(148,0,211,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-magenta { color: #ff00ff; filter: drop-shadow(0 0 10px rgba(255,0,255,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-violet { color: #ee82ee; filter: drop-shadow(0 0 10px rgba(238,130,238,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-pink { color: #ff4d6d; filter: drop-shadow(0 0 10px rgba(255,77,109,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-hotpink { color: #ff69b4; filter: drop-shadow(0 0 10px rgba(255,105,180,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-coral { color: #ff7f50; filter: drop-shadow(0 0 10px rgba(255,127,80,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-salmon { color: #fa8072; filter: drop-shadow(0 0 10px rgba(250,128,114,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-turquoise { color: #00bcd4; filter: drop-shadow(0 0 10px rgba(0,188,212,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-mint { color: #98ff98; filter: drop-shadow(0 0 10px rgba(152,255,152,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-silver { color: #c0c0c0; filter: drop-shadow(0 0 10px rgba(192,192,192,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-brown { color: #8b4513; filter: drop-shadow(0 0 10px rgba(139,69,19,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-tan { color: #d2b48c; filter: drop-shadow(0 0 10px rgba(210,180,140,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-khaki { color: #f0e68c; filter: drop-shadow(0 0 10px rgba(240,230,140,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-crimson { color: #dc143c; filter: drop-shadow(0 0 10px rgba(220,20,60,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-maroon { color: #800000; filter: drop-shadow(0 0 10px rgba(128,0,0,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-rosegold { color: #b76e79; filter: drop-shadow(0 0 10px rgba(183,110,121,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-skyblue { color: #87ceeb; filter: drop-shadow(0 0 10px rgba(135,206,235,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-steelblue { color: #4682b4; filter: drop-shadow(0 0 10px rgba(70,130,180,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-limegreen { color: #32cd32; filter: drop-shadow(0 0 10px rgba(50,205,50,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
#time.style-glass.color-seagreen { color: #2e8b57; filter: drop-shadow(0 0 10px rgba(46,139,87,0.5)) drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }

#date {
    font-size: clamp(14px, 2.6vw, 26px);
    margin-top: 10px;
    opacity: 0.8;
}

@keyframes timeGradientShift {
    0% { background-position: 0 0, 0% 0; }
    100% { background-position: 0 0, 300% 0; }
}

/* Now playing */
#now-playing {
    font-size: clamp(14px, 3vw, 28px);
    margin-top: 8px;
    opacity: 0.7;
}

/* Live indicator */
#live-indicator {
    font-size: clamp(14px, 3vw, 28px);
    margin-top: 4px;
    opacity: 0.9;
}

/* Ocultar el player */
#audio, #radio {
    display: none;
}

/* Botón pantalla completa */
#fs-btn {
    position: fixed;
    right: 12px;
    top: 12px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(0,0,0,0.35);
    color: #fff;
    backdrop-filter: blur(6px);
    cursor: pointer;
    font-size: 18px;
    line-height: 40px;
    text-align: center;
    user-select: none;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: auto;
}

#fs-btn.auto-hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

#fs-btn:hover {
    background: rgba(0,0,0,0.5);
    border-color: rgba(0,180,255,0.6);
}

#fs-btn:active {
    transform: scale(0.98);
}

/* Botón ajustes (engranaje) */
#settings-btn {
    position: fixed;
    right: 60px;
    top: 12px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(0,0,0,0.35);
    color: #fff;
    backdrop-filter: blur(6px);
    cursor: pointer;
    font-size: 18px;
    line-height: 40px;
    text-align: center;
    user-select: none;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: auto;
}

#settings-btn.auto-hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

#settings-btn:hover {
    background: rgba(0,0,0,0.5);
    border-color: rgba(0,180,255,0.6);
}

#settings-btn:active {
    transform: scale(0.98);
}

/* Botón DJ Mode */
#dj-mode-btn {
    position: fixed;
    right: 108px;
    top: 12px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(80,0,180,0.45);
    color: #fff;
    backdrop-filter: blur(6px);
    cursor: pointer;
    font-size: 18px;
    line-height: 40px;
    text-align: center;
    user-select: none;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: auto;
}

#dj-mode-btn.auto-hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

#dj-mode-btn:hover {
    background: rgba(120,0,220,0.6);
    border-color: rgba(180,80,255,0.8);
}

#dj-mode-btn:active {
    transform: scale(0.98);
}

/* Botón Finalizar DJ Set */
#end-dj-btn {
    position: fixed;
    right: 12px;
    bottom: 100px;
    padding: 12px 24px;
    border-radius: 12px;
    border: 2px solid rgba(255,80,80,0.6);
    background: rgba(200,0,0,0.5);
    color: #fff;
    backdrop-filter: blur(8px);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    user-select: none;
    transition: all 0.3s ease;
}

#end-dj-btn:hover {
    background: rgba(255,0,0,0.7);
    border-color: rgba(255,100,100,0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,0,0,0.4);
}

#end-dj-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Panel de ajustes */
#settings-panel {
    position: fixed;
    right: 12px;
    top: 60px;
    width: min(320px, 90vw);
    max-height: 85vh;
    background: rgba(5,5,15,0.95);
    color: #fff;
    border: 1px solid rgba(0,180,255,0.4);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0,180,255,0.1);
    padding: 14px 12px;
    display: none;
    z-index: 100;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

#settings-panel::-webkit-scrollbar {
    width: 6px;
}

#settings-panel::-webkit-scrollbar-track {
    background: rgba(0,180,255,0.05);
}

#settings-panel::-webkit-scrollbar-thumb {
    background: rgba(0,180,255,0.4);
    border-radius: 10px;
}

#settings-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0,180,255,0.6);
}

#settings-panel.open {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#settings-panel .panel-title {
    font-size: 11px;
    opacity: 0.7;
    margin: 10px 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #00b4ff;
}

#mode-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#mode-list li {
    padding: 9px 11px;
    margin: 3px 0;
    border-radius: 8px;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.8;
    transition: all 0.2s ease;
}

#mode-list li:hover {
    background: rgba(0,180,255,0.15);
    border-left-color: rgba(0,180,255,0.6);
    opacity: 1;
}

#mode-list li.active {
    background: rgba(0,180,255,0.25);
    border-left-color: #00d4ff;
    opacity: 1;
    color: #00d4ff;
    font-weight: 600;
}

#settings-panel .toggles label {
    display: flex;
    align-items: center;
    margin: 7px 0;
    font-size: 12px;
    opacity: 0.85;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#settings-panel .toggles label:hover {
    opacity: 1;
}

#settings-panel input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #00b4ff;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Botónes desplegables - Moderno */
.dropdown-btn {
    width: 100%;
    padding: 10px 12px;
    margin: 6px 0;
    background: linear-gradient(135deg, rgba(0,180,255,0.15) 0%, rgba(0,180,255,0.05) 100%);
    color: #00d4ff;
    border: 1px solid rgba(0,180,255,0.6);
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dropdown-btn:hover {
    background: linear-gradient(135deg, rgba(0,180,255,0.25) 0%, rgba(0,180,255,0.1) 100%);
    border-color: rgba(0,180,255,0.9);
    box-shadow: 0 6px 20px rgba(0,180,255,0.25);
    transform: translateY(-2px);
}

.dropdown-btn:active {
    transform: translateY(0);
}

/* Menús desplegables - Moderno */
.dropdown-menu {
    list-style: none;
    margin: 6px 0 10px 0;
    padding: 6px 0;
    background: rgba(10,10,15,0.9);
    border: 1px solid rgba(0,180,255,0.5);
    border-radius: 12px;
    overflow-y: auto;
    max-height: 300px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
}

.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(0,180,255,0.05);
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(0,180,255,0.4);
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0,180,255,0.6);
}

.dropdown-menu li {
    padding: 12px 14px;
    margin: 0;
    border: none;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.85;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-menu li:hover {
    background: rgba(0,180,255,0.2);
    opacity: 1;
    border-left-color: rgba(0,180,255,0.8);
}

.dropdown-menu li.active {
    background: rgba(0,180,255,0.3);
    opacity: 1;
    border-left-color: #00d4ff;
    font-weight: 600;
    color: #00d4ff;
}

#music-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#music-btn.auto-hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* Tooltip informativo de audio */
#audio-hint {
    position: fixed;
    left: 72px;
    bottom: 28px;
    padding: 10px 16px;
    background: rgba(120,0,220,0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#mini-player {
    position: fixed;
    left: 76px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(14px);
    border-radius: 999px;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 100;
}

#mini-player.auto-hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

#mini-player.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
}

#mini-player button {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.75;
    flex-shrink: 0;
    padding: 4px;
}

#mini-player button:hover {
    opacity: 1;
}

/* Contenedor del título - controla el overflow */
.title-wrapper {
    overflow: hidden;
    flex-shrink: 1;
    flex-grow: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

/* Título de la canción */
#track-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    align-self: center;
    min-width: 0;
    flex-shrink: 1;
    display: inline-block;
    padding-right: 20px;
}

/* Animación de scroll para títulos largos en móviles */
#track-title.scrolling {
    text-overflow: clip;
    animation: marquee 60s linear infinite;
    animation-delay: 0.3s;
    overflow: hidden;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-300vw));
    }
}

#vol-btn {
    font-size: 14px;
}

/* Indicador LIVE */
#live-indicator {
    color: #ff1744;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2px;
    align-self: center;
    flex-shrink: 0;
    animation: livePulse 1.5s ease-in-out infinite;
    margin-right: 3px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}

#live-indicator.hidden {
    display: none;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.65;
        transform: scale(1.1);
    }
}

/* Mobile portrait (iPhone X vertical) */
@media (max-width: 428px) and (max-height: 926px) and (orientation: portrait) {
    #mini-player {
        left: 64px;
        bottom: 22px;
        gap: 6px;
        padding: 6px 8px;
        max-width: calc(100vw - 80px);
        width: calc(100vw - 80px);
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(16px);
        flex-wrap: nowrap;
        overflow: hidden;
    }
    
    #live-indicator {
        font-size: 9px;
        margin-right: 0px;
        margin-left: -2px;
        gap: 1px;
        flex-shrink: 0;
        letter-spacing: -0.5px;
        white-space: nowrap;
    }
    
    .title-wrapper {
        overflow: hidden;
        flex-grow: 1;
        flex-shrink: 1;
        min-width: 0;
        position: relative;
    }
    
    #track-title {
        font-size: 10px;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-right: 5px;
    }
    
    #mini-player button {
        font-size: 11px;
        padding: 3px;
        flex-shrink: 0;
        min-width: 20px;
    }
}

/* Mobile landscape (iPhone X horizontal) */
@media (max-height: 450px) and (orientation: landscape) {
    #mini-player {
        left: 60px;
        bottom: 18px;
        gap: 5px;
        padding: 4px 6px;
        max-width: calc(100vw - 80px);
        width: calc(100vw - 80px);
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(16px);
        flex-wrap: nowrap;
        overflow: hidden;
    }
    
    #live-indicator {
        font-size: 8px;
        margin-right: 0px;
        margin-left: -2px;
        gap: 0px;
        flex-shrink: 0;
        letter-spacing: -0.5px;
        white-space: nowrap;
    }
    
    #track-title {
        max-width: calc(100vw - 220px);
        font-size: 10px;
        flex-grow: 1;
        flex-shrink: 1;
        min-width: 0;
        line-height: 1.3;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    #mini-player button {
        font-size: 10px;
        padding: 2px;
        flex-shrink: 0;
        min-width: 18px;
    }
    
    #music-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
        left: 12px;
        bottom: 12px;
    }
}

/* =====================================================================
   👁️ CONTADOR DE PERSONAS VIENDO/ESCUCHANDO
   ===================================================================== */
#viewer-counter {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 14px;
    color: white;
    z-index: 9999;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    animation: viewer-counter-fade-in 0.4s ease-out;
    user-select: none;
    pointer-events: none;
}

#viewer-icon {
    font-size: 15px;
    animation: viewer-icon-pulse 2s ease-in-out infinite;
}

#viewer-count {
    font-weight: 600;
    font-size: 15px;
    min-width: 16px;
    text-align: center;
    color: #00d4ff;
}

@keyframes viewer-counter-fade-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes viewer-icon-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.85;
    }
}

/* Responsive para móviles */
@media (max-width: 600px) {
    #viewer-counter {
        top: 70px;
        left: 10px;
        padding: 5px 10px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    #viewer-icon {
        font-size: 14px;
    }
    
    #viewer-count {
        font-size: 14px;
        min-width: 14px;
    }
}


    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-7px);
    }
}
