:root {
    --bg-body: var(--bg-primary, #090909);
    --bg-header: var(--bg-surface-header, rgba(18, 18, 18, 0.95));
    --bg-card: var(--bg-surface-card, #141414);
    --text-main: var(--text-primary, #ffffff);
    --text-dim: var(--text-secondary, #a0a0a0);
    --accent: var(--accent, #2979ff);
    --border: var(--border, #222222);
    --font-main: 'Inter', -apple-system, system-ui, sans-serif;
    --header-h: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.4;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: 0.2s; }

header {
    background-color: var(--bg-header);
    backdrop-filter: blur(10px);
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 3000;
    border-bottom: 1px solid var(--border);
}

.header-left { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    width: 24px;
}
.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}
.logo img { max-height: 52px;padding-top: 10px; }

.desktop-search { display: none; flex: 1; max-width: 500px; margin: 0 40px; }
.desktop-search form { position: relative; }
.desktop-search input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid var(--border);
    padding: 9px 54px 9px 16px;
    border-radius: 8px;
    color: #fff;
    outline: none;
    font-size: 14px;
    transition: 0.3s;
}
.desktop-search input:focus { border-color: var(--accent); background: #000; }
.desktop-search .search-submit {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: var(--accent);
    border: none;
    border-radius: 7px;
    color: var(--on-seed, #fff);
    cursor: pointer;
}
.desktop-search .search-submit:hover { opacity: 0.85; }

.header-right { display: flex; align-items: center; }
.search-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text-dim);
    cursor: pointer;
}
.search-trigger:hover { background: rgba(255,255,255,0.1); color: #fff; }

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2500;
    display: none;
    backdrop-filter: blur(4px);
}

aside {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: #121212;
    z-index: 2600;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    border-right: 1px solid var(--border);
    padding-top: 20px;
}
aside.open { left: 0; }

.nav-group { margin-bottom: 24px; }
.nav-title { padding: 0 24px 10px; font-size: 11px; color: var(--text-dim); text-transform: uppercase; font-weight: 700; letter-spacing: 1.5px; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    font-size: 15px;
    color: #ccc;
    gap: 12px;
    font-weight: 500;
}
.nav-item svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.nav-item:hover, .nav-item.active { background: rgba(41, 121, 255, 0.1); color: var(--accent); }
.nav-item.active { border-right: 3px solid var(--accent); }

.app-main { display: flex; max-width: 100%; margin: 0 auto; min-height: calc(100vh - var(--header-h)); }
main { flex: 1; padding: 16px; width: 100%; min-width: 0; }

.v-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .v-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
    .v-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}
@media (min-width: 1280px) {
    .v-grid { grid-template-columns: repeat(5, 1fr); }
}

.v-card { margin-bottom: 8px; width: 100%; }
.v-card a { display: block; }
.v-thumb {
    position: relative;
    aspect-ratio: var(--thumb-aspect-ratio, 16/9);
    background: #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}
.v-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.v-card:hover .v-thumb img { transform: scale(1.05); }

.v-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 600;
}
.v-hd {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--accent);
    color: var(--on-seed, #fff);
    padding: 1px 4px;
    font-size: 10px;
    font-weight: 900;
    border-radius: 3px;
    text-transform: uppercase;
}
.v-info h3 {
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
    line-height: 1.4;
    color: #efefef;
}
.v-meta {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}

.tag-item::before {
    content: "#";
    margin-right: 2px;
    opacity: 0.7;
    font-weight: 400;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.page-link {
    padding: 8px 16px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 600;
}
.page-link:hover { background: #222; color: #fff; border-color: #444; }
.page-link.active { background: var(--accent); color: var(--on-seed, #fff); border-color: var(--accent); }

.btn-load-more {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-load-more:hover { background: #222; border-color: var(--accent); color: var(--accent); }
.btn-load-more:disabled { opacity: 0.5; cursor: not-allowed; }

footer {
    background-color: #121212;
    border-top: 1px solid var(--border);
    padding: 50px 20px 30px;
    margin-top: 60px;
}
.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
.footer-info p { font-size: 14px; color: var(--text-dim); line-height: 1.7; margin-top: 15px; }
.footer-section h4 { font-size: 15px; margin-bottom: 20px; color: #fff; font-weight: 700; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-dim); font-size: 14px; }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 30px 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.6;
}

@media (min-width: 1024px) {
    .menu-toggle { display: none; }
    aside {
        position: sticky;
        top: var(--header-h);
        left: 0;
        width: 260px;
        height: calc(100vh - var(--header-h));
        background: transparent;
        padding-top: 30px;
    }
    .desktop-search { display: block; }
    .search-trigger { display: none; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    main { padding: 24px 40px; }
}

#mobileSearchOverlay {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100%;
    height: var(--header-h);
    background: #121212;
    display: none;
    align-items: center;
    padding: 0 16px;
    z-index: 3100;
}
#mobileSearchOverlay input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid var(--border);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    outline: none;
}
.m-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: var(--on-seed, #fff);
    cursor: pointer;
}

@keyframes likePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
@keyframes likeCountBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}
@keyframes floatingHeart {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) translateX(20px) scale(0.5);
    }
}
.like-btn-liked {
    color: #ff4458 !important;
}
.like-btn-liked svg {
    animation: likePulse 0.6s ease-out;
}

#playerContainer {
    position: relative;
    width: 100%;
    aspect-ratio: var(--thumb-aspect-ratio, 16/9);
    background: #000;
    overflow: hidden;
}
#playerContainer .art-video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
#artplayer-container { width: 100%; height: 100%; }

.like-btn-liked,
.like-btn.is-liked,
.like-btn.active {
    color: #ff4458 !important;
}
.like-btn.is-liked svg,
.like-btn.active svg {
    animation: likePulse 0.6s ease-out;
}
.like-btn.is-liked .like-count,
.like-btn.active .like-count {
    animation: likeCountBounce 0.5s ease-out;
}

.search-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #151515;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: none;
    z-index: 3200;
}
.search-suggest.active { display: block; }
.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
}
.search-suggest-item:hover,
.search-suggest-item.selected { background: rgba(41, 121, 255, 0.12); color: var(--accent); }
.search-suggest-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.search-suggest-empty { padding: 10px 16px; font-size: 13px; color: var(--text-dim); }

.crumbs { margin-bottom: 16px; font-size: 13px; color: var(--text-dim); }
.crumbs a { color: var(--accent); }
.crumbs .sep { margin: 0 8px; }
.crumbs .current { color: var(--text-main); }

.page-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.page-title .accent { color: var(--accent); }
.page-count { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    border-left: 3px solid var(--accent);
    padding-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.section-title.muted { color: #eee; border-left-color: #eee; }

.kw-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.kw-item {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(41, 121, 255, 0.1);
    color: var(--accent);
    border: 1px solid rgba(41, 121, 255, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.kw-item .count { margin-left: 4px; font-size: 11px; opacity: 0.7; }

.server-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}
.server-btn {
    padding: 7px 16px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.server-btn:hover { border-color: var(--accent-hover, #4a90ff); color: var(--accent-hover, #4a90ff); }
.server-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-seed, #fff); }
.server-btn.active:hover { background: var(--accent-dark, #1a5fd0); border-color: var(--accent-dark, #1a5fd0); }

.video-title { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.video-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}
.video-stat-group { display: flex; align-items: center; gap: 12px; }
.stat-inline { display: flex; align-items: center; gap: 4px; }
.like-wrap { display: flex; gap: 20px; color: var(--accent); font-weight: 700; }
.like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag-row .tag-item {
    background: rgba(41, 121, 255, 0.1);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.video-desc {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.6;
    background: #151515;
    padding: 12px;
    border-radius: 8px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.doc-wrap { max-width: 900px; margin: 0 auto; padding: 16px; }
.doc-wrap.narrow { max-width: 720px; }
.doc-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.doc-wrap h2 { font-size: 16px; font-weight: 700; margin: 22px 0 8px; color: var(--accent); }
.doc-wrap p { font-size: 14px; line-height: 1.7; color: var(--text-dim); margin-bottom: 12px; }
.doc-wrap a { color: var(--accent); }
.doc-form { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.doc-form label { font-size: 13px; font-weight: 600; color: var(--text-main); margin-top: 10px; }
.doc-form input,
.doc-form select,
.doc-form textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.doc-form input:focus,
.doc-form select:focus,
.doc-form textarea:focus { border-color: var(--accent); }
.doc-form textarea { min-height: 120px; resize: vertical; }
.doc-form .hint { font-size: 12px; color: var(--text-dim); }
.doc-form .check-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.doc-form .check-row input { width: auto; }
.doc-form .check-row label { margin: 0; font-weight: 400; }
.doc-submit {
    margin-top: 18px;
    padding: 12px 24px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: var(--on-seed, #fff);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 0.5px;
}
.doc-submit:hover { filter: brightness(1.1); }
.doc-status {
    margin-top: 14px;
    padding: 10px 14px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: rgba(41, 121, 255, 0.1);
    color: var(--accent);
    font-size: 13px;
}
.tally-scroll { overflow-x: auto; margin-top: 18px; }
.tally-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tally-table caption { text-align: left; padding-bottom: 10px; color: var(--text-dim); font-size: 13px; }
.tally-table th,
.tally-table td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.tally-table thead th { background: #1a1a1a; color: var(--text-main); font-weight: 700; }
.tally-figures { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.tally-figures > div {
    flex: 1;
    min-width: 130px;
    background: #151515;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}
.tally-figures span { display: block; font-size: 12px; color: var(--text-dim); }
.tally-figures strong { display: block; font-size: 20px; margin-top: 4px; color: var(--accent); }

@media (max-width: 1023px) {
    .doc-title { font-size: 19px; }
}
@media (min-width: 640px) {
    .tally-figures > div { min-width: 160px; }
}

.fv-header-banner,
.fv-footer-banner {
    text-align: center;
    margin: 20px auto;
    overflow: hidden;
}
