/* =====================================================
   YOTTAPLAYER — PALETA OSCURA (Base / Default)
   Se utiliza como diseño predeterminado con variables de Yottamaster
   ===================================================== */
:root {
    --yp-primary:        var(--theme-palette-color-1, var(--theme-palette-color-1));
    --yp-accent:         var(--theme-palette-color-2, #fc6a2c);
    --yp-font:           var(--theme-font-family, inherit);

    /* Superficies */
    --yp-glass-bg:       var(--theme-palette-color-8, rgba(20, 20, 30, 0.92));
    --yp-glass-border:   var(--theme-palette-color-7, rgba(255, 255, 255, 0.08));
    --yp-glass-shadow:   inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --yp-hover-shadow:   rgba(0, 0, 0, 0.6);

    /* Texto */
    --yp-text:           var(--theme-text-color, #f0f0f0);
    --yp-text-muted:     var(--theme-palette-color-4, rgba(255, 255, 255, 0.7));
    --yp-text-shadow:    0 1px 2px rgba(0, 0, 0, 0.5);

    /* Fondos internos */
    --yp-box-bg:         var(--theme-palette-color-6, rgba(0, 0, 0, 0.25));
    --yp-snippet-bg:     var(--theme-palette-color-5, rgba(255, 255, 255, 0.08));
    --yp-history-bg:     rgba(255, 255, 255, 0.03);

    /* Bordes y hovers */
    --yp-history-border: var(--theme-palette-color-7, rgba(255, 255, 255, 0.1));
    --yp-history-hover:  var(--theme-palette-color-6, rgba(255, 255, 255, 0.08));

    /* Overlay */
    --yp-overlay-bg:     rgba(0, 0, 0, 0.6);
    --yp-overlay-icon:   var(--theme-text-color, #ffffff);

    /* Cover widget */
    --yp-widget-bg:      var(--theme-palette-color-8, #1e1e28);
    --yp-widget-text:    var(--theme-text-color, #f0f0f0);
}

/* =====================================================
   YOTTAPLAYER — PALETA CLARA
   Se activa cuando Yottamaster alterna al modo claro
   ===================================================== */
html.light-mode,
html.light-mode body {
    --yp-glass-bg:       rgba(248, 248, 252, 0.96);
    --yp-glass-border:   rgba(0,0,0,0.10);
    --yp-glass-shadow:   inset 0 1px 0 rgba(255,255,255,0.9);
    --yp-hover-shadow:   rgba(0,0,0,0.12);

    --yp-text:           #0f0f1a;
    --yp-text-muted:     rgba(15,15,26,0.85);
    --yp-text-shadow:    none;

    --yp-box-bg:         rgba(0,0,0,0.05);
    --yp-snippet-bg:     rgba(0,0,0,0.04);
    --yp-history-bg:     rgba(0,0,0,0.05);

    --yp-history-border: rgba(0,0,0,0.10);
    --yp-history-hover:  rgba(0,0,0,0.06);

    --yp-overlay-bg:     rgba(255,255,255,0.80);
    --yp-overlay-icon:   #1a1a2e;

    --yp-widget-bg:      #f0f0f6;
    --yp-widget-text:    #1a1a2e;
}

html.light-mode .yp-artist-info-title,
html.light-mode .yp-snippet-time {
    opacity: 0.9 !important;
}

/* ── Tema 2: protección explícita de botones de play ─────────────────────
   Los botones de play SIEMPRE muestran blanco sobre color de paleta,
   independientemente del tema activo (Tema 1 oscuro / Tema 2 claro).
   Esto anula las reglas globales de color del tema que puedan interferir.
   ─────────────────────────────────────────────────────────────────────── */
html.light-mode .yp-controls .yp-play-btn,
html.light-mode .yp-play-toggle,
html.light-mode .yp-snippet-play-btn {
    background: linear-gradient(135deg, var(--yp-primary), var(--yp-accent)) !important;
    color: #ffffff !important;
}

html.light-mode .yp-controls .yp-play-btn i,
html.light-mode .yp-play-toggle i,
html.light-mode .yp-snippet-play-btn i {
    color: #ffffff !important;
}

html.light-mode .yp-controls .yp-play-btn:hover {
    background: linear-gradient(135deg, var(--yp-accent), var(--yp-primary)) !important;
}

html.light-mode .yp-play-toggle:hover {
    background: linear-gradient(135deg, var(--yp-accent), var(--yp-primary)) !important;
}

html.light-mode .yp-snippet-play-btn:hover {
    background: var(--yp-accent) !important;
}

/* ── Tema 2: texto de widgets adaptado ────────────────────────────────── */
html.light-mode .yp-widget .yp-marquee-container,
html.light-mode .yp-cover-widget-bottom .yp-marquee-container,
html.light-mode .yp-np-bar .yp-marquee-container {
    color: var(--yp-widget-text) !important;
}

html.light-mode .yp-widget {
    color: var(--yp-text) !important;
}



.yp-widget, .yp-full-player {
    font-family: var(--yp-font);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    background: var(--yp-glass-bg);
    border: 1px solid var(--yp-glass-border);
    color: var(--yp-text);
    box-shadow: 0 10px 30px var(--yp-hover-shadow), var(--yp-glass-shadow);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    text-transform: uppercase;
}

.yp-widget:hover, .yp-full-player:hover {
    box-shadow: 0 15px 40px var(--yp-hover-shadow), var(--yp-glass-shadow);
}

.yp-widget {
    padding: 12px 16px;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    max-width: 350px;
}

.yp-widget-cover {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.yp-widget-cover img { 
    width: 55px; 
    height: 55px; 
    object-fit: cover; 
    display: block;
    transition: transform 0.5s ease;
}

.yp-widget-cover:hover img {
    transform: scale(1.1);
}

.yp-widget-info { 
    flex: 1; 
    min-width: 0; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}

.yp-marquee-container { 
    overflow: hidden; 
    white-space: nowrap; 
    width: 100%; 
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: var(--yp-text-shadow);
}

.yp-marquee { 
    display: inline-block; 
    text-transform: uppercase;
    animation: yp-marquee 15s linear infinite; 
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

@keyframes yp-marquee { 
    0% { transform: translateX(100%); } 
    100% { transform: translateX(-100%); } 
}

.yp-widget-visualizer-container canvas { 
    width: 100%; 
    height: 18px; 
    background: var(--yp-box-bg); 
    border-radius: 0; 
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.yp-controls .yp-play-btn {
    background: linear-gradient(135deg, var(--yp-primary), var(--yp-accent));
    border: none;
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(252, 106, 44, 0.4);
    transition: all 0.2s ease;
}

.yp-controls .yp-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(252, 106, 44, 0.6);
}

.yp-controls .yp-play-btn i {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Full Player */
.yp-full-player {
    border-radius: 0;
    padding: 24px;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.yp-full-player-left {
    margin-bottom: 20px;
}

.yp-current-cover {
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.yp-current-cover img { 
    width: 100%; 
    aspect-ratio: 1; 
    object-fit: cover; 
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.yp-current-cover:hover img {
    transform: scale(1.05);
}

.yp-current-meta {
    margin-bottom: 15px;
    text-align: center;
}

.yp-current-meta .yp-artist {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--yp-text-muted);
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.yp-current-meta .yp-song {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--yp-text);
    text-shadow: var(--yp-text-shadow);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yp-visualizer-container {
    position: relative;
    width: calc(100% + 48px);
    margin: 24px -24px 0 -24px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.yp-artist-info-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    margin: 0 -24px -24px -24px;
    padding: 24px;
    background: var(--yp-box-bg);
    border-top: 1px solid var(--yp-glass-border);
}

.yp-artist-info-photo {
    width: 140px;
    height: 140px;
    border-radius: 0;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.yp-artist-info-content {
    flex: 1;
    min-width: 0;
    width: 100%;
}

@media (min-width: 600px) {
    .yp-artist-info-box {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }
    
    .yp-artist-info-photo {
        width: 100px;
        height: 100px;
    }
}

.yp-artist-bio-wrapper {
    margin-bottom: 15px;
}

.yp-artist-bio {
    font-size: 0.9em;
    line-height: 1.4;
    color: var(--yp-text-muted);
    margin: 0;
    max-height: 4.2em; /* exactly 3 lines at 1.4 line-height */
    overflow: hidden;
    transition: max-height 0.3s ease;
    text-transform: none; /* readablity for long bio */
    white-space: pre-wrap;
}

@keyframes yp-ellipsis {
    0% { content: "."; }
    33% { content: ".."; }
    66% { content: "..."; }
}

.yp-loading-dots::after {
    content: ".";
    animation: yp-ellipsis 1.5s infinite steps(1);
    display: inline-block;
    width: 20px;
    text-align: left;
}

.yp-artist-bio.expanded {
    max-height: 11.2em; /* exactly 8 lines at 1.4 line-height */
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar for bio */
.yp-artist-bio.expanded::-webkit-scrollbar {
    width: 6px;
}
.yp-artist-bio.expanded::-webkit-scrollbar-track {
    background: var(--yp-history-border);
    border-radius: 0;
}
.yp-artist-bio.expanded::-webkit-scrollbar-thumb {
    background: var(--yp-text);
    border-radius: 0;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.yp-artist-bio.expanded::-webkit-scrollbar-thumb:hover {
    background: var(--yp-text-muted);
}

.yp-bio-toggle, .yp-action-btn {
    cursor: pointer;
    background: var(--yp-primary);
    color: #ffffff !important;
    font-size: 0.7em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 0;
    text-transform: uppercase;
    transition: background 0.2s ease;
    border: none;
    text-decoration: none;
}

.yp-bio-toggle:hover, .yp-action-btn:hover {
    background: var(--yp-accent);
}

.yp-snippet-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--yp-snippet-bg);
    padding: 8px 12px;
    margin-top: 10px;
}

.yp-snippet-play-btn {
    background: var(--yp-primary);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.yp-snippet-play-btn:hover {
    background: var(--yp-accent);
}

.yp-visualizer-container canvas { 
    width: 100%; 
    height: 60px; 
    background: var(--yp-box-bg); 
    display: block;
}

@keyframes yp-text-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.yp-scrollable-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

.yp-player-controls { 
    display: flex; 
    align-items: center; 
    margin-top: 0;
    background: var(--yp-box-bg);
    padding: 0;
    border-radius: 0;
    border: none;
}

.yp-play-toggle { 
    background: linear-gradient(135deg, var(--yp-primary), var(--yp-accent)); 
    border: none; 
    color: #fff; 
    width: 65px; 
    height: 65px; 
    border-radius: 0; 
    cursor: pointer; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.yp-play-toggle:hover {
    background: linear-gradient(135deg, var(--yp-accent), var(--yp-primary));
}

.yp-play-toggle i {
    font-size: 24px;
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.yp-play-toggle:hover i {
    transform: scale(1.3);
}

.yp-volume-container {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 25px;
    position: relative;
}

.yp-volume-container i {
    color: var(--yp-text-muted);
    position: absolute;
    left: 6px;
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yp-volume-slider { 
    width: 100%;
    min-width: 0;
    flex: 1;
    margin: 0;
    height: 6px;
    -webkit-appearance: none;
    background: var(--yp-history-border);
    border-radius: 0;
    outline: none;
    transition: background 0.3s;
}

.yp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 0;
    background: var(--yp-text);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}

.yp-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.yp-player-body {
    margin-top: 25px;
}

.yp-history-list h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--yp-text-muted);
    margin: 0 0 10px 0;
    border-bottom: 1px solid var(--yp-glass-border);
    padding-bottom: 8px;
    text-align: left;
}

.yp-history-list ul { 
    list-style: none; 
    padding: 0; 
    margin: 0;
    max-height: 240px;
    overflow-y: auto;
    text-align: left;
}

.yp-history-list ul::-webkit-scrollbar {
    width: 6px;
}
.yp-history-list ul::-webkit-scrollbar-track {
    background: var(--yp-history-border);
    border-radius: 0;
}
.yp-history-list ul::-webkit-scrollbar-thumb {
    background: var(--yp-text);
    border-radius: 0;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.yp-history-list ul::-webkit-scrollbar-thumb:hover {
    background: var(--yp-text-muted);
}

.yp-history-list li { 
    border-radius: 0;
    color: var(--yp-text-muted);
}

.yp-history-cover-wrapper {
    position: relative;
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    cursor: pointer;
    overflow: hidden;
}

.yp-history-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--yp-overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.yp-history-cover-wrapper:hover .yp-history-cover-overlay {
    opacity: 1;
}

.yp-history-cover-overlay i {
    color: var(--yp-overlay-icon);
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.yp-history-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yp-history-list li:hover {
    background: var(--yp-history-hover);
}

/* Desktop Responsive Layout */
@media (min-width: 768px) {
    .yp-full-player {
        display: grid;
        grid-template-columns: 3fr 2fr;
        column-gap: 40px;
        row-gap: 0;
        align-items: stretch;
    }
    .yp-visualizer-container {
        grid-column: 1 / -1;
        margin-top: 24px; /* Consistent spacing from the two-column section */
    }
    .yp-artist-info-box {
        grid-column: 1 / -1;
        margin-top: 0; /* Flush against visualizer */
    }
    .yp-artist-info-photo {
        width: 200px;
        height: 200px;
    }
    .yp-full-player-left {
        margin-bottom: 0;
        min-width: 0;
    }
    .yp-current-cover {
        max-width: 100%;
    }
    .yp-full-player-right {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: 0;
        min-height: 100%;
        min-width: 0;
    }
    .yp-player-body {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .yp-history-list {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .yp-current-meta {
        text-align: right;
    }
    .yp-player-controls {
        flex-direction: row;
    }
    .yp-volume-container {
        flex-direction: row-reverse;
    }
    .yp-volume-container i {
        left: auto;
        right: 6px;
    }
    .yp-history-list h4, .yp-history-list ul {
        text-align: right;
    }
    .yp-history-list ul {
        flex: 1;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
    }
}

/* Cover Widget */
.yp-cover-widget {
    display: flex;
    flex-direction: column;
    width: 100%;
    font-family: var(--yp-font);
    background: var(--yp-widget-bg);
    color: var(--yp-widget-text);
    overflow: hidden;
    border: 1px solid var(--yp-glass-border);
    box-shadow: 0 8px 32px var(--yp-hover-shadow);
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.yp-cover-widget-img {
    width: 100%;
    position: relative;
}

.yp-cover-widget-img img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.yp-cover-widget:hover .yp-cover-widget-img img {
    transform: scale(1.04);
}

.yp-cover-widget-bottom {
    background: var(--yp-widget-bg);
    padding: 12px 15px;
    box-sizing: border-box;
    border-top: 2px solid var(--yp-primary);
    transition: background 0.3s ease;
}

.yp-cover-widget-bottom .yp-marquee-container {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--yp-widget-text);
    text-shadow: var(--yp-text-shadow, none);
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

@keyframes yp-blink {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}

@keyframes yp-spin {
    100% { transform: rotate(360deg); }
}

.yp-spinning {
    animation: yp-spin 1s linear infinite !important;
}

@keyframes yp-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.yp-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: yp-skeleton-loading 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .yp-skeleton,
html.light-mode .yp-skeleton {
    background: linear-gradient(90deg, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.05) 75%);
    background-size: 200% 100%;
}

.yp-widget img,
.yp-full-player img,
.yp-cover-widget img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* =====================================================
   RADIOVISUAL STYLES
   ===================================================== */
.yp-rv-container {
    background: #000;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.yp-rv-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yp-rv-overlay {
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, opacity 0.3s ease;
}

.yp-rv-container:hover .yp-rv-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.yp-rv-play-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 2px solid #fff;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
}

.yp-rv-play-btn i {
    font-size: 40px;
    margin-left: 5px;
}

.yp-rv-play-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.yp-rv-info {
    position: absolute;
    bottom: 25px;
    left: 25px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 5;
}

.yp-rv-info h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.yp-rv-info small {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.yp-rv-info small::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #ff0000;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff0000;
    animation: yp-blink 1s infinite;
}

/* =====================================================
   NOW PLAYING WIDGET — Solo metadatos (sin reproductor)
   Uso: [yottaplayer_nowplaying id="X"]
   ===================================================== */
.yp-nowplaying-widget {
    display: flex;
    flex-direction: column;
    font-family: var(--yp-font, inherit);
    background: var(--yp-widget-bg, #0e0e14);
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 32px var(--yp-hover-shadow, rgba(0, 0, 0, 0.55));
    border: 1px solid var(--yp-glass-border, rgba(255,255,255,0.08));
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ── Carátula ─────────────────────────────────────── */
.yp-np-cover {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--yp-box-bg, rgba(0,0,0,0.25));
    transition: background 0.3s ease;
}

.yp-np-cover img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity  0.4s ease;
}

.yp-nowplaying-widget:hover .yp-np-cover img {
    transform: scale(1.04);
}

/* Estado de carga: ligera transparencia hasta que llegue la portada real */
.yp-nowplaying-widget.yp-np-loading .yp-np-cover img {
    opacity: 0.6;
}

/* ── Barra inferior con marquesina ───────────────── */
.yp-np-bar {
    background: var(--yp-widget-bg, #0e0e14);
    padding: 11px 14px;
    box-sizing: border-box;
    border-top: 2px solid var(--yp-primary, #8a0ea8);
    position: relative;
    transition: background 0.3s ease;
}

/* Línea de brillo sutil sobre el borde superior */
.yp-np-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--yp-glass-border, rgba(255, 255, 255, 0.15)) 40%,
        var(--yp-glass-border, rgba(255, 255, 255, 0.15)) 60%,
        transparent
    );
}

.yp-np-bar .yp-marquee-container {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--yp-widget-text, #f0f0f0);
    letter-spacing: 0.4px;
    text-shadow: var(--yp-text-shadow, 0 1px 3px rgba(0, 0, 0, 0.6));
    transition: color 0.3s ease;
}

/* Reutiliza la animación global yp-marquee + yp-marquee-container */
.yp-np-bar .yp-marquee {
    display: inline-block;
    animation: yp-marquee 18s linear infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Removido: la pausa al hacer hover ahora se hace vía JS reduciendo el playbackRate sin resetear */

/* ── Tema 2 (modo claro) ──────────────────────────── */
html.light-mode .yp-nowplaying-widget {
    background: var(--yp-widget-bg);
    border-color: var(--yp-glass-border);
    box-shadow: 0 8px 32px var(--yp-hover-shadow);
}

html.light-mode .yp-np-cover {
    background: var(--yp-box-bg);
}

html.light-mode .yp-np-bar {
    background: #ffffff !important;
}

/* ── Prevención de selección de imagen ──────────── */
.yp-nowplaying-widget img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* =====================================================
   TV WIDGET — Video pasivo 16:9, sin controles
   Uso: [yottaplayer_tvwidget id="X"]
   ===================================================== */
.yp-tvwidget-wrap {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

/* Fuerza ratio 16:9 sin importar el ancho del contenedor */
.yp-tvwidget-wrap::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 9/16 = 0.5625 */
}

.yp-tvwidget-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Sin interacción: no se puede hacer clic, arrastrar ni abrir menú contextual */
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Capa de bloqueo extra encima del video para impedir cualquier interacción */
.yp-tvwidget-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: transparent;
    pointer-events: auto; /* intercepta clics antes del video */
    cursor: default;
}

/* =====================================================
   PLAY OVERLAY ON HOVER
   ===================================================== */
.yp-np-cover,
.yp-tvwidget-container {
    position: relative;
}

.yp-hover-play-overlay-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, opacity 0.3s ease;
    z-index: 20;
    pointer-events: auto;
    text-decoration: none !important;
}

.yp-nowplaying-widget:hover .yp-hover-play-overlay-link,
.yp-tvwidget-container:hover .yp-hover-play-overlay-link {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6) !important;
}

.yp-hover-play-box {
    width: 60px;
    height: 60px;
    /* El fondo del botón de play SIEMPRE usa el color de paleta, sin importar el tema */
    background-color: var(--yp-primary, #8a0ea8) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease;
    transform: scale(0.9);
}

.yp-hover-play-overlay-link:hover .yp-hover-play-box {
    transform: scale(1.08);
    background-color: var(--yp-accent, #fc6a2c) !important;
}

/* El ícono de play es SIEMPRE blanco, independiente del tema */
.yp-hover-play-box .dashicons-controls-play {
    color: #ffffff !important;
    font-size: 32px !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 4px !important; /* Desplazamiento óptico para que el triángulo parezca centrado */
    text-decoration: none !important;
}

/* Tema 2 (modo claro) — el botón de play NO cambia de color, siempre paleta + blanco */
html.light-mode .yp-hover-play-box {
    background-color: var(--yp-primary, #8a0ea8) !important;
}
html.light-mode .yp-hover-play-overlay-link:hover .yp-hover-play-box {
    background-color: var(--yp-accent, #fc6a2c) !important;
}
html.light-mode .yp-hover-play-box .dashicons-controls-play {
    color: #ffffff !important;
}

