/* ============================================================
   影视空间 - 主题样式表
   黑灰主题 | 响应式 | 动画效果
   ============================================================ */

/* ---------- CSS变量 / 主题系统 ---------- */
:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-card-hover: #252525;
    --bg-header: rgba(15, 15, 15, 0.92);
    --bg-input: #2a2a2a;
    --bg-overlay: rgba(0, 0, 0, 0.6);

    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --text-accent: #7c8aff;

    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);

    --border: #2a2a2a;
    --border-light: #333;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --header-height: 56px;
    --content-max-width: 1280px;
}

[data-theme="darker"] {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --bg-header: rgba(0, 0, 0, 0.95);
    --bg-input: #1a1a1a;
    --border: #1a1a1a;
    --border-light: #222;
}

[data-theme="blue"] {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2236;
    --bg-card-hover: #1f2937;
    --bg-header: rgba(10, 14, 26, 0.92);
    --bg-input: #1f2937;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --text-accent: #60a5fa;
    --border: #1e293b;
    --border-light: #334155;
}

/* ---------- 全局重置 ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
                 Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}
img {
    max-width: 100%;
    display: block;
}
button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 0;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   头部导航 - 新布局
   Logo | 6分类 | 搜索 | 菜单 | 历史 | 时间 | 汉堡(移动端)
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition-normal);
}
.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: 8px;
    transition: transform var(--transition-fast);
}
.logo:hover { transform: scale(1.03); }
.logo-icon {
    font-size: 20px;
    color: var(--accent);
    font-weight: bold;
}
.logo-text {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(
        115deg,
        var(--text-primary) 0%,
        #9aa7ff 35%,
        var(--accent-hover) 55%,
        var(--text-primary) 100%
    );
    background-size: 220% 100%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 8px rgba(111, 133, 255, 0.28);
    animation: logoTextShine 5s linear infinite, logoTextGlow 3.2s ease-in-out infinite;
}
@keyframes logoTextGlow {
    0%, 100% {
        text-shadow: 0 0 6px rgba(111, 133, 255, 0.22);
    }
    50% {
        text-shadow: 0 0 14px rgba(124, 145, 255, 0.42);
    }
}
@keyframes logoTextShine {
    0% { background-position: 200% 50%; }
    100% { background-position: -20% 50%; }
}

/* 头部分类导航 */
.header-cats {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    margin-left: 12px;
}
.cat-link {
    padding: 6px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.cat-link:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

/* 右侧工具栏 */
.header-tools {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* 工具按钮通用 */
.tool-item {
    position: relative;
}
.tool-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.tool-btn svg {
    width: 20px;
    height: 20px;
}
.tool-btn:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}
.tool-btn.active {
    color: var(--accent-hover);
    background: rgba(99, 102, 241, 0.12);
}

/* 头部时钟 */
.header-clock {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0 8px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* ---------- 搜索下拉 ---------- */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: -40px;
    width: 360px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all var(--transition-normal);
    z-index: 1010;
}
.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.search-dropdown-form {
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-dropdown-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-normal);
}
.search-dropdown-input:focus {
    border-color: var(--accent);
}
.search-dropdown-input::placeholder {
    color: var(--text-muted);
}
.search-dropdown-submit {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    transition: background var(--transition-fast);
}
.search-dropdown-submit:hover {
    background: var(--accent-hover);
}

/* ---------- 下拉面板（菜单/历史通用） ---------- */
.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all var(--transition-normal);
    z-index: 1010;
    overflow: hidden;
}
.dropdown-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-title {
    padding: 12px 16px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 菜单下拉 - 分类网格 */
.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 8px 12px;
}
.dropdown-cat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.dropdown-cat-item:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}
.dropdown-cat-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.dropdown-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
}

/* 历史记录下拉 */
.dropdown-history {
    width: 300px;
}
.history-list {
    max-height: 360px;
    overflow-y: auto;
    padding: 4px 0;
}
.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}
.history-item:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}
.history-item-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.history-item-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.history-item-del {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
    opacity: 0;
    transition: all var(--transition-fast);
}
.history-item:hover .history-item-del {
    opacity: 1;
}
.history-item-del:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.history-empty {
    padding: 32px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}
.history-clear-btn {
    font-size: 12px;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.history-clear-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* 下拉遮罩层 - z-index需低于header(1000)以避免遮挡下拉面板 */
.dropdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
}
.dropdown-overlay.active {
    display: block;
}

/* 主题切换 */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.theme-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}
.theme-btn:hover {
    border-color: var(--accent);
    transform: scale(1.1);
}

/* ---------- 汉堡菜单（移动端） ---------- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    gap: 5px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}
.menu-toggle:hover { background: var(--bg-input); }
.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all var(--transition-normal);
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- 移动端侧边菜单 ---------- */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}
.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 1002;
    transition: right var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.mobile-menu.active { right: 0; }
.mobile-menu-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}
.mobile-menu-close {
    margin-left: auto;
    font-size: 24px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}
.mobile-menu-close:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}
.mobile-menu-search {
    padding: 12px 16px;
}
.mobile-search-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}
.mobile-search-input:focus {
    border-color: var(--accent);
}
.mobile-search-input::placeholder {
    color: var(--text-muted);
}
.mobile-menu-nav {
    padding: 8px 0;
    flex: 1;
}
.mobile-menu-nav a {
    display: block;
    padding: 11px 24px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.mobile-menu-nav a:hover {
    color: var(--text-primary);
    background: var(--bg-input);
    padding-left: 28px;
}
.mobile-menu-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

/* ---------- 主内容 ---------- */
.main-content {
    min-height: calc(100vh - var(--header-height) - 200px);
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 84px;
}
.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 区块标题 ---------- */
.section {
    margin-bottom: 40px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 20px;
}
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex: 0 0 auto;
}
.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
}
.section-more {
    font-size: 13px;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.section-more:hover {
    color: var(--accent-hover);
    background: rgba(99, 102, 241, 0.1);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0 28px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.page-link:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.page-link.active {
    color: #fff;
    border-color: transparent;
    background: var(--accent);
}

.section-header .anniu {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.section-header .anniu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(214, 228, 96, 0.95);
    color: #233248;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.1;
}

.section-header .section-more {
    margin-left: auto;
    white-space: nowrap;
    flex: 0 0 auto;
}

/* ---------- 视频网格 ---------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}
/* 避免同一行被最高卡片拉高后，较矮卡片标题区下方出现大块留白 */
.video-grid > a.video-card {
    align-self: start;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-decoration: none;
    color: inherit;
}
.video-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}
.video-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg);
}
.video-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-input);
}
.video-card-cover .cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    transition: transform var(--transition-slow);
}
.video-card:hover .cover-img {
    transform: scale(1.06);
}
.cover-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}
.video-card:hover .cover-overlay { opacity: 1; }
.cover-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.cover-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%) scale(0.8);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-normal);
}
.video-card:hover .cover-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.cover-play-icon svg { margin-left: 2px; }
.video-card-info {
    flex: 0 0 auto;
    padding: 8px 12px;
    min-height: 0;
}
.video-card-title {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    transition: color var(--transition-fast);
}
.video-card:hover .video-card-title { color: var(--accent-hover); }

/* ---------- 分类页入口 ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 1px solid transparent;
}
.category-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}
.category-item.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--accent);
}
.category-icon {
    width: 44px;
    height: 44px;
    background: var(--bg-input);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all var(--transition-normal);
}
.category-item:hover .category-icon,
.category-item.active .category-icon {
    background: var(--accent);
    color: #fff;
}
.category-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.category-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* ---------- 搜索页 ---------- */
.search-page { padding-top: 20px; }
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 40px;
}
.search-input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: all var(--transition-normal);
}
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.search-input::placeholder { color: var(--text-muted); }
.search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.search-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-50%) scale(1.05);
}
.hot-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}
.hot-search-tag {
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.hot-search-tag:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
    background: rgba(99, 102, 241, 0.08);
}
.search-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.search-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}
.search-empty p { font-size: 15px; }

/* ---------- 播放页 ---------- */
.player-page { padding-top: 16px; }
.player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stui-player__video {
    width: 100%;
    height: 100%;
}
.embed-responsive {
    position: relative;
    width: 100%;
    height: 100%;
}
.embed-responsive-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.player-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
}
.player-placeholder-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    cursor: pointer;
}
.player-placeholder-icon:hover {
    background: var(--accent);
    transform: scale(1.1);
}
.player-placeholder-icon svg { margin-left: 4px; }
.video-info { margin-bottom: 32px; }
.video-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}
.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.video-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.video-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

/* ---------- 页脚 ---------- */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
}
.footer-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    text-align: center;
}
.footer-brand {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}
.footer-copy {
    font-size: 16px;
    color: var(--text-muted);
}

/* ---------- 回到顶部 ---------- */
.back-to-top {
    position: fixed;
    bottom: 78px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    color: var(--text-secondary);
}

/* ---------- 底部跑马灯 ---------- */
.marquee-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1003;
    height: 44px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: rgba(8, 8, 8, 0.58);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.marquee {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding-left: 100%;
    animation: footerMarqueeMove 38s linear infinite;
}
.marquee a {
    color: rgba(232, 232, 232, 0.74);
    font-size: 14px;
}
.marquee a:hover {
    color: var(--accent-hover);
}
@keyframes footerMarqueeMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ---------- 空状态 / 面包屑 ---------- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.empty-state-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.2;
}
.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.breadcrumb a:hover { color: var(--accent-hover); }
.breadcrumb-sep { opacity: 0.3; }

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.fade-in { animation: fadeIn 0.4s ease forwards; }
.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--border-light) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
.video-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}
.video-card:nth-child(1) { animation-delay: 0.05s; }
.video-card:nth-child(2) { animation-delay: 0.1s; }
.video-card:nth-child(3) { animation-delay: 0.15s; }
.video-card:nth-child(4) { animation-delay: 0.2s; }
.video-card:nth-child(5) { animation-delay: 0.25s; }
.video-card:nth-child(6) { animation-delay: 0.3s; }
.video-card:nth-child(7) { animation-delay: 0.35s; }
.video-card:nth-child(8) { animation-delay: 0.4s; }

/* ============================================================
   响应式布局
   ============================================================ */

/* 平板 */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .header-cats {
        gap: 0;
    }
    .cat-link {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* 手机端 */
@media (max-width: 768px) {
    .main-content {
        padding-bottom: 74px;
    }
    .marquee-container {
        height: 38px;
    }
    .marquee a {
        font-size: 12px;
    }
    .back-to-top {
        bottom: 68px;
    }

    :root {
        --header-height: 50px;
    }
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .category-item { padding: 14px 8px; }
    .category-icon { width: 36px; height: 36px; font-size: 16px; }

    /* 隐藏PC端导航元素 */
    .header-cats { display: none; }
    .header-clock { display: none; }

    /* 工具栏推到右侧 */
    .header-tools {
        margin-left: auto;
    }

    /* 隐藏菜单下拉和历史按钮，保留搜索和汉堡 */
    #menuDropToggle,
    #historyToggle { display: none; }

    /* 显示搜索图标和汉堡菜单 */
    #searchToggle { display: flex; }
    .menu-toggle { display: flex; }

    .section-header {
        gap: 6px;
        margin-bottom: 12px;
    }
    .section-title {
        font-size: 17px;
        white-space: nowrap;
        line-height: 1.1;
        gap: 8px;
    }
    .section-header .anniu {
        gap: 4px;
        flex-wrap: nowrap;
        overflow: hidden;
        margin-left: 4px !important;
    }
    .section-header .anniu a {
        font-size: 11px;
        font-weight: 700;
        padding: 4px 8px;
        border-radius: 8px;
        line-height: 1.1;
        letter-spacing: 0;
        max-width: 18vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .section-more {
        font-size: 11px;
        padding: 3px 6px;
        white-space: nowrap;
    }
    .video-card-info { padding: 8px; }
    .video-card-title { font-size: 12px; }
    .video-title { font-size: 18px; }
    .cover-tag { font-size: 9px; padding: 1px 5px; }
    .pagination { gap: 6px; margin: 4px 0 20px; }
    .page-link { min-width: 30px; height: 30px; font-size: 12px; padding: 0 8px; }

    .search-dropdown {
        width: calc(100vw - 40px);
        right: -60px;
    }
}

/* 小手机 */
@media (max-width: 375px) {
    .video-grid { gap: 8px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .container { padding: 0 12px; }
}

/* ============================================================
   采集广告区：#header 顶部插入块 + .menu-wrap 菜单（源站结构）
   ============================================================ */
.container #header {
    margin-bottom: 10px;
}

.container #header a:hover,
#hengfu a:hover,
#footer-hf a:hover {
    opacity: 0.92;
}

/* 源站「分类+子链」横向菜单：dt 胶囊 + dd 白字链接 */
#header .menu-wrap,
#hengfu .menu-wrap,
#footer-hf .menu-wrap {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin: 10px 0;
}

/* 横幅区：更紧凑，减少无效留白 */
#hengfu .menu-wrap,
#footer-hf .menu-wrap {
    padding: 10px 12px;
    margin: 8px 0;
}

#header .menu-wrap .menu,
#hengfu .menu-wrap .menu,
#footer-hf .menu-wrap .menu {
    border-radius: 5px;
}

/* 顶部 #header：保持可换行，适配窄屏 */
#header .menu-wrap dl {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 12px 0;
    padding: 0;
    list-style: none;
}

/* #hengfu / #footer-hf：手机优先 — 左侧分类名，右侧 4×2 子分类 */
#hengfu .menu-wrap dl,
#footer-hf .menu-wrap dl {
    display: grid;
    grid-template-columns: auto repeat(4, minmax(0, 1fr));
    column-gap: 6px;
    row-gap: 4px;
    width: 100%;
    margin: 0 0 6px 0;
    padding: 0;
    list-style: none;
    align-items: stretch;
}

#header .menu-wrap dl:last-child,
#hengfu .menu-wrap dl:last-child,
#footer-hf .menu-wrap dl:last-child {
    margin-bottom: 0;
}

#header .menu-wrap dt,
#hengfu .menu-wrap dt,
#footer-hf .menu-wrap dt {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

#hengfu .menu-wrap dt,
#footer-hf .menu-wrap dt {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-self: start;
    align-self: stretch;
    margin-right: 2px;
}

#header .menu-wrap dt a,
#hengfu .menu-wrap dt a,
#footer-hf .menu-wrap dt a {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 6px 14px 6px 12px;
    background: linear-gradient(145deg, #e8b4d4, #f0d0e4);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 13px;
    border-radius: 8px;
    line-height: 1.3;
    border: none;
    max-width: 100%;
}

/* 源站「热」角标：用样式替代小图，避免错位 */
#header .menu-wrap dt a .remen_logo,
#hengfu .menu-wrap dt a .remen_logo,
#footer-hf .menu-wrap dt a .remen_logo {
    display: none;
}

#header .menu-wrap dt a::after,
#hengfu .menu-wrap dt a::after,
#footer-hf .menu-wrap dt a::after {
    content: none;
    display: none;
}

#header .menu-wrap dd,
#hengfu .menu-wrap dd,
#footer-hf .menu-wrap dd {
    margin: 0;
    padding: 0;
}

#header .menu-wrap dd a,
#hengfu .menu-wrap dd a,
#footer-hf .menu-wrap dd a {
    color: var(--text-primary);
    font-size: 13px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color var(--transition-fast), background var(--transition-fast);
}

/* 横幅子链字号略大（手机） */
#hengfu .menu-wrap dd a,
#footer-hf .menu-wrap dd a {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 6px;
}

#hengfu .menu-wrap dt a,
#footer-hf .menu-wrap dt a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 50px;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 10px;
    line-height: 1.15;
}

#hengfu .menu-wrap,
#footer-hf .menu-wrap {
    padding: 8px 8px;
    margin: 6px 0;
}

#header .menu-wrap dd a:hover,
#hengfu .menu-wrap dd a:hover,
#footer-hf .menu-wrap dd a:hover {
    color: var(--accent-hover);
    background: var(--bg-card);
}

/* 顶部导航：子菜单盒独占一行 */
#header .menu-wrap #subMenuBox {
    width: 100%;
    flex-basis: 100%;
}

/* 横幅：子菜单盒不拆行，子项参与 dl 的 grid/flex */
#hengfu .menu-wrap #subMenuBox,
#footer-hf .menu-wrap #subMenuBox {
    display: contents;
}

/* PC：横幅一行展示「胶囊 + 8 子链」，铺满宽度、减少右侧留白 */
@media (min-width: 769px) {
    #hengfu .menu-wrap,
    #footer-hf .menu-wrap {
        padding: 10px 14px;
        margin: 8px 0;
    }

    #hengfu .menu-wrap dl,
    #footer-hf .menu-wrap dl {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0 8px;
        margin: 0 0 10px 0;
    }

    #hengfu .menu-wrap dt,
    #footer-hf .menu-wrap dt {
        grid-column: auto;
        flex: 0 0 auto;
        margin-right: 4px;
    }

    #hengfu .menu-wrap dd,
    #footer-hf .menu-wrap dd {
        flex: 1 1 0;
        min-width: 0;
    }

    #hengfu .menu-wrap dd a,
    #footer-hf .menu-wrap dd a {
        font-size: 15px;
        padding: 6px 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    #hengfu .menu-wrap dt a,
    #footer-hf .menu-wrap dt a {
        font-size: 14px;
        padding: 7px 16px 7px 14px;
        height: auto;
        min-height: 0;
    }
}

/* 下载区 .area 图标列表（与深色主题协调） */
#xiazai .icon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#xiazai .icon-list li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    max-width: 96px;
    text-align: center;
}

#xiazai .icon-list li a:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}

#xiazai .icon-list img {
    border-radius: 20%;
    width: 56px;
    height: 56px;
    object-fit: cover;
}

#xiazai .icon-list button {
    margin-top: 4px;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
}

.menu1 {
    color: #777777
}

.adHF,.adHF1,.adHF3 {
    margin-bottom: 2px
}

.adHF img {
    width: 100%;
    height: 6.122vw;
    min-height: 40px;
    max-height: 40px
}

.adHF1 img {
    width: 100%;
    height: 12.244vw;
    min-height: 80px;
    max-height: 90px
}

.adHF3 img {
    width: 100%;
    height: 24.488vw;
    min-height: 90px;
    max-height: 240px
}
