:root {
    --bg-surface: rgba(20, 10, 40, 0.85);
    --bg-raised: rgba(74, 0, 130, 0.8);
    --accent: oklch(55% 0.22 290);
    --accent-light: oklch(75% 0.15 290);
    --text-primary: #ffffff;
    --text-muted: #d9b3ff;
    --border: rgba(255, 255, 255, 0.1);
}

.wrapper-tv {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding: 16px 0;
}

.tv-container {
    background: var(--bg-raised);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    text-align: center;
    width: 100%;
    max-width: 900px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-sizing: border-box;
    margin: 0 12px;
}

/* ── Заголовок ── */
.tv-header {
    margin-bottom: 16px;
}

.tv-title {
    color: var(--text-primary);
    font-size: clamp(18px, 4.5vw, 26px);
    font-weight: 700;
    margin: 0 0 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.tv-subtitle {
    color: var(--text-muted);
    font-size: clamp(13px, 2.8vw, 15px);
    margin: 0;
}

/* ── Видео-обёртка с сохранением 16:9 ── */
.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

#tvPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ── Оверлей с кнопкой ── */
.tv-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    transition: opacity 0.2s ease;
}

.tv-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-btn-overlay {
    width: clamp(56px, 12vw, 80px);
    height: clamp(56px, 12vw, 80px);
    border-radius: 50%;
    background: rgba(153, 51, 255, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: clamp(20px, 4vw, 28px);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(4px);
}

.play-btn-overlay:hover {
    transform: scale(1.1);
    background: rgba(153, 51, 255, 1);
}

/* ── Управление ── */
.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.play-btn {
    width: clamp(52px, 13vw, 72px);
    height: clamp(52px, 13vw, 72px);
    border-radius: 50%;
    background: linear-gradient(135deg, #9933ff, #6600cc);
    border: none;
    color: #fff;
    font-size: clamp(16px, 3.5vw, 22px);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(102, 0, 204, 0.6);
}

.play-btn:active {
    transform: scale(0.94);
}

.fullscreen-btn {
    width: clamp(40px, 9vw, 52px);
    height: clamp(40px, 9vw, 52px);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: clamp(14px, 3vw, 18px);
    cursor: pointer;
    transition: background 0.2s ease;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* ── Громкость ── */
.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.volume-icon {
    color: var(--text-muted);
    font-size: clamp(15px, 3.5vw, 19px);
}

.volume-slider {
    width: 100%;
    max-width: 200px;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #9933ff;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(153, 51, 255, 0.6);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #9933ff;
    border: none;
    cursor: pointer;
}

/* ── Статус ── */
.status {
    color: var(--text-muted);
    font-size: clamp(11px, 2.8vw, 13px);
    margin-top: 12px;
    min-height: 20px;
}

/* ── Инфо о трансляции ── */
.stream-info {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px;
    margin-top: 14px;
    border: 1px solid var(--border);
}

.stream-title {
    color: var(--text-primary);
    font-size: clamp(13px, 2.8vw, 15px);
    font-weight: 600;
    margin-bottom: 4px;
}

.stream-description {
    color: var(--text-muted);
    font-size: clamp(11px, 2.5vw, 13px);
}

/* ── Адаптив ── */
@media (max-width: 768px) {
    .tv-container {
        padding: 14px;
        margin: 0 6px;
    }

    .volume-slider {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .tv-container {
        padding: 10px;
        margin: 0 4px;
        border-radius: 10px;
    }

    .volume-slider {
        max-width: 110px;
    }

    .fullscreen-btn {
        width: 40px;
        height: 40px;
    }
}