:root {
    --bg: #0b0d10;
    --bg-elevated: #14171b;
    --bg-card: #171a1f;
    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.18);
    --text: #eef1f3;
    --text-dim: #8b939b;
    --accent: #2fa671;
    --accent-dark: #24885c;
    --accent-ink: #06120c;
    --accent-text: #6fcf9d;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.mv-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11,13,16,0.8);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.mv-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.mv-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    flex-shrink: 0;
    color: var(--text);
}
.mv-logo-mark { font-size: 1.4rem; }
.mv-search {
    flex: 1;
    max-width: 420px;
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 4px 4px 16px;
    transition: border-color .15s, box-shadow .15s;
}
.mv-search:focus-within {
    border-color: rgba(47,166,113,0.55);
    box-shadow: 0 0 0 3px rgba(47,166,113,0.14);
}
.mv-search input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 34px;
    margin: 0 !important;
    padding: 0 8px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    color: var(--text) !important;
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 34px;
}
.mv-search input::placeholder { color: var(--text-dim); }
.mv-search input:-webkit-autofill,
.mv-search input:-webkit-autofill:hover,
.mv-search input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-elevated) inset;
    transition: background-color 9999s ease-in-out 0s;
}
.mv-search button {
    flex-shrink: 0;
    background: var(--bg-card);
    border: none;
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s, background .15s;
}
.mv-search button:hover { color: var(--text); background: rgba(255,255,255,0.08); }

.mv-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-dim);
    flex-shrink: 0;
}
.mv-nav a { transition: color .15s; white-space: nowrap; }
.mv-nav a:hover, .mv-nav a.is-active { color: var(--text); }
.mv-lang-switch {
    display: flex;
    gap: 2px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
}
.mv-lang-switch a {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--text-dim);
}
.mv-lang-switch a.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* ---------- Tagline banner ("logo" slogan) ---------- */
.mv-tagline-banner {
    text-align: center;
    padding: 22px 20px 8px;
    background: var(--bg) !important;
}
.mv-tagline-banner p {
    margin: 0;
    font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(1.25rem, 3vw, 2rem);
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--text) !important;
}

/* ---------- Hero ---------- */
.mv-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    background-image:
        linear-gradient(to top, var(--bg) 5%, rgba(11,13,16,0.6) 55%, rgba(11,13,16,0.3)),
        var(--hero-img);
    background-size: cover;
    background-position: center 25%;
}
.mv-hero-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 24px 48px;
}
.mv-hero-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.mv-hero-title {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 12px;
    max-width: 800px;
    line-height: 1.2;
    color: var(--text) !important;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.mv-hero-title a {
    color: var(--text) !important;
    text-decoration: none;
}
.mv-hero-title a:hover { text-decoration: underline; }
.mv-hero-meta {
    color: var(--text-dim);
    margin: 0 0 20px;
    font-size: 0.95rem;
}
.mv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.95rem;
}
.mv-btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow);
    transition: transform .15s, background .15s;
}
.mv-btn-primary:hover { transform: translateY(-2px); background: var(--accent-dark); }

/* ---------- Layout ---------- */
.mv-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}
.mv-section { margin-bottom: 44px; }
.mv-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}
.mv-section-head h2 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0;
}
.mv-see-all {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-text);
    white-space: nowrap;
}
.mv-page-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 20px;
}

/* ---------- Rows / Grid ---------- */
.mv-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
    scrollbar-width: thin;
}
.mv-row .mv-card { flex: 0 0 240px; scroll-snap-align: start; }

.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.mv-empty { color: var(--text-dim); padding: 24px 0; }

/* ---------- Video Card ---------- */
.mv-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.mv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}
.mv-card-thumb-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    text-decoration: none;
    color: inherit;
}
.mv-card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #000;
    position: relative;
}
.mv-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity .15s;
}
.mv-card-play svg {
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 12px;
    width: 22px;
    height: 22px;
}
.mv-card:hover .mv-card-play { opacity: 1; }
.mv-card-duration {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}
.mv-card-badge {
    position: absolute;
    left: 6px;
    top: 6px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
}
.mv-card-body { padding: 12px 14px 16px; }
.mv-card-title {
    margin: 0 0 6px;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}
.mv-card-title a {
    color: inherit;
    text-decoration: none;
}
.mv-card-title a:hover { color: var(--accent-text); }
.mv-card-channel {
    margin: 0 0 6px;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
}
.mv-card-stats {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.76rem;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ---------- Channel cards ---------- */
.mv-chan-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.mv-chan-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    width: 200px;
    transition: transform .18s, border-color .18s;
}
.mv-chan-card:hover { transform: translateY(-4px); border-color: var(--border-hover); }
.mv-chan-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #222;
    border: 2px solid var(--accent);
}
.mv-chan-name { font-weight: 700; font-size: 0.95rem; }
.mv-chan-meta { color: var(--text-dim); font-size: 0.76rem; }

/* ---------- Filters (browse page) ---------- */
.mv-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}
.mv-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.mv-filter-label {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.mv-chip {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
    transition: all .15s;
}
.mv-chip:hover { color: var(--text); border-color: var(--border-hover); }
.mv-chip.is-active {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: transparent;
}

/* ---------- Pagination ---------- */
.mv-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    font-weight: 700;
}
.mv-pagination a { color: var(--accent-text); }
.mv-page-indicator { color: var(--text-dim); font-weight: 600; }

/* ---------- Footer ---------- */
.mv-footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    color: var(--text-dim);
    font-size: 0.82rem;
}
.mv-footer-inner { max-width: 1280px; margin: 0 auto; }

/* ---------- Modal player ---------- */
.mv-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.mv-modal:not([hidden]) {
    display: flex;
}
.mv-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,6,8,0.85);
    backdrop-filter: blur(4px);
}
.mv-modal-box {
    position: relative;
    width: 100%;
    max-width: 960px;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.mv-modal-player { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.mv-modal-player iframe { width: 100%; height: 100%; border: 0; }
.mv-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
}

/* ---------- Swipe / prev-next controls (modal + video page player) ---------- */
.mv-swipe-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, opacity .15s;
}
.mv-swipe-nav:hover { background: rgba(0,0,0,0.8); }
.mv-swipe-nav-prev { left: 12px; }
.mv-swipe-nav-next { right: 12px; }
@media (max-width: 720px) {
    .mv-swipe-nav { width: 34px; height: 34px; }
}

/* ---------- Video detail page ---------- */
.mv-video-page { max-width: 960px; padding-top: 32px; }
.mv-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.mv-video-player iframe { width: 100%; height: 100%; border: 0; }
.mv-video-title {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0 0 16px;
}
.mv-video-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.mv-video-channel {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
}
.mv-video-channel .mv-chan-avatar { width: 40px; height: 40px; }
.mv-video-stats {
    color: var(--text-dim);
    font-size: 0.85rem;
}
.mv-video-yt-link {
    margin-left: auto;
    padding: 10px 20px;
    font-size: 0.85rem;
}
.mv-video-description {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 40px;
    white-space: pre-line;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .mv-header-inner { flex-wrap: wrap; }
    .mv-search { order: 3; max-width: none; width: 100%; }
    .mv-nav { gap: 14px; }
    .mv-hero { min-height: 320px; }
    .mv-row .mv-card { flex-basis: 200px; }
    .mv-video-yt-link { margin-left: 0; }

    /* Filter chips: scroll horizontally instead of wrapping into a tall stack */
    .mv-filter-group {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -24px;
        padding: 0 24px;
    }
    .mv-filter-group::-webkit-scrollbar { display: none; }
    .mv-filter-label { flex-shrink: 0; }
    .mv-chip { flex-shrink: 0; padding: 5px 12px; font-size: 0.78rem; }
}
