/* ============================================================
   SharpVideo - PC 端样式（独立重写）
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
    color-scheme: dark;
    /* 颜色 */
    --c-bg: #141414;
    --c-bg-soft: rgba(44, 44, 44, 0.8);
    --c-bg-nav: rgba(20, 20, 20, 0.96);
    --c-bg-input: rgba(44, 44, 44, 0.8);
    --c-bg-select: rgba(55, 55, 55, 0.7);
    --c-bg-opt: rgba(20, 20, 20, 0.9);
    --c-bg-link: rgba(255, 255, 255, 0.8);

    --c-accent: #ffdf89;
    --c-accent-2: #ffd179;
    --c-accent-dark: #63450c;

    --c-text: #fff;
    --c-text-2: rgba(255, 255, 255, 0.7);
    --c-text-3: rgba(255, 255, 255, 0.6);

    --c-line: #58585878;
    --c-line-soft: #ffffff14;

    /* 尺寸 */
    --h-nav: 84px;
    --w-max: 1920px;
    --w-sidebar: 400px;
    --w-sidebar-md: 360px;
    --w-search-min: 500px;
    --w-search-max: 720px;

    /* 圆角 */
    --r-card: 12px;
    --r-pill: 36px;
    --r-icon: 8px;

    /* 间距 */
    --sp-pad: 60px;
    --sp-gap: 24px;

    /* 字体 */
    --ff: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- 重置 ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
ul, ol, li { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; -webkit-user-select: none; }
input, button, select { font: inherit; border: 0; }
button { cursor: pointer; background: none; }

/* ---------- 基础 ---------- */
body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--c-bg);
    overflow-x: hidden;
    overflow-anchor: none;
    position: relative;
    min-width: 320px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   顶部导航
   ============================================================ */
.header-spacer { display: none; }

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: var(--w-max);
    margin: 0 auto;
    height: var(--h-nav);
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 var(--sp-pad);
    background-color: rgba(20, 20, 20, 0.72);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    background-image: linear-gradient(0deg, rgba(20, 20, 20, 0) 1%, rgba(20, 20, 20, 0.6) 99%);
    flex-wrap: nowrap;
}

/* 品牌 + 导航（内容宽度，不被压缩） */
.nav-brand-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 0 0 auto;
    gap: 24px;
    margin-right: 24px;
}

.brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 44px;
    border-radius: 8px;
    background: url(logo.png) no-repeat center / 100% 100%;
}

.brand-name {
    font-size: 22px;
    font-weight: 1000;
    white-space: nowrap;
    display: inline-block;
    background: linear-gradient(
        90deg,
        #ffce6c 0%,
        #ffe7ab 50%,
        #ffce6c 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: brand-shimmer 8s ease-in-out infinite;
}

@keyframes brand-shimmer {
    0%   { background-position: 100% 0%; }
    50%  { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

@media (prefers-reduced-motion: reduce) {
    .brand-name { animation: none; }
}

.nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--c-text);
    font-size: 16px;
    font-weight: normal;
    line-height: 26px;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--c-accent); }

/* 搜索栏（完全自定义：图标输入 + 自定义下拉 + 图标按钮） */
.search-bar {
    height: 48px;
    flex: 0 1 var(--w-search-max);
    min-width: var(--w-search-min);
    max-width: var(--w-search-max);
    margin: 0 auto;
    border: 1px solid var(--c-line);
    border-radius: var(--r-pill);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: visible;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.search-bar:focus-within {
    border-color: rgba(255, 223, 137, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 223, 137, 0.12);
}

/* 输入框区 */
.sb-input-area {
    flex: 1 1 62%;
    min-width: 0;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar input {
    flex: 1 1 0;
    min-width: 0;
    align-self: stretch;
    padding: 0 44px 0 20px;
    font-size: 14px;
    color: var(--c-text);
    background: var(--c-bg-input);
    border: none;
    outline: none;
    border-radius: var(--r-pill) 0 0 var(--r-pill);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-bar input::placeholder { color: var(--c-text-3); }

/* 清除按钮 */
.sb-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.sb-clear::before,
.sb-clear::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
}
.sb-clear::before { transform: rotate(45deg); }
.sb-clear::after  { transform: rotate(-45deg); }

.sb-clear:hover { background: rgba(255, 255, 255, 0.22); }
.sb-clear:active { background: rgba(255, 255, 255, 0.3); }
.sb-clear[hidden] { display: none; }

/* 自定义下拉选择器 */
.custom-select {
    position: relative;
    flex: 0 0 18%;
    min-width: 100px;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.cs-trigger {
    width: 100%;
    height: 100%;
    padding: 10px;
    font-size: 16px;
    color: var(--c-accent);
    background: var(--c-bg-select);
    line-height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.2s;
}

.cs-trigger:hover { background: rgba(255, 255, 255, 0.06); }

.cs-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-arrow {
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--c-accent);
    flex-shrink: 0;
    margin-top: 1px;
    transition: transform 0.2s;
}

.custom-select.is-open .cs-arrow { transform: rotate(180deg); }

.cs-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    z-index: 200;
    background: var(--c-bg-opt);
    border: 1px solid var(--c-line);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.custom-select.is-open .cs-options { display: block; }

.cs-option {
    padding: 10px 12px;
    font-size: 14px;
    color: var(--c-text);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s, color 0.15s;
}

.cs-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--c-accent);
}

.cs-option.is-selected {
    color: var(--c-accent);
    background: rgba(255, 223, 137, 0.12);
}

/* 解析播放按钮 */
.sb-btn {
    flex: 0 0 20%;
    min-width: 110px;
    height: 100%;
    font-size: 16px;
    font-weight: bold;
    color: var(--c-accent-dark);
    background: linear-gradient(90deg, #ffe7ab, #ffce6c);
    border: none;
    border-radius: 0 var(--r-pill) var(--r-pill) 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: filter 0.2s;
}

.sb-btn:hover {
    background: linear-gradient(90deg, #ffecbc, #ffd88a);
}

.sb-btn:active { filter: brightness(0.95); }

/* 支持入口（内容宽度，不被压缩） */
.nav-support {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 16px;
    margin-left: 24px;
}

.nav-support a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    line-height: 30px;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.nav-support a:hover { opacity: 1; }
.nav-support img { min-width: 30px; height: 30px; }

/* 汉堡菜单按钮（PC 端隐藏，平板/移动端显示） */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--c-text);
    transition: transform 0.3s, opacity 0.2s;
    transform-origin: center;
}

.nav-toggle:hover { background: rgba(255, 255, 255, 0.1); }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; transform: none; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 移动端导航下拉面板 */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--c-line-soft);
    padding: 12px 20px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.nav-dropdown.is-open {
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: navSlide 0.25s ease;
}

@keyframes navSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown a {
    padding: 12px 8px;
    font-size: 15px;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-line-soft);
    transition: color 0.2s, padding-left 0.2s;
}

.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { color: var(--c-accent); padding-left: 16px; }

/* ============================================================
   主体布局（Grid 双栏）
   ============================================================ */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--w-sidebar);
    gap: var(--sp-gap);
    width: 100%;
    max-width: var(--w-max);
    margin: 0 auto;
    padding: 0 var(--sp-pad);
}

/* 左:播放区 */
.play-zone {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: url(video.webp) center / cover no-repeat;
    border-radius: var(--r-card);
}

.player iframe {
    width: 100%;
    height: 100%;
    border-radius: var(--r-card);
    background: transparent;
}

.player iframe.is-hidden {
    visibility: hidden;
}

/* 播放器提示遮罩 */
.player-tip {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--r-card);
    transition: opacity 0.3s;
}

.player-tip.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.player-tip-content {
    text-align: center;
    color: var(--c-text);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-tip-title {
    font-size: 24px;
    font-weight: bold;
}

.player-tip-desc {
    font-size: 16px;
    color: var(--c-text-2);
    line-height: 1.5;
}

/* 公告栏 */
.announce {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--c-text);
    font-size: 20px;
    font-weight: normal;
    line-height: 28px;
}

.announce #video-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.announce marquee {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 22px;
    color: var(--c-text-3);
}

/* 推广位 */
.promo {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
}

.promo-item {
    flex: 1 1 calc(20% - 12px);
    max-width: calc(20% - 12px);
    min-width: calc(15% - 12px);
    border-radius: var(--r-card);
    overflow: hidden;
    transition: transform 0.2s;
}

.promo-item:hover { transform: translateY(-2px); }
.promo-item img { width: 100%; border-radius: var(--r-card); }

/* ============================================================
   侧边栏
   ============================================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-line-soft);
    border-radius: var(--r-card);
    overflow-x: hidden;
    overflow-y: auto;
    word-break: break-word;
    word-wrap: break-word;
}

.card h1, .card h2 {
    font-size: 20px;
    line-height: 30px;
    color: var(--c-text);
}

.card p {
    font-size: 14px;
    line-height: 22px;
    color: var(--c-text-3);
    text-indent: 28px;
}

/* 广告卡 */
.card-ad, .card-ad a { color: var(--c-text-3); }

/* 更多应用 */
.apps-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 318px;
    overflow: hidden auto;
    padding-right: 6px;
}

.apps-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.apps-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: var(--r-icon);
    overflow: hidden;
}

.apps-arrow {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    opacity: 0.5;
}

.apps-icon img, .apps-arrow img { width: 100%; height: 100%; }

.apps-name {
    flex: 1;
    max-width: 100%;
    font-size: 16px;
    line-height: 24px;
    font-weight: normal;
    color: var(--c-text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apps-item:hover .apps-name { color: var(--c-text); }
.apps-item:hover .apps-arrow { opacity: 1; }
.apps-item:hover .apps-icon { border: 1px solid var(--c-line-soft); }

/* 友情链接 */
.links-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    column-gap: 5%;
    row-gap: 10px;
}

.link-item {
    flex: 1 1 30%;
    min-width: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-bg-link);
    border-radius: 4px;
    overflow: hidden;
}
.link-item img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   滚动条
   ============================================================ */
.card::-webkit-scrollbar,
.apps-list::-webkit-scrollbar {
    width: 8px;
    height: 2px;
    border-radius: 8px;
    background-color: #282828;
}

.card::-webkit-scrollbar-track,
.apps-list::-webkit-scrollbar-track {
    border-radius: 8px;
    background-color: var(--c-bg);
}

.card::-webkit-scrollbar-thumb,
.apps-list::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background-color: #333;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: var(--w-max);
    margin: 0 auto;
    padding: 30px var(--sp-pad);
    color: var(--c-text);
    font-size: 14px;
    line-height: 16px;
    text-align: center;
    opacity: 0.4;
}

/* ============================================================
   悬浮二维码
   ============================================================ */
.qr-float {
    position: fixed;
    top: 50%;
    right: 20px;
    width: 112px;
    height: 246px;
    transform: translateY(-50%);
    border: 1px solid #17171b;
    border-radius: 112px;
    box-shadow: 0 -6px 24px rgb(109 109 109 / 10%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 11;
    transition: right 0.3s;
}

.qr-float.is-folded { right: -56px; }

.qr-float:hover {
    right: 20px;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.qr-float img { width: 100%; height: 100%; object-fit: contain; }

.qr-text {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: normal;
    color: #333;
    background: #f0f0f0;
    border-radius: 20px;
    text-align: center;
}

/* ============================================================
   广告
   ============================================================ */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

.top-banner-ad {
    position: fixed;
    top: 100px;
    left: 45%;
    width: 600px;
    max-width: 90vw;
    height: 120px;
    border-radius: var(--r-icon);
    box-shadow: 0 0 25px rgb(0 0 0 / 10%);
    overflow: hidden;
    opacity: 0;
    transition: all 1s;
    z-index: 999;
    transform: translateX(-65%);
}

.is-visible { opacity: 1; }
.is-hidden-ads { opacity: 0; }

/* ============================================================
   断点 — 全面响应式适配
   断点策略：
   ≥1440px    大桌面      sidebar 400px  pad 60px
   ≤1439px    中桌面      sidebar 360px  pad 32px
   ≤1279px    小笔记本/大平板横屏  sidebar 320px  pad 24px
   ≤1023px    平板竖屏    单栏堆叠  汉堡菜单
   ≤767px     移动端      两行导航  全宽搜索
   ≤480px     大手机      单列推广  隐藏二维码
   ≤374px     小手机      极限压缩
   ============================================================ */

/* ---- 中桌面 ≤1439px ---- */
@media screen and (max-width: 1439px) {
    :root {
        --sp-pad: 32px;
    }
    .layout {
        grid-template-columns: minmax(0, 1fr) var(--w-sidebar-md);
    }
}

/* ---- 小笔记本 / 大平板横屏 ≤1279px ---- */
@media screen and (max-width: 1279px) {
    :root {
        --sp-pad: 24px;
        --w-sidebar: 320px;
        --w-sidebar-md: 320px;
        --w-search-min: 320px;
        --w-search-max: 560px;
    }

    .nav-brand-group { gap: 20px; }
    .brand-name { font-size: 20px; }
    .nav-links { gap: 18px; }
    .nav-links a { font-size: 15px; }

    .search-bar {
        height: 44px;
        flex: 1 1 auto;
        min-width: 0;
        max-width: var(--w-search-max);
    }
    .search-bar input { font-size: 14px; }
    .custom-select { flex: 0 0 90px; min-width: 90px; }
    .cs-trigger { font-size: 14px; }
    .sb-btn { font-size: 14px; flex: 0 0 96px; min-width: 96px; }

    .layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 16px;
    }

    .promo-item {
        flex: 1 1 calc(25% - 12px);
        max-width: calc(25% - 12px);
        min-width: calc(20% - 12px);
    }
    .footer { padding: 24px var(--sp-pad); }
}

/* ---- 平板竖屏 ≤1023px ---- */
@media screen and (max-width: 1023px) {
    :root {
        --sp-pad: 20px;
        --h-nav: 60px;
        --sp-gap: 16px;
        --r-card: 10px;
    }

    .navbar { padding: 0 var(--sp-pad); }

    /* 品牌区压缩 - 仅显示logo图标 */
    .nav-brand-group { gap: 8px; min-width: 0; flex: 0 0 auto; margin-right: 16px; }
    .brand-logo {
        width: 40px; height: 40px;
        min-width: 40px; min-height: 40px;
    }
    .brand-name { display: none; }

    /* 隐藏顶部导航链接，显示汉堡菜单 */
    .nav-links { display: none; }
    .nav-toggle { display: flex; width: 36px; height: 36px; flex: 0 0 36px; gap: 6px; }

    /* 搜索栏弹性自适应 */
    .search-bar {
        height: 42px;
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        margin: 0;
    }
    .search-bar input { font-size: 13px; padding: 0 38px 0 14px; }
    .custom-select { flex: 0 0 84px; min-width: 84px; }
    .cs-trigger { font-size: 14px; padding: 8px; line-height: 26px; }
    .sb-btn { font-size: 14px; flex: 0 0 90px; min-width: 90px; }

    .nav-support { gap: 12px; margin-left: 16px; }
    .nav-support a { height: 28px; line-height: 28px; }
    .nav-support img { min-width: 28px; height: 28px; }

    /* 单栏堆叠：播放器占满宽度 */
    .layout {
        grid-template-columns: 1fr;
        gap: 16px;
        overflow-x: hidden;
    }
    .sidebar {
        max-width: 100%;
        overflow-x: hidden;
    }
    .card {
        max-width: 100%;
        overflow-x: hidden;
    }

    .promo { gap: 10px; }
    .promo-item {
        flex: 1 1 calc(33% - 10px);
        max-width: calc(33% - 10px);
        min-width: calc(25% - 10px);
    }
    .links-grid { column-gap: 3%; }
    .link-item { flex: 1 1 30%; min-height: 44px; }

    .apps-list { max-height: 260px; }
    .footer { font-size: 13px; padding: 24px var(--sp-pad); }
}

/* ---- 移动端 ≤767px ---- */
@media screen and (max-width: 767px) {
    :root {
        --sp-pad: 16px;
        --h-nav: 64px;
        --r-card: 10px;
        --r-pill: 28px;
    }

    /* navbar 单行布局 - 移动端固定 64px，内部元素尺寸固定不再逐级缩水 */
    .navbar {
        flex-wrap: nowrap;
        height: var(--h-nav);
        padding: 10px var(--sp-pad);
        padding-top: max(10px, env(safe-area-inset-top));
        gap: 12px;
    }
    .nav-brand-group {
        flex: 0 0 auto;
        gap: 10px;
        min-width: 0;
        margin-right: 12px;
    }
    .brand-logo {
        width: 40px; height: 40px;
        min-width: 40px; min-height: 40px;
    }
    .brand-name { display: none; }
    .nav-toggle { width: 36px; height: 36px; flex: 0 0 36px; }

    .nav-support {
        flex: 0 0 auto;
        gap: 10px;
        margin-left: 12px;
    }
    .nav-support a { height: 32px; line-height: 32px; }
    .nav-support img { min-width: 28px; height: 28px; }

    /* 搜索栏自适应 - 尺寸固定，视觉更稳 */
    .search-bar {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        margin: 0;
        height: 44px;
    }
    .search-bar input { font-size: 14px; padding: 0 38px 0 14px; }
    /* 移动端：下拉与解析按钮简化为图标，给输入框留出最大空间 */
    .custom-select { flex: 0 0 44px; min-width: 44px; }
    .cs-trigger { font-size: 0; padding: 0; line-height: 1; display: flex; align-items: center; justify-content: center; }
    .cs-label { display: none; }
    .cs-arrow { border-top-width: 7px; border-left-width: 5px; border-right-width: 5px; }
    .sb-btn {
        font-size: 0;
        flex: 0 0 44px;
        min-width: 44px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .sb-btn::after {
        content: "";
        width: 18px;
        height: 18px;
        background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4l14 8-14 8z'/%3E%3C/svg%3E") no-repeat center / contain;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4l14 8-14 8z'/%3E%3C/svg%3E") no-repeat center / contain;
    }

    /* 主体单栏 */
    .layout {
        grid-template-columns: 1fr;
        gap: 14px;
        overflow-x: hidden;
    }
    .play-zone { gap: 14px; }
    .sidebar {
        max-width: 100%;
        overflow-x: hidden;
    }
    .card {
        max-width: 100%;
        overflow-x: hidden;
    }

    .player { aspect-ratio: 16 / 9; }
    .player-tip-title { font-size: 18px; }
    .player-tip-desc { font-size: 13px; line-height: 1.5; }

    /* 公告栏堆叠，标题允许换行避免溢出 */
    .announce {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        font-size: 16px;
    }
    .announce #video-title-text {
        white-space: normal;
        word-break: break-word;
    }
    .announce marquee { width: 100%; font-size: 13px; }

    .promo {
        flex-wrap: wrap;
        gap: 8px;
    }
    .promo-item {
        flex: 1 1 calc((100% - 16px) / 3);
        max-width: calc((100% - 16px) / 3);
        min-width: calc((100% - 16px) / 3);
    }

    .card { padding: 14px; }
    .card h1, .card h2 { font-size: 17px; line-height: 26px; }
    .card p { font-size: 13px; line-height: 21px; text-indent: 24px; }

    /* 触控目标 ≥44px（Apple HIG 推荐） */
    .apps-list { height: auto; max-height: 280px; }
    .apps-item { gap: 10px; min-height: 48px; }
    .apps-icon { width: 36px; height: 36px; flex: 0 0 36px; }
    .apps-name { font-size: 14px; line-height: 22px; }

    .links-grid { column-gap: 3%; row-gap: 8px; }
    .link-item { flex: 1 1 30%; min-height: 44px; }

    /* footer 适配底部 Home Indicator */
    .footer {
        font-size: 12px;
        line-height: 18px;
        padding: 20px var(--sp-pad);
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    /* 二维码悬浮缩小 */
    .qr-float {
        width: 64px;
        height: 140px;
        right: 6px;
        border-radius: 64px;
    }
    .qr-float.is-folded { right: -32px; }
    .qr-float:hover { right: 6px; transform: translateY(-50%) scale(1.02); }
    .qr-text { font-size: 10px; padding: 2px 6px; }

    /* 平板及以下导航下拉面板 */
    .nav-dropdown { top: 100%; }
}

/* ---- 大手机 ≤480px ---- */
@media screen and (max-width: 480px) {
    :root {
        --sp-pad: 12px;
    }
    /* navbar 高度与内部元素尺寸已固定，此处不再随屏幕缩小而缩水 */

    /* 推广位三列 */
    .promo { gap: 8px; }
    .promo-item { flex: 1 1 calc((100% - 16px) / 3); max-width: calc((100% - 16px) / 3); min-width: calc((100% - 16px) / 3); }

    .links-grid { column-gap: 3%; }
    .link-item { flex: 1 1 30%; }

    /* 隐藏二维码悬浮，避免遮挡窄屏内容 */
    .qr-float { display: none; }

    .player-tip-title { font-size: 16px; }
    .player-tip-desc { font-size: 12px; }

    .card { padding: 12px; }
    .card h1, .card h2 { font-size: 16px; line-height: 24px; }
    .card p { font-size: 12px; line-height: 20px; text-indent: 20px; }
}

/* ---- 小手机 ≤374px ---- */
@media screen and (max-width: 374px) {
    .brand-name { display: none; }
    .announce { font-size: 14px; }
    .player-tip-title { font-size: 15px; }
}

/* ---- 横屏适配：移动端横屏（高度不足）时 navbar 改单行紧凑布局 ---- */
@media screen and (max-width: 1023px) and (orientation: landscape) and (max-height: 500px) {
    :root {
        --h-nav: 52px;
    }
    .navbar {
        flex-wrap: nowrap;
        height: var(--h-nav);
        padding: 4px var(--sp-pad);
        padding-top: max(4px, env(safe-area-inset-top));
        gap: 10px;
    }
    .nav-brand-group { flex: 0 0 auto; gap: 8px; }
    .brand-logo {
        width: 32px; height: 32px;
        min-width: 32px; min-height: 32px;
    }
    .brand-name { display: none; }
    .nav-toggle { display: flex; width: 32px; height: 32px; flex: 0 0 32px; gap: 4px; }
    .nav-toggle span { width: 18px; }
    .nav-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .search-bar {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        min-width: 0;
        height: 36px;
    }
    .search-bar input { font-size: 12px; padding: 0 34px 0 12px; }
    .custom-select { flex: 0 0 68px; min-width: 68px; }
    .cs-trigger { font-size: 12px; padding: 4px; line-height: 28px; }
    .sb-btn { font-size: 12px; flex: 0 0 72px; min-width: 72px; }

    .nav-support { flex: 0 0 auto; gap: 8px; }
    .nav-support a { height: 24px; line-height: 24px; }
    .nav-support img { min-width: 24px; height: 24px; }

    /* 横屏限制播放器高度，避免占满屏幕 */
    .player { aspect-ratio: 16 / 9; max-height: 65vh; }
    .player-tip-title { font-size: 16px; }
    .player-tip-desc { font-size: 12px; }

    /* 横屏时导航下拉面板限制最大高度并可滚动 */
    .nav-dropdown {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* ---- 大屏桌面 ≥1920px 时内容居中，两侧留白 ---- */
@media screen and (min-width: 1921px) {
    :root { --sp-pad: 80px; }
}

/* ---- 打印样式 ---- */
@media print {
    .navbar, .qr-float, .nav-support, .promo, .footer { display: none !important; }
    .layout { grid-template-columns: 1fr; }
    body { background: #fff; color: #000; }
}

/* ---- 无障碍：减少动画 ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}