* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    background: #0b0b0f;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.header {
    position: relative;
    width: 100%;
    background: #111116;
    border-bottom: 1px solid #222229;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 24px;
}

.logo {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: #ff1744;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 35px 25px 60px;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 800;
}

.category-description {
    margin: 0;
    color: #9c9ca5;
    font-size: 15px;
    line-height: 1.7;
    text-align: justify;
}

.filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.filter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    background: #15151b;
    border: 1px solid #24242c;
    color: #bdbdc6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all .2s ease;
}

.filter-link:hover {
    background: #1d1d24;
    color: #fff;
    border-color: #33333d;
}

.filter-link.active {
    background: #ff1744;
    border-color: #ff1744;
    color: #fff;
}

.category-dropdown {
    position: relative;
}

.category-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    background: #15151b;
    border: 1px solid #24242c;
    color: #bdbdc6;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.category-button:hover {
    background: #1d1d24;
    color: #fff;
    border-color: #33333d;
}

.category-arrow {
    font-size: 11px;
    transition: transform .2s ease;
}

.category-dropdown.open .category-arrow {
    transform: rotate(180deg);
}

.category-menu {
    position: absolute;
    z-index: 100;
    top: calc(100% + 8px);
    right: 0;                    /* было left: 0 */
    left: auto;
    width: 520px;
    max-width: calc(100vw - 30px);
    padding: 12px;
    background: #15151b;
    border: 1px solid #292932;
    border-radius: 10px;
    box-shadow: 0 15px 45px rgba(0,0,0,.45);
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

.category-dropdown.open .category-menu {
    display: grid;
}

.category-item {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    color: #bdbdc6;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s ease, color .15s ease;
}

.category-item:hover {
    background: #22222a;
    color: #fff;
}








.category-menu-head {
    grid-column: 1 / -1;
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    padding-bottom: 4px;
    background: transparent;
    pointer-events: none;
}

.category-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    background: #15151b;
    border: 1px solid #24242c;
    color: #bdbdc6;
    cursor: pointer;
    transition: all .2s ease;
    pointer-events: auto;
    box-shadow: 0 0 0 4px #15151b;
}

.category-close:hover {
    background: #1d1d24;
    color: #fff;
    border-color: #33333d;
}













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

.video-card {
    min-width: 0;
    background: #111116;
    border: 1px solid #25252e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(0,0,0,.22);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,.38);
    border-color: #34343f;
}

.video-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #15151b;
    border-radius: 11px 11px 0 0;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.video-link:hover .thumbnail img {
    transform: scale(1.04);
}

.duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    top: auto;
    padding: 4px 7px;
    background: rgba(0,0,0,.84);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50px;
    height: 50px;
    transform: translate(-50%,-50%) scale(.9);
    opacity: 0;
    border-radius: 50%;
    background: rgba(255,23,68,.95);
    transition: opacity .25s ease, transform .25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button::after {
    content: "";
    margin-left: 3px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #fff;
}

.video-link:hover .play-button {
    opacity: 1;
    transform: translate(-50%,-50%) scale(1);
}

.video-info {
    padding: 13px 13px 14px;
    min-height: 88px;
}

.video-title {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
    color: #7f7f89;
    font-size: 12px;
    line-height: 1.3;
}

.video-meta .dot {
    color: #4b4b53;
}

.empty {
    padding: 80px 20px;
    text-align: center;
    color: #777781;
}

.empty h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 24px;
}

.empty p {
    margin: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 45px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.pagination a {
    background: #15151b;
    border: 1px solid #24242c;
    color: #bdbdc6;
}

.pagination a:hover {
    background: #1d1d24;
    color: #fff;
}

.pagination .active {
    background: #ff1744;
    border: 1px solid #ff1744;
    color: #fff;
}

.pagination .dots {
    color: #777781;
}

/* =========================
   HOME PAGE SEO
   ========================= */

.home-flow {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.home-flow .page-header {
    order: 1;
    margin-bottom: 0;
}

.home-flow .home-intro {
    order: 2;
}

.home-flow .home-videos,
.home-flow .empty {
    order: 3;
}

.home-flow .pagination {
    order: 4;
    margin-top: 0;
}

.home-videos {
    margin-top: 0;
}

.home-videos h2 {
    margin: 0 0 22px;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 800;
    color: #fff;
}

.home-seo {
    max-width: 1000px;
    margin-top: 60px;
    color: #9c9ca5;
}

.home-seo h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 800;
}

.home-seo h3 {
    margin: 30px 0 10px;
    color: #fff;
    font-size: 21px;
    line-height: 1.35;
    font-weight: 700;
}

.home-seo p {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
}

/* =========================
   VIDEO PAGE
   ========================= */

.video-content {
    width: 100%;
    max-width: 1400px;
}

.video-page-title {
    margin: 0 0 20px;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 800;
    color: #fff;
}

.video-player {
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-player iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.video-main-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #777781;
    font-size: 13px;
}

.video-main-meta .dot {
    color: #4b4b53;
}

.video-description {
    margin-top: 22px;
    color: #bdbdc6;
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-line;
    text-align: justify;
}

.video-categories {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.video-category {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 7px;
    background: #15151b;
    border: 1px solid #24242c;
    color: #bdbdc6;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s ease;
}

.video-category:hover {
    background: #1d1d24;
    color: #fff;
    border-color: #33333d;
}

.related-section {
    margin-top: 50px;
}

.related-section h2 {
    margin: 0 0 25px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 800;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width:1200px) {

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

}

@media (max-width:800px) {

    .container {
        padding: 25px 15px 50px;
    }

    .home-flow {
        gap: 25px;
    }

    .home-flow .home-intro {
        order: 5;
    }


    .page-header h1 {
        font-size: 28px;
    }

    .video-page-title {
        margin-bottom: 16px;
        font-size: 28px;
    }

    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 16px;
    }

    .category-menu {
        width: 430px;
    }

    .home-videos h2 {
        font-size: 24px;
    }

    .home-seo {
        margin-top: 50px;
    }

    .home-seo h2 {
        font-size: 25px;
    }

    .home-seo h3 {
        font-size: 20px;
    }

}
@media (max-width:700px) {
    .header-inner {
        padding: 18px 25px 18px 25px;
    }
}
@media (max-width:500px) {

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

    .video-info {
        padding: 12px 12px 13px;
    }

    .page-header h1 {
        font-size: 25px;
    }

    .video-page-title {
        margin-bottom: 14px;
        font-size: 25px;
    }

    .filter-link,
    .category-button {
        font-size: 13px;
        padding: 0 14px;
    }

    .header {
    position: relative;
    }

    .category-dropdown {
        position: static;
    }

    .category-menu {
        left: 15px;
        right: 15px;
        width: auto;
        max-width: none;
        transform: none;
        max-height: 70vh;
        overflow-y: auto;
    }

    .home-videos h2 {
        font-size: 22px;
        margin-bottom: 18px;
    }

    .home-seo {
        margin-top: 45px;
    }

    .home-seo h2 {
        font-size: 23px;
    }

    .home-seo h3 {
        font-size: 19px;
        margin-top: 26px;
    }

    .home-seo p {
        font-size: 14px;
        line-height: 1.7;
    }

}
@media (max-width:350px) {

    .category-menu {
        grid-template-columns: 1fr;
    }

}

/* =========================
   VIDEO PAGE LAYOUT
   ========================= */

.video-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: start;
}

.latest-videos {
    min-width: 0;
}

.latest-videos h2 {
    margin: 0 0 20px;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 800;
}

.latest-videos-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.latest-videos .video-title {
    font-size: 15px !important;
    line-height: 1.4 !important;
}

/* =========================
   VIDEO PAGE RESPONSIVE
   ========================= */

@media (max-width:1200px) {

    .video-page-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 24px;
    }

}

@media (max-width:900px) {

    .video-page-layout {
        grid-template-columns: 1fr;
    }

    .latest-videos {
        margin-top: 10px;
    }

    .latest-videos-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 14px;
    }

}

@media (max-width:500px) {

    .latest-videos-list {
        grid-template-columns: 1fr;
    }

}

/* =========================
   FOOTER
   ========================= */

.site-footer {
    position: relative;
    margin-top: 70px;
    background: #111116;
    border-top: 1px solid #222229;
}

.site-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-footer-copy {
    margin: 0;
    color: #777781;
    font-size: 13px;
    line-height: 1.5;
}

.site-footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-footer-links a {
    color: #9c9ca5;
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
    transition: color .2s ease;
}

.site-footer-links a:hover {
    color: #fff;
}

@media (max-width:800px) {

    .site-footer {
        margin-top: 55px;
    }

    .site-footer-inner {
        padding: 22px 15px;
    }

}

@media (max-width:500px) {

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .site-footer-right {
        justify-content: flex-start;
    }


}

/* =========================
   USER AGREEMENT
   ========================= */

.terms-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0 40px;
}

.terms-page h1 {
    margin: 0 0 30px;
    font-size: 30px;
    line-height: 1.25;
}

.terms-page h2 {
    margin: 32px 0 12px;
    font-size: 20px;
    line-height: 1.35;
}

.terms-page p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.7;
}

.schetchick {
    position: absolute;
    left: -99999999999px;
}

/* =========================
   Переключатель языка
   ========================= */

.site-footer-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px 22px;
}

/* ---- выбор языка (футер) ---- */

.lang-dd {
    position: relative;
}

.lang-dd-btn {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #17171e;
    border: 1px solid #2a2a33;
    color: #d4d4dc;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.lang-dd-btn::-webkit-details-marker { display: none; }

.lang-dd-btn svg { flex: none; color: #ff1744; }

.lang-dd-btn:hover,
.lang-dd[open] .lang-dd-btn {
    background: #1f1f28;
    color: #fff;
    border-color: #ff1744;
}

.lang-dd-arrow { transition: transform .2s ease; color: #8a8a96 !important; }
.lang-dd[open] .lang-dd-arrow { transform: rotate(180deg); }

.lang-dd-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    z-index: 1000;
    width: 560px;
    max-width: calc(100vw - 30px);
    box-sizing: border-box;
    background: #15151b;
    border: 1px solid #2f2f39;
    border-radius: 14px;
    box-shadow: 0 -12px 40px rgba(0,0,0,.55);
    padding: 12px;
}

.lang-dd-search {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #2a2a33;
    background: #0e0e12;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.lang-dd-search:focus { border-color: #ff1744; }

.lang-dd-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.lang-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    color: #c4c4cd;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lang-dd-item b {
    flex: none;
    min-width: 24px;
    font-size: 11px;
    letter-spacing: .5px;
    color: #7d7d89;
}

a.lang-dd-item:hover {
    background: #1f1f28;
    color: #fff;
}

.lang-dd-item.active {
    background: #ff1744;
    color: #fff;
}

.lang-dd-item.active b { color: #ffd0d9; }

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

@media (max-width:500px) {
    .lang-dd {
        position: static;
    }

    .lang-dd-panel {
        left: 15px;
        right: 15px;
        width: auto;
        max-width: none;
    }
}
