/* 
   PREMIUM PLAYER DESIGN - 2024 EDITION
   Glassmorphism, Vibrant Accents, and Netflix-inspired UI
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #E50914;
    --secondary-color: #141414;
    --glass-bg: rgba(20, 20, 20, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-dim: #b3b3b3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* === BACKGROUND LAYERS === */
.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background-color: #000;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    z-index: -1;
}

.bg-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bg-blob {
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    filter: blur(80px);
    opacity: 0.2;
    border-radius: 50%;
    animation: move 20s infinite alternate;
}

.bg-blob:nth-child(2) {
    bottom: -10vw;
    right: -10vw;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    animation-duration: 30s;
}

@keyframes move {
    from {
        transform: translate(-10%, -10%);
    }

    to {
        transform: translate(10%, 10%);
    }
}

/* === THEME GRADIENTS === */
body.theme-default .bg-wrapper {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
}

body.theme-neon .bg-wrapper {
    background: linear-gradient(135deg, #2d005e 0%, #000000 100%);
}

body.theme-cyber .bg-wrapper {
    background: linear-gradient(135deg, #1a0b2e 0%, #0d021f 100%);
}

body.theme-ocean .bg-wrapper {
    background: linear-gradient(135deg, #002d2d 0%, #000a0a 100%);
}

body.theme-sunset .bg-wrapper {
    background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 100%);
}

body.theme-galaxy .bg-wrapper {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

body.theme-jungle .bg-wrapper {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

body.theme-hot .bg-wrapper {
    background: linear-gradient(135deg, #f12711 0%, #f5af19 100%);
}

body.theme-electric .bg-wrapper {
    background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
}

body.theme-candy .bg-wrapper {
    background: linear-gradient(135deg, #ae389e 0%, #fe1919 100%);
}

body.theme-royal .bg-wrapper {
    background: linear-gradient(135deg, #6441A5 0%, #2a0845 100%);
}

body.theme-rose .bg-wrapper {
    background: linear-gradient(135deg, #e52d27 0%, #b31217 100%);
}

body.theme-forest .bg-wrapper {
    background: linear-gradient(135deg, #134E5E 0%, #71B280 100%);
}

body.theme-nord .bg-wrapper {
    background: linear-gradient(135deg, #2e3440 0%, #4c566a 100%);
}

body.theme-sakura .bg-wrapper {
    background: linear-gradient(135deg, #FFC0CB 0%, #800080 100%);
}

body.theme-nightcity .bg-wrapper {
    background: linear-gradient(135deg, #fcee09 0%, #00f0ff 100%);
}

body.theme-gold .bg-wrapper {
    background: linear-gradient(135deg, #2d1d00 0%, #0a0800 100%);
}

body.theme-oled .bg-wrapper {
    background: #000;
}

body.theme-oled .bg-blobs {
    display: none;
}

/* Theme Netflix alias for OLED or Default with specific tweaks */
body.theme-netflix .bg-blobs {
    display: none;
}

body.theme-netflix .video-container {
    border-radius: 0;
}

body.theme-netflix .top-nav {
    background: #000;
}

/* === TOP NAVIGATION === */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.status-badge {
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid rgba(229, 9, 20, 0.4);
    padding: 5px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ff4d4d;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #ff4d4d;
    border-radius: 50%;
    animation: dot-pulse 1.5s infinite;
}

@keyframes dot-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 77, 77, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
    }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.viewer-count {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 50px;
}

/* === MAIN SECTION === */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 40px;
    z-index: 10;
}

.channel-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    background: linear-gradient(to bottom, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.video-container {
    width: 100%;
    max-width: 1100px;
    aspect-ratio: 16/9;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--glass-border);
}

/* === VIDEOJS CUSTOMIZATION === */
.video-js {
    width: 100% !important;
    height: 100% !important;
}

.video-js .vjs-big-play-button {
    background-color: var(--primary-color) !important;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin-top: -40px;
    margin-left: -40px;
    font-size: 3em;
    border: none !important;
    box-shadow: 0 0 30px var(--primary-color);
}

.video-js .vjs-control-bar {
    height: 70px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    background-color: transparent !important;
}

.video-js .vjs-progress-control {
    position: absolute;
    width: 100%;
    top: -20px;
    left: 0;
    height: 10px;
}

.video-js .vjs-play-progress {
    background-color: var(--primary-color);
}

/* === BRANDING OVERLAY === */
.player-branding {
    position: absolute;
    bottom: 25px;
    right: 85px;
    height: 25px;
    width: auto;
    object-fit: contain;
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 1));
    display: block !important;
    opacity: 0.8;
    /* Siempre visible con buena opacidad */
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slightly more opaque when controls are active */
.video-js.vjs-user-active .player-branding {
    opacity: 1;
}

.video-js.vjs-user-inactive .player-branding {
    opacity: 0;
}

/* === FOOTER === */
.main-footer {
    width: 100%;
    padding: 60px 5% 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    text-align: center;
    margin-top: 60px;
    color: var(--text-dim);
    font-size: 14px;
}

.footer-logo {
    height: 35px;
    margin-bottom: 20px;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
}

.footer-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* === SHARE BUTTONS === */
.share-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.share-pill:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* === FOOTER BUTTONS === */
.footer-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.social-pill:hover {
    background: #fff;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.whatsapp-btn {
    background: #25d366;
    border-color: #25d366;
}

.whatsapp-btn:hover {
    background: #128c7e;
    color: #fff;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* === MOBILE === */
@media (max-width: 768px) {
    .channel-title {
        font-size: 1.8rem;
    }

    .video-container {
        border-radius: 0;
    }

    .top-nav {
        padding: 0 15px;
        height: 70px;
    }

    .nav-logo {
        height: 35px;
    }

    .status-badge {
        padding: 4px 10px;
        font-size: 11px;
    }

    .main-content {
        padding-top: 90px;
    }

    .player-branding {
        height: 20px;
        bottom: 20px;
        right: 70px;
    }
}