/* Estilos Base Globales */
#pato-radio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999999;
    background: var(--pato-accent, #ff0000);
    padding: 10px 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    font-family: 'Segoe UI', Roboto, sans-serif;
    color: #fff;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pato-player-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    position: relative;
    transition: max-width 0.4s ease;
}

/* Layout Centrado / Ajustado al diseño */
#pato-radio-player.pato-layout-centered .pato-player-container {
    max-width: 1200px;
}

/* --- SKIN: VINYL (Classic) --- */
.pato-skin-vinyl .pato-player-container {
    gap: 35px;
}

.pato-skin-vinyl .pato-artwork-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.pato-skin-vinyl .pato-artwork {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    border: 2px solid #fff;
    z-index: 10;
    overflow: hidden;
}

.pato-skin-vinyl .pato-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pato-skin-vinyl .pato-vinyl-disk {
    position: absolute;
    top: 5px;
    left: 10px;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #333 30%, #111 100%);
    border-radius: 50%;
    z-index: 1;
    transition: left 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: repeating-radial-gradient(circle, transparent 0, transparent 4px, rgba(255, 255, 255, 0.05) 5px);
}

.pato-skin-vinyl.playing .pato-vinyl-disk {
    left: 40px;
    animation: pato-spin 4s linear infinite;
}

/* --- SKIN: MINIMAL (Slim Bar) --- */
.pato-skin-minimal {
    padding: 5px 0 !important;
}

.pato-skin-minimal .pato-artwork-wrapper {
    width: 40px;
    height: 40px;
}

.pato-skin-minimal .pato-vinyl-disk {
    display: none;
}

.pato-skin-minimal .pato-info {
    margin-left: 0;
}

.pato-skin-minimal #pato-play-pause {
    width: 40px;
    height: 40px;
}

/* --- SKIN: MODERN (Premium Card Style) --- */
.pato-skin-modern {
    background: #1a1a1a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pato-skin-modern .pato-artwork-wrapper {
    width: 70px;
    height: 70px;
    margin-top: -20px;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.pato-skin-modern .pato-artwork {
    border: none;
    border-radius: 12px;
}

.pato-skin-modern .pato-vinyl-disk {
    display: none;
}

.pato-skin-modern #pato-play-pause {
    background: var(--pato-btn-bg, #fff) !important;
    border-radius: 50%;
    width: 55px;
    height: 55px;
}

.pato-skin-modern .pato-play-icon {
    border-left-color: var(--pato-bar-color, #1a1a1a);
}

.pato-skin-modern.playing .pato-play-icon {
    border-left-color: var(--pato-bar-color, #1a1a1a);
    border-right-color: var(--pato-bar-color, #1a1a1a);
}

/* --- SKIN: GLASS (Canva Style ✨) --- */
.pato-skin-glass {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.1) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.pato-skin-glass .pato-artwork-wrapper {
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.pato-skin-glass .pato-artwork {
    border: none;
}

.pato-skin-glass .pato-vinyl-disk {
    display: none;
}

.pato-skin-glass #pato-artist,
.pato-skin-glass #pato-song {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pato-skin-glass #pato-play-pause {
    background: var(--pato-btn-bg, rgba(255, 255, 255, 0.2)) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Animaciones y Otros */
@keyframes pato-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.pato-info {
    flex-grow: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    z-index: 20;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

#pato-artist {
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

#pato-song {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 3px;
}

#pato-play-pause {
    background: var(--pato-btn-bg, #fff) !important;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pato-play-icon {
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 18px solid var(--pato-icon-color, #ff0000);
    margin-left: 5px;
}

.playing .pato-play-icon {
    width: 15px;
    height: 20px;
    border: none;
    border-left: 5px solid var(--pato-icon-color, #ff0000);
    border-right: 5px solid var(--pato-icon-color, #ff0000);
    margin-left: 0;
}

/* Colores y Variables de Texto/Bordes */
#pato-radio-player {
    background: var(--pato-bar-color, #ff0000) !important;
    border-top: 2px solid var(--pato-border-color, rgba(255, 255, 255, 0.1));
}

#pato-artist {
    color: var(--pato-text-color, #ffffff);
}

#pato-song {
    color: var(--pato-text-color, #ffffff);
    opacity: 0.8;
}

/* Tamaños de Botones */
.pato-btn-small #pato-play-pause {
    width: 35px;
    height: 35px;
}

.pato-btn-small .pato-play-icon {
    border-width: 7px 0 7px 12px;
}

.pato-btn-small .playing .pato-play-icon {
    width: 10px;
    height: 14px;
    border-width: 0 3px;
}

.pato-btn-medium #pato-play-pause {
    width: 50px;
    height: 50px;
}

.pato-btn-large #pato-play-pause {
    width: 65px;
    height: 65px;
}

.pato-btn-large .pato-play-icon {
    border-width: 12px 0 12px 22px;
}

.pato-btn-large .playing .pato-play-icon {
    width: 18px;
    height: 24px;
    border-width: 0 7px;
}

/* Tipos de VU Meter */
.pato-vumeter {
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.playing .pato-vumeter {
    opacity: 1;
}

/* VU: Bars (Classic) */
.pato-vu-type-bars .pato-vu-bar {
    flex: 1;
    background: linear-gradient(to top, var(--pato-vu-1), var(--pato-vu-2));
    height: 5%;
}

.pato-vu-type-bars.playing .pato-vu-bar {
    animation: pato-vu-bars-anim 0.5s ease infinite alternate;
}

@keyframes pato-vu-bars-anim {
    0% {
        height: 10%;
    }

    100% {
        height: 90%;
    }
}

/* VU: Wave (Digital Onda) */
.pato-vu-type-wave .pato-vumeter {
    gap: 0;
    filter: blur(1px);
}

.pato-vu-type-wave .pato-vu-bar {
    flex: 1;
    background: var(--pato-vu-1);
    height: 20%;
    border-radius: 10px;
}

.pato-vu-type-wave.playing .pato-vu-bar {
    animation: pato-vu-wave-anim 1s ease-in-out infinite alternate;
}

@keyframes pato-vu-wave-anim {
    0% {
        height: 20%;
        background: var(--pato-vu-1);
    }

    100% {
        height: 80%;
        background: var(--pato-vu-2);
    }
}

/* VU: Dots (Modern Dots) */
.pato-vu-type-dots .pato-vumeter {
    gap: 8px;
    justify-content: center;
}

.pato-vu-type-dots .pato-vu-bar {
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pato-vu-1);
}

.pato-vu-type-dots.playing .pato-vu-bar {
    animation: pato-vu-dots-anim 0.4s ease infinite alternate;
}

@keyframes pato-vu-dots-anim {
    0% {
        transform: translateY(0);
        background: var(--pato-vu-1);
    }

    100% {
        transform: translateY(-25px);
        background: var(--pato-vu-2);
    }
}

/* VU: Hidden */
.pato-vu-type-hidden .pato-vumeter {
    display: none;
}

.pato-vol-label {
    font-size: 20px;
    font-weight: bold;
    color: var(--pato-vol-color, #000);
}

#pato-volume-slider {
    width: 80px;
    cursor: pointer;
    accent-color: var(--pato-vol-color, #000);
}

/* --- SISTEMA DE FORMAS (SHAPES) --- */

/* Bordes Rectos (Sharp) */
.pato-style-sharp #pato-play-pause,
.pato-style-sharp .pato-artwork,
.pato-style-sharp .pato-artwork-wrapper,
.pato-style-sharp .pato-vinyl-disk {
    border-radius: 0px !important;
}

/* Bordes Redondeados (Rounded - Default) */
.pato-style-rounded #pato-play-pause,
.pato-style-rounded .pato-artwork,
.pato-style-rounded .pato-artwork-wrapper {
    border-radius: 12px !important;
}

/* Bordes Circulares (Circular) */
.pato-style-circular #pato-play-pause,
.pato-style-circular .pato-artwork,
.pato-style-circular .pato-artwork-wrapper,
.pato-style-circular .pato-vinyl-disk {
    border-radius: 50% !important;
}

/* Responsive */
@media (max-width: 768px) {
    #pato-radio-player {
        padding: 5px 0;
        padding-bottom: calc(5px + env(safe-area-inset-bottom));
    }

    .pato-vumeter,
    .pato-volume {
        display: none;
    }

    .pato-info {
        min-width: 0;
        margin-right: 10px;
    }

    .pato-artwork-wrapper {
        width: 50px;
        height: 50px;
    }

    #pato-play-pause {
        width: 40px;
        height: 40px;
    }

    .pato-skin-vinyl .pato-vinyl-disk {
        width: 40px;
        height: 40px;
        left: 5px;
    }

    .pato-skin-vinyl.playing .pato-vinyl-disk {
        left: 30px;
    }

    .pato-skin-modern .pato-artwork-wrapper {
        margin-top: 0;
    }
}