:root {
    color-scheme: dark;
    --bg: #080b0f;
    --panel: #14191f;
    --panel-2: #101419;
    --line: #2c333b;
    --muted: #aeb6bf;
    --text: #f7f7f8;
    --red: #e30613;
    --red-dark: #9d0008;
    --green: #22c55e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(227, 6, 19, .18), transparent 30rem),
        linear-gradient(180deg, #0c1015 0%, var(--bg) 40%, #05070a 100%);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.topbar {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 34px;
    background: linear-gradient(90deg, var(--red-dark), var(--red));
    box-shadow: 0 8px 28px rgba(0, 0, 0, .42);
}

.brand,
.main-nav a {
    color: #fff;
    text-decoration: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    font-size: 30px;
}

.brand img {
    max-width: 72px;
    max-height: 54px;
    object-fit: contain;
}

.brand strong {
    overflow-wrap: anywhere;
}

.brand-mark {
    width: 58px;
    height: 46px;
    border: 4px solid #fff;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.brand-mark svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
    line-height: 1;
    transition: background .18s ease;
}

.main-nav a:hover {
    background: rgba(0, 0, 0, .16);
}

.main-nav svg {
    width: 23px;
    height: 23px;
}

.watch-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: stretch;
    gap: 18px;
    max-width: 1540px;
    margin: 0 auto;
    padding: 22px;
}

.player-card,
.channel-panel,
.form-card,
.contact-card {
    background: linear-gradient(180deg, rgba(24, 29, 35, .96), rgba(13, 17, 22, .96));
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .28);
}

.player-card {
    padding: 16px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid #343b44;
    border-radius: 8px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.player-empty {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    gap: 6px;
    text-align: center;
    background: rgba(0, 0, 0, .62);
}

.player-empty.show {
    display: grid;
}

.startup-ad {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: none;
    background: #000;
}

.startup-ad.show {
    display: block;
}

.startup-ad img,
.startup-ad video,
.startup-ad-link {
    width: 100%;
    height: 100%;
    display: block;
}

.startup-ad img,
.startup-ad video {
    object-fit: cover;
}

.ad-countdown {
    position: absolute;
    z-index: 6;
    top: 18px;
    right: 18px;
    padding: 10px 13px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-weight: 800;
}

.ad-countdown strong {
    color: #ff4049;
}

.youtube-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    border: 0;
    background: #000;
}

.youtube-player.show {
    display: block;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 0 0;
    flex-wrap: wrap;
}

.round-control {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border: 1px solid #3a424b;
    border-radius: 50%;
    background: linear-gradient(145deg, #f8fafc 0%, #cbd5e1 52%, #64748b 100%);
    color: #0f172a;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .32);
}

.round-control svg {
    width: 24px;
    height: 24px;
    stroke-width: 3;
}

.player-empty b {
    font-size: 26px;
}

.player-empty span {
    color: var(--muted);
}

.channel-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding: 22px;
    background: linear-gradient(135deg, #1a1f25, #11161c);
    border: 1px solid #2b323b;
    border-radius: 8px;
}

.ad-banner {
    min-height: 94px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 18px 22px;
    border: 1px dashed #4b5563;
    border-radius: 8px;
    background: linear-gradient(135deg, #171c22, #0e1318);
    color: #fff;
    text-decoration: none;
}

.ad-banner.image-ad {
    min-height: 96px;
    padding: 0;
    overflow: hidden;
    border-style: solid;
}

.ad-banner.image-ad img {
    width: 100%;
    height: 100%;
    min-height: 96px;
    display: block;
    object-fit: cover;
}

.ad-banner span {
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--red);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.ad-banner strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 20px;
}

.ad-banner small {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.summary-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid #4b535e;
    border-radius: 50%;
    color: #fff;
}

.summary-icon svg {
    width: 30px;
    height: 30px;
}

.channel-summary h1 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
}

.channel-summary p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.stats-grid article {
    padding: 18px;
    background: #0f141a;
    border: 1px solid #2a323a;
    border-radius: 8px;
}

.stats-grid span {
    display: block;
    min-height: 34px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 800;
    text-align: center;
}

.stats-grid strong {
    display: block;
    margin-top: 8px;
    color: #ff2832;
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.channel-panel {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    padding: 18px;
    position: sticky;
    top: 0;
    height: 100%;
}

.panel-title,
.country-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.panel-title {
    justify-content: flex-start;
    margin-bottom: 16px;
    font-size: 18px;
}

.panel-title svg {
    width: 30px;
    height: 30px;
}

.select-wrap,
.search-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 0 12px;
    min-height: 54px;
    background: #0b0f14;
    border: 1px solid #3a424b;
    border-radius: 8px;
}

.select-wrap select,
.search-wrap input {
    width: 100%;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font: inherit;
}

.select-wrap select option {
    color: #111;
}

.flag-holder {
    width: 34px;
    display: inline-flex;
    align-items: center;
}

.flag-holder .flag-img {
    width: 32px;
    height: 22px;
}

.search-wrap svg {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    color: #c8ced6;
}

.country-caption {
    border-top: 1px solid #2a3139;
    border-bottom: 1px solid #2a3139;
    padding: 12px 2px;
    color: var(--muted);
}

.country-caption span {
    color: #fff;
    font-weight: 800;
}

.channel-list {
    flex: 1;
    max-height: none;
    overflow: auto;
    padding-right: 4px;
}

.channel-list button {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, .14);
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
    padding: 10px 7px;
    border-radius: 8px;
}

.channel-list button:hover,
.channel-list button.active {
    background: rgba(227, 6, 19, .12);
}

.flag-img,
.channel-list img {
    width: 42px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .15);
}

.channel-list span {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.report-modal {
    position: fixed;
    z-index: 30;
    inset: 0;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, .72);
}

.report-modal.show {
    display: grid;
}

.report-dialog {
    position: relative;
    width: min(560px, 100%);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #101419;
}

.report-dialog h2 {
    margin: 0 0 16px;
}

.report-dialog .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.report-dialog label {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-weight: 800;
}

.report-dialog input,
.report-dialog select,
.report-dialog textarea {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #3a424b;
    border-radius: 8px;
    background: #0b0f14;
    color: #fff;
    padding: 12px 13px;
    font: inherit;
}

.report-dialog textarea {
    min-height: 120px;
    resize: vertical;
}

.report-dialog button[type="submit"] {
    margin-top: 16px;
    border: 0;
    border-radius: 8px;
    padding: 12px 18px;
    background: var(--red);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #1f2937;
    color: #fff;
    cursor: pointer;
}

.empty-list {
    color: var(--muted);
    text-align: center;
    padding: 24px 8px;
}

.ratings-board {
    padding: 24px;
    background: linear-gradient(180deg, rgba(24, 29, 35, .96), rgba(13, 17, 22, .96));
    border: 1px solid var(--line);
    border-radius: 8px;
}

.hosting-page {
    width: min(1120px, calc(100% - 32px));
}

.hosting-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.hosting-package {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(24, 29, 35, .96), rgba(13, 17, 22, .96));
}

.hosting-package h2 {
    margin: 0 0 12px;
}

.hosting-package strong {
    display: block;
    color: #ff2832;
    font-size: 30px;
}

.hosting-package span,
.hosting-package p {
    color: var(--muted);
}

.hosting-package button {
    margin-top: 16px;
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    background: var(--red);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.hosting-order-form {
    margin-top: 18px;
}

.ratings-board header span {
    color: #ff4049;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
}

.ratings-board h1 {
    margin: 8px 0 20px;
}

.rating-list {
    display: grid;
    gap: 12px;
}

.rating-row {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #2a323a;
    border-radius: 8px;
    background: #0f141a;
}

.rank {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--red);
}

.rating-info {
    flex: 1;
    min-width: 0;
}

.rating-info div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.rating-info span,
.rating-count span {
    color: var(--muted);
}

.rating-meter {
    height: 8px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #28313b;
}

.rating-meter span {
    display: block;
    height: 100%;
    background: var(--red);
}

.rating-count {
    min-width: 96px;
    text-align: right;
}

.page-wrap {
    width: min(960px, calc(100% - 32px));
    margin: 34px auto;
}

.page-wrap.form-page {
    width: min(820px, calc(100% - 32px));
}

.page-wrap.two-col {
    width: min(1120px, calc(100% - 32px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
}

.form-card,
.contact-card {
    padding: 24px;
}

.compact-form {
    margin: 0 auto;
}

.form-card header span {
    color: #ff4049;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
}

.form-card h1,
.contact-card h2 {
    margin: 8px 0 20px;
}

.form-card label {
    display: block;
    color: var(--muted);
    margin-top: 14px;
    font-weight: 700;
}

.form-card .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-card .form-grid label {
    margin-top: 0;
}

.full-field {
    grid-column: 1 / -1;
}

.form-card input,
.form-card textarea {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #3a424b;
    border-radius: 8px;
    background: #0b0f14;
    color: #fff;
    padding: 13px 14px;
    font: inherit;
}

.form-card textarea {
    min-height: 138px;
    resize: vertical;
}

.form-card button {
    margin-top: 18px;
    border: 0;
    border-radius: 8px;
    padding: 13px 20px;
    background: var(--red);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.form-result {
    min-height: 22px;
    margin-top: 14px;
    color: var(--green);
    font-weight: 700;
}

.form-result.error {
    color: #ff5a63;
}

.turnstile-wrap {
    margin-top: 16px;
    min-height: 65px;
}

.contact-card {
    color: var(--muted);
}

.contact-card a {
    display: block;
    color: #fff;
    margin-top: 14px;
}

.hosting-placeholder p {
    color: var(--muted);
    margin: 0;
}

.site-footer {
    width: min(1540px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    margin: 0 auto;
    padding: 28px 0 34px;
    color: var(--muted);
}

.site-footer span {
    grid-column: 2;
    text-align: center;
}

.site-footer a {
    grid-column: 3;
    justify-self: end;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

@media (max-width: 980px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .brand {
        font-size: 24px;
    }

    .main-nav {
        justify-content: flex-start;
        width: 100%;
    }

    .main-nav a {
        padding: 10px 8px;
    }

    .watch-shell,
    .page-wrap.two-col {
        grid-template-columns: 1fr;
    }

    .watch-shell {
        padding: 14px;
    }

    .channel-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .main-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-nav a span {
        font-size: 14px;
    }

    .channel-summary {
        align-items: flex-start;
        padding: 16px;
    }

    .ad-banner {
        grid-template-columns: 1fr;
    }

    .ad-banner small {
        white-space: normal;
    }

    .summary-icon {
        width: 48px;
        height: 48px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-card .form-grid {
        grid-template-columns: 1fr;
    }

    .hosting-grid {
        grid-template-columns: 1fr;
    }

    .report-dialog .form-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        align-items: center;
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .site-footer span,
    .site-footer a {
        grid-column: 1;
        justify-self: center;
    }
}
