/* ============================================================
   NUO TV FLOATING PLAYER — tv-player.css
   Modulárny floating video player, nezávislý od ostatného CSS
   ============================================================ */

/* --- Player Container --- */
.nuo-tv-player {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 680px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.45));
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    border-radius: 16px;
    user-select: none;
}

.nuo-tv-player.is-visible {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.nuo-tv-player.is-animating-in {
    animation: tvPlayerIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.nuo-tv-player.is-animating-out {
    animation: tvPlayerOut 0.3s ease-in forwards;
}

@keyframes tvPlayerIn {
    from { opacity: 0; transform: translateY(40px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tvPlayerOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(30px) scale(0.9); }
}

/* Minimalizovaný stav */
.nuo-tv-player.is-minimized .nuo-tv-player__screen,
.nuo-tv-player.is-minimized .nuo-tv-player__stand {
    display: none;
}

.nuo-tv-player.is-minimized {
    width: 340px;
}

/* Dragging stav */
.nuo-tv-player.is-dragging {
    transition: none;
    cursor: grabbing;
    opacity: 0.92;
}

/* --- Inner wrapper (TV frame) --- */
.nuo-tv-player__inner {
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.08);
    position: relative;
}

/* --- Header / Title bar --- */
.nuo-tv-player__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(90deg, var(--primary, #c3009e) 0%, var(--secondary, #00a9e0) 100%);
    cursor: grab;
}

.nuo-tv-player__header:active { cursor: grabbing; }

.nuo-tv-player__header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.nuo-tv-player__icon { font-size: 1.2rem; }
.nuo-tv-player__title { font-weight: 700; font-size: 0.9rem; letter-spacing: 0.05em; }

.nuo-tv-player__header-right {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nuo-tv-player__btn-minimize,
.nuo-tv-player__btn-close {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s ease, transform 0.15s ease;
    padding: 0;
}

.nuo-tv-player__btn-minimize:hover { background: rgba(255,255,255,0.35); transform: scale(1.1); }
.nuo-tv-player__btn-close:hover { background: rgba(220,50,50,0.7); transform: scale(1.1); }

/* --- Screen area --- */
.nuo-tv-player__screen {
    padding: 12px 16px 4px;
    background: #000;
    position: relative;
}

/* CRT border effect */
.nuo-tv-player__screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.nuo-tv-player__frame-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
}

.nuo-tv-player__frame-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
    border-radius: 6px;
}

/* TV scan-line overlay (estetický detail) */
.nuo-tv-player__frame-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0,0,0,0.06) 2px,
        rgba(0,0,0,0.06) 4px
    );
    pointer-events: none;
    z-index: 2;
    border-radius: 6px;
}

/* --- TV Stand --- */
.nuo-tv-player__stand {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(160deg, #1a1a2e 0%, #0f3460 100%);
    padding-bottom: 10px;
}

.nuo-tv-player__stand-neck {
    width: 30px;
    height: 14px;
    background: linear-gradient(90deg, #2a2a4a, #3a3a6a, #2a2a4a);
    border-radius: 0 0 4px 4px;
}

.nuo-tv-player__stand-base {
    width: 100px;
    height: 10px;
    background: linear-gradient(90deg, #222240, #3a3a6a, #222240);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* --- Resize hint --- */
.nuo-tv-player__resize-hint {
    position: absolute;
    bottom: 14px;
    right: 8px;
    color: rgba(255,255,255,0.25);
    font-size: 0.75rem;
    cursor: se-resize;
    z-index: 10;
    transition: color 0.2s;
}

.nuo-tv-player__resize-hint:hover { color: rgba(255,255,255,0.6); }

/* --- Responsive --- */
@media (max-width: 540px) {
    .nuo-tv-player {
        width: calc(100vw - 20px);
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
}
