:root {
    --bg: #050506;
    --panel: #101114;
    --panel-2: #17191e;
    --text: #f5f7fb;
    --muted: #9aa1ad;
    --line: #262a31;
    --accent: #e51b35;
    --accent-2: #ffb238;
    --ok: #24c6a5;
    --shadow: 0 18px 48px rgba(0, 0, 0, .36);
    --wrap: min(1180px, calc(100vw - 32px));
    --header-height: 72px;
    --admin-bar-height: 0px;
    --mobile-nav-height: 0px;
    --mobile-search-height: 0px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    background: var(--bg);
    color-scheme: dark;
}

body {
    margin: 0;
    padding-top: calc(var(--header-height) + var(--mobile-search-height) + var(--mobile-nav-height));
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.55;
    transition: padding-top .18s ease;
}

body.admin-bar {
    --admin-bar-height: 32px;
}

body.is-popup-open .site-header,
body.is-popup-open .site-main,
body.is-popup-open .site-footer {
    filter: blur(7px);
    pointer-events: none;
    user-select: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video,
iframe {
    max-width: 100%;
}

img {
    display: block;
}

button,
input {
    font: inherit;
}

.screen-reader-text,
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip: auto;
    background: var(--accent);
    color: white;
}

.site-header {
    position: fixed;
    top: var(--admin-bar-height);
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(5, 5, 6, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    width: var(--wrap);
    height: var(--header-height);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr minmax(280px, 360px);
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand__mark,
.custom-logo-link {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.brand__mark {
    background: var(--accent);
    color: white;
    font-weight: 900;
    border-radius: 8px;
}

.custom-logo {
    max-width: 136px;
    max-height: 42px;
    object-fit: contain;
}

.brand__name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 800;
}

.primary-nav {
    min-width: 0;
}

.primary-menu,
.primary-menu ul,
.footer-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    color: #d8dce4;
    border-radius: 6px;
    font-size: 15px;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
    background: var(--panel-2);
    color: white;
}

.primary-menu .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 178px;
    padding: 8px;
    background: #121319;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: .18s ease;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu .sub-menu {
    top: 0;
    left: calc(100% + 8px);
}

.header-search form,
.header-search {
    display: flex;
}

.header-search {
    height: 42px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.header-search input,
.mobile-search input,
.search-field {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: white;
    padding: 0 14px;
}

.header-search button,
.mobile-search button,
.search-submit {
    border: 0;
    background: var(--accent);
    color: white;
    padding: 0 16px;
    cursor: pointer;
}

.icon-button {
    width: 42px;
    height: 42px;
    display: none;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: white;
    cursor: pointer;
}

.icon-button svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: currentColor;
    display: block;
    margin: 3px 0;
}

.mobile-search {
    border-top: 1px solid var(--line);
    padding: 10px 16px 14px;
}

.mobile-search form {
    display: flex;
    height: 42px;
    max-width: 720px;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.site-main {
    width: var(--wrap);
    margin: 0 auto;
    padding-bottom: 44px;
}

.hero {
    position: relative;
    min-height: clamp(420px, 70vh, 620px);
    display: grid;
    align-items: end;
    margin: 0 calc((100vw - min(1180px, calc(100vw - 32px))) / -2);
    padding: 96px max(16px, calc((100vw - 1180px) / 2)) 52px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 5, 6, .94), rgba(5, 5, 6, .58) 52%, rgba(5, 5, 6, .88)), linear-gradient(0deg, var(--bg), rgba(5, 5, 6, 0) 48%);
    z-index: 1;
}

.hero__media {
    position: absolute;
    inset: 0;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__content {
    position: relative;
    z-index: 2;
    width: min(680px, 100%);
}

.eyebrow {
    color: var(--accent-2);
    font-weight: 800;
    letter-spacing: 0;
}

.hero h1 {
    margin: 12px 0 12px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.06;
    letter-spacing: 0;
}

.hero p {
    max-width: 620px;
    margin: 0 0 24px;
    color: #d2d6de;
    font-size: 17px;
}

.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    font-weight: 800;
}

.section {
    padding: 34px 0 0;
}

.section__head,
.page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section__head h2,
.page-heading h1,
.single-video__header h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: 0;
}

.section-link {
    color: var(--muted);
}

.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tab {
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--muted);
    white-space: nowrap;
    cursor: pointer;
}

.tab.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.video-card {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.video-card__thumb,
.ad-slot {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #0c0d10;
    overflow: hidden;
}

.video-card__thumb img,
.ad-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .24s ease;
}

.video-card:hover .video-card__thumb img {
    transform: scale(1.04);
}

.video-card__play {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(229, 27, 53, .92);
}

.video-card__play::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 13px;
    border-left: 11px solid white;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

.video-card__duration,
.ad-slot__badge {
    position: absolute;
    right: 9px;
    bottom: 9px;
    padding: 3px 7px;
    background: rgba(0, 0, 0, .74);
    color: white;
    border-radius: 5px;
    font-size: 12px;
}

.video-card__body {
    padding: 12px;
}

.video-card__title {
    min-height: 44px;
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.45;
    letter-spacing: 0;
}

.video-card__title a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-card__meta,
.single-video__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.video-card--ad {
    background: #141115;
    border-color: rgba(255, 178, 56, .4);
}

.ad-slot {
    display: grid;
    place-items: center;
    color: var(--accent-2);
}

.ad-slot__empty {
    display: grid;
    place-items: center;
    width: calc(100% - 22px);
    height: calc(100% - 22px);
    border: 1px dashed rgba(255, 178, 56, .5);
    border-radius: 8px;
    font-weight: 800;
}

.ad-slot__badge {
    top: 9px;
    bottom: auto;
    background: var(--accent-2);
    color: #191006;
    font-weight: 800;
}

.page-heading {
    padding: 34px 0 4px;
    display: block;
}

.page-heading p {
    color: var(--muted);
}

.page-heading--center {
    min-height: 46vh;
    display: grid;
    place-items: center;
    text-align: center;
}

.single-video {
    padding-top: 30px;
}

.single-video__header {
    margin-bottom: 18px;
}

.single-video__meta {
    justify-content: flex-start;
    margin-top: 8px;
}

.player-shell {
    position: relative;
    background: #000;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.player-shell video,
.player-shell__poster,
.embed-wrap iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}

.embed-wrap {
    aspect-ratio: 16 / 9;
}

.embed-wrap iframe {
    height: 100%;
}

.preroll-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    background: #000;
}

.preroll-layer img,
.preroll-layer video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preroll-countdown {
    position: absolute;
    right: 14px;
    top: 14px;
    min-width: 86px;
    min-height: 34px;
    display: grid;
    place-items: center;
    padding: 0 10px;
    background: rgba(0, 0, 0, .72);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    color: white;
    font-size: 13px;
}

.single-video__content {
    max-width: 860px;
    margin-top: 22px;
    color: #d8dce4;
    overflow: hidden;
}

.single-video__content :where(img, video, iframe, embed, object) {
    max-width: 100%;
}

.single-video__content :where(img, video) {
    height: auto;
}

.single-video__content :where(.wp-block-video, .wp-video, .wp-video-shortcode, figure) {
    max-width: 100%;
}

.single-video__content video,
.single-video__content .wp-video,
.single-video__content .wp-video-shortcode {
    width: 100% !important;
}

.single-video__content iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}

.single-video__content a {
    color: var(--accent-2);
}

.search-form {
    display: flex;
    width: min(520px, 100%);
    height: 44px;
    margin: 12px auto 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.search-form label {
    flex: 1;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #08090b;
}

.site-footer__inner {
    width: var(--wrap);
    margin: 0 auto;
    padding: 34px 0 28px;
}

.footer-brand {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.footer-brand span,
.site-info,
.footer-widget {
    color: var(--muted);
}

.footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 18px 0;
}

.footer-menu a {
    color: #d8dce4;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.footer-widget {
    font-size: 14px;
}

.footer-widget__title {
    margin: 0 0 10px;
    color: white;
    font-size: 16px;
}

.site-info {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-top: 22px;
    margin-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.daily-popup {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    padding: 20px;
}

.daily-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .62);
}

.daily-popup__dialog {
    position: relative;
    z-index: 2;
    width: min(460px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.daily-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    background: rgba(0, 0, 0, .58);
    color: white;
    cursor: pointer;
}

.daily-popup__content {
    padding: 24px;
}

.daily-popup__content img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin: -24px -24px 18px;
    max-width: calc(100% + 48px);
}

.daily-popup__content h2 {
    margin: 0 36px 10px 0;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 32px;
    color: var(--muted);
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.lazy-section {
    content-visibility: auto;
    contain-intrinsic-size: 700px;
}

@media (max-width: 1024px) {
    :root {
        --header-height: 62px;
    }

    .site-header__inner {
        grid-template-columns: auto 1fr auto auto;
        gap: 10px;
    }

    .icon-button {
        display: grid;
    }

    .brand {
        justify-self: start;
    }

    .primary-nav {
        position: fixed;
        top: calc(var(--admin-bar-height) + var(--header-height) + var(--mobile-search-height));
        left: 0;
        right: 0;
        display: none;
        max-height: calc(100vh - var(--admin-bar-height) - var(--header-height));
        overflow: auto;
        background: #08090b;
        border-bottom: 1px solid var(--line);
        padding: 12px 16px 18px;
    }

    .primary-nav.is-open {
        display: block;
    }

    .primary-menu {
        display: block;
    }

    .primary-menu a {
        min-height: 44px;
        justify-content: space-between;
    }

    .primary-menu .sub-menu {
        position: static;
        min-width: 0;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin: 0 0 8px 12px;
    }

    .primary-menu li:hover > .sub-menu,
    .primary-menu li:focus-within > .sub-menu {
        display: block;
    }

    .header-search {
        display: none;
    }

    .video-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-widgets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    :root {
        --wrap: min(100vw - 24px, 1180px);
    }

    .brand__name {
        max-width: 42vw;
        font-size: 16px;
    }

    .custom-logo-link,
    .brand__mark {
        width: 36px;
        height: 36px;
    }

    .hero {
        min-height: 430px;
        padding-top: 86px;
        padding-bottom: 30px;
    }

    .hero::after {
        background: linear-gradient(0deg, var(--bg), rgba(5, 5, 6, .78) 58%, rgba(5, 5, 6, .42));
    }

    .hero h1 {
        font-size: 34px;
    }

    .section__head {
        display: block;
    }

    .tabs {
        margin-top: 12px;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .video-card__title {
        min-height: auto;
    }

    .footer-brand,
    .site-info {
        display: block;
    }

    .footer-brand span,
    .site-info span {
        display: block;
        margin-top: 6px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .daily-popup__content {
        padding: 18px;
    }

    .daily-popup__content img {
        margin: -18px -18px 16px;
        max-width: calc(100% + 36px);
    }
}

@media (max-width: 782px) {
    body.admin-bar {
        --admin-bar-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
