:root {
    --bg: #0b0d10;
    --panel: #15191f;
    --panel-2: #1f232b;
    --text: #f3f5f7;
    --muted: #a6adb8;
    --line: #2d3340;
    --hot: #ff3158;
    --gold: #f7b733;
    --cyan: #35d0ba;
    --header-bg: #0b0d10;
    --header-box-bg: #101215;
    --header-text: #f3f5f7;
    --header-border: #2d3340;
    --footer-bg: #090b0e;
    --footer-text: #a6adb8;
    --footer-border: #2d3340;
    --radius: 8px;
    --container: 1180px;
    --logo-height: 42px;
    --logo-width: 220px;
    --grid-mobile-columns: 2;
    --grid-tablet-columns: 3;
    --grid-desktop-columns: 4;
    --grid-trending-columns: 5;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img, iframe, video { max-width: 100%; }
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.layout-container {
    width: min(100% - 24px, var(--container));
    margin-inline: auto;
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 10px 0 6px;
    background: var(--header-bg);
    background: color-mix(in srgb, var(--header-bg) 94%, transparent);
    backdrop-filter: blur(12px);
    color: var(--header-text);
}
body.admin-bar .site-header { top: 32px; }
.site-header__bar {
    width: min(100% - 24px, var(--container));
    margin-inline: auto;
    background: var(--header-box-bg);
    border: 1px solid var(--header-border);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.site-header__inner {
    min-height: 58px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
}
.site-branding {
    min-width: 0;
}
.site-title {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--header-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.custom-logo {
    max-height: var(--logo-height);
    max-width: var(--logo-width);
    width: auto;
}
.menu-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--header-border);
    border-radius: var(--radius);
    background: var(--panel);
    display: inline-grid;
    place-content: center;
    gap: 5px;
}
.menu-toggle span:not(.screen-reader-text) {
    display: block;
    width: 19px;
    height: 2px;
    background: var(--text);
}
.primary-nav,
.header-search {
    display: none;
}
.primary-nav.is-open {
    grid-column: 1 / -1;
    display: block;
}
.header-search.is-open {
    grid-column: 1 / -1;
    display: block;
}
.primary-nav__list,
.footer-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.primary-nav__list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}
.primary-nav__list::-webkit-scrollbar { display: none; }
.primary-nav a,
.footer-nav a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 6px 10px;
    color: var(--muted);
    border-radius: var(--radius);
}
.primary-nav a {
    min-height: 30px;
    padding: 4px 13px;
    color: var(--header-text);
    font-size: .86rem;
    font-weight: 800;
    white-space: nowrap;
}
.primary-nav a:hover {
    color: #111;
    text-shadow: 0 0 2px var(--gold), 0 0 4px var(--gold);
}
.primary-nav a:hover,
.footer-nav a:hover { color: var(--text);  }
.search-form {
    display: flex;
    gap: 0;
    width: 100%;    
    justify-content: right;
}
.search-field {
    min-width: 0;
    flex: 1;
    min-height: 42px;
    padding: 0 12px;
    color: var(--text);
    background: #101319;
    border: 1px solid var(--header-border);
    border-radius: var(--radius) 0 0 var(--radius);
}
.search-submit,
button,
input[type="submit"] {
    min-height: 42px;
    border: 0;
    border-radius: var(--radius);
    padding: 0 14px;
    color: #111;
    background: var(--gold);
    font-weight: 800;
    cursor: pointer;
}
.header-search .search-submit {
    position: relative;
    width: 46px;
    min-width: 46px;
    padding: 0;
    font-size: 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: #080a0d;
    border: 1px solid var(--header-border);
    border-left: 0;
}
.header-search .search-submit::before,
.header-search .search-submit::after {
    content: "";
    position: absolute;
    display: block;
}
.header-search .search-submit::before {
    width: 12px;
    height: 12px;
    top: 13px;
    left: 14px;
    border: 3px solid var(--text);
    border-radius: 50%;
}
.header-search .search-submit::after {
    width: 9px;
    height: 3px;
    top: 28px;
    left: 27px;
    background: var(--text);
    border-radius: 999px;
    transform: rotate(45deg);
}
.ad-slot {
    width: min(100% - 24px, var(--container));
    margin: 12px auto;
    min-height: 72px;
    display: grid;
    place-items: center;
    background: repeating-linear-gradient(135deg, #131820, #131820 10px, #171d26 10px, #171d26 20px);
    border: 1px dashed #3b4352;
    border-radius: var(--radius);
    overflow: hidden;
}
.ad-slot:empty::before {
    content: "Ad widget";
    color: var(--muted);
    font-size: .85rem;
}
.theme-ad {
    margin: 18px 0;
}
.theme-ad .widget {
    margin: 0;
}
.theme-ad .rtb-banner-grid,
.theme-ad .ad-slot {
    margin: 0;
}
.theme-ad .rtb-banner-grid {
    gap: 12px;
}
.theme-ad .rtb-banner-item {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius);
    overflow: hidden;
}
.theme-ad .rtb-banner-image {
    display: block;
    width: 100%;
    border-radius: var(--radius);
}
.theme-ad-video_top {
    margin-top: 10px;
    margin-bottom: 14px;
}
.theme-ad-video_bottom {
    margin-top: 18px;
    margin-bottom: 8px;
}
.rtb-popup-dialog {
    background: var(--panel);
    border: 1px solid var(--line);
}
.rtb-fixed-ad .rtb-banner-item {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .08);
}
.archive-header h1,
.single-video h1 {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.7rem);
    line-height: 1.12;
}
.video-section { padding: 18px 0; }
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--hot);
    padding-left: 10px;
}
.section-heading h2 {
    margin: 0;
    font-size: 1.2rem;
}
.section-heading a { color: var(--gold); font-weight: 700; }
.term-strip {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 14px 0 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 49, 88, .75) rgba(31, 35, 43, .85);
    scroll-snap-type: x proximity;
    scroll-padding-inline: 2px;
}
.term-strip::-webkit-scrollbar {
    height: 10px;
}
.term-strip::-webkit-scrollbar-track {
    background: linear-gradient(90deg, rgba(31, 35, 43, .45), rgba(31, 35, 43, .9), rgba(31, 35, 43, .45));
    border-radius: 999px;
    border: 3px solid var(--bg);
}
.term-strip::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--hot), var(--gold));
    border-radius: 999px;
    border: 2px solid var(--bg);
}
.term-strip::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #ff4b6d, #ffc84a);
}
.chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--line);
    font-size: .9rem;
    scroll-snap-align: start;
}
.chip--soft { color: var(--cyan); background: rgba(53, 208, 186, .08); }
.video-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-mobile-columns), minmax(0, 1fr));
    gap: 12px;
}
.video-card {
    min-width: 0;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: var(--radius);
    overflow: hidden;
}
.video-card__thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #090b0f;
    overflow: hidden;
}
.video-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}
.video-card:hover .video-card__thumb img { transform: scale(1.04); }
.video-card__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #697384;
    font-weight: 900;
}
.video-card__duration {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
}
.video-card__body { padding: 9px; }
.video-card__term {
    color: var(--gold);
    font-size: .76rem;
    font-weight: 800;
}
.video-card__title {
    margin: 4px 0 7px;
    font-size: .92rem;
    line-height: 1.38;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: .76rem;
}
.archive-header {
    padding: 20px 0 14px;
    display: grid;
    gap: 12px;
}
.archive-description {
    color: var(--muted);
    max-width: 760px;
}
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: .85rem;
}
.breadcrumb a { color: var(--gold); }
.content-with-sidebar {
    display: grid;
    gap: 18px;
}
.sidebar .ad-slot { width: 100%; margin: 0; }
.pagination-wrap {
    margin: 22px 0;
}
.pagination-wrap ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pagination-wrap ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.page-numbers {
    min-width: 38px;
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 5px 10px;
    border-radius: var(--radius);
}

.page-numbers li {       
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.page-numbers.current,
.page-numbers a:hover {
    color: #111;
    background: var(--gold);
    border-color: var(--gold);
}
.pagination-wrap--front {
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}
.home-before-footer {
    margin-top: 22px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.home-before-footer .widget {
    margin: 0 0 16px;
}
.home-before-footer .widget:last-child {
    margin-bottom: 0;
}
.single-video { padding: 16px 0 28px; }
.player-shell {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050608;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.main-player,
.player-shell iframe,
.player-shell video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}
.player-empty {
    height: 100%;
    display: grid;
    place-content: center;
    gap: 4px;
    text-align: center;
    color: var(--muted);
    padding: 20px;
}
.single-video__header {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.single-video__meta,
.single-video__terms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: var(--muted);
}
.single-video__content {
    padding: 16px 0;
    color: #d9dee7;
    overflow-wrap: anywhere;
}
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 16px 0;
}
.post-nav a {
    display: grid;
    min-height: 46px;
    place-items: center;
    padding: 8px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
}
.empty-state {
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
}
.site-footer {
    margin-top: 28px;
    border-top: 1px solid var(--footer-border);
    background: var(--footer-bg);
    color: var(--footer-text);
}
.site-footer__inner {
    width: min(100% - 24px, var(--container));
    margin-inline: auto;
    padding: 22px 0;
    display: grid;
    gap: 12px;
    color: var(--footer-text);
}
.footer-brand {
    display: grid;
    gap: 4px;
}
.site-footer .footer-nav a,
.footer-brand strong { color: var(--footer-text); }

@media (min-width: 720px) {
    .site-header__inner {
        grid-template-columns: minmax(120px, auto) minmax(0, 1fr) minmax(240px, 380px);
        padding: 8px 20px;
    }
    .menu-toggle { display: none; }
    .primary-nav { display: block; }
    .header-search { display: block; }
    .video-grid { grid-template-columns: repeat(var(--grid-tablet-columns), minmax(0, 1fr)); }
    .video-grid--featured { grid-template-columns: repeat(var(--grid-tablet-columns), minmax(0, 1fr)); }
    .video-grid--compact { grid-template-columns: repeat(var(--grid-tablet-columns), minmax(0, 1fr)); }
    .content-with-sidebar { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
}

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

@media (min-width: 1040px) {
    .video-grid { grid-template-columns: repeat(var(--grid-desktop-columns), minmax(0, 1fr)); }
    .video-grid--compact { grid-template-columns: repeat(var(--grid-trending-columns), minmax(0, 1fr)); }
    .video-card__title { font-size: .96rem; }
}

@media (max-width: 420px) {
    .layout-container,
    .site-header__bar,
    .site-footer__inner,
    .ad-slot { width: min(100% - 16px, var(--container)); }
    .video-grid { gap: 8px; }
    .video-card__body { padding: 7px; }
    .video-card__title { font-size: .84rem; }
    .post-nav { grid-template-columns: 1fr; }
}
