:root {
    --bg: #06080c;
    --panel: #10151d;
    --panel-2: #161c26;
    --text: #fff;
    --muted: rgba(255, 255, 255, 0.72);
    --accent: #00c2ff;
    --border: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
    background: linear-gradient(180deg, #070a0f 0%, #0c1118 100%);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

body {
    overflow-x: hidden;
}

.app {
    width: 100%;
}

.page {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 14px;
}

.player-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    min-height: 220px;
    max-height: 72vh;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.stage {
    width: 100%;
    height: 100%;
    background: #000;
}

.stage video,
.stage iframe,
.stage embed,
.stage object {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}

.status {
    position: absolute;
    right: 0px;
    top: 0px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.55);
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.2;
    pointer-events: none;
}

.channel-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 30;
}
.channel-controls button {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    color: #00131a;
    font-weight: 700;
    cursor: pointer;
    /*background: transparent;*/
    background: var(--accent);
}

.hidden {
    display: none !important;
}

#engine-badge {
    position: absolute;
    top: 0px;
    left: 12px;
    z-index: 40;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.2;
    max-width: 68vw;
    word-break: break-word;
    pointer-events: none;
    display: none !important;
}


.channels-wrap {
    margin-top: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
}

.channels-head {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.channels-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
}

.channel-btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: #fff;
    border-radius: 14px;
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}

.channel-btn:hover {
    border-color: rgba(0, 194, 255, 0.45);
    transform: translateY(-1px);
}

.channel-btn.active {
    background: var(--accent);
    color: #00141a;
    border-color: transparent;
}

.plyr,
.plyr__video-wrapper,
.plyr video,
.plyr iframe {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 640px) {
    .page {
        padding: 10px;
    }
    .channels-list {
        grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    }
    .channel-btn {
        padding: 11px 8px;
        font-size: 13px;
    }
}
