.video-hero {
    padding-bottom: 56px;
}

.video-library {
    padding: 36px 0 72px;
    background: #f8fafc;
}

.video-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.video-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 560px;
}

.video-filter {
    border: 1px solid #d9deea;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    padding: 8px 14px;
    font: 600 0.84rem/1.2 inherit;
    cursor: pointer;
}

.video-filter:hover,
.video-filter:focus-visible {
    border-color: #5740b8;
    color: #453195;
    outline: none;
}

.video-filter.is-active {
    border-color: #5740b8;
    background: #5740b8;
    color: #fff;
}

.video-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 220px;
    padding: 8px 12px;
    border: 1px solid #d9deea;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
}

.video-search:focus-within {
    border-color: #5740b8;
    box-shadow: 0 0 0 3px rgba(87, 64, 184, 0.12);
}

.video-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
}

.video-count {
    min-width: 28px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.video-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr);
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.video-spotlight-media,
.video-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #020617;
}

.video-spotlight-media {
    min-height: 100%;
}

.video-spotlight-media img,
.video-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.video-spotlight-media img {
    aspect-ratio: 16 / 9;
}

.video-card-media img {
    aspect-ratio: 16 / 9;
}

.video-spotlight-media:hover img,
.video-card-media:hover img {
    transform: scale(1.025);
}

.video-play {
    position: absolute;
    inset: 50% auto auto 50%;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    pointer-events: none;
}

.video-play .bi {
    margin-left: 4px;
    background: none;
    color: inherit;
    font-size: 2.2rem;
}

.video-play-small {
    width: 52px;
    height: 52px;
}

.video-play-small .bi {
    font-size: 1.6rem;
}

.video-spotlight-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 30px;
}

.video-spotlight-copy h2 {
    margin: 12px 0;
    color: #0f172a;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.25;
}

.video-spotlight-copy h2 a,
.video-card h3 a {
    color: inherit;
    text-decoration: none;
}

.video-spotlight-copy h2 a:hover,
.video-card h3 a:hover {
    color: #5740b8;
}

.video-spotlight-copy > p:not(.video-meta) {
    color: #475569;
    line-height: 1.65;
}

.video-badges {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.video-badge {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ede9fe;
    color: #453195;
    font-size: 0.73rem;
    font-weight: 700;
}

.video-badge-new {
    background: #dcfce7;
    color: #166534;
}

.video-meta {
    display: flex;
    gap: 6px 14px;
    flex-wrap: wrap;
    margin: 0 0 12px;
    color: #64748b;
    font-size: 0.8rem;
}

.video-watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 11px 18px;
    border-radius: 10px;
    background: #5740b8;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
}

.video-watch-btn:hover,
.video-watch-btn:focus-visible {
    background: #453195;
    color: #fff !important;
    outline: none;
}

.video-watch-btn .bi,
.video-register-btn .bi {
    border-radius: 0;
    background: none;
    color: inherit;
}

.video-section-heading h2 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 1.35rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 22px;
}

.video-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}

.video-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.video-card h3 {
    margin: 12px 0 10px;
    color: #0f172a;
    font-size: 1.08rem;
    line-height: 1.4;
}

.video-description {
    display: -webkit-box;
    overflow: hidden;
    flex: 1;
    margin-bottom: 16px;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.video-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.video-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #453195;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.video-card-link:hover {
    color: #31236f;
}

.video-card-link .bi {
    background: none;
    color: inherit;
}

.video-empty {
    padding: 36px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #475569;
    text-align: center;
}

.video-register-btn {
    background: #5740b8;
    color: #fff;
}

.video-register-btn:hover,
.video-register-btn:focus-visible {
    background: #453195;
    color: #fff;
}

body.dark-mode .video-library,
body.dark-mode .tutorial-cta-section {
    background: #0b1020;
}

body.dark-mode .video-filter,
body.dark-mode .video-search,
body.dark-mode .video-spotlight,
body.dark-mode .video-card {
    border-color: #2b3550;
    background: #151c2e;
}

body.dark-mode .video-filter {
    color: #d5dced;
}

body.dark-mode .video-filter:hover,
body.dark-mode .video-filter:focus-visible {
    color: #fff;
}

body.dark-mode .video-filter.is-active {
    border-color: #5740b8;
    background: #5740b8;
    color: #fff;
}

body.dark-mode .video-search input,
body.dark-mode .video-spotlight-copy h2,
body.dark-mode .video-card h3,
body.dark-mode .video-section-heading h2 {
    color: #f1f5f9;
}

body.dark-mode .video-spotlight-copy > p:not(.video-meta),
body.dark-mode .video-description,
body.dark-mode .video-empty {
    color: #b6c0d2;
}

body.dark-mode .video-meta,
body.dark-mode .video-count {
    color: #9eabc0;
}

body.dark-mode .video-badge {
    background: #2b2350;
    color: #d8ccff;
}

body.dark-mode .video-badge-new {
    background: #143a2a;
    color: #bbf7d0;
}

body.dark-mode .video-card-link {
    color: #c4b5fd;
}

body.dark-mode .video-card-link:hover {
    color: #ddd6fe;
}

body.dark-mode a.video-watch-btn,
body.dark-mode a.video-watch-btn:hover,
body.dark-mode a.video-watch-btn:focus-visible,
body.dark-mode a.video-register-btn,
body.dark-mode a.video-register-btn:hover,
body.dark-mode a.video-register-btn:focus-visible {
    color: #fff !important;
}

[hidden] {
    display: none !important;
}

.video-watch-page {
    max-width: 1080px;
    padding: 120px 20px 72px;
}

.video-breadcrumb {
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.video-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #453195;
    text-decoration: none;
}

.video-watch-header {
    margin-bottom: 24px;
}

.video-watch-header h1 {
    max-width: 920px;
    margin: 14px 0;
    color: #0f172a;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.2;
}

.video-watch-description {
    max-width: 850px;
    color: #475569;
    font-size: 1.04rem;
    line-height: 1.65;
}

.video-watch-description + .video-meta a,
.video-breadcrumb a {
    color: #453195;
}

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

.video-facade {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #020617;
    cursor: pointer;
}

.video-facade img,
.video-iframe,
.video-player video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.video-facade:focus-visible {
    outline: 4px solid #a78bfa;
    outline-offset: -4px;
}

.video-privacy {
    margin-top: 10px;
    color: #64748b;
    font-size: 0.8rem;
}

.video-watch-actions {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.video-article-body {
    max-width: 820px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid #e2e8f0;
}

.video-article-body h2,
.video-related h2 {
    margin-bottom: 16px;
    color: #0f172a;
    font-size: 1.45rem;
}

.video-article-body p {
    color: #334155;
    font-size: 1rem;
    line-height: 1.75;
}

.video-related {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid #e2e8f0;
}

body.dark-mode .video-watch-header h1,
body.dark-mode .video-article-body h2,
body.dark-mode .video-related h2 {
    color: #f1f5f9;
}

body.dark-mode .video-watch-description,
body.dark-mode .video-article-body p {
    color: #b6c0d2;
}

body.dark-mode .video-breadcrumb a,
body.dark-mode .video-watch-description + .video-meta a {
    color: #c4b5fd;
}

body.dark-mode .video-article-body,
body.dark-mode .video-related {
    border-color: #2b3550;
}

@media (max-width: 900px) {
    .video-spotlight {
        grid-template-columns: 1fr;
    }

    .video-spotlight-copy {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .video-toolbar {
        align-items: stretch;
    }

    .video-filters {
        flex-basis: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .video-filter {
        flex-shrink: 0;
    }

    .video-search {
        flex: 1;
        min-width: 0;
    }

    .video-spotlight-copy {
        padding: 20px;
    }
}
