:root {
    --mvl-bg: #f7f8fa;
    --mvl-text: #1f2933;
    --mvl-muted: #65748b;
    --mvl-line: #dde3ea;
    --mvl-primary: #2563eb;
    --mvl-primary-dark: #1d4ed8;
    --mvl-card: #ffffff;
}

body {
    background: var(--mvl-bg);
    color: var(--mvl-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--mvl-primary);
    text-decoration: none;
}

a:hover {
    color: var(--mvl-primary-dark);
    text-decoration: underline;
}

.brand-mark {
    color: var(--mvl-text);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
}

.home-search {
    padding: 72px 0 48px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
}

.search-shell {
    max-width: 920px;
}

.search-panel {
    background: #fff;
    border: 1px solid var(--mvl-line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 16px 40px rgba(31, 41, 51, 0.06);
}

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

.filter-check {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--mvl-line);
    border-radius: 6px;
    background: #fff;
}

.filter-check .form-check-input {
    margin: 0;
}

.page-block,
.section-block {
    padding-top: 42px;
}

.page-title {
    font-size: 2rem;
    font-weight: 750;
    margin-bottom: 24px;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-heading h1,
.section-heading h2 {
    font-size: 1.35rem;
    font-weight: 750;
    margin: 0;
}

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

.video-card {
    background: var(--mvl-card);
    border: 1px solid var(--mvl-line);
    border-radius: 8px;
    overflow: hidden;
}

.thumb-link {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    background: #e8edf3;
    overflow: hidden;
}

.thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-empty {
    display: block;
    width: 100%;
    height: 100%;
}

.duration-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.78rem;
    line-height: 1.2;
}

.video-card-body {
    padding: 12px;
}

.video-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
}

.video-title a {
    color: var(--mvl-text);
}

.channel-link,
.video-meta {
    color: var(--mvl-muted);
    font-size: 0.86rem;
}

.video-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}

.tag-cloud,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a,
.tag-list a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--mvl-line);
    border-radius: 999px;
    background: #fff;
    color: var(--mvl-text);
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.watch-layout aside .video-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.player-frame {
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
}

.watch-title {
    font-size: 1.7rem;
    font-weight: 750;
    line-height: 1.25;
}

.description {
    white-space: pre-wrap;
    color: #394656;
}

.side-title {
    font-size: 1rem;
    font-weight: 750;
}

.empty-state {
    border: 1px solid var(--mvl-line);
    border-radius: 8px;
    background: #fff;
    padding: 28px;
    color: var(--mvl-muted);
}

.eyebrow {
    color: var(--mvl-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.narrow-page {
    max-width: 460px;
}

.admin-form,
.admin-table {
    background: #fff;
    border: 1px solid var(--mvl-line);
    border-radius: 8px;
    padding: 18px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

@media (max-width: 991.98px) {
    .filter-grid,
    .video-grid,
    .watch-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 575.98px) {
    .home-search {
        padding: 44px 0 28px;
    }

    .filter-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }

    .search-panel {
        padding: 14px;
    }

    .page-title {
        font-size: 1.55rem;
    }

    .watch-title {
        font-size: 1.35rem;
    }
}
