/* =========================================================
   盘搜 资源搜索 - 主样式
   设计语言：深空科技感 + 玻璃拟态（Glassmorphism）
   - 背景：深蓝紫星空渐变 + 柔光光斑
   - 容器：半透明玻璃（blur + 细白描边），层级用透明度区分
   - 文字：白系，主次靠透明度
   ========================================================= */

:root {
    --glass-bg: rgba(255, 255, 255, .06);
    --glass-bg-hover: rgba(255, 255, 255, .1);
    --glass-border: rgba(255, 255, 255, .12);
    --glass-border-hover: rgba(255, 255, 255, .28);
    --text-main: #f2f4ff;
    --text-sub: rgba(233, 236, 255, .62);
    --text-dim: rgba(233, 236, 255, .4);
    --accent: #8b8cf8;
    --accent-2: #5f6df0;
    --grad: linear-gradient(135deg, #8b8cf8, #5f6df0);
    --radius-lg: 20px;
    --radius-md: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    background-color: #0d1024;
    /* 深空渐变底 + 两团柔光光斑（固定，营造玻璃透光感） */
    background-image:
        radial-gradient(1200px 800px at 85% -10%, rgba(107, 99, 255, .28), transparent 60%),
        radial-gradient(1000px 700px at -10% 30%, rgba(0, 161, 255, .22), transparent 55%),
        radial-gradient(900px 700px at 60% 115%, rgba(168, 85, 247, .18), transparent 60%),
        linear-gradient(180deg, #0d1024 0%, #10142c 55%, #0d1024 100%);
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { -webkit-user-drag: none; }

main { margin: 0 auto; max-width: 860px; padding: 0 20px; }

/* ==================== 品牌区 ==================== */
.brand {
    display: grid;
    justify-items: center;
    gap: 18px;
    padding: 8vh 0 0;
    text-align: center;
    transition: transform .3s ease, padding .3s ease;
}

.brand-logo img {
    width: 84px;
    height: 84px;
    border-radius: 24px;
    display: block;
    box-shadow: 0 12px 40px rgba(95, 109, 240, .45);
    border: 1px solid rgba(255, 255, 255, .16);
}

.brand-slogan {
    font-size: 30px;
    font-weight: 600;
    color: #fff;
    letter-spacing: .5px;
    line-height: 1.3;
    text-shadow: 0 2px 24px rgba(139, 140, 248, .35);
}

.brand-slogan-strong {
    background: linear-gradient(135deg, #a5b4fc, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.brand-subtitle {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--text-sub);
    font-size: 14px;
}

.brand-subtitle-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icon { display: inline-flex; align-items: center; justify-content: center; }

/* 对勾图标 */
.icon-yes {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6ee7b7, #34d399);
    box-shadow: 0 0 12px rgba(52, 211, 153, .5);
    flex-shrink: 0;
}
.icon-yes::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #06251a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

/* ==================== 搜索框（玻璃） ==================== */
.search { margin-top: 32px; position: relative; }

/* 手机端顶栏 logo：与搜索框同排，默认隐藏，仅手机端显示；40px 与手机端输入框同高对齐 */
.search-logo { display: none; flex-shrink: 0; }
.search-logo img { width: 40px; height: 40px; border-radius: 9px; display: block; }

.search-form {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    /* 紫蓝主色系玻璃：与搜索按钮渐变、品牌主题保持一致 */
    background: rgba(139, 140, 248, .10);
    border: 1px solid rgba(139, 140, 248, .32);
    border-radius: 50px;
    padding: 0 8px 0 24px;
    height: 56px;
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    box-shadow: 0 8px 32px rgba(8, 10, 30, .4), inset 0 1px 0 rgba(255, 255, 255, .08);
    transition: background .2s, border-color .2s, box-shadow .2s;
}

.search-form:hover,
.search-form:focus-within {
    background: var(--glass-bg-hover);
    border-color: rgba(139, 140, 248, .55);
    box-shadow: 0 12px 40px rgba(95, 109, 240, .25), inset 0 1px 0 rgba(255, 255, 255, .1);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-main);
    height: 100%;
    min-width: 0;
}
.search-input::placeholder { color: var(--text-dim); }

/* 清除按钮 */
.search-clear {
    display: none;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 255, 255, .1);
    border-radius: 50%;
    color: var(--text-sub);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}
.search-clear:hover { background: rgba(255, 255, 255, .18); }
.icon-no { position: relative; width: 14px; height: 14px; }
.icon-no::before,
.icon-no::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}
.icon-no::before { transform: translate(-50%, -50%) rotate(45deg); }
.icon-no::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* 搜索按钮 */
.search-btn {
    width: 96px;
    height: 42px;
    border: none;
    border-radius: 22px;
    background: var(--grad);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 4px 18px rgba(95, 109, 240, .45);
    transition: filter .2s, transform .15s, box-shadow .2s;
}
.search-btn:hover { filter: brightness(1.12); box-shadow: 0 6px 24px rgba(95, 109, 240, .55); }
.search-btn:active { transform: scale(.97); }
.search-btn:disabled { opacity: .7; cursor: default; }
.icon-search { position: relative; width: 16px; height: 16px; }
.icon-search::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
}
.icon-search::after {
    content: '';
    position: absolute;
    right: -1px;
    bottom: 1px;
    width: 7px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transform: rotate(45deg);
}

.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 联想框（本地搜索历史，玻璃） */
.suggest-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(20, 24, 48, .82);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    box-shadow: 0 20px 48px rgba(5, 8, 24, .55);
    overflow: hidden;
    z-index: 20;
}
.suggest-item {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .15s, color .15s;
}
.suggest-item:hover { background: rgba(139, 140, 248, .12); color: #c7c9ff; }
.suggest-word { flex: 1; word-break: break-all; }
.suggest-tag { color: var(--text-dim); font-size: 12px; flex-shrink: 0; }

/* ==================== 热搜榜 ==================== */
.category-list { margin-top: 22px; text-align: center; }
.category-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.category-title-main {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 6px;
    background: linear-gradient(90deg, #a5b4fc, #c084fc, #60a5fa, #a5b4fc);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: titleShimmer 3s linear infinite;
}
.category-title-sub {
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 2px;
}
@keyframes titleShimmer {
    to { background-position: 200% center; }
}
.category-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.category-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-sub);
    cursor: pointer;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transform: translateY(10px) scale(.9);
    transition: transform .25s, box-shadow .25s, border-color .25s, color .25s, background .25s;
    animation: categoryPop .5s ease forwards;
}
@keyframes categoryPop {
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.category-item:hover {
    border-color: rgba(139, 140, 248, .6);
    color: #fff;
    background: linear-gradient(135deg, rgba(139, 140, 248, .35), rgba(95, 109, 240, .35));
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 24px rgba(95, 109, 240, .3);
}
.category-item:active { transform: translateY(0) scale(.97); }

/* ==================== 搜索 loading ==================== */
.search-loading { text-align: center; margin-top: 40px; }
.loading { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
.loading-box {
    display: flex;
    width: max-content;
    animation: marquee 24s linear infinite;
}
.loading-dot {
    width: 58px;
    height: 58px;
    margin: 0 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.loading-dot img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .06);
    box-shadow: 0 6px 20px rgba(8, 10, 30, .4);
}
.loader-text { margin-top: 20px; font-size: 15px; color: var(--text-sub); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==================== 结果区 ==================== */
.result-main { margin-top: 12px; padding-bottom: 40px; }

.result-meta { font-size: 13px; color: var(--text-sub); padding: 8px 6px; }
.result-meta .keyword { color: #a5b4fc; font-weight: 600; }
.result-meta .count { color: #a5b4fc; font-weight: 600; }

/* 搜索结果顶部来源说明：玻璃提示条，随结果区整体显隐 */
.source-notice {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0 0 8px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-sub);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
}
.source-notice b { color: var(--text-main); font-weight: 600; }

.tabbar {
    display: flex;
    gap: 10px;
    padding: 8px 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }

.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-size: 13px;
    color: var(--text-sub);
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    flex-shrink: 0;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.tab-item:hover { border-color: var(--glass-border-hover); color: #fff; }
.tab-item.active {
    color: #fff;
    border-color: transparent;
    background: var(--c, var(--accent-2));
    box-shadow: 0 4px 18px rgba(95, 109, 240, .4);
}
.tab-item.active:hover { color: #fff; }
.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    background: rgba(255, 255, 255, .1);
    color: var(--text-sub);
}
.tab-item.active .tab-count { background: rgba(255, 255, 255, .25); color: #fff; }

.tabpanel { display: flex; flex-direction: column; gap: 12px; overflow-x: hidden; }

/* 结果卡片（玻璃） */
.result-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    box-shadow: 0 10px 36px rgba(5, 8, 24, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: box-shadow .2s, transform .2s, background .2s, border-color .2s;
    /* 纵向两行：第一行 = 徽标 + 标题 + 提取按钮，第二行 = 来源行（仅百度卡片有） */
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.result-card:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(139, 140, 248, .35);
    box-shadow: 0 14px 44px rgba(95, 109, 240, .22), inset 0 1px 0 rgba(255, 255, 255, .1);
    transform: translateY(-2px);
}

.card-top { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }

/* 提取按钮：恒在卡片右侧，不随标题换行 */
.card-extract { flex-shrink: 0; }

.platform-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .1);
}
.platform-badge img { width: 100%; height: 100%; }

.card-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    word-break: break-all;
}

.card-status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.card-status.ok { background: rgba(52, 211, 153, .15); color: #6ee7b7; }
.card-status.warn { background: rgba(251, 191, 36, .15); color: #fcd34d; }
.card-status.bad { background: rgba(248, 113, 113, .15); color: #fca5a5; }

.card-note {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
}

.card-links {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.card-link {
    flex: 1;
    min-width: 220px;
    font-size: 13px;
    color: var(--text-sub);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-all;
}
.card-link .url { flex: 1; color: #a5b4fc; }
.card-link .pwd { flex-shrink: 0; color: var(--text-sub); }
.card-link .pwd b { color: #c7c9ff; }

.card-actions { display: flex; gap: 8px; flex-shrink: 0; margin-top: 12px; }

.btn {
    border: none;
    border-radius: 9px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(95, 109, 240, .35); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: var(--text-sub); border: 1px solid rgba(255, 255, 255, .1); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); color: var(--text-main); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card-meta {
    margin-top: 10px;
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--text-dim);
}

/* 空态 / 错误态 */
.empty, .error-box { text-align: center; padding: 56px 0; color: var(--text-dim); font-size: 14px; }
.empty-icon { font-size: 44px; margin-bottom: 12px; }
.error-box { color: #fca5a5; }

/* ==================== 转存弹窗（玻璃） ==================== */
.transfer-modal {
    position: fixed;
    /* 不用 inset（Chrome 87+ 才支持），老内核 WebView 会失去定位导致弹窗错位 */
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 8, 24, .6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 20px;
}
.transfer-modal[hidden] { display: none; }
.transfer-modal-box {
    width: 460px;
    max-width: 100%;
    background: rgba(24, 28, 54, .88);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(32px) saturate(150%);
    -webkit-backdrop-filter: blur(32px) saturate(150%);
    box-shadow: 0 24px 64px rgba(5, 8, 24, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
    animation: modal-in .2s ease;
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: none; }
}
.transfer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.transfer-title { font-size: 16px; font-weight: 600; }
.transfer-close {
    border: none;
    background: transparent;
    font-size: 22px;
    color: var(--text-sub);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    line-height: 1;
    transition: background .15s, color .15s;
}
.transfer-close:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.transfer-body { padding: 20px; }
.transfer-res-title {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 14px;
    word-break: break-all;
    line-height: 1.5;
}
.account-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}
.account-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
    background: rgba(255, 255, 255, .03);
}
.account-item:hover { border-color: var(--glass-border-hover); background: rgba(255, 255, 255, .06); }
.account-item.selected {
    border-color: rgba(139, 140, 248, .7);
    background: rgba(139, 140, 248, .12);
    box-shadow: 0 0 0 1px rgba(139, 140, 248, .5) inset;
}
.account-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .3);
    flex-shrink: 0;
    position: relative;
}
.account-item.selected .account-radio { border-color: #a5b4fc; }
.account-item.selected .account-radio::after {
    content: '';
    position: absolute;
    /* 不用 inset（Chrome 87+ 才支持） */
    top: 3px;
    right: 3px;
    bottom: 3px;
    left: 3px;
    border-radius: 50%;
    background: #a5b4fc;
    box-shadow: 0 0 8px rgba(165, 180, 252, .8);
}
.account-info { flex: 1; min-width: 0; }
.account-name { font-size: 14px; color: var(--text-main); font-weight: 500; }
.account-dir { font-size: 12px; color: var(--text-dim); margin-top: 2px; word-break: break-all; }
.account-empty { text-align: center; padding: 30px 0; color: var(--text-dim); font-size: 14px; }

.transfer-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}
.transfer-tip {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 12px;
    text-align: center;
}

/* ==================== 转存文件选择器（10-转存文件选择.md） ==================== */
.file-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 50vh;
}
.file-picker-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-dim);
}
.file-picker-actions { display: flex; gap: 8px; }
.file-picker-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .03);
    font-size: 13px;
}
.picker-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-main);
}
.picker-row:hover { background: rgba(255, 255, 255, .06); }
.picker-row input[type="checkbox"] { flex-shrink: 0; accent-color: var(--primary, #6366f1); }
.picker-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-size { font-size: 12px; color: var(--text-dim); flex-shrink: 0; }
.picker-icon { flex-shrink: 0; }
.picker-dir > summary { list-style: none; cursor: pointer; }
.picker-dir > summary::-webkit-details-marker { display: none; }
.picker-children {
    margin-left: 22px;
    border-left: 1px solid rgba(255, 255, 255, .08);
    padding-left: 8px;
}
.picker-empty { color: var(--text-dim); font-size: 12px; padding: 4px 8px; }
.btn-sm { padding: 3px 10px; font-size: 12px; }

/* ==================== 转存弹窗：加载/失败/二维码 ==================== */
.transfer-loading {
    text-align: center;
    padding: 40px 0;
    color: var(--text-dim);
    font-size: 14px;
}
/* 转存等待期轮播提示：每次换文案播放淡入，避免生硬跳变（与 modal-in 同风格） */
#transferTipText {
    display: inline-block;
    animation: tip-fade-in .5s ease;
}
@keyframes tip-fade-in {
    from { opacity: .2; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.transfer-error {
    text-align: center;
    padding: 30px 10px;
    color: #fca5a5;
    font-size: 14px;
}
.qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px 0 4px;
}
.qr-box {
    width: 210px;
    height: 210px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 5px;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .04), 0 10px 30px rgba(5, 8, 24, .4);
}
.qr-box canvas,
.qr-box img {
    display: block;
    width: 200px;
    height: 200px;
}
.qr-tip { font-size: 13px; color: var(--text-sub); }
.qr-pwd { font-size: 14px; color: var(--text-sub); }
.qr-pwd b { color: #c7c9ff; }
.qr-hint { font-size: 12px; color: #fcd34d; }
.qr-timer { width: 100%; max-width: 220px; }
.qr-progress {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
}
.qr-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 1s linear;
}
.qr-progress-bar.safe { background: #34d399; }
.qr-progress-bar.warn { background: #fbbf24; }
.qr-progress-bar.danger { background: #f87171; }
.qr-countdown {
    margin-top: 6px;
    text-align: center;
    font-size: 13px;
    color: var(--text-sub);
}
.qr-countdown.expired { color: #fca5a5; font-weight: 600; }
.qr-wrap.expired { opacity: .55; filter: grayscale(1); }
.qr-wrap.expired .qr-box { pointer-events: none; }

/* 移动端打开分享链接按钮 */
.transfer-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 30px;
    background: var(--grad);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 26px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(95, 109, 240, .4);
    transition: transform .2s, filter .2s, box-shadow .2s;
}
.transfer-open-btn:hover { filter: brightness(1.1); }
.transfer-open-btn:active { transform: scale(.97); }
.qr-wrap.expired .transfer-open-btn { opacity: .5; pointer-events: none; }

/* ==================== toast ==================== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 60px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 22px;
    opacity: 0;
    pointer-events: none;
    transition: all .25s;
    z-index: 200;
    max-width: 82vw;
    text-align: center;
    box-shadow: 0 10px 32px rgba(5, 8, 24, .5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== footer ==================== */
.footbar {
    text-align: center;
    padding: 34px 0 26px;
    font-size: 13px;
    color: var(--text-dim);
}
.footbar-disclaimer {
    max-width: 720px;
    margin: 0 auto 18px;
    padding: 18px 20px;
    text-align: left;
    font-size: 12px;
    line-height: 1.9;
    color: var(--text-sub);
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: var(--radius-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.footbar-disclaimer p { margin: 6px 0; }
.footbar-disclaimer b { color: var(--text-main); }
.footbar-contact { color: #a5b4fc; }

/* 搜索中的品牌收缩 */
body.page-searching .brand { transform: scale(.8); padding-top: 4vh; }
body.page-searching .category-list { display: none !important; }

/* ==================== 响应式 ==================== */
@media only screen and (max-width: 767px) {
    main { padding: 0 16px; }
    /* 手机端顶栏吸顶：logo + 搜索框一行，固定在视口最顶部；负 margin 补全 main 的左右内边距避免两侧漏内容 */
    .search {
        position: sticky;
        top: 0;
        z-index: 50;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 -16px;
        padding: 8px 16px;
        background: rgba(13, 16, 36, .82);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }
    .search-logo { display: block; }
    /* 手机端搜索框改圆角矩形，与胶囊形区分，更紧凑 */
    .search-form { flex: 1; height: 40px; padding-left: 14px; gap: 6px; border-radius: 12px; }
    .search-btn { width: 32px; height: 32px; border-radius: 10px; }
    /* 手机端隐藏原品牌大区（logo+副标题+大标题），由顶栏替代 */
    .brand { display: none; }
    .category-item { font-size: 12px; padding: 6px 12px; }
    /* 手机端"什么都能搜"标签过多，只展示前 20 个 */
    .category-item:nth-child(n+21) { display: none; }
    /* 手机端 footer 左右留边距，避免免责声明铺满 */
    .footbar { padding: 30px 16px 24px; }
    .result-card { padding: 14px; }
    .card-links { flex-direction: column; align-items: stretch; }
    .card-actions { justify-content: flex-end; }
    .card-link { min-width: 0; }
}

/* ==================== 结果卡片内的来源行 ==================== */
/* 第一行放徽标/标题/提取按钮（见 .card-top），来源行作为卡片第二个子元素整宽独占一行 */
.card-promo {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(251, 191, 36, .1);
    border: 1px solid rgba(251, 191, 36, .25);
    font-size: 12px;
    line-height: 1.55;
    color: #fcd34d;
}

.card-promo .promo-tag {
    flex-shrink: 0;
    padding: 0 6px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1200;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
}

.card-promo .promo-text {
    flex: 1;
    word-break: break-all;
}

@media only screen and (max-width: 767px) {
    .card-promo { font-size: 11px; padding: 5px 8px; }
}