/* ==========================================================================
   网盘聚合搜索 - 设计系统
   4 套主题色板 + 亮暗双模，全部通过 CSS 变量驱动
   ========================================================================== */

/* 微信 X5 / 旧版 WebView 文字不缩放修正 */
html, body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ---------- 主题：暖红（默认） ---------- */
:root,
[data-theme="red"] {
    --theme-primary: #ff6b6b;
    --theme-primary-light: #ff8e53;
    --theme-primary-gradient: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    --theme-primary-hover: #ff5252;
    --theme-primary-soft: rgba(255, 107, 107, .12);
    --theme-secondary-gradient: linear-gradient(135deg, #ff8e53 0%, #ffa940 100%);
    --theme-tertiary-gradient: linear-gradient(135deg, #ffa940 0%, #ffc53d 100%);
    --theme-background: #f5f5f5;
    --theme-surface: #ffffff;
    --theme-card: #fff8f0;
    --theme-card-gradient: linear-gradient(135deg, #fff8f0 0%, #fff0f0 100%);
    --theme-text: #333333;
    --theme-text-secondary: #666666;
    --theme-text-muted: #999999;
    --theme-border: #f0f0f0;
    --theme-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    --theme-shadow-lg: 0 8px 32px rgba(0, 0, 0, .1);
}

/* ---------- 主题：海洋蓝 ---------- */
[data-theme="blue"] {
    --theme-primary: #4a90e2;
    --theme-primary-light: #5fa3f0;
    --theme-primary-gradient: linear-gradient(135deg, #4a90e2 0%, #5fa3f0 100%);
    --theme-primary-hover: #3a7bc8;
    --theme-primary-soft: rgba(74, 144, 226, .12);
    --theme-secondary-gradient: linear-gradient(135deg, #5fa3f0 0%, #7eb8f7 100%);
    --theme-tertiary-gradient: linear-gradient(135deg, #7eb8f7 0%, #9dcdff 100%);
    --theme-background: #f0f4f8;
    --theme-surface: #ffffff;
    --theme-card: #f0f8ff;
    --theme-card-gradient: linear-gradient(135deg, #f0f8ff 0%, #e6f2ff 100%);
    --theme-text: #2c3e50;
    --theme-text-secondary: #5a6c7d;
    --theme-text-muted: #8b9aa8;
    --theme-border: #e1e8ed;
    --theme-shadow: 0 2px 12px rgba(44, 62, 80, .07);
    --theme-shadow-lg: 0 8px 32px rgba(44, 62, 80, .12);
}

/* ---------- 主题：森林绿 ---------- */
[data-theme="green"] {
    --theme-primary: #27ae60;
    --theme-primary-light: #2ecc71;
    --theme-primary-gradient: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    --theme-primary-hover: #229954;
    --theme-primary-soft: rgba(39, 174, 96, .12);
    --theme-secondary-gradient: linear-gradient(135deg, #2ecc71 0%, #58d68d 100%);
    --theme-tertiary-gradient: linear-gradient(135deg, #58d68d 0%, #82e0aa 100%);
    --theme-background: #f0f7f4;
    --theme-surface: #ffffff;
    --theme-card: #f0faf4;
    --theme-card-gradient: linear-gradient(135deg, #f0faf4 0%, #e6f5eb 100%);
    --theme-text: #1e3a2f;
    --theme-text-secondary: #4a6356;
    --theme-text-muted: #7d9188;
    --theme-border: #d4e6dc;
    --theme-shadow: 0 2px 12px rgba(30, 58, 47, .07);
    --theme-shadow-lg: 0 8px 32px rgba(30, 58, 47, .12);
}

/* ---------- 主题：暗夜黑 ---------- */
[data-theme="dark"] {
    --theme-primary: #6366f1;
    --theme-primary-light: #8b5cf6;
    --theme-primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --theme-primary-hover: #4f46e5;
    --theme-primary-soft: rgba(99, 102, 241, .18);
    --theme-secondary-gradient: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    --theme-tertiary-gradient: linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%);
    --theme-background: #0f0f1a;
    --theme-surface: #1a1a2e;
    --theme-card: #252538;
    --theme-card-gradient: linear-gradient(135deg, #252538 0%, #1e1e32 100%);
    --theme-text: #f0f0f5;
    --theme-text-secondary: #a0a0b0;
    --theme-text-muted: #808090;
    --theme-border: #3a3a4a;
    --theme-shadow: 0 2px 12px rgba(0, 0, 0, .4);
    --theme-shadow-lg: 0 8px 32px rgba(0, 0, 0, .5);
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--theme-background);
    color: var(--theme-text);
    font-size: 14px;
    line-height: 1.6;
    transition: background-color .3s ease, color .3s ease;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; outline: none; }
img { display: block; max-width: 100%; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   顶部导航
   ========================================================================== */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
    backdrop-filter: saturate(180%) blur(12px);
    transition: background-color .3s ease, border-color .3s ease;
}

.top-nav-box {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--theme-primary-gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: .5px;
    flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.logo-title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }

.logo-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--theme-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-version {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--theme-primary-soft);
    color: var(--theme-primary);
    font-weight: 500;
    white-space: nowrap;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--theme-text-muted);
    white-space: nowrap;
}

.top-nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-menu-item {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--theme-text-secondary);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
    white-space: nowrap;
}

.nav-menu-item:hover {
    color: var(--theme-primary);
    background: var(--theme-primary-soft);
}

.nav-menu-item.active {
    color: #fff;
    background: var(--theme-primary-gradient);
    font-weight: 500;
}

.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.theme-toggle,
.theme-switcher-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-secondary);
    background: var(--theme-background);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.theme-toggle:hover,
.theme-switcher-btn:hover {
    color: var(--theme-primary);
    background: var(--theme-primary-soft);
}

.theme-switcher { position: relative; }

.theme-dropdown {
    position: absolute;
    top: 44px;
    right: 0;
    width: 150px;
    padding: 6px;
    border-radius: 12px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow-lg);
    display: none;
    z-index: 200;
}

.theme-dropdown.show { display: block; animation: dropdownIn .18s ease; }

/* 入场动画一律只做位移/缩放，不用透明度门控可见性：
   动画若被节流或跳过，内容依然完整可见 */
@keyframes dropdownIn {
    from { transform: translateY(-6px); }
    to   { transform: translateY(0); }
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--theme-text-secondary);
    cursor: pointer;
    transition: background .15s ease;
}

.theme-option:hover { background: var(--theme-primary-soft); }
.theme-option.active { color: var(--theme-primary); font-weight: 500; }

.theme-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nav-menu-icon {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-secondary);
    background: var(--theme-background);
    cursor: pointer;
}

/* ==========================================================================
   页面容器 / 公告条
   ========================================================================== */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-view { display: none; }
.page-view.active { display: block; }

.notice-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: var(--theme-card-gradient);
    border: 1px solid var(--theme-border);
    font-size: 13px;
    color: var(--theme-text-secondary);
}

.notice-label {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--theme-primary-gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.notice-text { flex: 1; min-width: 0; word-break: break-word; }

.notice-close {
    flex-shrink: 0;
    color: var(--theme-text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    transition: color .2s;
}

.notice-close:hover { color: var(--theme-primary); }

/* ==========================================================================
   主页两栏
   ========================================================================== */
.home-main {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 24px;
}

.search-section {
    min-width: 0;
    padding: 32px 28px;
    border-radius: 18px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow);
}

.search-header { margin-bottom: 24px; }

.search-title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.5px;
    margin-bottom: 8px;
}

.search-title .highlight {
    background: var(--theme-primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-subtitle {
    font-size: 14px;
    color: var(--theme-text-secondary);
}

/* ---------- 搜索框 ---------- */
.search-box-wrapper { position: relative; min-width: 0; }

.search-input-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 6px 6px 6px 16px;
    border-radius: 14px;
    background: var(--theme-background);
    border: 2px solid transparent;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

[data-theme="dark"] .search-input-box { background: rgba(255, 255, 255, .05); }

.search-input-box:focus-within {
    border-color: var(--theme-primary);
    background: var(--theme-surface);
    box-shadow: 0 0 0 4px var(--theme-primary-soft);
}

.input-search-icon {
    display: flex;
    align-items: center;
    color: var(--theme-text-muted);
    flex-shrink: 0;
}

.search-input-box input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--theme-text);
}

.search-input-box input::placeholder { color: var(--theme-text-muted); }

.search-btn {
    flex-shrink: 0;
    height: 44px;
    padding: 0 28px;
    border-radius: 10px;
    background: var(--theme-primary-gradient);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.search-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.search-btn:active { transform: translateY(0); }

/* ---------- 热门搜索 & 历史 ---------- */
.hot-keywords {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.hot-keywords-label {
    font-size: 13px;
    color: var(--theme-text-muted);
    flex-shrink: 0;
}

.hot-keyword {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--theme-text-secondary);
    background: var(--theme-background);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

[data-theme="dark"] .hot-keyword { background: rgba(255, 255, 255, .06); }

.hot-keyword:hover {
    color: #fff;
    background: var(--theme-primary-gradient);
    transform: translateY(-1px);
}

.search-history-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 8px;
    border-radius: 12px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow-lg);
    display: none;
    z-index: 60;
}

.search-history-dropdown.show { display: block; }

.search-history-list { display: flex; flex-wrap: wrap; gap: 8px; }

.search-history-item {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--theme-text-secondary);
    background: var(--theme-background);
    cursor: pointer;
}

[data-theme="dark"] .search-history-item { background: rgba(255, 255, 255, .06); }

.search-history-item:hover { color: var(--theme-primary); }

.search-history-clear {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--theme-border);
    text-align: right;
    font-size: 12px;
    color: var(--theme-text-muted);
    cursor: pointer;
}

.search-history-clear:hover { color: var(--theme-primary); }

/* ---------- 网盘类型 tabs ---------- */
.pan-type-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 22px;
    position: relative;
}

.pan-type-label {
    font-size: 13px;
    color: var(--theme-text-muted);
    margin-right: 2px;
    flex-shrink: 0;
}

.pan-type-tab {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--theme-text-secondary);
    background: var(--theme-background);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
    white-space: nowrap;
}

[data-theme="dark"] .pan-type-tab { background: rgba(255, 255, 255, .06); }

.pan-type-tab:hover { color: var(--theme-primary); }

.pan-type-tab.active {
    color: #fff;
    background: var(--theme-primary-gradient);
    font-weight: 500;
    box-shadow: 0 3px 10px var(--theme-primary-soft);
}

.pan-type-mobile { display: none; }

/* ---------- 资源分类筛选 ---------- */
.cat-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    min-width: 0;
}

.cat-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    color: var(--theme-text-secondary);
    background: var(--theme-background);
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

[data-theme="dark"] .cat-chip { background: rgba(255, 255, 255, .06); }

.cat-chip i {
    font-style: normal;
    font-size: 11px;
    color: var(--theme-text-muted);
}

.cat-chip:hover { color: var(--theme-primary); border-color: var(--theme-primary-soft); }

.cat-chip.active {
    color: #fff;
    background: var(--theme-primary-gradient);
    font-weight: 500;
    box-shadow: 0 3px 10px var(--theme-primary-soft);
}

.cat-chip.active i { color: rgba(255, 255, 255, .85); }

/* ---------- TMDB 影视卡 ---------- */
.tmdb-info {
    display: flex;
    gap: 14px;
    margin-top: 22px;
    padding: 14px;
    border-radius: 14px;
    background: var(--theme-card-gradient);
    border: 1px solid var(--theme-border);
}

.tmdb-poster {
    width: 76px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--theme-background);
    aspect-ratio: 2 / 3;
}

.tmdb-poster img { width: 100%; height: 100%; object-fit: cover; }

.tmdb-content { min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.tmdb-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }

.tmdb-title-cn { font-size: 15px; font-weight: 600; }

.tmdb-title-en { font-size: 12px; color: var(--theme-text-muted); }

.tmdb-year {
    display: inline-block;
    align-self: flex-start;
    padding: 1px 8px;
    border-radius: 5px;
    background: var(--theme-primary-soft);
    color: var(--theme-primary);
    font-size: 12px;
}

.tmdb-overview {
    font-size: 13px;
    line-height: 1.65;
    color: var(--theme-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   右侧信息卡片
   ========================================================================== */
.info-section { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.info-card {
    min-width: 0;
    padding: 22px;
    border-radius: 18px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow);
}

.stats-header { margin-bottom: 16px; min-width: 0; }

.info-card-title {
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.info-card-title::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--theme-primary-gradient);
}

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

.stat-item {
    padding: 12px 6px;
    border-radius: 12px;
    background: var(--theme-card-gradient);
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    background: var(--theme-primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    margin-top: 4px;
    font-size: 12px;
    color: var(--theme-text-muted);
}

.resource-missing-divider {
    height: 1px;
    margin: 16px 0;
    background: var(--theme-border);
}

.stats-footer {
    text-align: center;
    font-size: 12px;
    color: var(--theme-text-muted);
}

/* ---------- 资源缺失卡 ---------- */
.resource-missing-card { text-align: center; align-items: center; }

.resource-missing-icon-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--theme-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    cursor: pointer;
    user-select: none;
    transition: transform .2s ease;
}

.resource-missing-icon-circle:active { transform: scale(.94); }

.resource-missing-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.resource-missing-desc {
    font-size: 13px;
    color: var(--theme-text-secondary);
    margin-bottom: 16px;
}

.resource-missing-btns { display: flex; justify-content: center; gap: 10px; }

.resource-btn {
    padding: 9px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.resource-btn-primary {
    background: var(--theme-primary-gradient);
    color: #fff;
}

.resource-btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }

.search-tips {
    font-size: 12px;
    color: var(--theme-text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   搜索结果区
   ========================================================================== */
.search-result-section {
    min-width: 0;
    margin-top: 24px;
    padding: 22px;
    border-radius: 18px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow);
    display: none;
}

.search-result-section.show { display: block; animation: panelIn .28s ease; }

/* 仅做位移动画：即使动画被节流也不会让结果内容不可见 */
@keyframes panelIn {
    from { transform: translateY(10px); }
    to   { transform: translateY(0); }
}

.search-result-header { margin-bottom: 16px; }

.search-result-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.search-result-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.search-result-title-icon {
    display: flex;
    align-items: center;
    color: var(--theme-primary);
}

.search-result-count {
    font-size: 13px;
    font-weight: 400;
    color: var(--theme-text-muted);
}

.search-result-close {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--theme-text-muted);
    cursor: pointer;
    transition: color .2s;
}

.search-result-close:hover { color: var(--theme-primary); }

/* ---------- 加载动画 ---------- */
.search-result-loading {
    padding: 48px 0;
    text-align: center;
}

.loading-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 34px;
    margin-bottom: 14px;
}

.loading-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--theme-primary);
    animation: pulseUp 1s ease-in-out infinite;
}

.loading-pulse:nth-child(2) { animation-delay: .15s; background: var(--theme-primary-light); }
.loading-pulse:nth-child(3) { animation-delay: .3s; opacity: .6; }

@keyframes pulseUp {
    0%, 100% { transform: translateY(0); opacity: .45; }
    50%      { transform: translateY(-12px); opacity: 1; }
}

.loading-text { font-size: 14px; color: var(--theme-text-secondary); }

/* ---------- 结果卡片 ---------- */
.search-result-item {
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--theme-card-gradient);
    border: 1px solid var(--theme-border);
    margin-bottom: 12px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.search-result-item:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 18px var(--theme-primary-soft);
    transform: translateY(-2px);
}

.result-card-main {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.search-result-info { min-width: 0; flex: 1; }

.search-result-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-all;
    margin-bottom: 4px;
}

.search-result-desc {
    font-size: 13px;
    color: var(--theme-text-secondary);
    line-height: 1.6;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.search-result-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 12px;
    background: var(--theme-background);
    color: var(--theme-text-secondary);
    white-space: nowrap;
}

[data-theme="dark"] .search-result-tag { background: rgba(255, 255, 255, .07); }

.search-result-tag.type {
    background: var(--theme-primary-soft);
    color: var(--theme-primary);
    font-weight: 500;
}

.search-result-tag.source { color: var(--theme-text-muted); }

.search-result-tag.cat {
    background: var(--theme-background);
    color: var(--theme-text-secondary);
    border: 1px solid var(--theme-border);
    cursor: pointer;
}

.search-result-tag.cat:hover {
    color: var(--theme-primary);
    border-color: var(--theme-primary-soft);
}

.search-result-tag.local {
    color: #fff;
    font-weight: 500;
}

.link-check-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 12px;
    background: var(--theme-background);
    color: var(--theme-text-muted);
    white-space: nowrap;
}

[data-theme="dark"] .link-check-status { background: rgba(255, 255, 255, .07); }

.check-icon {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.link-check-status.is-checking { color: #d48806; }
.link-check-status.is-checking .check-icon { animation: blink 1s ease-in-out infinite; }
.link-check-status.is-ok { color: #389e0d; }
.link-check-status.is-bad { color: #cf1322; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: .25; }
}

/* ---------- 卡片操作按钮 ---------- */
.search-result-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.search-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 14px;
    border-radius: 9px;
    font-size: 13px;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
    white-space: nowrap;
}

.search-result-btn.result-primary-action {
    background: var(--theme-primary-gradient);
    color: #fff;
    font-weight: 500;
}

.search-result-btn.result-primary-action:hover { filter: brightness(1.06); }

.search-result-btn.result-icon-action {
    background: var(--theme-background);
    color: var(--theme-text-secondary);
}

[data-theme="dark"] .search-result-btn.result-icon-action { background: rgba(255, 255, 255, .07); }

.search-result-btn.result-icon-action:hover {
    color: var(--theme-primary);
    background: var(--theme-primary-soft);
}

.search-result-btn.result-icon-action.done {
    color: var(--theme-text-muted);
    opacity: .5;
    pointer-events: none;
}

/* ---------- 文件列表 ---------- */
.search-result-files {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--theme-border);
}

.file-list-head {
    font-size: 12px;
    color: var(--theme-text-muted);
    margin-bottom: 8px;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--theme-text-secondary);
    background: var(--theme-surface);
}

.file-list-item + .file-list-item { margin-top: 4px; }

.file-list-item .fname { flex: 1; min-width: 0; word-break: break-all; }
.file-list-item .fsize { flex-shrink: 0; font-size: 12px; color: var(--theme-text-muted); }

/* ---------- 空状态 ---------- */
.search-result-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--theme-text-muted);
}

.empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--theme-background);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-muted);
}

[data-theme="dark"] .search-result-empty .empty-icon { background: rgba(255, 255, 255, .06); }

.empty-title { font-size: 15px; font-weight: 500; color: var(--theme-text-secondary); margin-bottom: 6px; }
.empty-desc { font-size: 13px; margin-bottom: 16px; }

/* ==========================================================================
   榜单 / 最近更新 页
   ========================================================================== */
.list-page-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 4px 0 18px;
}

.list-page-head h2 { font-size: 22px; font-weight: 600; }
.list-page-head span { font-size: 13px; color: var(--theme-text-muted); }

.rank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.rank-card {
    padding: 16px;
    border-radius: 14px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.rank-card:hover {
    border-color: var(--theme-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--theme-primary-soft);
}

.rank-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rank-index {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: var(--theme-background);
    color: var(--theme-text-muted);
}

.rank-card:nth-child(1) .rank-index { background: linear-gradient(135deg, #ff6b6b, #ff8e53); color: #fff; }
.rank-card:nth-child(2) .rank-index { background: linear-gradient(135deg, #ffa940, #ffc53d); color: #fff; }
.rank-card:nth-child(3) .rank-index { background: linear-gradient(135deg, #ffc53d, #ffe58f); color: #fff; }

.rank-badge {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 5px;
    background: var(--theme-primary-soft);
    color: var(--theme-primary);
}

.rank-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.rank-meta { font-size: 12px; color: var(--theme-text-muted); }

.latest-list { display: flex; flex-direction: column; gap: 10px; }

.latest-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.latest-item:hover { border-color: var(--theme-primary); transform: translateX(3px); }

.latest-main { flex: 1; min-width: 0; }
.latest-name { font-size: 14px; font-weight: 500; margin-bottom: 3px; word-break: break-all; }
.latest-sub { font-size: 12px; color: var(--theme-text-muted); display: flex; gap: 10px; flex-wrap: wrap; }

/* 最近更新 · 排序控件 */
.list-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list-page-head-left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.latest-sort { display: flex; align-items: center; gap: 6px; }
.latest-sort label { font-size: 13px; color: var(--theme-text-muted); white-space: nowrap; }
.latest-sort-select {
    font-family: inherit;
    font-size: 13px;
    color: var(--theme-text);
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 9px;
    padding: 7px 28px 7px 12px;
    cursor: pointer;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.latest-sort-select:hover { border-color: var(--theme-primary); }
.latest-sort-select:focus { border-color: var(--theme-primary); box-shadow: 0 0 0 3px var(--theme-primary-soft); }

/* 最近更新：实时同步状态提示（让访客一眼看到数据已与线上同步） */
.latest-sync-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--theme-text-muted);
}
.latest-sync-hint b { color: var(--theme-primary); font-weight: 600; }
.latest-sync-hint .sync-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--theme-primary);
    box-shadow: 0 0 0 0 var(--theme-primary-soft);
    animation: syncPulse 2.4s ease-out infinite;
}
@keyframes syncPulse {
    0%   { box-shadow: 0 0 0 0 var(--theme-primary-soft); }
    70%  { box-shadow: 0 0 0 6px rgba(0, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .latest-sync-hint .sync-dot { animation: none; }
}

/* 最近更新：分页条 */
.latest-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
}
.latest-pager:empty { margin-top: 0; }
/* 搜索结果分页条：复用同一套分页按钮样式，只调整外层留白 */
.search-pager { margin-top: 20px; }
.pager-btn {
    font-family: inherit;
    font-size: 13px;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    color: var(--theme-text);
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    cursor: pointer;
    transition: all .18s ease;
}
.pager-btn:hover:not(:disabled):not(.active) {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}
.pager-btn.active {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: #fff;
    font-weight: 600;
}
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-gap { color: var(--theme-text-muted); padding: 0 2px; }
.pager-info { font-size: 12px; color: var(--theme-text-muted); margin: 0 4px; }
.pager-size-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--theme-text-muted);
    margin-left: 4px;
}
.pager-size {
    font-family: inherit;
    font-size: 12px;
    color: var(--theme-text);
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 5px 6px;
    cursor: pointer;
    outline: none;
}
.pager-size:hover, .pager-size:focus { border-color: var(--theme-primary); }
.latest-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--theme-text-muted);
}

/* ==========================================================================
   页脚
   ========================================================================== */
.footerBox {
    margin-top: 40px;
    padding: 28px 20px;
    border-top: 1px solid var(--theme-border);
    background: var(--theme-surface);
    transition: background-color .3s ease;
}

.footerBox .box {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    font-size: 13px;
    color: var(--theme-text-muted);
    line-height: 2;
}

.footerBox .box a { color: var(--theme-text-secondary); }
.footerBox .box a:hover { color: var(--theme-primary); }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin-bottom: 4px;
}

/* 后台入口：低调地在页脚留一个口子 */
.admin-entry {
    opacity: .5;
    font-size: 12.5px;
    border-left: 1px solid var(--theme-border);
    padding-left: 16px;
    transition: opacity .2s ease, color .2s ease;
}

.admin-entry:hover { opacity: 1; color: var(--theme-primary); }

/* 顶部导航「管理后台」入口（醒目但不喧宾夺主） */
.nav-admin-link {
    color: var(--theme-primary) !important;
    font-weight: 600;
    border: 1px solid var(--theme-primary);
    border-radius: 999px;
    padding: 5px 14px !important;
    margin-left: 4px;
    line-height: 1.2;
    transition: background-color .2s ease, color .2s ease;
}
.nav-admin-link:hover { background: var(--theme-primary); color: #fff !important; }

/* 微信内打开提示条 */
.wechat-tip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: linear-gradient(135deg, #ff7a45 0%, #ff5e62 100%);
    color: #fff;
    font-size: 12.5px;
    line-height: 1.4;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.wechat-tip-icon { flex-shrink: 0; font-size: 15px; }
.wechat-tip-text { flex: 1; }
.wechat-tip-text b { font-weight: 700; }
.wechat-tip-close {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.22);
    cursor: pointer;
    font-size: 13px;
}
body.has-wechat-tip { padding-top: 46px; }
body.has-wechat-tip .top-nav { top: 46px; }

/* ==========================================================================
   弹窗
   ========================================================================== */
.dialog-mask {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, .45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.dialog-mask.show { display: flex; }

.dialog-box {
    width: 100%;
    max-width: 420px;
    max-height: 86vh;
    overflow-y: auto;
    padding: 24px;
    border-radius: 18px;
    background: var(--theme-surface);
    box-shadow: var(--theme-shadow-lg);
    animation: dialogIn .22s cubic-bezier(.2, .9, .3, 1.1);
}

@keyframes dialogIn {
    from { transform: scale(.94) translateY(10px); }
    to   { transform: scale(1) translateY(0); }
}

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

.dialog-head-title { font-size: 16px; font-weight: 600; }

.dialog-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.dialog-close-btn:hover { background: var(--theme-background); color: var(--theme-primary); }

.dialog-desc {
    font-size: 13px;
    color: var(--theme-text-secondary);
    margin-bottom: 12px;
}

.dialog-textarea {
    width: 100%;
    min-height: 92px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--theme-border);
    background: var(--theme-background);
    color: var(--theme-text);
    font-size: 14px;
    resize: none;
    transition: border-color .2s;
}

[data-theme="dark"] .dialog-textarea { background: rgba(255, 255, 255, .05); }
.dialog-textarea:focus { border-color: var(--theme-primary); }

.dialog-submit {
    width: 100%;
    height: 44px;
    margin-top: 14px;
    border-radius: 12px;
    background: var(--theme-primary-gradient);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    transition: filter .2s;
}

.dialog-submit:hover { filter: brightness(1.06); }

/* ---------- 转存结果弹窗 ---------- */
.success-title {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
    color: #389e0d;
}

[data-theme="dark"] .success-title { color: #73d13d; }

.resource-subtitle {
    font-size: 13px;
    color: var(--theme-text-secondary);
    text-align: center;
    line-height: 1.6;
    word-break: break-all;
    margin-bottom: 16px;
}

.scan-tip { text-align: center; font-size: 14px; color: var(--theme-text-secondary); }
.scan-tip .pan-name { color: var(--theme-primary); font-weight: 600; }

.scan-desc {
    text-align: center;
    font-size: 12px;
    color: var(--theme-text-muted);
    margin: 4px 0 14px;
}

.qrcode-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.qrcode {
    width: 168px;
    height: 168px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--theme-border);
}

.qrcode canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }

/* 链接超过二维码容量上限时的降级提示（绝不画假码糊弄访客） */
.qrcode-fallback {
    width: 168px;
    min-height: 168px;
    padding: 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px dashed var(--theme-border);
    color: var(--theme-text-secondary);
    font-size: 12px;
    line-height: 1.8;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.url-box {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--theme-background);
    border: 1px dashed var(--theme-border);
    margin-bottom: 12px;
}

[data-theme="dark"] .url-box { background: rgba(255, 255, 255, .05); }

.url-label { font-size: 12px; color: var(--theme-text-muted); margin-bottom: 4px; }

.url-text {
    font-size: 13px;
    color: var(--theme-text);
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.expire-tip {
    font-size: 13px;
    color: #ff6b6b;
    font-weight: 500;
    text-align: center;
    margin-bottom: 12px;
}

.tip-text {
    font-size: 12px;
    color: var(--theme-text-muted);
    text-align: center;
    margin-bottom: 10px;
}

.dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.dialog-actions button,
.dialog-actions a.btn-secondary {
    flex: 1;
    min-width: 96px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 14px;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.btn-primary {
    background: var(--theme-primary-gradient);
    color: #fff;
    font-weight: 500;
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-secondary {
    background: var(--theme-background);
    color: var(--theme-text-secondary);
    border: 1px solid var(--theme-border);
}

[data-theme="dark"] .btn-secondary { background: rgba(255, 255, 255, .06); }

.btn-secondary:hover { color: var(--theme-primary); border-color: var(--theme-primary); }

/* ---------- 加载转圈 ---------- */
.loading-content { text-align: center; padding: 20px 0; }

.loading-spinner {
    position: relative;
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1.1s linear infinite;
}

.spinner-ring:nth-child(1) { border-top-color: var(--theme-primary); }
.spinner-ring:nth-child(2) { inset: 9px; border-right-color: var(--theme-primary-light); animation-duration: .9s; animation-direction: reverse; }
.spinner-ring:nth-child(3) { inset: 18px; border-bottom-color: var(--theme-primary); animation-duration: 1.4s; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-subtext { font-size: 12px; color: var(--theme-text-muted); margin-top: 4px; }

.error-content { text-align: center; padding: 14px 0; }
.error-title { font-size: 17px; font-weight: 600; color: #cf1322; margin-bottom: 8px; }
.error-message { font-size: 13px; color: var(--theme-text-secondary); margin-bottom: 16px; }

/* ---------- 联系我们 ---------- */
.qrcode-dialog-inner { text-align: center; }

.qrcode-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.qrcode-subtitle { font-size: 13px; color: var(--theme-text-secondary); margin-bottom: 18px; }

.qrcode-btns { display: flex; flex-direction: column; gap: 10px; }

.qrcode-btn {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 14px;
    background: var(--theme-background);
    border: 1px solid var(--theme-border);
    color: var(--theme-text-secondary);
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

[data-theme="dark"] .qrcode-btn { background: rgba(255, 255, 255, .06); }

.qrcode-btn:hover {
    color: #fff;
    background: var(--theme-primary-gradient);
    border-color: transparent;
}

/* ---------- 轻提示 ---------- */
.toast-layer {
    position: fixed;
    top: 84px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.toast {
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 14px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow-lg);
    color: var(--theme-text);
    animation: toastIn .22s ease;
    white-space: nowrap;
}

.toast.success { color: #389e0d; border-color: rgba(56, 158, 13, .3); }
.toast.warning { color: #d48806; border-color: rgba(212, 136, 6, .3); }
.toast.error   { color: #cf1322; border-color: rgba(207, 19, 34, .3); }

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

/* ---------- 回到顶部 ---------- */
.back-top {
    position: fixed;
    right: 24px;
    bottom: 32px;
    z-index: 900;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-primary-gradient);
    color: #fff;
    box-shadow: var(--theme-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- 悬浮管理入口 ---------- */
.float-admin {
    position: fixed;
    right: 24px;
    bottom: 88px;
    z-index: 901;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 15px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: var(--theme-primary-gradient);
    box-shadow: var(--theme-shadow-lg);
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.float-admin:hover { color: #fff; transform: translateY(-2px); }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1024px) {
    .home-main { grid-template-columns: minmax(0, 1fr); }
    .search-section { padding: 26px 20px; }
    .search-title { font-size: 25px; }
    .top-nav-menu { display: none; }
    .nav-menu-icon { display: flex; }
}

@media (max-width: 640px) {
    .logo-subtitle { display: none; }
    .logo-name { font-size: 15px; }

    .home-container { padding: 14px; }

    .search-section { padding: 22px 16px; border-radius: 16px; }
    .search-title { font-size: 21px; }
    .search-subtitle { font-size: 13px; }

    .search-input-box { padding: 5px 5px 5px 12px; }
    .search-input-box input { height: 40px; font-size: 14px; }
    .search-btn { height: 40px; padding: 0 18px; font-size: 14px; }

    .pan-type-tabs { display: none; }
    .pan-type-mobile {
        display: block;
        margin-top: 20px;
    }

    .pan-type-label { display: block; margin-bottom: 8px; }

    .pan-type-mobile-list {
        display: flex;
        gap: 8px;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .pan-type-mobile-list::-webkit-scrollbar { display: none; }

    .pan-type-mobile-btn {
        flex-shrink: 0;
        padding: 6px 15px;
        border-radius: 20px;
        font-size: 13px;
        color: var(--theme-text-secondary);
        background: var(--theme-background);
        white-space: nowrap;
    }

    [data-theme="dark"] .pan-type-mobile-btn { background: rgba(255, 255, 255, .06); }

    .pan-type-mobile-btn.active {
        color: #fff;
        background: var(--theme-primary-gradient);
        font-weight: 500;
    }

    .search-result-section { padding: 16px; border-radius: 16px; }

    .result-card-main { flex-direction: column; gap: 12px; }
    .search-result-actions { width: 100%; }
    .search-result-btn { flex: 1; justify-content: center; padding: 0 10px; }
    .search-result-btn .action-label { display: inline; }

    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-value { font-size: 17px; }

    .dialog-box { padding: 20px; border-radius: 16px; }

    .toast { font-size: 13px; padding: 8px 14px; }

    .back-top { right: 14px; bottom: 18px; width: 40px; height: 40px; }
    .float-admin { right: 14px; bottom: 68px; padding: 8px 12px; font-size: 12px; }
    .cat-filter { margin-top: 10px; }

    .rank-grid { grid-template-columns: 1fr 1fr; }
    .latest-item { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
