:root {
    color-scheme: dark;
    --bg: #0d0f12;
    --panel: #171b20;
    --panel-2: #20262d;
    --text: #f2f4f7;
    --muted: #9aa4b2;
    --accent: #e0b449;
    --accent-text: #111111;
    --line: #2b333d;
    --header-bg: rgba(13, 15, 18, 0.94);
    --badge-quality: rgba(24, 119, 242, 0.9);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, "Microsoft YaHei", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: auto minmax(280px, 560px);
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 14px clamp(16px, 4vw, 40px);
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    transition: transform 180ms ease;
    will-change: transform;
}

.site-header-hidden {
    transform: translateY(-105%);
}

.brand {
    flex: 0 0 auto;
    font-family: var(--brand-font);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    color: var(--accent);
    letter-spacing: 0;
}

.search-area {
    display: grid;
    width: min(560px, 100%);
    gap: 8px;
}

.search-form {
    display: flex;
    width: 100%;
    gap: 8px;
}

.search-form input {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
}

.search-form button,
.jump-video-link,
.pagination a,
.error-page a {
    height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.search-form button {
    position: relative;
    min-width: 64px;
    flex: 0 0 auto;
}

.jump-video-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--accent) 54%, var(--line) 46%);
    background: color-mix(in srgb, var(--accent) 18%, var(--panel) 82%);
    color: var(--text);
}

.jump-video-link::after,
.search-submit::after {
    content: attr(data-remaining);
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

.jump-video-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.jump-video-link.is-disabled,
.jump-video-link.is-disabled:hover,
.search-submit.is-disabled,
.search-submit.is-disabled:hover {
    opacity: 0.46;
    cursor: not-allowed;
    border-color: var(--line);
    color: var(--muted);
}

.preset-search {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.preset-search a {
    display: inline-flex;
    align-items: center;
    max-width: 92px;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line) 66%);
    border-radius: 6px;
    background: color-mix(in srgb, var(--panel) 78%, #000 22%);
    color: color-mix(in srgb, var(--text) 82%, var(--accent) 18%);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preset-search a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.category-nav-wrap {
    position: relative;
    grid-column: 1 / -1;
    min-width: 0;
    border-top: 1px solid var(--line);
}

.category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav a {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
}

.category-nav span {
    margin-left: 6px;
    color: var(--muted);
}

.nav-scroll-hint {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 3;
    display: none;
    width: clamp(38px, 8vw, 72px);
    border: 0;
    color: var(--accent);
    cursor: pointer;
    opacity: 0;
    transition: opacity 160ms ease;
}

.nav-scroll-hint::before {
    position: absolute;
    top: 50%;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line) 58%);
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel) 86%, #000 14%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-50%);
}

.nav-scroll-hint-left {
    left: 0;
    background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 76%, transparent) 58%, transparent 100%);
}

.nav-scroll-hint-left::before {
    left: 10px;
    content: "<";
}

.nav-scroll-hint-right {
    right: 0;
    background: linear-gradient(270deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 76%, transparent) 58%, transparent 100%);
}

.nav-scroll-hint-right::before {
    right: 10px;
    content: ">";
    animation: navHintPulse 1.4s ease-in-out infinite;
}

.category-nav-wrap.can-scroll-left .nav-scroll-hint-left,
.category-nav-wrap.can-scroll-right .nav-scroll-hint-right {
    display: block;
    opacity: 1;
}

.category-nav-wrap.can-scroll-left .nav-scroll-hint-left::before {
    animation: navHintPulse 1.4s ease-in-out infinite;
}

@keyframes navHintPulse {
    0%,
    100% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(-50%) translateX(3px);
    }
}

.nav-scroll-hint-left::before {
    animation-direction: reverse;
}

.ad-slot {
    width: min(1200px, 100%);
    margin: 2px auto;
}

.ad-slot:empty,
.ad-floating:empty {
    display: none;
}

.has-ad-placeholders .ad-slot:empty {
    display: block;
    overflow: hidden;
    background: #000 url("/static/img/loading.svg") center / 42px 42px no-repeat;
}

.has-ad-placeholders .ad-words:empty {
    min-height: calc(var(--ad-word-count, 0) * 38px);
}

.has-ad-placeholders .ad-banner:empty {
    min-height: calc(var(--ad-banner-count, 0) * 120px);
}

.has-ad-placeholders .ad-nav-grid:empty {
    min-height: calc(var(--ad-nav-count, 0) * 70px);
}

.has-ad-placeholders .ad-app-grid:empty {
    min-height: calc((var(--ad-app-rows, 0) * 92px) + 10px);
}

.ad-words {
    display: grid;
    gap: 0;
    overflow: hidden;
}

.ad-word-item,
.ad-word-line {
    display: block;
    overflow: hidden;
}

.ad-word-line {
    border-radius: 0;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.ad-word-line > div {
    max-width: 100%;
    min-height: 38px;
    padding: 8px 5px !important;
    line-height: 22px;
}

.ad-word-line span {
    max-width: 100%;
}

.ad-banner {
    display: grid;
    gap: 1px;
}

.ad-banner-item,
.ad-banner-item a {
    display: block;
    min-width: 0;
}

.ad-banner img {
    display: block;
    width: 1200px;
    max-width: 100%;
    height: 120px;
    object-fit: fill;
    border-radius: 0;
    background: #000;
}

.ad-banner img.abcdHF {
    height: 60px;
}

.ad-banner img.abcdHF1 {
    height: 120px;
}

.ad-nav-grid {
    display: block;
    box-sizing: border-box;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

.ad-nav-card {
    display: block;
    float: left;
    width: 100%;
    min-width: 0;
    padding: 15px 0;
    border: 0;
    border-radius: 0;
    background: #000000;
}

.ad-nav-title {
    display: block;
    float: left;
    width: 8%;
    position: relative;
    margin: 0;
    padding: 0 5px;
    border-radius: 10px;
    background: #e7cdaa;
    color: #000;
    font-size: 16px;
    font-weight: 400;
    line-height: 40px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ad-nav-hot .ad-nav-title {
    background: linear-gradient(135deg, #ffe08a, #ff9f1c);
    color: #160f00;
    font-weight: 800;
}

.ad-nav-hot-badge {
    position: absolute;
    top: -8px;
    right: -6px;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.ad-nav-hot .ad-nav-links a {
    color: #ffd166;
}

.ad-nav-links {
    display: block;
}

.ad-nav-links a {
    display: block;
    float: left;
    width: 11.5%;
    max-width: none;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    line-height: 40px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ad-nav-card::after,
.ad-nav-grid::after {
    display: table;
    clear: both;
    content: "";
}

.ad-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
    gap: 4px;
    max-width: 1200px;
    margin: 2px auto;
    padding: 5px;
    border-radius: 8px;
    background-color: #000000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ad-app-item {
    display: grid;
    gap: 0;
    min-width: 0;
    margin: 2px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-app-item img {
    display: block;
    width: 80%;
    max-width: 80px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 10px;
}

.ad-app-item span {
    color: #f35626;
    background-image: -webkit-linear-gradient(92deg, #f35626, #7100ff);
    font-size: 10px;
    font-weight: bold;
    line-height: 1.35;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-animation: hue 10s infinite linear;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ad-app-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

@-webkit-keyframes hue {
    from {
        -webkit-filter: hue-rotate(0deg);
    }

    to {
        -webkit-filter: hue-rotate(-360deg);
    }
}

.ad-video-card {
    border-color: color-mix(in srgb, var(--accent) 38%, transparent);
}

.ad-floating {
    position: relative;
    z-index: 9999;
    display: contents;
    pointer-events: none;
}

.ad-float-item {
    position: fixed !important;
    z-index: 9999 !important;
    display: block !important;
    width: 130px !important;
    height: auto !important;
    cursor: pointer;
    pointer-events: auto !important;
    transition: transform 0.3s ease;
}

.ad-float-item:hover {
    transform: scale(1.1);
}

.ad-float-close {
    position: absolute;
    top: -7px;
    right: 0;
    z-index: 10000;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    padding: 0;
    opacity: 0.72;
    transform: translateX(3px);
}

.ad-float-close:hover {
    background: #d71920;
    opacity: 0.96;
}

.ad-float-item img {
    display: block !important;
    width: 130px !important;
    height: auto !important;
    border-radius: 25px !important;
    object-fit: contain !important;
}

.ad-float-item.zuo1,
.ad-float-item.zuo2,
.ad-float-item.zuo3,
.ad-float-item.zuo4,
.ad-float-item.zuo5,
.ad-float-item.you1,
.ad-float-item.you2,
.ad-float-item.you3,
.ad-float-item.you4,
.ad-float-item.you5 {
    right: 5px !important;
    left: auto !important;
}

.ad-float-item.zuo1,
.ad-float-item.you1 {
    top: max(160px, 20vh) !important;
}

.ad-float-item.zuo2,
.ad-float-item.you2 {
    top: max(250px, 32vh) !important;
}

.ad-float-item.zuo3,
.ad-float-item.you3 {
    top: max(340px, 44vh) !important;
}

.ad-float-item.zuo4,
.ad-float-item.you4 {
    top: max(430px, 56vh) !important;
}

.ad-float-item.zuo5,
.ad-float-item.you5 {
    top: max(520px, 68vh) !important;
}

.ad-float-item.xia1,
.ad-float-item.xia2,
.ad-float-item.xia3,
.ad-float-item.xia4 {
    top: 91% !important;
    right: auto !important;
}

.ad-float-item.xia1 {
    left: 3% !important;
}

.ad-float-item.xia2 {
    left: 29% !important;
}

.ad-float-item.xia3 {
    left: 53% !important;
}

.ad-float-item.xia4 {
    left: 78% !important;
}

.video-section,
.history-section,
.video-info,
.error-page {
    width: min(1200px, calc(100% - 32px));
    margin: 24px auto;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

h1 {
    margin: 0;
    font-size: clamp(22px, 3vw, 32px);
    letter-spacing: 0;
}

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

.video-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding-bottom: 10px;
    border-radius: 8px;
    background: var(--panel);
    overflow: hidden;
    border: 1px solid transparent;
}

.video-card:hover {
    border-color: var(--accent);
}

.thumb-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--panel-2);
}

.video-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--panel-2);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.video-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: grid;
    gap: 5px;
    max-width: calc(100% - 16px);
    pointer-events: none;
}

.video-badge {
    width: max-content;
    max-width: 100%;
    padding: 3px 7px;
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.video-badge-category {
    background: var(--accent);
    color: var(--accent-text);
}

.video-badge-quality {
    background: var(--badge-quality);
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
}

.play-icon {
    position: relative;
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    transform: translateY(8px) scale(0.92);
    transition: transform 180ms ease;
}

.play-icon::before {
    position: absolute;
    top: 50%;
    left: 52%;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid var(--accent-text);
    content: "";
    transform: translate(-40%, -50%);
}

.video-card:hover .play-overlay {
    opacity: 1;
    transform: scale(1);
}

.video-card:hover .play-icon {
    transform: translateY(0) scale(1);
}

.video-title {
    padding: 0 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 700;
}

.video-meta {
    padding: 0 10px;
    color: var(--muted);
    font-size: 12px;
}

.player-shell {
    width: min(1200px, 100%);
    margin: 0 auto;
    background: #000;
}

.player-shell iframe {
    display: block;
    width: 100%;
    height: min(68vh, 680px);
    min-height: 240px;
    border: 0;
}

.video-info p,
.empty-state {
    color: var(--muted);
}

.pagination {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin: 24px auto;
}

.pagination a,
.error-page a {
    display: inline-flex;
    align-items: center;
}

.history-section[hidden] {
    display: none;
}

.history-section {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent) 0%, transparent 42%),
        color-mix(in srgb, var(--panel) 88%, #000 12%);
}

.history-section .section-head {
    margin-bottom: 12px;
}

.history-section h1 {
    font-size: clamp(18px, 2vw, 22px);
}

.history-clear {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-2);
    color: var(--muted);
    cursor: pointer;
}

.history-clear:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

.history-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    min-height: 68px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel-2) 70%, #000 30%);
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.history-card:hover {
    border-color: color-mix(in srgb, var(--accent) 65%, var(--line) 35%);
    background: color-mix(in srgb, var(--accent) 9%, var(--panel-2) 91%);
    transform: translateY(-1px);
}

.history-thumb {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: var(--panel);
}

.history-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.history-text {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.history-text strong,
.history-text em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-text strong {
    color: var(--text);
    font-size: 13px;
    line-height: 1.35;
}

.history-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.site-footer {
    margin-top: 44px;
    padding: 0 clamp(16px, 4vw, 40px) 36px;
    color: var(--muted);
}

.footer-inner {
    width: min(1200px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, transparent) 0%, transparent 38%),
        linear-gradient(180deg, var(--panel) 0%, color-mix(in srgb, var(--panel) 68%, #000 32%) 100%);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
    gap: 24px;
    align-items: end;
    padding: 24px;
    border-bottom: 1px solid var(--line);
}

.footer-title-wrap {
    min-width: 0;
}

.footer-kicker {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 26px;
    margin-bottom: 10px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line) 54%);
    border-radius: 6px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-top h2 {
    margin: 0;
    font-size: clamp(18px, 2.2vw, 26px);
    line-height: 1.35;
    letter-spacing: 0;
}

.footer-top a {
    color: var(--text);
}

.footer-top p {
    display: -webkit-box;
    margin: 0;
    color: color-mix(in srgb, var(--muted) 86%, var(--text) 14%);
    font-size: 14px;
    line-height: 1.75;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.footer-middle {
    display: grid;
    grid-template-columns: minmax(180px, 0.28fr) minmax(0, 1fr);
    gap: 16px;
    padding: 18px 24px 22px;
}

.footer-brand-panel {
    position: relative;
    display: grid;
    align-content: center;
    min-width: 0;
    overflow: hidden;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, transparent) 0%, transparent 48%),
        linear-gradient(160deg, color-mix(in srgb, var(--panel-2) 92%, var(--accent) 8%) 0%, color-mix(in srgb, var(--panel) 68%, #000 32%) 100%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent), 0 14px 28px rgba(0, 0, 0, 0.14);
}

.footer-brand-panel::before {
    position: absolute;
    inset: -45%;
    background:
        linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--accent) 22%, transparent) 44%, transparent 72%),
        radial-gradient(circle, color-mix(in srgb, #fff 8%, transparent) 0%, transparent 52%);
    content: "";
    opacity: 0.86;
    transform: translateX(-30%) rotate(10deg);
    animation: footerBrandFlow 9s ease-in-out infinite alternate;
    pointer-events: none;
}

.footer-brand-panel strong {
    position: relative;
    z-index: 1;
    color: var(--text);
    font-size: 18px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-brand-panel span {
    position: relative;
    z-index: 1;
    margin-top: 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes footerBrandFlow {
    0% {
        transform: translateX(-34%) translateY(-8%) rotate(10deg);
    }

    100% {
        transform: translateX(28%) translateY(8%) rotate(10deg);
    }
}

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

.footer-keywords a {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel) 82%, #000 18%);
    color: color-mix(in srgb, var(--muted) 88%, var(--text) 12%);
    font-size: 14px;
    line-height: 1.35;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.footer-keywords a span {
    display: inline-grid;
    flex: 0 0 28px;
    width: 28px;
    height: 24px;
    place-items: center;
    border-radius: 5px;
    background: color-mix(in srgb, var(--accent) 18%, var(--panel-2) 82%);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.footer-keywords a em {
    min-width: 0;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-keywords a:hover,
.footer-bottom a:hover,
.footer-top a:hover {
    color: var(--accent);
}

.footer-keywords a:hover {
    border-color: color-mix(in srgb, var(--accent) 62%, var(--line) 38%);
    background: color-mix(in srgb, var(--accent) 10%, var(--panel) 90%);
    transform: translateY(-1px);
}

.footer-bottom {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px 16px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.12);
}

.footer-bottom span,
.footer-bottom a {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.footer-bottom span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-bottom a {
    flex: 0 1 auto;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .site-header {
        align-items: stretch;
        gap: 8px;
        grid-template-columns: 1fr;
        padding: 8px 12px;
    }

    .brand {
        font-size: 24px;
    }

    .search-area {
        gap: 5px;
    }

    .search-form {
        gap: 6px;
    }

    .search-form input {
        height: 34px;
        padding-inline: 10px;
    }

    .search-form button {
        height: 34px;
        min-width: 56px;
        padding-inline: 10px;
    }

    .jump-video-link {
        height: 34px;
        min-width: 70px;
        padding-inline: 8px;
        font-size: 13px;
    }

    .preset-search {
        gap: 4px;
    }

    .preset-search a {
        min-height: 22px;
        max-width: 78px;
        padding-inline: 7px;
        font-size: 11px;
    }

    .category-nav-wrap {
        margin-top: 2px;
    }

    .category-nav {
        gap: 6px;
        padding-top: 7px;
    }

    .category-nav a {
        padding: 6px 8px;
        font-size: 13px;
    }

    .category-nav span {
        margin-left: 4px;
    }

    .nav-scroll-hint {
        width: 46px;
    }

    .ad-nav-grid {
        width: 100%;
        margin: 0;
        border-radius: 0;
        padding: 0;
    }

    .has-ad-placeholders .ad-banner:empty {
        min-height: calc(var(--ad-banner-count, 0) * 80px);
    }

    .has-ad-placeholders .ad-nav-grid:empty {
        min-height: calc(var(--ad-nav-count, 0) * 90px);
    }

    .has-ad-placeholders .ad-app-grid:empty {
        min-height: calc((var(--ad-app-rows-mobile, 0) * 76px) + 10px);
    }

    .ad-nav-card {
        padding: 10px 0;
    }

    .ad-nav-title {
        width: 14%;
        font-size: 14px;
        line-height: 70px;
    }

    .ad-nav-hot-badge {
        top: 4px;
        right: 0;
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .ad-nav-links a {
        width: 21%;
        font-size: 12px;
        line-height: 30px;
    }

    .ad-app-grid {
        grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
        max-width: 85%;
        margin: 2px 0;
        padding: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0);
    }

    .ad-app-item img {
        width: 100%;
    }

    .ad-banner img {
        width: 100vw;
        height: 80px;
        max-height: none;
    }

    .ad-banner img.abcdHF {
        height: 40px;
    }

    .ad-banner img.abcdHF1 {
        height: 80px;
    }

    .ad-float-item {
        width: 65px !important;
    }

    .ad-float-item img {
        width: 65px !important;
        border-radius: 15px !important;
    }

    .ad-float-item.zuo1,
    .ad-float-item.you1 {
        top: max(138px, 22vh) !important;
    }

    .ad-float-item.zuo2,
    .ad-float-item.you2 {
        top: max(203px, 34vh) !important;
    }

    .ad-float-item.zuo3,
    .ad-float-item.you3 {
        top: max(268px, 46vh) !important;
    }

    .ad-float-item.zuo4,
    .ad-float-item.you4 {
        top: max(333px, 58vh) !important;
    }

    .ad-float-item.zuo5,
    .ad-float-item.you5 {
        top: max(398px, 70vh) !important;
    }

    .ad-float-item.xia1,
    .ad-float-item.xia2,
    .ad-float-item.xia3,
    .ad-float-item.xia4 {
        top: 91% !important;
        width: 65px !important;
    }

    .ad-float-item.xia1 img,
    .ad-float-item.xia2 img,
    .ad-float-item.xia3 img,
    .ad-float-item.xia4 img {
        width: 65px !important;
    }

    .ad-float-item.xia1 {
        left: 3% !important;
    }

    .ad-float-item.xia2 {
        left: 29% !important;
    }

    .ad-float-item.xia3 {
        left: 53% !important;
        right: auto !important;
    }

    .ad-float-item.xia4 {
        left: 78% !important;
        right: auto !important;
    }

    .player-shell iframe {
        height: 58vw;
        min-height: 220px;
        max-height: 360px;
    }

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

    .history-section {
        padding: 14px;
    }

    .history-grid {
        grid-template-columns: 1fr;
    }

    .footer-top,
    .footer-middle {
        grid-template-columns: 1fr;
    }

    .footer-top {
        gap: 14px;
    }

    .footer-keywords {
        grid-template-columns: 1fr;
    }

    .footer-top,
    .footer-middle,
    .footer-bottom {
        padding-inline: 14px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .footer-bottom a {
        max-width: 100%;
        text-align: left;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .history-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-brand-panel::before,
    .nav-scroll-hint::before,
    .history-card,
    .footer-keywords a,
    .play-overlay,
    .play-icon {
        transition: none;
        animation: none;
    }
}
