/**
 * YT Starter Pack — TV Modern UI (v3.2.4)
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

#ytsp-tv-root.ytsp-tv-root--modern {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #08080c;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    cursor: default;
}

#ytsp-tv-root.ytsp-tv-root--modern.ytsp-tv--idle {
    cursor: none;
}

.ytsp-tv-stage {
    position: absolute;
    inset: 0;
    background: #0c0c10;
}

.ytsp-tv-live-container {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ytsp-tv-live-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Header chrome */
.ytsp-tv-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#ytsp-tv-root.ytsp-tv--idle .ytsp-tv-header {
    opacity: 0;
}

.ytsp-tv-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 10px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
}

.ytsp-tv-header__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e85d4a;
    box-shadow: 0 0 10px rgba(232, 93, 74, 0.8);
}

.ytsp-tv-header__name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
}

.ytsp-tv-header__live {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #fff;
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(229, 57, 53, 0.45);
}

.ytsp-tv-header__live--hidden {
    display: none;
}

/* Footer chrome */
.ytsp-tv-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#ytsp-tv-root.ytsp-tv--idle .ytsp-tv-footer {
    opacity: 0;
}

.ytsp-tv-footer__title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin: 0;
    min-height: 1.4em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.ytsp-tv-footer__actions {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.ytsp-tv-footer__btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}

.ytsp-tv-footer__btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.04);
}

.ytsp-tv-footer__btn--active {
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.2);
}

/* Loader */
.ytsp-tv-loader {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(8, 8, 12, 0.92);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.ytsp-tv-loader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ytsp-tv-loader__ring {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: #e53935;
    border-radius: 50%;
    animation: ytsp-tv-modern-spin 0.8s linear infinite;
}

@keyframes ytsp-tv-modern-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Offline — clean, no large graphic */
.ytsp-tv-offline {
    position: absolute;
    inset: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0e0e14 0%, #08080c 100%);
    padding: 32px;
    text-align: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ytsp-tv-offline--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ytsp-tv-offline__inner {
    max-width: 420px;
}

.ytsp-tv-offline__inner h2 {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.ytsp-tv-offline__inner p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.55;
    margin: 0;
}

.ytsp-tv-offline__hint {
    margin-top: 16px !important;
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    line-height: 1.5 !important;
}

/* Minimal skeleton */
.ytsp-tv-skeleton--modern {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: #0c0c10;
}

.ytsp-tv-skeleton--modern .ytsp-tv-skeleton__video {
    width: 100%;
    height: 100%;
}

/* Channel grid below player — cleaner cards */
.ytsp-tv-channel-videos {
    margin-top: 24px;
    padding: 0 4px;
}

.ytsp-tv-channel-videos__title {
    font-family: "Inter", sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em;
}

.ytsp-tv-video-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ytsp-tv-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .ytsp-tv-header {
        padding: 12px 14px;
    }
    .ytsp-tv-footer {
        padding: 14px;
        flex-wrap: wrap;
    }
    .ytsp-tv-footer__title {
        font-size: 13px;
        width: 100%;
    }
    #ytsp-tv-root.ytsp-tv-root--modern {
        border-radius: 12px;
    }
}
