/* =========================================================
   VIDEOS.CSS
   Страница "Видеоуроки"
========================================================= */


/* =========================================================
   ОСНОВА
========================================================= */

:root {
    --video-purple: #6542f4;
    --video-purple-dark: #4930d8;
    --video-purple-light: #eeeaff;
    --video-purple-soft: #f7f5ff;

    --video-blue: #6c8cff;

    --video-text: #12275d;
    --video-text-light: #6476a3;

    --video-border: #e3ddff;

    --video-white: #ffffff;

    --video-shadow:
        0 15px 45px rgba(79, 57, 190, 0.10);

    --video-shadow-hover:
        0 25px 60px rgba(79, 57, 190, 0.20);
}


* {
    box-sizing: border-box;
}


body {
    overflow-x: hidden;
}


/* =========================================================
   HEADER
========================================================= */

.header {
    position: relative;
    z-index: 100;
}


/* =========================================================
   HERO
========================================================= */

.videos-hero {
    position: relative;

    min-height: 390px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 8% 50%,
            rgba(122, 91, 255, 0.16),
            transparent 28%
        ),
        radial-gradient(
            circle at 92% 20%,
            rgba(151, 128, 255, 0.17),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #eeeaff 0%,
            #f8f7ff 48%,
            #e9e4ff 100%
        );

    border-bottom:
        1px solid rgba(101, 66, 244, 0.08);
}


.videos-hero::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    left: -190px;
    top: -100px;

    background:
        radial-gradient(
            circle,
            rgba(109, 82, 245, 0.14),
            rgba(109, 82, 245, 0)
        );

    animation:
        heroFloat 8s ease-in-out infinite;
}


.videos-hero::after {
    content: "";

    position: absolute;

    width: 340px;
    height: 340px;

    border-radius: 50%;

    right: -140px;
    bottom: -160px;

    background:
        radial-gradient(
            circle,
            rgba(130, 105, 255, 0.18),
            rgba(130, 105, 255, 0)
        );

    animation:
        heroFloatReverse 9s ease-in-out infinite;
}


.videos-hero-content {
    position: relative;

    z-index: 5;

    width: min(900px, 92%);

    text-align: center;

    padding: 65px 20px;
}


.videos-label {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    padding: 8px 16px;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.75);

    border:
        1px solid rgba(101, 66, 244, 0.12);

    color:
        var(--video-purple);

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 4px;

    box-shadow:
        0 8px 25px rgba(101, 66, 244, 0.08);

    animation:
        fadeDown 0.7s ease both;
}


.videos-hero h1 {
    margin: 0;

    color:
        var(--video-text);

    font-size:
        clamp(48px, 6vw, 78px);

    line-height: 1;

    font-weight: 900;

    letter-spacing: -3px;

    animation:
        fadeUp 0.8s ease 0.1s both;
}


.videos-hero p {
    max-width: 720px;

    margin:
        22px auto 0;

    color:
        #6679a6;

    font-size:
        clamp(16px, 2vw, 20px);

    line-height: 1.7;

    animation:
        fadeUp 0.8s ease 0.2s both;
}


/* =========================================================
   HERO POINTS
========================================================= */

.videos-hero-points {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 14px 30px;

    margin-top: 28px;

    animation:
        fadeUp 0.8s ease 0.3s both;
}


.videos-hero-points span {
    display: inline-flex;

    align-items: center;

    gap: 9px;

    color:
        #7382a8;

    font-size: 15px;

    font-weight: 600;
}


.videos-hero-points b {
    width: 10px;
    height: 10px;

    border-radius: 50%;

    background:
        var(--video-purple);

    box-shadow:
        0 0 0 7px rgba(101, 66, 244, 0.09);

    animation:
        pointPulse 2s ease-in-out infinite;
}


.videos-hero-points span:nth-child(2) b {
    animation-delay: .25s;
}


.videos-hero-points span:nth-child(3) b {
    animation-delay: .5s;
}


/* =========================================================
   DECORATIONS
========================================================= */

.videos-hero-decoration {
    position: absolute;

    pointer-events: none;

    border-radius: 50%;

    filter: blur(1px);
}


.decoration-one {
    width: 120px;
    height: 120px;

    right: 16%;
    top: 65px;

    background:
        rgba(130, 106, 255, 0.13);

    animation:
        decorationFloat 5s ease-in-out infinite;
}


.decoration-two {
    width: 55px;
    height: 55px;

    left: 18%;
    bottom: 55px;

    background:
        rgba(105, 81, 242, 0.13);

    animation:
        decorationFloat 4s ease-in-out infinite reverse;
}


/* =========================================================
   ОСНОВНАЯ ОБЛАСТЬ
========================================================= */

.videos-library {
    display: grid;

    grid-template-columns:
        235px minmax(0, 1fr);

    gap: 28px;

    padding-top: 55px;
    padding-bottom: 80px;
}


/* =========================================================
   SIDEBAR
========================================================= */

.videos-sidebar {
    align-self: start;

    position: sticky;
    top: 25px;

    padding: 18px;

    border:
        1px solid var(--video-border);

    border-radius: 24px;

    background:
        rgba(255, 255, 255, 0.82);

    box-shadow:
        var(--video-shadow);

    backdrop-filter:
        blur(16px);

    animation:
        fadeLeft 0.7s ease both;
}


.sidebar-title {
    display: flex;

    align-items: center;

    gap: 11px;

    padding:
        8px 7px 18px;

    color:
        var(--video-text);

    font-size: 17px;

    font-weight: 800;
}


.sidebar-title-icon {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 12px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #714cff,
            #5835e9
        );

    box-shadow:
        0 8px 18px rgba(101, 66, 244, 0.25);

    animation:
        iconFloat 3s ease-in-out infinite;
}


.video-class-button {
    position: relative;

    width: 100%;

    display: flex;

    align-items: center;

    gap: 11px;

    padding: 10px;

    margin-bottom: 7px;

    border: 1px solid transparent;

    border-radius: 13px;

    background: transparent;

    color:
        var(--video-text);

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    text-align: left;

    cursor: pointer;

    transition:
        transform .25s ease,
        background .25s ease,
        color .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}


.video-class-button:hover {
    transform:
        translateX(4px);

    background:
        #f5f2ff;

    border-color:
        #e8e2ff;
}


.video-class-button.active {
    color:
        var(--video-purple);

    background:
        linear-gradient(
            135deg,
            #f0ebff,
            #e9e3ff
        );

    border-color:
        #d8ceff;

    box-shadow:
        0 7px 18px rgba(101, 66, 244, 0.10);
}


.video-class-button.active::before {
    content: "";

    position: absolute;

    left: -1px;

    width: 4px;
    height: 60%;

    border-radius: 0 5px 5px 0;

    background:
        var(--video-purple);
}


.class-number {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    font-size: 14px;

    font-weight: 900;

    transition:
        transform .25s ease;
}


.video-class-button:hover .class-number {
    transform:
        rotate(-5deg)
        scale(1.08);
}


.all-icon {
    color:
        white;

    background:
        linear-gradient(
            135deg,
            #6945f5,
            #8065ff
        );
}


.class-5 {
    color: #149c68;
    background: #ddfaec;
}


.class-6 {
    color: #1686d8;
    background: #e0f3ff;
}


.class-7 {
    color: #e87812;
    background: #fff0dc;
}


.class-8 {
    color: #5835e9;
    background: #ebe7ff;
}


.class-9 {
    color: #dc4776;
    background: #ffe6ef;
}


.class-10 {
    color: #e86d12;
    background: #fff0d9;
}


.class-11 {
    color: #536bd8;
    background: #e8ecff;
}


/* =========================================================
   ПРАВАЯ ЧАСТЬ
========================================================= */

.videos-results {
    min-width: 0;

    animation:
        fadeRight 0.7s ease both;
}


/* =========================================================
   SEARCH PANEL
========================================================= */

.videos-search-panel {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr) 255px;

    gap: 14px;

    padding: 13px;

    border:
        1px solid var(--video-border);

    border-radius: 22px;

    background:
        rgba(255, 255, 255, 0.88);

    box-shadow:
        var(--video-shadow);

    backdrop-filter:
        blur(15px);
}


.videos-search-box {
    position: relative;

    display: flex;

    align-items: center;

    min-width: 0;

    border:
        1px solid #ded6ff;

    border-radius: 15px;

    background:
        #ffffff;

    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        transform .25s ease;
}


.videos-search-box:focus-within {
    border-color:
        #967fff;

    box-shadow:
        0 0 0 4px rgba(101, 66, 244, 0.09);

    transform:
        translateY(-1px);
}


.search-icon {
    flex-shrink: 0;

    margin-left: 18px;

    color:
        var(--video-purple);

    font-size: 25px;

    line-height: 1;

    transform:
        rotate(-15deg);
}


.videos-search-box input {
    width: 100%;

    min-width: 0;

    height: 56px;

    padding:
        0 48px 0 14px;

    border: none;

    outline: none;

    background: transparent;

    color:
        var(--video-text);

    font-family: inherit;

    font-size: 15px;
}


.videos-search-box input::placeholder {
    color:
        #9aa6c2;
}


.clear-search {
    position: absolute;

    right: 12px;

    width: 32px;
    height: 32px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: none;

    border-radius: 50%;

    background:
        #f0edff;

    color:
        var(--video-purple);

    font-size: 20px;

    cursor: pointer;

    opacity: 0;

    pointer-events: none;

    transform:
        scale(.7);

    transition:
        opacity .2s ease,
        transform .2s ease,
        background .2s ease;
}


.videos-search-box.has-value .clear-search {
    opacity: 1;

    pointer-events: auto;

    transform:
        scale(1);
}


.clear-search:hover {
    background:
        #e3dcff;

    transform:
        scale(1.08);
}


/* =========================================================
   TAG BUTTON
========================================================= */

.video-tags-button {
    min-height: 56px;

    display: flex;

    align-items: center;

    gap: 11px;

    padding:
        0 18px;

    border:
        1px solid #ded6ff;

    border-radius: 15px;

    background:
        #ffffff;

    color:
        var(--video-text);

    font-family: inherit;

    font-size: 14px;

    font-weight: 800;

    cursor: pointer;

    transition:
        background .25s ease,
        border-color .25s ease,
        color .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}


.video-tags-button:hover {
    border-color:
        #b9a9ff;

    color:
        var(--video-purple);

    background:
        #faf9ff;

    transform:
        translateY(-2px);

    box-shadow:
        0 8px 20px rgba(101, 66, 244, 0.10);
}


.video-tags-button.open {
    border-color:
        var(--video-purple);

    background:
        #f5f1ff;

    color:
        var(--video-purple);
}


.tags-icon {
    width: 30px;
    height: 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    color:
        white;

    background:
        linear-gradient(
            135deg,
            #6f4bf6,
            #5836e4
        );

    font-size: 17px;
}


.tags-arrow {
    margin-left: auto;

    font-size: 18px;

    transition:
        transform .3s ease;
}


.video-tags-button.open .tags-arrow {
    transform:
        rotate(180deg);
}


/* =========================================================
   FILTERS
========================================================= */

.video-filters {
    max-height: 0;

    overflow: hidden;

    margin-top: 0;

    padding: 0 20px;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(247, 245, 255, .96),
            rgba(239, 235, 255, .96)
        );

    border:
        1px solid transparent;

    opacity: 0;

    transform:
        translateY(-8px);

    transition:
        max-height .4s ease,
        padding .4s ease,
        margin .4s ease,
        opacity .3s ease,
        transform .4s ease,
        border-color .4s ease;
}


.video-filters.open {
    max-height: 250px;

    margin-top: 12px;

    padding:
        17px 20px;

    border-color:
        #e2dbff;

    opacity: 1;

    transform:
        translateY(0);
}


.video-filters-title {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 13px;

    color:
        var(--video-text);

    font-size: 13px;

    font-weight: 800;
}


.filter-hint {
    color:
        #8c98b8;

    font-size: 12px;

    font-weight: 500;
}


.video-tags-scroll {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;

    max-height: 145px;

    overflow-y: auto;

    padding-right: 4px;
}


.video-tags-scroll::-webkit-scrollbar {
    width: 5px;
}


.video-tags-scroll::-webkit-scrollbar-thumb {
    border-radius: 10px;

    background:
        #c9bcff;
}


.video-tag-filter {
    padding:
        8px 13px;

    border:
        1px solid #ddd5ff;

    border-radius: 999px;

    background:
        white;

    color:
        #62729b;

    font-family: inherit;

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


.video-tag-filter:hover {
    color:
        var(--video-purple);

    border-color:
        #b9a9ff;

    transform:
        translateY(-2px);

    box-shadow:
        0 6px 14px rgba(101, 66, 244, .10);
}


.video-tag-filter.active {
    color:
        white;

    border-color:
        var(--video-purple);

    background:
        linear-gradient(
            135deg,
            #7049f7,
            #5733df
        );

    box-shadow:
        0 6px 17px rgba(101, 66, 244, .22);
}


/* =========================================================
   RESULTS HEADER
========================================================= */

.videos-results-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin:
        38px 4px 20px;
}


.section-label {
    margin-bottom: 7px;

    color:
        var(--video-purple);

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 3px;
}


.videos-results-header h2 {
    margin: 0;

    color:
        var(--video-text);

    font-size:
        clamp(25px, 3vw, 34px);

    font-weight: 900;

    letter-spacing: -1px;
}


.video-search-result {
    margin:
        8px 0 0;

    color:
        #8591af;

    font-size: 14px;
}


.video-count {
    flex-shrink: 0;

    padding:
        9px 14px;

    border-radius: 999px;

    color:
        var(--video-purple);

    background:
        #f0ebff;

    font-size: 12px;

    font-weight: 800;

    box-shadow:
        inset 0 0 0 1px #e2d9ff;
}


/* =========================================================
   VIDEO GRID
========================================================= */

.videos-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 22px;
}


/* =========================================================
   VIDEO CARD
========================================================= */

.video-card {
    position: relative;

    overflow: hidden;

    border:
        1px solid var(--video-border);

    border-radius: 24px;

    background:
        white;

    box-shadow:
        var(--video-shadow);

    transform-style:
        preserve-3d;

    transition:
        transform .18s ease,
        box-shadow .3s ease,
        border-color .3s ease;

    animation:
        cardAppear .6s ease both;
}


.video-card::before {
    content: "";

    position: absolute;

    z-index: 3;

    width: 150px;
    height: 150px;

    top: -90px;
    right: -70px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(117, 87, 255, .15),
            transparent 70%
        );

    pointer-events: none;

    transition:
        transform .5s ease;
}


.video-card:hover {
    box-shadow:
        var(--video-shadow-hover);

    border-color:
        #cfc2ff;
}


.video-card:hover::before {
    transform:
        scale(1.5);
}


/* =========================================================
   PREVIEW
========================================================= */

.video-preview {
    position: relative;

    height: 220px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #5b3ee8,
            #748ff4
        );
}


.video-preview img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform .6s cubic-bezier(.2,.8,.2,1),
        filter .4s ease;
}


.video-card:hover .video-preview img {
    transform:
        scale(1.07);

    filter:
        brightness(.85);
}


.video-preview-placeholder {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 30% 25%,
            rgba(255,255,255,.20),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #5b3ee8,
            #7a94f5
        );
}


.video-preview-placeholder::before {
    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    border:
        1px solid rgba(255,255,255,.20);

    border-radius: 50%;

    animation:
        previewRing 4s linear infinite;
}


.video-preview-placeholder span {
    position: relative;

    z-index: 2;

    width: 70px;
    height: 70px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding-left: 5px;

    border-radius: 50%;

    color:
        var(--video-purple);

    background:
        rgba(255,255,255,.94);

    font-size: 27px;

    box-shadow:
        0 15px 35px rgba(35, 19, 119, .25);

    transition:
        transform .3s ease;
}


.video-card:hover
.video-preview-placeholder span {
    transform:
        scale(1.12)
        rotate(4deg);
}


/* =========================================================
   PLAY OVERLAY
========================================================= */

.video-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(37, 25, 116, .18);

    opacity: 0;

    transition:
        opacity .3s ease;
}


.video-card:hover .video-overlay {
    opacity: 1;
}


.video-play {
    width: 68px;
    height: 68px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding-left: 5px;

    border:
        1px solid rgba(255,255,255,.75);

    border-radius: 50%;

    color:
        var(--video-purple);

    background:
        rgba(255,255,255,.96);

    text-decoration: none;

    font-size: 25px;

    box-shadow:
        0 15px 35px rgba(34, 19, 116, .28);

    transform:
        scale(.65);

    transition:
        transform .35s cubic-bezier(.2,.8,.2,1);
}


.video-card:hover .video-play {
    transform:
        scale(1);
}


.video-play:hover {
    transform:
        scale(1.12) !important;
}


/* =========================================================
   CARD CONTENT
========================================================= */

.video-card-content {
    padding:
        21px 22px 23px;
}


.video-card-meta {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 11px;
}


.video-category {
    display: inline-flex;

    padding:
        5px 10px;

    border-radius: 999px;

    color:
        var(--video-purple);

    background:
        #f0ebff;

    font-size: 11px;

    font-weight: 800;
}


.video-class-badge {
    display: inline-flex;

    padding:
        5px 10px;

    border-radius: 999px;

    color:
        #5367b8;

    background:
        #edf1ff;

    font-size: 11px;

    font-weight: 800;
}


.video-card-content h3 {
    margin:
        0 0 9px;

    color:
        var(--video-text);

    font-size: 19px;

    line-height: 1.3;

    font-weight: 850;
}


.video-card-content p {
    min-height: 44px;

    margin:
        0 0 14px;

    color:
        #7180a2;

    font-size: 13px;

    line-height: 1.7;
}


/* =========================================================
   TAGS В КАРТОЧКЕ
========================================================= */

.video-card-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-bottom: 17px;
}


.video-card-tags span {
    padding:
        5px 8px;

    border-radius: 7px;

    color:
        #7563bc;

    background:
        #f5f2ff;

    font-size: 10px;

    font-weight: 700;
}


/* =========================================================
   WATCH BUTTON
========================================================= */

.watch-button {
    position: relative;

    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding:
        11px 15px;

    border-radius: 11px;

    color:
        white;

    background:
        linear-gradient(
            135deg,
            #6d47f4,
            #5733df
        );

    text-decoration: none;

    font-size: 12px;

    font-weight: 800;

    overflow: hidden;

    box-shadow:
        0 8px 18px rgba(101, 66, 244, .20);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}


.watch-button::before {
    content: "";

    position: absolute;

    width: 70px;
    height: 100%;

    left: -100px;
    top: 0;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.4),
            transparent
        );

    transform:
        skewX(-20deg);

    transition:
        left .55s ease;
}


.watch-button:hover {
    transform:
        translateY(-3px);

    box-shadow:
        0 13px 27px rgba(101, 66, 244, .30);
}


.watch-button:hover::before {
    left: 130%;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-videos,
.no-video-results {
    min-height: 390px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 50px 25px;

    text-align: center;

    border:
        1px dashed #d8ceff;

    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(250,249,255,.95),
            rgba(244,240,255,.9)
        );

    animation:
        fadeUp .6s ease both;
}


.no-video-results {
    display: none;
}


.empty-icon {
    position: relative;

    width: 120px;
    height: 120px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border-radius: 35px;

    background:
        linear-gradient(
            135deg,
            #eeeaff,
            #e4ddff
        );

    box-shadow:
        inset 0 0 0 1px #d7ccff;
}


.play-circle {
    width: 66px;
    height: 66px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding-left: 4px;

    border-radius: 50%;

    color:
        white;

    background:
        linear-gradient(
            135deg,
            #7049f7,
            #5934df
        );

    font-size: 25px;

    box-shadow:
        0 15px 30px rgba(101, 66, 244, .25);

    animation:
        playPulse 2.5s ease-in-out infinite;
}


.empty-videos h3,
.no-video-results h3 {
    margin:
        0 0 9px;

    color:
        var(--video-text);

    font-size: 24px;

    font-weight: 900;
}


.empty-videos p,
.no-video-results p {
    max-width: 560px;

    margin:
        0;

    color:
        #7b89a9;

    font-size: 14px;

    line-height: 1.7;
}


.empty-note {
    margin-top: 18px;

    padding:
        9px 14px;

    border-radius: 999px;

    color:
        var(--video-purple);

    background:
        #eeeaff;

    font-size: 12px;

    font-weight: 700;
}


.no-results-icon {
    width: 82px;
    height: 82px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 18px;

    border-radius: 25px;

    background:
        #eeeaff;

    font-size: 38px;

    animation:
        searchFloat 3s ease-in-out infinite;
}


.reset-video-search {
    margin-top: 20px;

    padding:
        12px 19px;

    border: none;

    border-radius: 12px;

    color:
        white;

    background:
        linear-gradient(
            135deg,
            #7049f7,
            #5733df
        );

    font-family: inherit;

    font-size: 13px;

    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 9px 22px rgba(101, 66, 244, .22);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}


.reset-video-search:hover {
    transform:
        translateY(-3px);

    box-shadow:
        0 14px 28px rgba(101, 66, 244, .30);
}


/* =========================================================
   SPARKS
========================================================= */

.spark {
    position: absolute;

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background:
        #7859ff;

    box-shadow:
        0 0 15px rgba(120, 89, 255, .45);
}


.spark-one {
    top: 18px;
    right: 20px;

    animation:
        sparkFloat 2.3s ease-in-out infinite;
}


.spark-two {
    left: 15px;
    bottom: 28px;

    animation:
        sparkFloat 2.7s ease-in-out .4s infinite;
}


.spark-three {
    right: 15px;
    bottom: 18px;

    width: 5px;
    height: 5px;

    animation:
        sparkFloat 2.2s ease-in-out .8s infinite;
}


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

footer {
    position: relative;

    background:
        linear-gradient(
            135deg,
            #f3f0ff,
            #eeeaff
        );

    border-top:
        1px solid #ded7ff;
}


.footer-grid {
    min-height: 105px;

    display: grid;

    grid-template-columns:
        1fr 1fr auto;

    align-items: center;

    gap: 30px;
}


footer h3 {
    margin:
        0 0 7px;

    color:
        var(--video-text);

    font-size: 13px;
}


footer p {
    margin: 0;

    color:
        #7a88a9;

    font-size: 12px;
}


footer a {
    color:
        var(--video-purple);

    text-decoration: none;

    transition:
        color .2s ease;
}


footer a:hover {
    color:
        var(--video-purple-dark);
}


footer small {
    color:
        #8792ad;

    font-size: 11px;
}


/* =========================================================
   DARK THEME
========================================================= */

body.dark .videos-hero {
    background:
        radial-gradient(
            circle at 8% 50%,
            rgba(106, 72, 255, .18),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(93, 73, 200, .18),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #15172e,
            #1d2040 55%,
            #24234d
        );
}


body.dark .videos-hero h1,
body.dark .videos-results-header h2,
body.dark .video-card-content h3,
body.dark .sidebar-title,
body.dark .video-class-button,
body.dark .video-tags-button,
body.dark .video-filters-title,
body.dark .empty-videos h3,
body.dark .no-video-results h3 {
    color:
        #f5f3ff;
}


body.dark .videos-hero p,
body.dark .video-card-content p,
body.dark .video-search-result,
body.dark .empty-videos p,
body.dark .no-video-results p {
    color:
        #b8b9d5;
}


body.dark .videos-hero-points span {
    color:
        #bfc0dd;
}


body.dark .videos-label {
    background:
        rgba(47, 44, 84, .75);

    border-color:
        rgba(143, 119, 255, .22);

    color:
        #a996ff;
}


body.dark .videos-library {
    background:
        transparent;
}


body.dark .videos-sidebar,
body.dark .videos-search-panel,
body.dark .video-card,
body.dark .video-filters,
body.dark .videos-search-box,
body.dark .video-tags-button {
    background:
        rgba(31, 34, 65, .92);

    border-color:
        #393b68;
}


body.dark .video-class-button:hover {
    background:
        #292c50;
}


body.dark .video-class-button.active {
    background:
        linear-gradient(
            135deg,
            #302a62,
            #342d6c
        );

    border-color:
        #4c438d;

    color:
        #aa99ff;
}


body.dark .videos-search-box input {
    color:
        #f5f3ff;
}


body.dark .videos-search-box input::placeholder {
    color:
        #8185a9;
}


body.dark .video-tags-button {
    color:
        #eeeaff;
}


body.dark .video-tags-button.open {
    background:
        #302a5d;

    color:
        #ad9cff;
}


body.dark .video-filters {
    background:
        linear-gradient(
            135deg,
            #252747,
            #29294e
        );
}


body.dark .video-tag-filter {
    background:
        #202341;

    border-color:
        #42456f;

    color:
        #b5b8d5;
}


body.dark .video-tag-filter:hover {
    color:
        #b39fff;

    border-color:
        #6659a8;
}


body.dark .video-tag-filter.active {
    color:
        white;

    background:
        linear-gradient(
            135deg,
            #7049f7,
            #5733df
        );

    border-color:
        #795eff;
}


body.dark .video-count {
    background:
        #30295f;

    color:
        #b3a1ff;

    box-shadow:
        inset 0 0 0 1px #49417d;
}


body.dark .empty-videos,
body.dark .no-video-results {
    background:
        linear-gradient(
            145deg,
            #202341,
            #25264b
        );

    border-color:
        #45456f;
}


body.dark .empty-note {
    background:
        #30295d;

    color:
        #b6a5ff;
}


body.dark .video-card-tags span {
    background:
        #2d2c51;

    color:
        #aaa0dc;
}


body.dark footer {
    background:
        linear-gradient(
            135deg,
            #17192f,
            #1d1f3b
        );

    border-color:
        #33355b;
}


body.dark footer h3 {
    color:
        #f3f2ff;
}


body.dark footer p,
body.dark footer small {
    color:
        #a9acce;
}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes fadeUp {

    from {
        opacity: 0;
        transform:
            translateY(25px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }

}


@keyframes fadeDown {

    from {
        opacity: 0;
        transform:
            translateY(-15px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }

}


@keyframes fadeLeft {

    from {
        opacity: 0;
        transform:
            translateX(-25px);
    }

    to {
        opacity: 1;
        transform:
            translateX(0);
    }

}


@keyframes fadeRight {

    from {
        opacity: 0;
        transform:
            translateX(25px);
    }

    to {
        opacity: 1;
        transform:
            translateX(0);
    }

}


@keyframes cardAppear {

    from {
        opacity: 0;
        transform:
            translateY(25px)
            scale(.97);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }

}


@keyframes heroFloat {

    0%,
    100% {
        transform:
            translate(0, 0);
    }

    50% {
        transform:
            translate(20px, 15px);
    }

}


@keyframes heroFloatReverse {

    0%,
    100% {
        transform:
            translate(0, 0);
    }

    50% {
        transform:
            translate(-18px, -12px);
    }

}


@keyframes decorationFloat {

    0%,
    100% {
        transform:
            translateY(0)
            scale(1);
    }

    50% {
        transform:
            translateY(-15px)
            scale(1.05);
    }

}


@keyframes iconFloat {

    0%,
    100% {
        transform:
            translateY(0);
    }

    50% {
        transform:
            translateY(-4px);
    }

}


@keyframes pointPulse {

    0%,
    100% {
        box-shadow:
            0 0 0 7px
            rgba(101, 66, 244, .09);
    }

    50% {
        box-shadow:
            0 0 0 11px
            rgba(101, 66, 244, 0);
    }

}


@keyframes playPulse {

    0%,
    100% {
        transform:
            scale(1);
    }

    50% {
        transform:
            scale(1.07);
    }

}


@keyframes previewRing {

    from {
        transform:
            rotate(0deg)
            scale(.85);

        opacity: .4;
    }

    50% {
        opacity: .9;
    }

    to {
        transform:
            rotate(360deg)
            scale(1.15);

        opacity: .2;
    }

}


@keyframes sparkFloat {

    0%,
    100% {
        transform:
            translate(0, 0)
            scale(1);
    }

    50% {
        transform:
            translate(5px, -9px)
            scale(1.3);
    }

}


@keyframes searchFloat {

    0%,
    100% {
        transform:
            translateY(0)
            rotate(0);
    }

    50% {
        transform:
            translateY(-8px)
            rotate(-4deg);
    }

}


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

@media (max-width: 1100px) {

    .videos-library {
        grid-template-columns:
            200px minmax(0, 1fr);

        gap: 20px;
    }


    .videos-search-panel {
        grid-template-columns:
            minmax(0, 1fr) 220px;
    }


    .videos-grid {
        gap: 17px;
    }

}


@media (max-width: 900px) {

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


    .videos-sidebar {
        position: static;

        display: grid;

        grid-template-columns:
            repeat(4, 1fr);

        gap: 7px;

        padding: 15px;
    }


    .sidebar-title {
        grid-column:
            1 / -1;
    }


    .video-class-button {
        margin: 0;
    }


    .video-class-button.active::before {
        display: none;
    }


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

}


@media (max-width: 700px) {

    .videos-hero {
        min-height: 340px;
    }


    .videos-hero-content {
        padding:
            50px 15px;
    }


    .videos-hero h1 {
        font-size: 48px;

        letter-spacing:
            -2px;
    }


    .videos-hero p {
        font-size: 15px;
    }


    .videos-hero-points {
        gap: 10px 18px;
    }


    .videos-search-panel {
        grid-template-columns:
            1fr;
    }


    .videos-results-header {
        align-items: flex-start;

        flex-direction: column;
    }


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


    .video-preview {
        height: 230px;
    }


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

        padding:
            25px 0;
    }

}


@media (max-width: 520px) {

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


    .sidebar-title {
        grid-column:
            1 / -1;
    }


    .video-class-button {
        padding:
            8px;
    }


    .videos-hero h1 {
        font-size:
            40px;
    }


    .videos-label {
        font-size:
            9px;

        letter-spacing:
            2px;
    }


    .videos-hero-points {
        flex-direction:
            column;

        gap: 13px;
    }


    .video-filters.open {
        max-height:
            330px;
    }


    .video-tags-scroll {
        max-height:
            230px;
    }

}


/* =========================================================
   ACCESSIBILITY
========================================================= */

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline:
        3px solid rgba(101, 66, 244, .28);

    outline-offset:
        3px;
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            .01ms !important;
    }

}

/* Полностью скрываем верхнюю карточку видеоуроков */
.videos-hero {
    display: none !important;
}



/* =========================================================
   VIDEO DETAILS MODAL — исправление темы и прокрутки
   Тема берётся с body.dark (как на странице VENUS).
========================================================= */

dialog#videoDetailsModal {
    box-sizing: border-box !important;
    width: min(920px, calc(100vw - 32px)) !important;
    max-width: 920px !important;
    height: min(92vh, 900px) !important;
    max-height: 92vh !important;
    padding: 0 !important;
    border: 1px solid #e3ddff !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #12275d !important;
    overscroll-behavior: contain;
}

dialog#videoDetailsModal::backdrop {
    background: rgba(8, 10, 28, .72);
    backdrop-filter: blur(5px);
}

/* Внутренняя область окна прокручивается независимо от страницы. */
dialog#videoDetailsModal .vd-modal-inner {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    background: #ffffff;
    color: #12275d;
}

/* Не даём большому видео растягивать модальное окно. */
dialog#videoDetailsModal .vd-player,
dialog#videoDetailsModal iframe,
dialog#videoDetailsModal video {
    display: block;
    width: 100%;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

dialog#videoDetailsModal iframe,
dialog#videoDetailsModal video {
    aspect-ratio: 16 / 9;
    max-height: 65vh;
}

/* Светлая тема */
dialog#videoDetailsModal .vd-modal-inner h1,
dialog#videoDetailsModal .vd-modal-inner h2,
dialog#videoDetailsModal .vd-modal-inner h3,
dialog#videoDetailsModal .vd-modal-inner p,
dialog#videoDetailsModal .vd-modal-inner label {
    color: inherit;
}

/* Тёмная тема — определяется существующим классом body.dark. */
body.dark dialog#videoDetailsModal {
    background: #191b35 !important;
    color: #f2f0ff !important;
    border-color: #393b68 !important;
}

body.dark dialog#videoDetailsModal .vd-modal-inner {
    background: #191b35 !important;
    color: #f2f0ff !important;
}

body.dark dialog#videoDetailsModal .vd-modal-inner h1,
body.dark dialog#videoDetailsModal .vd-modal-inner h2,
body.dark dialog#videoDetailsModal .vd-modal-inner h3,
body.dark dialog#videoDetailsModal .vd-modal-inner p,
body.dark dialog#videoDetailsModal .vd-modal-inner label,
body.dark dialog#videoDetailsModal .vd-modal-inner span {
    color: #e9e6ff;
}

body.dark dialog#videoDetailsModal .vd-modal-inner button {
    color: #f4f1ff;
}

body.dark dialog#videoDetailsModal .vd-modal-inner input,
body.dark dialog#videoDetailsModal .vd-modal-inner textarea {
    color: #f4f1ff;
    background: #252747;
    border-color: #45476f;
}

/* Полоса прокрутки модального окна */
dialog#videoDetailsModal .vd-modal-inner::-webkit-scrollbar {
    width: 8px;
}

dialog#videoDetailsModal .vd-modal-inner::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #b9a9ff;
}

body.dark dialog#videoDetailsModal .vd-modal-inner::-webkit-scrollbar-thumb {
    background: #62569d;
}

@media (max-width: 600px) {
    dialog#videoDetailsModal {
        width: calc(100vw - 16px) !important;
        height: 94vh !important;
        max-height: 94vh !important;
        border-radius: 16px !important;
    }

    dialog#videoDetailsModal .vd-modal-inner {
        padding-bottom: 20px;
    }
}
