/* ============================================================
   YOTTACAST — Paleta (hereda de YottaMaster via CSS vars)
   ============================================================ */
:root {
    --yc-primary:    var(--theme-palette-color-1, var(--theme-palette-color-1));
    --yc-accent:     var(--theme-palette-color-2, #b44fc4);
    --yc-font:       var(--theme-font-family, inherit);

    --yc-bg:         var(--theme-palette-color-8, rgba(20,20,30,0.95));
    --yc-border:     var(--theme-palette-color-7, rgba(255,255,255,0.08));
    --yc-text:       var(--theme-text-color, #f0f0f0);
    --yc-text-muted: var(--theme-palette-color-4, rgba(255,255,255,0.65));
    --yc-surface:    var(--theme-palette-color-6, rgba(0,0,0,0.25));
    --yc-progress:   rgba(255,255,255,0.15);
    --yc-radius:     0px; /* Rectangular — igual que YottaPlayer */
}

html.light-mode,
html.light-mode body {
    --yc-bg:         rgba(248,248,252,0.97);
    --yc-border:     rgba(0,0,0,0.10);
    --yc-text:       #1a1a2e;
    --yc-text-muted: rgba(30,30,60,0.6);
    --yc-surface:    rgba(0,0,0,0.05);
    --yc-progress:   rgba(0,0,0,0.12);
}

/* ============================================================
   FULL PLAYER
   ============================================================ */
.yc-player {
    font-family: var(--yc-font);
    background: var(--yc-bg);
    border: 1px solid var(--yc-border);
    color: var(--yc-text);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.45),
                inset 0 1px 0 rgba(255,255,255,0.08);
    border-radius: var(--yc-radius);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.yc-player:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.55),
                inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ── Header ─────────────────────────────────────────────────── */
.yc-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--yc-border);
    background: var(--yc-surface);
}

.yc-show-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: var(--yc-radius);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.yc-show-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.yc-show-logo:hover img { transform: scale(1.05); }

.yc-show-meta { flex: 1; min-width: 0; }

.yc-show-title {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--yc-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.yc-show-subtitle {
    margin: 0 0 10px 0;
    font-size: 0.82rem;
    color: var(--yc-text-muted);
    text-transform: none;
}
.yc-show-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.yc-feed-btn, .yc-ia-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 10px;
    background: var(--yc-primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--yc-radius);
    transition: background 0.2s ease;
}
.yc-feed-btn:hover, .yc-ia-btn:hover {
    background: var(--yc-accent);
    color: #fff !important;
}
.yc-feed-btn .dashicons, .yc-ia-btn .dashicons {
    font-size: 14px; width: 14px; height: 14px;
}
.yc-ia-btn { background: rgba(255,255,255,0.12); }
.yc-ia-btn:hover { background: rgba(255,255,255,0.22); }
html.light-mode .yc-ia-btn { background: rgba(0,0,0,0.08); }
html.light-mode .yc-ia-btn:hover { background: rgba(0,0,0,0.14); }

/* ── Now Playing ─────────────────────────────────────────────── */
.yc-now-playing {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 22px 24px;
    border-bottom: 1px solid var(--yc-border);
    background: var(--yc-surface);
    transition: opacity 0.3s ease;
}
.yc-now-playing.yc-hidden { display: none; }

.yc-np-cover-wrap {
    position: relative;
    flex-shrink: 0;
    width: 90px;
    height: 90px;
}
.yc-np-cover {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--yc-radius);
    display: block;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
/* Spinning ring while playing */
.yc-np-spin-ring {
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid transparent;
    border-top-color: var(--yc-primary);
    opacity: 0;
    transition: opacity 0.3s;
}
.yc-np-cover-wrap.is-playing .yc-np-spin-ring {
    opacity: 1;
    animation: yc-spin 1.8s linear infinite;
}
@keyframes yc-spin { to { transform: rotate(360deg); } }

.yc-np-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.yc-np-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--yc-text);
}
.yc-np-creator {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Controls ────────────────────────────────────────────────── */
.yc-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.yc-btn {
    background: var(--yc-surface);
    border: 1px solid var(--yc-border);
    color: var(--yc-text);
    cursor: pointer;
    border-radius: var(--yc-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
    padding: 0;
}
.yc-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}
.yc-prev-btn, .yc-next-btn {
    width: 36px;
    height: 36px;
}
.yc-play-btn, .yc-play-main {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--yc-primary), var(--yc-accent));
    border: none;
    box-shadow: 0 4px 18px rgba(138,14,168,0.45);
}
.yc-play-btn .dashicons {
    font-size: 26px;
    width: 26px;
    height: 26px;
}
.yc-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(138,14,168,0.6);
}
.yc-prev-btn:hover, .yc-next-btn:hover {
    background: rgba(138,14,168,0.2);
    border-color: var(--yc-primary);
}
.yc-speed-btn {
    width: 36px;
    height: 36px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── Progress ────────────────────────────────────────────────── */
.yc-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.yc-time-current, .yc-time-total {
    font-size: 0.72rem;
    color: var(--yc-text-muted);
    white-space: nowrap;
    min-width: 32px;
    font-variant-numeric: tabular-nums;
}
.yc-progress-bar {
    flex: 1;
    position: relative;
    height: 6px;
    background: var(--yc-progress);
    border-radius: 3px;
    overflow: visible;
    cursor: pointer;
}
.yc-progress-fill {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--yc-primary), var(--yc-accent));
    border-radius: inherit;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}
.yc-progress-seek {
    position: absolute;
    inset: -6px 0;
    width: 100%;
    height: calc(100% + 12px);
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

/* ── Volume ──────────────────────────────────────────────────── */
.yc-volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.yc-vol-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--yc-text-muted);
    cursor: pointer;
}
.yc-volume-slider {
    width: 72px;
    height: 4px;
    -webkit-appearance: none;
    background: var(--yc-progress);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.yc-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--yc-text);
    cursor: pointer;
    transition: transform 0.15s ease;
}
.yc-volume-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }

/* ── Episode list ────────────────────────────────────────────── */
.yc-episode-list {
    max-height: 460px;
    overflow-y: auto;
}
.yc-episode-list::-webkit-scrollbar { width: 5px; }
.yc-episode-list::-webkit-scrollbar-track { background: var(--yc-border); }
.yc-episode-list::-webkit-scrollbar-thumb {
    background: var(--yc-primary);
    border-radius: 0;
}

.yc-episode {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--yc-border);
    cursor: pointer;
    transition: background 0.18s ease;
}
.yc-episode:last-child { border-bottom: none; }
.yc-episode:hover { background: rgba(138,14,168,0.08); }
.yc-episode.is-active { background: rgba(138,14,168,0.15); }
.yc-episode.is-active .yc-ep-title { color: var(--yc-accent); }

.yc-ep-play-wrap {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}
.yc-ep-play-btn {
    width: 36px;
    height: 36px;
    background: var(--yc-primary);
    border: none;
    border-radius: var(--yc-radius);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}
.yc-ep-play-btn .dashicons { font-size: 18px; width: 18px; height: 18px; }
.yc-ep-play-btn:hover { background: var(--yc-accent); transform: scale(1.1); }
.yc-ep-number {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: var(--yc-surface);
    border: 1px solid var(--yc-border);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 3px;
    line-height: 1;
    color: var(--yc-text-muted);
}

.yc-ep-info { flex: 1; min-width: 0; }
.yc-ep-title {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--yc-text);
    transition: color 0.2s;
}
.yc-ep-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.yc-ep-format, .yc-ep-duration {
    font-size: 0.68rem;
    color: var(--yc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 3px;
}
.yc-ep-duration .dashicons { font-size: 12px; width: 12px; height: 12px; }
.yc-ep-format {
    background: rgba(138,14,168,0.15);
    color: var(--yc-accent);
    padding: 1px 5px;
}

.yc-ep-download {
    flex-shrink: 0;
    color: var(--yc-text-muted);
    text-decoration: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--yc-radius);
    transition: color 0.2s, background 0.2s;
}
.yc-ep-download:hover { color: var(--yc-primary); background: rgba(138,14,168,0.12); }
.yc-ep-download .dashicons { font-size: 18px; width: 18px; height: 18px; }

.yc-no-episodes {
    padding: 40px 24px;
    text-align: center;
    color: var(--yc-text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ── Text utility ────────────────────────────────────────────── */
.yc-text-muted { color: var(--yc-text-muted); }

/* ============================================================
   MINI WIDGET
   ============================================================ */
.yc-mini {
    font-family: var(--yc-font);
    background: var(--yc-bg);
    border: 1px solid var(--yc-border);
    color: var(--yc-text);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--yc-radius);
    max-width: 420px;
    width: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
}
.yc-mini:hover {
    box-shadow: 0 14px 36px rgba(0,0,0,0.45);
}
.yc-mini-cover {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: var(--yc-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.yc-mini-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.yc-mini-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.yc-mini-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.yc-mini-show {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.yc-mini-progress-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.yc-mini-progress-bar {
    flex: 1;
    height: 3px;
    background: var(--yc-progress);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.yc-mini-progress-bar .yc-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--yc-primary), var(--yc-accent));
    transition: width 0.1s linear;
}
.yc-mini-time {
    font-size: 0.65rem;
    color: var(--yc-text-muted);
    min-width: 28px;
    font-variant-numeric: tabular-nums;
}
.yc-mini-play-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--yc-radius);
    background: linear-gradient(135deg, var(--yc-primary), var(--yc-accent));
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(138,14,168,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.yc-mini-play-btn:hover { transform: scale(1.1); box-shadow: 0 5px 18px rgba(138,14,168,0.55); }
.yc-mini-play-btn .dashicons { font-size: 20px; width: 20px; height: 20px; }

/* ============================================================
   SINGLE EPISODE EMBED
   ============================================================ */
.yc-embed {
    font-family: var(--yc-font);
    background: var(--yc-bg);
    border: 1px solid var(--yc-border);
    color: var(--yc-text);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: stretch;
    border-radius: var(--yc-radius);
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
.yc-embed-cover {
    flex-shrink: 0;
    width: 90px;
}
.yc-embed-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.yc-embed-body {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}
.yc-embed-title {
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.yc-embed-show {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.yc-embed-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 600px) {
    .yc-now-playing { gap: 24px; }
    .yc-np-cover-wrap, .yc-np-cover { width: 110px; height: 110px; }
}

@media (max-width: 480px) {
    .yc-header { flex-direction: column; align-items: flex-start; }
    .yc-show-logo { width: 60px; height: 60px; }
    .yc-controls { justify-content: center; }
    .yc-mini { max-width: 100%; }
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
@keyframes yc-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.yc-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: yc-skeleton 1.5s infinite;
    border-radius: 4px;
}
html.light-mode .yc-skeleton {
    background: linear-gradient(90deg,
        rgba(0,0,0,0.05) 25%,
        rgba(0,0,0,0.09) 50%,
        rgba(0,0,0,0.05) 75%);
    background-size: 200% 100%;
}

/* ============================================================
   PULSE animation for playing state badge
   ============================================================ */
@keyframes yc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.yc-episode.is-active .yc-ep-play-btn {
    animation: yc-pulse 1.8s infinite;
}
