:root {
    --vm-accent: #ffc001;
    --vm-dark: #00223a;
    --vm-text: #252525;
    --vm-muted: #6b7280;
    --vm-border: #e6e8eb;
    --vm-radius: 16px;
}

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

.vm-carousel p,
.vm-library__results-inner p {
    font-family: "Montserrat", sans-serif !important;
}

.vm-card {
    position: relative;
    cursor: pointer;
    outline: none;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow:
            0 12px 28px rgba(0, 0, 0, 0.07),
            0 2px 8px rgba(0, 0, 0, 0.04);
    transition:
            transform 0.3s ease,
            box-shadow 0.3s ease;
}

.vm-card:hover {
    background: linear-gradient(180deg, #FFFFFF 70%, #FFF9EF 100%);
}

.vm-carousel .vm-card {
    box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.1);
}

.vm-carousel .vm-card:hover {
    transform: translateY(-3px);
}

.vm-card::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 7px;
    background: linear-gradient(90deg, #FFE37A 0%, #F4B400 45%, #BD9440 100%);
    transform: translateX(-100%);
    transition: transform .45s ease;
}

.vm-card:hover::after {
    transform: translateX(0);
}

.vm-card__button {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
    appearance: none;
}

.vm-card__button:focus-visible {
    outline: 3px solid rgba(255, 192, 1, 0.42);
    box-shadow:
            0 0 0 3px rgba(255,192,1,.35);
    outline-offset: -3px;
}

.vm-card__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111;
}

.vm-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.vm-card:hover .vm-card__image {
    transform: scale(1.045);
}

.vm-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .2);
}

.vm-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.24));
    transition:
            transform 0.28s ease,
            filter 0.28s ease;
}

.vm-card__play svg {
    display: block;
    width: 100%;
    height: 100%;
}

.vm-card__play circle {
    fill: #ffc001;
}

.vm-card__play path {
    fill: #fff;
}

.vm-card:hover .vm-card__play {
    transform: translate(-50%, -50%) scale(1.08);
    filter: drop-shadow(0 13px 22px rgba(0, 0, 0, 0.3));
}

.vm-card__duration {
    position: absolute;
    right: 12px;
    bottom: 10px;
    z-index: 2;
    padding: 5px 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 5px;
    backdrop-filter: blur(4px);
}

.vm-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 30px 35px;
}

.vm-card__language {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    padding: 3px 15px;
    color: #5a5a5a;
    font-size: 13px;
    background: #FFF9E8;
    border: 1px solid rgba(255, 192, 1, .35);
    border-radius: 999px;
}

.vm-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #5a5a5a;
    line-height: 1.45;
    min-height: calc(1.45em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vm-library {
    width: 100%;
}

.vm-library__toolbar {
    position: relative;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 50px;
}

.vm-library__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.vm-library__count {
    flex: 0 0 auto;
    color: #a5a5a5;
    font-size: 14px;
    white-space: nowrap;
    align-self: end;
    padding-right: 5px;
}

.vm-select {
    position: relative;
}

.vm-select.is-open {
    z-index: 100;
}

/* Trigger pill */

.vm-select__trigger {
    display: grid !important;
    grid-template-columns: 25px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 40px;
    padding: 0 16px !important;
    color: #797979 !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400 !important;
    text-transform: none !important;
    text-align: left;
    background: #fff !important;
    border: 1px solid #ededed !important;
    border-radius: 999px !important;
    cursor: pointer;
    appearance: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
    min-width: 165px;
    transition:
            color 0.2s ease,
            border-color 0.2s ease,
            background 0.2s ease,
            box-shadow 0.2s ease !important;
}

.vm-select__trigger:hover {
    border-color: #ffecb2 !important;
    background: #fcfcfc !important;
}

.vm-select.is-open .vm-select__trigger {
    outline: none !important;
    border-color: #ffdf7f !important;
}

/* Icons */

.vm-select__leading-icon,
.vm-select__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b1b1b1;
}

.vm-select__leading-icon {
    width: 25px;
    height: 25px;
}

.vm-select__leading-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vm-select__chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.22s ease;
}

.vm-select__chevron svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vm-select.is-open .vm-select__chevron {
    transform: rotate(180deg);
}

.vm-select__value {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Dropdown menu */

.vm-select__menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    max-height: 270px;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    background: #fff !important;
    border-radius: 10px;
    box-shadow: 0 4px 12px #00000040 !important;
    transform: translateY(-5px);
    pointer-events: none;
    transition:
            opacity 0.18s ease,
            transform 0.18s ease,
            visibility 0.18s ease;
}

.vm-select.is-open .vm-select__menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.vm-select__option {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 4px 16px !important;
    color: #5a5a5a !important;
    font-family: inherit;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    text-align: left;
    background: #fff !important;
    border: 0 !important;
    cursor: pointer;
    scrollbar-width: thin;
    text-transform: none !important;
    transition:
            color 0.16s ease,
            background 0.16s ease;
}

.vm-select__option:first-child {
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
}

.vm-select__option:last-child {
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
}

.vm-select__option:hover,
.vm-select__option:focus-visible {
    background-color: #F3F3F3 !important;
    opacity: .8 !important;
    outline: none !important;
    box-shadow: none !important;
}

.vm-select__option.is-selected {
    color: #fff !important;
    background: #ffc001 !important;
}

.vm-library.is-loading .vm-library__results {
    opacity: .48;
    pointer-events: none;
}

.vm-pagination {
    display: flex;
    margin-top: 60px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.vm-pagination__button {
    min-width: 30px !important;
    height: 36px !important;
    padding: 0 8px !important;
    border: none !important;
    border-radius: 3px !important;
    background: #fff !important;
    color: #5a5a5a !important;
    cursor: pointer;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.618 !important;
    min-height: unset !important;
}

.vm-pagination__button:hover {
    background: #f3f3f3 !important;
}

.vm-pagination__button.is-active {
    background: #ffc001 !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 4px 10px rgba(0, 0, 0, 0.10) !important;
    cursor: default !important;
}

.vm-pagination__button:disabled {
    opacity: 1 !important;
    cursor: default !important;
}

.vm-pagination__pager-btn {
    width: 64px !important;
    height: 44px !important;
    padding: 0 !important;
    line-height: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px !important;
    background: #fff !important;
    color: #bbb !important;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition: transform .15s ease, box-shadow .15s ease, color .15s ease, background .15s ease;
    text-decoration: none !important;
    border: 1px solid #eeeeee !important;
}

.vm-pagination__pager-btn[disabled] {
    pointer-events: none;
}

.vm-pagination__pager-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.04), 0 10px 20px rgba(0, 0, 0, 0.10) !important;
    color: #ffc001 !important;
}

.vm-pagination__pager-btn.previous {
    margin-right: 20px;
}

.vm-pagination__pager-btn.next {
    margin-left: 20px;
}

.vm-pagination__ellipsis {
    color: #b0b0b0;
    display: inline-block;
    min-width: 16px;
    text-align: center;
}

.vm-empty-state {
    margin: 50px auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #a5a5a5;
    font-size: 14px;
}

.vm-empty-state .vm-empty-state__icon {
    width: 200px;
    height: auto;
}

.vm-empty-state .vm-library__empty {
    font-size: 20px;
    font-weight: 500;
}

.vm-empty-state .vm-library__empty-desc {
    margin: 5px 0 30px;
}

.vm-empty-state .vm-empty-state__button {
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: auto;
    min-height: 40px;
    padding: 0 25px 0 20px !important;
    color: #5a5a5a !important;
    font-size: 15px;
    font-weight: 400 !important;
    text-transform: none !important;
    text-align: left;
    background: #ffc001 !important;
    border: none !important;
    border-radius: 999px !important;
    cursor: pointer;
    appearance: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;
    transition:
            color 0.2s ease,
            border-color 0.2s ease,
            background 0.2s ease,
            box-shadow 0.2s ease !important;
}

.vm-empty-state .vm-empty-state__button:hover {
    box-shadow: inset 0 0 0 120px rgba(0, 0, 0, 0.18) !important;
}

.vm-empty-state .vm-empty-state__button .vm-empty-state__button-icon {
    width: 30px;
    height: 30px;
}

.vm-carousel {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 42px;
    overflow: hidden;
}

.vm-carousel__track {
    align-items: stretch;
}

.vm-carousel__slide {
    height: auto;
}

.vm-carousel__slide .vm-card {
    width: 100%;
    height: 100%;
}

.vm-carousel__pagination {
    position: absolute;
    right: 0;
    bottom: 0 !important;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.vm-carousel__pagination .swiper-pagination-bullet {
    width: 40px;
    height: 5px;
    margin: 0 !important;
    opacity: 1;
    background: #dedede;
    border-radius: 999px;
    transition:
            background-color 0.2s ease,
            transform 0.2s ease;
}

.vm-carousel__pagination .swiper-pagination-bullet-active {
    background: #ffc001;
}

.vm-carousel__pagination.swiper-pagination-lock {
    display: none;
}

@media (max-width: 1300px) {
    .video-library-content {
        padding: 0 16px;
    }
}

@media (max-width: 1100px) {
    .vm-grid {
        gap: 30px 20px;
    }
}

@media (max-width: 800px) {
    .vm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vm-filter {
        min-width: 0;
        flex: 1;
    }
}

@media (max-width: 767px) {
    .vm-card {
        border-radius: 15px;
    }

    .vm-card__content {
        padding: 18px 20px 22px;
    }

    .vm-card__play {
        width: 52px;
        height: 52px;
    }

    .vm-card__title {
        font-size: 16px;
    }

    .vm-carousel {
        padding-bottom: 36px;
    }

    .vm-carousel__pagination .swiper-pagination-bullet {
        width: 28px;
    }
}

@media (max-width: 640px) {
    .vm-library__toolbar {
        flex-direction: column;
        gap: 35px;
        margin-bottom: 20px;
    }

    .vm-library__filters {
        width: 100%;
    }

    .vm-library__count {
        width: 100%;
        text-align: right;
    }

    .vm-select {
        flex: 1 1 100%;
        width: 100%;
    }

    .vm-select__trigger {
        min-height: 50px;
        font-size: 15px;
    }
}

@media (max-width: 560px) {
    .vm-grid { grid-template-columns: 1fr; }
    .vm-library__toolbar { flex-direction: column; }
}
