/* =========================================
   ULYTAU TV — Страница-специфичные стили
   (перенесено из main.tpl для чистоты кода)
   ========================================= */

:root {
    --plyr-color-main: #00b3ff;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Видео плеер и модалка --- */
.video-container {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: var(--bg-dark);
    box-shadow: var(--shadow-card);
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.video-modal .modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    margin: auto;
}

.video-modal .close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    z-index: 10000;
    color: var(--text-main);
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
}

.video-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.player-error-message {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    pointer-events: none;
}

.player-error-message > div {
    pointer-events: all;
}

/* --- Жарнама блоки --- */
.ad-container {
    padding: 40px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ad-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ad-wrapper {
    width: 100%;
    max-width: 1200px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}

.ad-wrapper img {
    max-width: 100%;
    height: auto;
}

/* --- Плеер: қазір эфирде overlay --- */
.player-now-playing {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s;
}

.video-container:hover .player-now-playing {
    opacity: 0.3;
}

.pnp-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}

.pnp-live-badge {
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.pnp-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: pnpBlink 1.2s infinite;
}

@keyframes pnpBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.pnp-info { flex: 1; min-width: 0; }

.pnp-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.pnp-time {
    color: rgba(255,255,255,0.6);
    font-size: 0.78rem;
}

.pnp-next {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.pnp-progress {
    height: 3px;
    background: rgba(255,255,255,0.15);
}

.pnp-progress span {
    display: block;
    height: 100%;
    background: var(--plyr-color-main);
    transition: width 1s linear;
}

/* --- Floating «Қазір эфирде» виджет --- */
.floating-now-playing {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9000;
    background: var(--floating-bg);
    backdrop-filter: blur(16px);
    border: var(--border);
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    min-width: 220px;
    max-width: 320px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fnpSlideIn 0.5s ease;
}

.floating-now-playing:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,179,255,0.2);
    border-color: rgba(0,179,255,0.3);
}

@keyframes fnpSlideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fnp-pulse {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(238,0,0,0.6);
    animation: fnpPulse 2s infinite;
}

@keyframes fnpPulse {
    0% { box-shadow: 0 0 0 0 rgba(238,0,0,0.6); }
    70% { box-shadow: 0 0 0 8px rgba(238,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(238,0,0,0); }
}

.fnp-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}

.fnp-badge {
    background: var(--danger);
    color: #fff; /* контраст қызыл үстінде */
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 1.5px;
    flex-shrink: 0;
}

.fnp-text { min-width: 0; }

.fnp-label {
    color: rgba(255,255,255,0.5);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fnp-title {
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.fnp-progress {
    height: 2px;
    background: rgba(255,255,255,0.08);
}

.fnp-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #00b3ff, var(--primary));
    transition: width 1s linear;
}

@media (max-width: 600px) {
    .floating-now-playing {
        left: 10px;
        right: 10px;
        bottom: 75px;
        max-width: none;
    }
}
