/* ======================
   GLOBAL & VARIABLES
====================== */
:root {
    --primary: #ff2b3a;
    --primary-glow: rgba(255, 43, 58, 0.4);
    --secondary: #6366f1;
    --accent: #a855f7;
    --bg-dark: #0a0b14;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);
    --glass-grad: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #000;
    background: radial-gradient(circle at top right, #1a1c2c, #000);
    color: var(--text-primary);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}


/* ======================
   VIDEO FULLSCREEN PRO REAL
====================== */

#video-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

/* truco profesional */
#player,
#player iframe {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 177.77vh;
    /* 16:9 */
    height: 100vh;

    min-width: 100vw;
    min-height: 56.25vw;

    transform: translate(-50%, -50%);
    pointer-events: none;
    /* bloquea clicks */
}



/* ======================
   BRAND FLOATING CARD
 ====================== */
.brand-card {
    position: fixed;
    top: 30px;
    left: 40px;
    z-index: 100;

    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2));
    backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;

    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    pointer-events: all;
    transition: all 0.3s ease;
}


.brand-name {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 43, 58, 0.3));
}

.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}


/* ======================
   BOTTOM BAR
====================== */
.bottombar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1200px;

    height: 110px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 32px;

    backdrop-filter: blur(24px) saturate(180%);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    box-shadow: var(--shadow-main);

    z-index: 10;
}


/* track */
.track-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
    background: linear-gradient(90deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.program {
    font-size: 12px;
    color: var(--accent);
    /* Cambiamos a color acento (Purpura/Violeta) */
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.program.active-program {
    color: var(--primary);
    font-weight: 700;
}

.program i {
    font-size: 14px;
    animation: pulse-mini 2s infinite;
}

@keyframes pulse-mini {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* ======================
   VISUALIZADOR DE AUDIO
====================== */
.equalizer {
    display: flex;
    gap: 4px;
    height: 40px;
    align-items: flex-end;
    justify-content: center;
    flex: 1;
    max-width: 300px;
}

.equalizer span {
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 2px;
    animation: wave 0.6s infinite ease-in-out alternate;
    box-shadow: 0 0 10px var(--primary-glow);
}

@keyframes wave {

    0%,
    100% {
        height: 8px;
        opacity: 0.6
    }

    50% {
        height: 36px;
        opacity: 1
    }
}


/* ======================
   CONTROLES MEJORADOS
====================== */
.controls-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(255, 43, 58, 0.3));
    border-color: var(--primary);
    transform: scale(1.1);
}

.volume-slider {
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(255, 43, 58, 0.5);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(255, 43, 58, 0.5);
}

/* ======================
   PANEL INFORMACIÓN FLOTANTE
====================== */
.info-panel {
    position: fixed;
    right: -340px;
    top: 0;
    bottom: 0;
    width: 320px;
    background: rgba(5, 8, 18, 0.95);
    backdrop-filter: var(--blur-md);
    border-left: 1px solid var(--border);
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding-bottom: 120px;
}

.info-panel.show {
    right: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(5, 8, 18, 0.7);
}

.panel-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.panel-content {
    padding: 20px 24px;
}

.info-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.info-section:last-child {
    border-bottom: none;
}

.info-section h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.lyric-line {
    opacity: 0.9;
    transition: all 0.3s ease;
    display: block;
    min-height: 33px;
    /* Altura mínima para mantener estructura */
    height: auto;
    /* Crecer si el texto ocupa más líneas */
    line-height: 1.4;
    /* Espaciado normal entre líneas de texto */
    padding: 6px 0;
    /* Un poco de aire arriba y abajo */
    margin: 0;
    transform: scale(1);
    transform-origin: center;
    word-break: break-word;
    text-align: center;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    color: #ffffff;
}

/* Ocultar barra de scroll pero mantener funcionalidad */
#lyricsContainer::-webkit-scrollbar {
    display: none;
}

#lyricsContainer {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Sin efecto karaoke - todas las líneas iguales */
.lyric-line.active {
    opacity: 0.9;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
}

/* Títulos de secciones de información con colores del logo */
.info-section h4 {
    background: linear-gradient(135deg, #ff2b3a, #ff6b75);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 6px;
}

.info-section p {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.next-track {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.next-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.next-info {
    flex: 1;
    min-width: 0;
}

.next-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    word-break: break-word;
}

.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* ======================
   MOBILE
====================== */
@media(max-width:800px) {
    .info-panel {
        width: 100%;
        right: -100%;
    }

    .controls-bar {
        gap: 8px;
    }

    .volume-slider {
        display: none;
    }
}

@media(max-width:600px) {
    .bottombar {
        bottom: 12px;
        width: calc(100% - 24px);
        height: 90px;
        padding: 0 16px;
        border-radius: 16px;
    }

    .title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    .thumb {
        display: none;
        /* Mejoramos espacio ocultando miniatura */
    }

    .equalizer {
        display: none !important;
        /* Ocultamos ecualizador por petición del usuario */
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .controls-bar {
        gap: 4px;
    }
}

/* ======================
   CINEMATIC CROSSFADE LAYER
====================== */

.fade-layer {
    position: fixed;
    inset: 0;

    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, .25);

    opacity: 0;
    pointer-events: none;
    z-index: 4;

    transition: opacity .45s ease;
}

.fade-layer.show {
    opacity: 1;
}


/* ======================
   AI HOST STATUS MIC
====================== */
.ai-host-mic {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-host-mic.thinking {
    background: rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
    color: #6366f1;
    transform: scale(1.1);
}

.ai-host-mic.speaking {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
    transform: scale(1.2);
}

.ai-host-mic.thinking i.spinning {
    display: inline-block;
    animation: ai-spin 2s linear infinite;
}

.ai-host-mic.speaking i.pulse {
    display: inline-block;
    animation: ai-pulse 0.8s infinite alternate;
}

@keyframes ai-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ai-pulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(1.3); opacity: 1; }
}

/* metadata animation */
.title,
.thumb {
    transition: opacity .35s ease, transform .35s ease;
}

.meta-hide {
    opacity: 0;
    transform: translateY(8px);
}