@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Raleway:wght@300;400;600&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Raleway', 'Montserrat', sans-serif;
}

:root {
    --darktheme: #030712;
    --dark: #0a1633;
    --light: #ffffff;
    --gradLime: #a8f000;
    --gradLimeBright: #c4ff1a;
    --gradLimeDark: #6eb500;
    --gradAqua: #00e5ff;
    --gradBlue: #0055ff;
    --gradBlueDark: #061c56;
}

.wrapper {
    overflow: hidden;
    background-color: var(--darktheme);
    margin: auto;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px 10px;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #8e8e8e 100%);
}

.container {
    max-width: 500px;
    width: 500px;
    min-height: 620px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.container-circle1,
.container-circle2 {
    padding: 10px;
    display: flex;
    flex-direction: column;
    width: auto;
    height: auto;
}

.container-circle1 {
    justify-items: flex-start;
}

.outer-circle1,
.outer-circle2 {
    max-width: 300px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
}

.inner-circle1,
.inner-circle2 {
    background: var(--darktheme);
    padding: 1rem;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    transition: 0.5s ease-in;
}

/* Circle 1: Electric Lime Green (Radio Tropical) */
.outer-circle1 {
    background: linear-gradient(135deg, var(--gradLime), var(--gradLimeDark));
    box-shadow: 0px 0px 30px var(--gradLime), 0px 0px 60px rgba(168, 240, 0, 0.4);
    animation: circle-one 5s infinite alternate ease-in-out;
}

/* Circle 2: Electric Cyan & Royal Blue (Radio Tropical) */
.outer-circle2 {
    transform: translateX(180px);
    background: linear-gradient(135deg, var(--gradAqua), var(--gradBlue));
    box-shadow: 0px 0px 30px var(--gradAqua), 0px 0px 50px rgba(0, 85, 255, 0.5);
    animation: circle-two 6s infinite alternate ease-in-out;
}

.inner-circle1 {
    box-shadow: 0px 0px 25px inset var(--gradLime), 0px 0px 35px inset rgba(168, 240, 0, 0.6);
}

.inner-circle2 {
    box-shadow: 0px 0px 25px inset var(--gradBlue), 0px 0px 25px inset var(--gradAqua);
}

/* Floating Glassmorphism Player Card */
.rectangle {
    position: absolute;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(6, 22, 58, 0.75) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 240, 0, 0.35);
    border-radius: 24px;
    max-width: 310px;
    width: 310px;
    min-height: 460px;
    z-index: 2;
    transform: translate(95px, 40px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.404), 0 0 25px rgba(0, 85, 255, 0.164);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 16px 15px 20px 15px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.rectangle:hover {
    border-color: rgba(168, 240, 0, 0.6);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.75), 0 0 35px rgba(168, 240, 0, 0.3);
}

/* Animations for circles */
@keyframes circle-one {
    0% {
        box-shadow: 0px 0px 20px var(--gradLime), 0px 0px 40px rgba(168, 240, 0, 0.35);
        transform: scale(0.98);
    }

    50% {
        box-shadow: 0px 0px 35px var(--gradLimeBright), 0px 0px 70px rgba(168, 240, 0, 0.55);
        transform: scale(1.03);
    }

    100% {
        box-shadow: 0px 0px 20px var(--gradLime), 0px 0px 40px rgba(168, 240, 0, 0.35);
        transform: scale(0.98);
    }
}

@keyframes circle-two {
    0% {
        box-shadow: 0px 0px 20px var(--gradAqua), 0px 0px 30px var(--gradBlue);
        transform: translateX(180px) scale(0.98);
    }

    50% {
        box-shadow: 0px 0px 40px var(--gradAqua), 0px 0px 65px rgba(0, 85, 255, 0.6);
        transform: translateX(180px) scale(1.04);
    }

    100% {
        box-shadow: 0px 0px 20px var(--gradAqua), 0px 0px 30px var(--gradBlue);
        transform: translateX(180px) scale(0.98);
    }
}

/* Extra animation when playing */
.playing.rectangle {
    border-color: var(--gradLime);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(168, 240, 0, 0.4);
}

/* ① STATION HEADER — Logo fijo + título, siempre visible arriba */
.station-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0 5px 10px 5px;
    border-bottom: 1px solid rgba(168, 240, 0, 0.18);
    margin-bottom: 10px;
    flex-direction: column;
    align-content: center;
    justify-content: center;
}

.station-logo-fixed {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: contain;
    background-color: #030a1e;
    border: 1.5px solid rgba(168, 240, 0, 0.5);
    box-shadow: 0 0 12px rgba(168, 240, 0, 0.35), 0 0 20px rgba(0, 85, 255, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: logo-pulse-soft 4s ease-in-out infinite;
}

.station-logo-fixed:hover {
    transform: scale(1.06);
    box-shadow: 0 0 20px rgba(168, 240, 0, 0.6), 0 0 30px rgba(0, 229, 255, 0.5);
}

@keyframes logo-pulse-soft {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(168, 240, 0, 0.35), 0 0 18px rgba(0, 85, 255, 0.25);
    }

    50% {
        box-shadow: 0 0 20px rgba(168, 240, 0, 0.6), 0 0 30px rgba(0, 85, 255, 0.5);
    }
}

.station-header-title {
    display: flex;
    flex-direction: column;
    text-align: left;
    align-items: center;
    align-content: center;
}

.station-name-top {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #ffffff 35%, var(--gradLime) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.station-sub-top {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gradAqua);
    margin-top: 2px;
}

/* ② ALBUM ART WRAPPER — Carátula del tema en vivo, separada del logo */
.album-art-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 18px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(0, 85, 255, 0.25);
    border: 1.5px solid rgba(168, 240, 0, 0.25);
    background-color: #030a1e;
    transition: box-shadow 0.4s ease;
}

.album-art-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.8rem;
    color: rgba(168, 240, 0, 0.25);
    background: linear-gradient(135deg, #061536 0%, #020814 100%);
    transition: opacity 0.4s ease;
}

/* Clase activa cuando sonic inyecta imagen real */
.album-art-wrapper.has-art .album-art-placeholder {
    opacity: 0;
}

.album-art-sonic {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* img inyectada por sonic widget — visible directamente */
.album-art-sonic img,
#sonic_art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    border-radius: 0;
}

/* Cuando NO hay imagen (sonic_art vacío), placeholder visible */
#sonic_art:empty~.album-art-placeholder,
.album-art-sonic:empty+.album-art-placeholder {
    opacity: 1;
}

/* Animación pulsante del album art cuando hay audio */
.playing .album-art-wrapper {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 28px rgba(168, 240, 0, 0.35);
    animation: art-pulse 3s ease-in-out infinite;
}

@keyframes art-pulse {

    0%,
    100% {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(168, 240, 0, 0.2);
    }

    50% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65), 0 0 32px rgba(168, 240, 0, 0.5);
    }
}

/* Track Controls Bar */
.controls {
    height: 5px;
    width: 230px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: var(--light);
    position: relative;
    overflow: visible;
    margin: 8px 0 2px 0;
}

.controls-bar-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 65%;
    background: linear-gradient(90deg, var(--gradBlue), var(--gradLime));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.playing .controls-bar-progress {
    animation: bar-glow 2s infinite linear alternate;
}

@keyframes bar-glow {
    0% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.controls i#control-points {
    position: absolute;
    left: 63%;
    font-size: 11px;
    color: var(--gradLimeBright);
    text-shadow: 0 0 8px var(--gradLime);
    transition: all 0.3s ease;
}

.playing .controls i#control-points {
    animation: point-pulse 1.2s infinite ease-in-out;
}

@keyframes point-pulse {

    0%,
    100% {
        transform: scale(1);
        text-shadow: 0 0 6px var(--gradLime);
    }

    50% {
        transform: scale(1.35);
        text-shadow: 0 0 14px var(--gradLimeBright);
    }
}

/* Time Display */
.controls-time {
    width: 230px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-weight: 600;
}

.starts-time {
    font-family: monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
}

.ends-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gradLimeBright);
    font-weight: 700;
    letter-spacing: 1px;
}

.pulse-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--gradLimeBright);
    box-shadow: 0 0 8px var(--gradLimeBright);
    animation: live-blink 1.4s infinite;
}

@keyframes live-blink {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(0.7);
    }
}

/* Song Name / Station Title */
.music-name {
    color: var(--light);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    padding: 6px 12px;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.35;
}

/* Badge EN VIVO */
.now-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--gradLime);
    background: rgba(168, 240, 0, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(168, 240, 0, 0.3);
    margin-bottom: 6px;
}

/* Título inyectado por sonic_title */
#sonic_title,
.sonic-title-text {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
    text-align: center;
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: opacity 0.4s ease;
    line-height: 1.35;
}

/* sonic_art img styles - image injected by sonic widget */
#sonic_art {
    display: none;
    /* hidden by default, shown via JS when sonic loads img */
}

.song-title-text {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 700;
}

/* Player Button and Controls */
.player-btn {
    width: 230px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: var(--light);
    font-size: 20px;
}

.ctrl-skip {
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.25s ease;
    font-size: 1.15rem;
}

.ctrl-skip:hover {
    opacity: 1;
    color: var(--gradLime);
    transform: scale(1.15);
}

.play-circle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradLimeBright) 0%, var(--gradLimeDark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #030919;
    font-size: 1.35rem;
    cursor: pointer;
    box-shadow: 0 0 20px var(--gradLime), 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
}

.play-circle-btn #play-icon {
    margin-left: 2px;
}

.playing .play-circle-btn #play-icon {
    margin-left: 0;
}

.play-circle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--gradLimeBright), 0 8px 20px rgba(0, 0, 0, 0.5);
}

.play-circle-btn:active {
    transform: scale(0.95);
}

/* Redes Sociales (Original Template Position & Modern Hover Effects) */
.redes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 30px 0 10px 0;
    z-index: 3;
    position: relative;
}

.redes div {
    font-size: 26px;
    transition: transform 0.3s ease;
}

.redes div a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.redes div:hover {
    transform: translateY(-4px);
}

.redes .whatsapp a:hover {
    background: rgba(37, 211, 102, 0.25);
    border-color: #25d366;
    color: #25d366;
    box-shadow: 0 0 18px rgba(37, 211, 102, 0.5);
}

.redes .instagram a:hover {
    background: rgba(225, 48, 108, 0.25);
    border-color: #f75586;
    color: #f75586;
    box-shadow: 0 0 18px rgba(225, 48, 108, 0.5);
}

.redes .tiktok a:hover {
    background: rgba(0, 229, 255, 0.25);
    border-color: var(--gradAqua);
    color: var(--gradAqua);
    box-shadow: 0 0 18px var(--gradAqua);
}

.redes .email a:hover {
    background: rgba(168, 240, 0, 0.25);
    border-color: var(--gradLime);
    color: var(--gradLime);
    box-shadow: 0 0 18px var(--gradLime);
}

.redes .facebook a:hover {
    background: rgba(24, 119, 242, 0.25);
    border-color: #1877f2;
    color: #1877f2;
    box-shadow: 0 0 18px rgba(24, 119, 242, 0.5);
}

/* Credits Footer */
.player-credits {
    text-align: center;
    font-size: 0.75rem;
    color: #000000;
    margin-top: 10px;
    z-index: 3;
}

.player-credits a {
    color: #8dbf18;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.player-credits a:hover {
    color: #6f9c05;
    text-shadow: 0 0 8px var(--gradLime);
}

/* Mobile responsive handling */
@media (max-width: 520px) {
    .container {
        width: 100%;
        max-width: 340px;
        align-items: center;
        min-height: auto;
    }

    .container-circle1,
    .container-circle2 {
        position: absolute;
    }

    .outer-circle1 {
        width: 200px;
        height: 200px;
        transform: translate(-30px, 0);
    }

    .outer-circle2 {
        width: 220px;
        height: 220px;
        transform: translate(60px, 160px);
    }

    .rectangle {
        position: relative;
        transform: none !important;
        margin: 20px auto 25px auto;
    }

    .redes {
        margin: 15px 0 10px 0;
    }
}