/* Hojas de Estilo del Reproductor de TV - PromoScreenTV */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body.tv-body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    cursor: none; /* Ocultar cursor en la TV */
    user-select: none;
    margin: 0;
    padding: 0;
}

/* Slide Container */
.tv-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    will-change: opacity;
}

.tv-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Image fits */
.tv-slide img {
    display: block;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.fit-cover img {
    object-fit: cover;
}

.fit-contain img {
    object-fit: contain;
}

.fit-none img {
    object-fit: none;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

/* --- TRANSICIONES --- */

/* 1. Desvanecimiento (Fade) */
.transition-fade .tv-slide {
    transition: opacity 1.2s ease-in-out;
}

/* 2. Desplazamiento (Slide) */
.transition-slide .tv-slide {
    transition: opacity 1s ease-in-out, transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-slide .tv-slide:not(.active) {
    transform: translateX(100%);
    opacity: 0;
}

.transition-slide .tv-slide.active {
    transform: translateX(0);
    opacity: 1;
}

/* 3. Zoom Suave / Ken Burns */
.transition-zoom .tv-slide {
    transition: opacity 1.5s ease-in-out;
}

@keyframes kenburns {
    0% {
        transform: scale(1.0);
    }
    100% {
        transform: scale(1.08) translate(0.5%, 0.5%);
    }
}

.transition-zoom .tv-slide.active img {
    animation: kenburns 40s linear forwards;
}

/* 4. Corte Directo (Sin Efecto) */
.transition-none .tv-slide {
    transition: none !important;
}


/* --- RELOJ FLOTANTE --- */
.tv-clock {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 600;
    padding: 8px 24px;
    border-radius: 12px;
    z-index: 10;
    font-family: monospace;
    letter-spacing: 1px;
}


/* --- PANTALLA DE CARGA --- */
.tv-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #090d16;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 100;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

.tv-loader p {
    font-size: 18px;
    color: #9ca3af;
    font-weight: 500;
}

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


/* --- PANTALLA VACÍA --- */
.tv-empty-msg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #090d16;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    gap: 16px;
    z-index: 50;
}

.tv-empty-msg h2 {
    font-size: 40px;
    color: #ffffff;
}

.tv-empty-msg p {
    font-size: 20px;
    color: #9ca3af;
}

.tv-empty-msg p.sub {
    font-size: 15px;
    color: #4b5563;
}

/* --- FLOATING FULLSCREEN TOAST BANNER --- */
.fs-overlay {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fs-overlay.hidden {
    opacity: 0;
    transform: translate(-50%, 50px);
    pointer-events: none;
}

.fs-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    padding: 16px 24px;
    max-width: 500px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transform: translateY(0);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.fs-overlay:hover .fs-card {
    transform: scale(1.02);
}

.fs-icon {
    color: #6366f1;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.fs-card h2 {
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 12px;
}

.fs-card p {
    font-size: 16px;
    color: #9ca3af;
    line-height: 1.5;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.8; }
}

/* --- ORIENTACIÓN VERTICAL EN PANTALLAS HORIZONTALES --- */
.orientation-vertical {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
}

.orientation-vertical .tv-slide {
    width: 56.25vh; /* Proporción 9:16 en base al alto de pantalla */
    height: 100vh;
    left: 50%;
    transform: translateX(-50%);
}

@media (orientation: portrait) {
    /* Si la TV física ya está rotada a vertical */
    .orientation-vertical .tv-slide {
        width: 100vw;
        height: 100vh;
        left: 0;
        transform: none;
    }
}

/* --- MARCA DE AGUA (WATERMARK) --- */
.tv-watermark {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 10;
    user-select: none;
    pointer-events: none;
}

.tv-watermark .watermark-icon {
    color: rgba(99, 102, 241, 0.5);
}

.tv-watermark span span {
    color: rgba(99, 102, 241, 0.6);
}
