:root {
    --cobalto-profundo: #040812;
    --cobalto-hud-card: #0c1424;
    --azul-cobalto: #1e56a0;      /* Azul Cobalto de alta definición */
    --azul-real: #0043ff;         /* Azul Real eléctrico e interactivo */
    --amarillo-oro-alerta: #ffcc00;
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--cobalto-profundo);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 24px 16px;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* LIENZO ATMOSFÉRICO DE CONTRALUZ */
.ambient-fluid-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at 50% 0%, var(--cobalto-hud-card) 0%, var(--cobalto-profundo) 100%);
    z-index: 1;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    mix-blend-mode: screen;
}

.orb-real-blue {
    width: 600px;
    height: 600px;
    background: #002266; /* Espectro Azul Real base */
    top: -10%;
    left: -10%;
    opacity: 0.85;
}

.orb-cobalt-glow {
    width: 400px;
    height: 400px;
    background: rgba(30, 86, 160, 0.15); /* Difusión Azul Cobalto */
    bottom: 10%;
    right: -5%;
}

.external-logo-container {
    z-index: 3;
    width: 100%;
    max-width: 390px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 10px;
}

.external-main-logo {
    max-width: 100%;
    height: auto;
    max-height: 55px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

.player-wrapper {
    width: 100%;
    max-width: 390px;
    background: var(--cobalto-hud-card);
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    padding: 24px 20px 85px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 2;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
    position: relative;
}

.hud-top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-icon-side {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 18px;
    cursor: pointer;
}

.tab-toggle-container {
    background: #05080f;
    padding: 3px;
    border-radius: 20px;
    display: flex;
    gap: 2px;
}

.tab-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

/* Sincronización cromática de botones activos de pestañas */
.tab-toggle-btn#btn-tab-onair.active {
    background: var(--azul-real);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 67, 255, 0.4);
}

.tab-toggle-btn#btn-tab-revista.active {
    background: var(--amarillo-oro-alerta);
    color: #000;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.4);
}

.hud-view-section {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.hud-view-section.active {
    display: flex;
}

.upper-status-hud {
    text-align: left;
}

.hud-status-tag {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

#hud-top-track-artist {
    font-size: 15px;
    font-weight: 500;
    margin-top: 2px;
}

/* CAJA CENTRAL: MARCO DE NEÓN EN AZUL COBALTO Y AZUL REAL */
.main-neon-display-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #04070d;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--azul-cobalto); /* Trazo robusto en Azul Cobalto */
    box-shadow: 
        0 0 25px rgba(30, 86, 160, 0.5), 
        inset 0 0 20px rgba(0, 67, 255, 0.3); /* Aura interna Azul Real */
}

.visualizer-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    height: 100%;
    position: absolute;
    padding: 0 24px;
}

.v-bar {
    flex: 1;
    max-width: 6px;
    height: 20px;
    /* Flujo dinámico de color: Fusión Cobalto y Real */
    background: linear-gradient(180deg, var(--azul-real) 0%, var(--azul-cobalto) 100%);
    border-radius: 10px;
}

.v-bar.animate {
    animation: hudWave 0.6s ease-in-out infinite alternate;
}

.v-bar:nth-child(2n) { animation-duration: 0.45s; animation-delay: 0.12s; }
.v-bar:nth-child(3n+1) { animation-duration: 0.7s; animation-delay: 0.25s; }

@keyframes hudWave {
    0% { height: 12px; }
    100% { height: 160px; }
}

.admob-intercalated-zone {
    position: absolute;
    width: 95%;
    height: 95%;
    background: #04070d;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.admob-intercalated-zone.active {
    opacity: 1;
    pointer-events: auto;
}

.ad-tag {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.ad-placeholder {
    color: #fff;
    font-size: 13px;
}

.gold-circles-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.gold-circle-btn {
    background: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--amarillo-oro-alerta);
    color: var(--amarillo-oro-alerta);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.15s ease;
}

.gold-circle-btn:active {
    transform: scale(0.9);
    background: rgba(255, 204, 0, 0.15);
}

#like-btn.liked {
    background: #ff2d55;
    border-color: #ff2d55;
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 45, 85, 0.5);
}

.full-playlist-action-btn {
    width: 100%;
    background: var(--azul-real); /* Botón maestro en Azul Real */
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.8px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 67, 255, 0.3);
    transition: transform 0.15s ease;
}

.full-playlist-action-btn:active {
    transform: scale(0.97);
}

/* ESTILO PREMIUM PARA EL BOTÓN DE INSTALACIÓN DE LA WEBAPP */
.install-webapp-btn {
    width: 100%;
    background: none;
    border: 2px solid var(--azul-cobalto);
    color: var(--text-white);
    padding: 12px;
    border-radius: 25px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: none; /* Se activa mediante JS solo si es instalable en el dispositivo */
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 5px;
    transition: all 0.2s ease;
}

.install-webapp-btn:active {
    background: rgba(30, 86, 160, 0.2);
    transform: scale(0.97);
}

.editorial-scroll-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 440px;
    overflow-y: auto;
}

.editorial-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.editorial-card-text {
    flex: 1;
    text-align: left;
}

.editorial-card-text h3 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.editorial-card-text p {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.3;
}

.editorial-card-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: #fff;
}

.gradient-monvil { background: linear-gradient(135deg, #ff007f, #7928ca); }
.gradient-movil { background: linear-gradient(135deg, #ff9f1c, #ff5400); }
.gradient-moonshot { background: linear-gradient(135deg, #222, #000); border: 1px solid rgba(255,255,255,0.08); }
.gradient-ai { background: linear-gradient(135deg, var(--azul-cobalt), #040812); }

.persistent-base-player {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: #05080f;
    border-top: 1px solid var(--glass-border);
    border-radius: 0 0 32px 32px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.base-track-details {
    text-align: left;
    max-width: 45%;
}

.base-meta-tag {
    font-size: 8px;
    font-weight: 700;
    color: var(--azul-real);
    letter-spacing: 0.5px;
}

#base-track-title {
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.base-player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hud-precision-volume {
    -webkit-appearance: none;
    width: 70px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
}

.hud-precision-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.base-play-trigger {
    background: #fff;
    border: none;
    color: #000;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.base-secondary-trigger {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 15px;
    cursor: pointer;
}