/* Melopod Videos — simple YouTube-inspired browse layout.
 * Loaded AFTER video-editorial.css. Everything is scoped to .ve-home,
 * so watch pages and their editorial cards keep their existing design.
 */
.ve-editorial.ve-home {
    --mpv-bg: #111019;
    --mpv-surface: #1c1a26;
    --mpv-surface-hover: #292638;
    --mpv-ink: #f7f4fd;
    --mpv-muted: #a8a4b7;
    --mpv-accent: #bd91ed;
    --mpv-accent-soft: rgba(189, 145, 237, .16);
    --mpv-line: rgba(241, 236, 255, .12);
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 100vh;
    box-sizing: border-box;
    margin: 0;
    padding: clamp(20px, 2.6vw, 38px) clamp(14px, 3vw, 48px) 90px;
    color: var(--mpv-ink);
    background: var(--mpv-bg);
    display: block;
    border: 0;
    box-shadow: none;
    position: relative;
    overflow: visible;
    font-family: inherit;
}
.ve-editorial.ve-home *,
.ve-editorial.ve-home *::before,
.ve-editorial.ve-home *::after { box-sizing: border-box; }
.ve-editorial.ve-home a { text-decoration: none; }
.ve-editorial.ve-home button,
.ve-editorial.ve-home input,
.ve-editorial.ve-home select { font: inherit; }
.ve-editorial.ve-home :focus-visible { outline: 2px solid var(--mpv-accent); outline-offset: 3px; }

/* Compact page title rather than the old full-screen editorial hero. */
.ve-home .mpv-header { display: grid; gap: 20px; margin: 0 0 22px; }
.ve-home .mpv-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 0; }
.ve-home .mpv-overline { display: block; margin-bottom: 6px; color: var(--mpv-accent); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.ve-home .mpv-heading h1 { margin: 0; font-family: var(--font-display, var(--font-heading, inherit)); font-weight: 850; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.045em; line-height: 1.04; text-transform: none; color: var(--mpv-ink); }
.ve-home .mpv-heading h1 span { color: var(--mpv-accent); }
.ve-home .mpv-heading p { color: var(--mpv-muted); font-size: 13px; line-height: 1.5; margin: 8px 0 0; }
.ve-home .mpv-upload { background: var(--mpv-accent); border: 1px solid transparent; color: #160f21; padding: 11px 16px; border-radius: 0; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 9px; font-size: 13px; font-weight: 800; transition: background .18s, transform .18s; }
.ve-home .mpv-upload:hover { background: #d7b5fa; transform: translateY(-1px); color: #160f21; }
.ve-home .mpv-upload svg { width: 17px; height: 17px; }

.ve-home form.mpv-search { width: min(100%, 660px); max-width: 660px; position: relative; display: flex; align-items: center; gap: 0; min-height: 47px; margin: 0; padding: 0; background: var(--mpv-surface); border: 1px solid var(--mpv-line); border-radius: 0; box-shadow: none; overflow: hidden; }
.ve-home form.mpv-search:focus-within { border-color: rgba(189,145,237,.65); }
.ve-home .mpv-search > svg { flex: 0 0 20px; width: 20px; height: 20px; margin: 0 12px 0 16px; stroke: var(--mpv-muted); }
.ve-home .mpv-search input { appearance: none; min-width: 0; flex: 1 1 auto; height: 45px; padding: 0 8px 0 0; margin: 0; color: var(--mpv-ink); background: transparent; border: none; outline: none; box-shadow: none; font-size: 14px; }
.ve-home .mpv-search input:focus { outline: none; box-shadow: none; }
.ve-home .mpv-search input::placeholder { color: #928e9f; }
.ve-home .mpv-search button { appearance: none; height: 45px; min-width: 88px; padding: 0 18px; border: 0; border-left: 1px solid var(--mpv-line); border-radius: 0; background: #2b2739; color: var(--mpv-ink); cursor: pointer; font-size: 13px; font-weight: 750; transition: background .18s; }
.ve-home .mpv-search button:hover { background: #393148; }

/* YouTube-like category row, scrollable with no wrapping on a phone. */
.ve-home .mpv-navigation { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--mpv-line); padding-bottom: 19px; margin-bottom: 24px; min-width: 0; }
.ve-home nav.mpv-chips.ve-topics { min-width: 0; flex: 1 1 auto; max-width: 100%; display: flex; align-items: center; flex-wrap: nowrap; gap: 9px; margin: 0; padding: 2px 1px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scrollbar-width: none; background: transparent; border: none; }
.ve-home .mpv-chips::-webkit-scrollbar { display: none; }
.ve-home nav.mpv-chips.ve-topics a { position: static; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 35px; margin: 0; padding: 7px 14px; background: var(--mpv-surface); border: 1px solid rgba(255,255,255,.035); border-radius: 0; font-size: 12px; font-weight: 700; letter-spacing: 0; line-height: 1.1; text-transform: none; white-space: nowrap; color: #d8d4e5; box-shadow: none; transition: background .18s, color .18s; }
.ve-home nav.mpv-chips.ve-topics a:hover { color: #fff; background: var(--mpv-surface-hover); }
.ve-home nav.mpv-chips.ve-topics a.selected,
.ve-home nav.mpv-chips.ve-topics a[aria-current="page"] { color: #1b1325; background: #eee2ff; border-color: #eee2ff; }
.ve-home nav.mpv-chips.ve-topics a::before,
.ve-home nav.mpv-chips.ve-topics a::after { content: none; display: none; }
.ve-home .mpv-filter-trigger { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--mpv-line); border-radius: 0; color: var(--mpv-ink); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.ve-home .mpv-filter-trigger:hover,
.ve-home .mpv-filter-trigger[aria-expanded="true"] { background: var(--mpv-surface-hover); border-color: rgba(189,145,237,.4); }
.ve-home .mpv-filter-trigger svg { width: 17px; height: 17px; }

/* Compact, optional advanced filters (kept compatible with existing form IDs). */
.ve-home #veFilters[hidden] { display: none !important; }
.ve-home #veFilters:not([hidden]) { display: block !important; }
.ve-home .mpv-filter-wrap { position: relative; margin: -9px 0 24px; border: 1px solid var(--mpv-line); border-radius: 0; background: #1b1925; padding: 20px; box-shadow: 0 15px 35px rgba(0,0,0,.17); opacity: 1; visibility: visible; transform: none; }
.ve-home form.mpv-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; padding: 0; margin: 0; background: transparent; width: 100%; position: static; color: var(--mpv-ink); }
.ve-home .mpv-filter-head { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.ve-home .mpv-filter-head strong { font-size: 16px; color: var(--mpv-ink); }
.ve-home .mpv-filter-head button { border: 0; background: none; color: var(--mpv-muted); cursor: pointer; font-size: 24px; line-height: 1; padding: 0 5px; }
.ve-home .mpv-filter-head button:hover { color: var(--mpv-ink); }
.ve-home form.mpv-filters label { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 12px; font-weight: 700; color: var(--mpv-muted); text-transform: none; letter-spacing: 0; }
.ve-home form.mpv-filters input,
.ve-home form.mpv-filters select { width: 100%; min-width: 0; height: 39px; margin: 0; padding: 0 11px; border: 1px solid var(--mpv-line); border-radius: 0; background: #282534; color: var(--mpv-ink); box-shadow: none; font-size: 12px; }
.ve-home .mpv-filter-actions { display: flex; grid-column: 1 / -1; align-items: center; gap: 17px; margin-top: 1px; }
.ve-home .mpv-filter-actions button { min-height: 39px; padding: 8px 16px; border: 0; border-radius: 0; background: var(--mpv-accent); color: #171020; cursor: pointer; text-transform: none; font-size: 12px; font-weight: 800; }
.ve-home .mpv-filter-actions a { color: var(--mpv-muted); font-size: 12px; }
.ve-home .mpv-filter-actions a:hover { color: #fff; }

/* Feed, same-sized cards, minimal metadata hierarchy. */
.ve-home .mpv-results { display: block; margin: 0; padding: 0; background: transparent; border: none; min-width: 0; }
.ve-home .mpv-status { margin: 0; font-size: 12px; color: var(--mpv-muted); }
.ve-home .mpv-status:empty { display: none; }
.ve-home .mpv-results-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.ve-home .mpv-results-heading h2 { color: var(--mpv-ink); font-size: clamp(20px, 2vw, 25px); letter-spacing: -.025em; font-weight: 800; line-height: 1.2; margin: 0; text-transform: none; }
.ve-home .mpv-results-heading p { margin: 6px 0 0; font-size: 13px; color: var(--mpv-muted); line-height: 1.35; }
.ve-home .mpv-sort-indicator { color: var(--mpv-muted); font-size: 12px; }
.ve-home .mpv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 35px 22px; margin: 0; padding: 0; width: 100%; align-items: start; }
.ve-home article.mpv-card { min-width: 0; max-width: none; margin: 0; padding: 0; border: none; border-radius: 0; background: transparent; box-shadow: none; display: block; overflow: visible; }
.ve-home article.mpv-card::before,
.ve-home article.mpv-card::after { content: none; display: none; }
.ve-home .mpv-thumbnail { width: 100%; aspect-ratio: 16 / 9; position: relative; display: block; overflow: hidden; border-radius: 0; background: #23202d; isolation: isolate; }
.ve-home .mpv-thumbnail > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center center; position: absolute; inset: 0; opacity: 1; border-radius: 0; transform: none; transition: transform .25s ease, filter .25s ease; z-index: 1; }
.ve-home .mpv-thumbnail:hover > img { transform: scale(1.035); filter: brightness(.82); }
.ve-home .mpv-thumb-placeholder { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; flex-direction: column; gap: 9px; background: radial-gradient(ellipse at 20% 25%, #383048, #23202e 64%, #17151f); color: rgba(224,211,242,.45); }
.ve-home .mpv-thumb-placeholder svg { width: 45px; height: 45px; }
.ve-home .mpv-thumb-placeholder span { font-weight: 800; font-size: 11px; letter-spacing: .17em; }
.ve-home .mpv-thumb-play { position: absolute; z-index: 2; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; width: 49px; height: 49px; border-radius: 0; color: #fff; background: rgba(17,15,24,.76); backdrop-filter: blur(7px); opacity: 0; transform: translate(-50%,-45%); transition: transform .2s, opacity .2s; }
.ve-home .mpv-thumb-play svg { width: 23px; height: 23px; margin-left: 3px; }
.ve-home .mpv-thumbnail:hover .mpv-thumb-play,
.ve-home .mpv-thumbnail:focus-visible .mpv-thumb-play { opacity: 1; transform: translate(-50%,-50%); }
.ve-home .mpv-duration { position: absolute; z-index: 2; right: 8px; bottom: 8px; padding: 3px 5px; border-radius: 0; background: rgba(8,7,12,.87); color: #fff; font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 750; line-height: 1.1; }
.ve-home .mpv-short-label { position: absolute; z-index: 2; left: 9px; top: 9px; padding: 4px 7px; border-radius: 0; background: rgba(18,15,26,.79); color: #e9d5ff; font-size: 10px; font-weight: 750; letter-spacing: .01em; }

.ve-home .mpv-card-body { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) 27px; align-items: start; gap: 11px; min-width: 0; margin: 12px 0 0; padding: 0 2px; }
.ve-home a.mpv-avatar { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 0; color: #fff; background: #5c416f; font-size: 13px; font-weight: 750; aspect-ratio: 1; }
.ve-home .mpv-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 0; }
.ve-home .mpv-card-info { display: block; min-width: 0; margin: 0; padding: 0; background: transparent; border: none; overflow-wrap: anywhere; }
.ve-home .mpv-card-info h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0 0 5px; padding: 0; color: var(--mpv-ink); font-size: 14px; font-weight: 780; line-height: 1.4; letter-spacing: -.015em; text-transform: none; }
.ve-home .mpv-card-info h3 a { color: inherit; }
.ve-home .mpv-card-info h3 a:hover { color: #e4caff; }
.ve-home a.mpv-creator { display: inline-block; max-width: 100%; color: var(--mpv-muted); font-size: 12px; line-height: 1.35; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; vertical-align: middle; }
.ve-home a.mpv-creator:hover { color: #f0e1ff; }
.ve-home .mpv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--mpv-muted); font-size: 11px; line-height: 1.45; margin-top: 2px; }
.ve-home .mpv-meta time { white-space: nowrap; }

.ve-home .mpv-card-menu { min-width: 0; position: relative; z-index: 4; margin: 0; padding: 0; background: transparent; border: none; }
.ve-home .mpv-card-menu > summary { display: flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; width: 27px; height: 31px; padding: 4px; border-radius: 0; color: #bfb7ce; background: transparent; }
.ve-home .mpv-card-menu > summary::-webkit-details-marker { display: none; }
.ve-home .mpv-card-menu > summary svg { width: 21px; height: 21px; }
.ve-home .mpv-card-menu > summary:hover,
.ve-home .mpv-card-menu[open] > summary { background: var(--mpv-surface-hover); color: #fff; }
.ve-home .mpv-menu-items { position: absolute; z-index: 40; top: 35px; right: 0; width: max-content; min-width: 164px; max-width: 220px; padding: 5px; border-radius: 0; border: 1px solid var(--mpv-line); background: #292534; box-shadow: 0 13px 30px rgba(0,0,0,.45); }
.ve-home .mpv-menu-items > a,
.ve-home .mpv-menu-items > button { width: 100%; min-height: 34px; display: flex; text-align: left; align-items: center; margin: 0; padding: 9px 11px; border: none; border-radius: 0; background: transparent; color: #eee9f6; font-size: 12px; font-weight: 600; cursor: pointer; line-height: 1.35; }
.ve-home .mpv-menu-items > a:hover,
.ve-home .mpv-menu-items > button:hover { background: #41394f; color: #fff; }

.ve-home .mpv-empty { padding: 70px 20px; text-align: center; background: rgba(255,255,255,.025); border: 1px solid var(--mpv-line); border-radius: 0; }
.ve-home .mpv-empty svg { width: 50px; height: 50px; color: var(--mpv-accent); }
.ve-home .mpv-empty h3 { color: var(--mpv-ink); font-size: 20px; margin: 14px 0 7px; }
.ve-home .mpv-empty p { color: var(--mpv-muted); font-size: 13px; margin: 0 0 16px; }
.ve-home .mpv-empty a { display: inline-flex; padding: 10px 14px; border: 1px solid var(--mpv-line); border-radius: 0; color: #e4caff; font-size: 12px; font-weight: 750; }
.ve-home .mpv-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 47px; padding: 0; border: none; color: var(--mpv-muted); font-size: 12px; }
.ve-home .mpv-pagination a { border: 1px solid var(--mpv-line); border-radius: 0; padding: 10px 16px; color: var(--mpv-ink); background: var(--mpv-surface); font-weight: 700; }
.ve-home .mpv-pagination a:hover { background: var(--mpv-surface-hover); }

@media (max-width: 1499px) {
    .ve-home .mpv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ve-home form.mpv-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1010px) {
    .ve-home .mpv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; }
    .ve-home form.mpv-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .ve-editorial.ve-home { padding: 18px 13px 72px; }
    .ve-home .mpv-header { gap: 16px; margin-bottom: 16px; }
    .ve-home .mpv-heading p { font-size: 12px; }
    .ve-home .mpv-heading h1 { font-size: 30px; }
    .ve-home .mpv-overline { font-size: 9px; }
    .ve-home .mpv-upload { padding: 10px 11px; font-size: 0; gap: 0; border-radius: 0; }
    .ve-home .mpv-upload svg { width: 20px; height: 20px; }
    .ve-home form.mpv-search { max-width: none; min-height: 43px; border-radius: 0; }
    .ve-home .mpv-search input,
    .ve-home .mpv-search button { height: 42px; }
    .ve-home .mpv-search input { font-size: 13px; }
    .ve-home .mpv-search button { min-width: 65px; padding: 0 10px; font-size: 12px; }
    .ve-home .mpv-search > svg { width: 17px; margin: 0 9px 0 12px; }
    .ve-home .mpv-navigation { gap: 9px; margin-bottom: 21px; padding-bottom: 15px; }
    .ve-home nav.mpv-chips.ve-topics { gap: 7px; }
    .ve-home nav.mpv-chips.ve-topics a { min-height: 32px; padding: 7px 11px; font-size: 11px; }
    .ve-home .mpv-filter-trigger { height: 33px; width: 36px; padding: 0; }
    .ve-home .mpv-filter-trigger span { display: none; }
    .ve-home .mpv-filter-wrap { padding: 15px; }
    .ve-home form.mpv-filters { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .ve-home .mpv-results-heading { margin-bottom: 17px; }
    .ve-home .mpv-grid { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
    .ve-home .mpv-thumbnail { border-radius: 0; }
    .ve-home .mpv-card-body { margin-top: 11px; }
    .ve-home .mpv-card-info h3 { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .ve-home .mpv-thumbnail > img,
    .ve-home .mpv-thumb-play,
    .ve-home .mpv-upload,
    .ve-home .mpv-filter-trigger { transition: none !important; }
}

/* Sharp-corner design: neutralize rounding from shared/editorial styles,
   including stateful controls, injected cards, overlays and small-screen rules.
   Scope everything to the Videos homepage (not watch pages or the app shell). */
.ve-editorial.ve-home,
.ve-editorial.ve-home *,
.ve-editorial.ve-home *::before,
.ve-editorial.ve-home *::after,
.ve-home + .ve-toast {
    border-radius: 0 !important;
}
