/* Agregue todo su codigo personalizado aqui */

.player {
    position: fixed;
    inset: auto 0 max(0px, env(safe-area-inset-bottom));
    width: 100%;
    padding: clamp(0.75rem, 2vw, 1.25rem);
    z-index: 100;
}

.player-artwork {
    max-width: 362px;
    max-height: 362px;
}

.header-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.player-artwork img,
.player-artwork-mini {
    object-fit: cover;
}

@media (min-width: 992px) {
    .player {
        inset: auto 8vw max(1.5vw, env(safe-area-inset-bottom));
        width: auto;
        padding: 1.25vw;
    }

    .header-logo-img {
        max-width: 7.5vw;
        height: auto;
    }
}

.player-cover-image {
    animation: bga 60s linear infinite;
}

@keyframes bga {
    50% {
        transform: scale(2)
    }
}
.items-start {
    align-items: flex-start;
    margin-top: 15px;
}
.player-button {
    font-weight: 700;
}

.player-artwork-style {
    background-color: transparent !important;
}

/* Metadata debajo de la portada central */
.central-metadata {
    position: absolute;
    top: calc(50% + min(25vh, 181px) + 0.75rem);
    left: 50%;
    transform: translate(-50%, 0);
    text-align: center;
    width: 90%;
    max-width: 400px;
    z-index: 20;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

@media (min-width: 992px) {
    .central-metadata {
        top: calc(10vw + min(50vh, 362px) + 0.75rem);
    }
}

.central-metadata .song-artist {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.central-metadata .song-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

/* El analizador real se dibuja detrás de la portada. */
.visual-equalizer {
    display: none;
}

.visualizer {
    position: absolute;
    inset: 8vh 3vw max(7.5rem, 14vh);
    width: auto;
    height: auto;
    z-index: 1;
    opacity: 0.16;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.visualizer canvas {
    width: 100%;
    height: 100%;
}

.player-artwork {
    z-index: 10;
}


/* Identidad de estación, DJ Staff y reloj local */
.central-metadata .central-station-name {
    color: #67d9ff;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.central-live-dj {
    align-self: center;
    margin-top: 0.2rem;
    padding: 0.2rem 0.65rem;
    border: 1px solid rgba(255, 90, 110, 0.7);
    border-radius: 999px;
    color: #ff8b9a;
    background: rgba(120, 0, 20, 0.35);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    animation: liveDjSoftPulse 1.8s ease-in-out infinite;
}

.central-live-dj[hidden] {
    display: none;
}

@keyframes liveDjSoftPulse {
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .central-live-dj { animation: none; }
}

.listener-clock {
    position: fixed;
    top: var(--main-padding, 1rem);
    right: var(--main-padding, 1rem);
    z-index: 70;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-variant-numeric: tabular-nums;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    backdrop-filter: blur(8px);
}

/* Video global fullscreen */
.modal-video {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 0.75rem;
    transform: none;
    border-radius: 0;
    background: rgba(2, 6, 23, 0.97);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-video:not(.is-active) {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
}

.video-overlay-content {
    position: relative;
    width: min(calc(100vw - 2rem), calc((100vh - 2rem) * 16 / 9));
    height: min(calc(100vh - 2rem), calc((100vw - 2rem) * 9 / 16));
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-video .video-close {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    z-index: 1002;
    min-width: 3rem;
    min-height: 3rem;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.modal-body-video {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    border-radius: 0.75rem;
}

.modal-body-video iframe,
.modal-body-video video {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

.video-status {
    margin: 0;
    color: #fff;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.04em;
}

body.video-overlay-open {
    overflow: hidden;
}

@media (max-width: 991px) {
    .player {
        inset: auto 0 max(0px, env(safe-area-inset-bottom));
        width: 100%;
    }

    .visualizer {
        inset: 4.5rem 1rem max(6rem, 16vh);
        opacity: 0.13;
    }

    .listener-clock {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 1.05rem;
        padding: 0.3rem 0.55rem;
    }

    .modal-video {
        padding: 0.5rem;
    }

    .modal-video .video-close {
        top: max(0.75rem, env(safe-area-inset-top));
        right: max(0.75rem, env(safe-area-inset-right));
    }
}
