/* ============================================
 * Yuweiming 绿色导航 — 主样式表
 * 版本：2.2.1
 * ============================================ */

/* ========== 设计令牌（CSS 自定义属性） ========== */
:root {
    /* 主色调 */
    --color-primary: #5ba835;
    --color-primary-dark: #4a8c2a;
    --color-primary-darker: #3d6b24;
    --color-primary-deep: #1e3b0e;
    --color-primary-light: #7ab85c;
    --color-primary-lighter: #8ab87a;
    --color-primary-pale: #c5e0b4;

    /* 背景色 */
    --bg-start: #e8f5e0;
    --bg-mid: #c5e0b4;
    --bg-end: #dcefd4;
    --bg-body: linear-gradient(170deg, #e8f5e0 0%, #d4e9c3 20%, #c8e4b8 40%, #b8d9a6 60%, #c5e0b4 80%, #dcefd4 100%);

    /* 文字色 */
    --text-primary: #2d5016;
    --text-secondary: #5a8a3c;
    --text-tertiary: #7aac5c;
    --text-muted: #8ab87a;

    /* 卡片 */
    --card-bg: rgba(255, 255, 255, 0.68);
    --card-bg-hover: rgba(255, 255, 255, 0.85);
    --card-bg-subtle: rgba(255, 255, 255, 0.55);
    --card-border: rgba(144, 238, 144, 0.22);
    --card-border-hover: rgba(91, 168, 53, 0.3);

    /* 搜索框 */
    --search-bg: rgba(255, 255, 255, 0.88);
    --search-border: rgba(91, 168, 53, 0.25);
    --search-focus-border: #5ba835;
    --search-focus-shadow: 0 4px 32px rgba(45, 80, 22, 0.15), 0 0 0 4px rgba(91, 168, 53, 0.1);

    /* 页脚 */
    --footer-bg-start: rgba(255, 255, 255, 0.72);
    --footer-bg-mid: rgba(240, 248, 232, 0.78);
    --footer-bg-end: rgba(232, 245, 224, 0.82);

    /* 阴影 */
    --shadow-card: 0 1px 12px rgba(45, 80, 22, 0.05);
    --shadow-card-hover: 0 4px 28px rgba(45, 80, 22, 0.1);
    --shadow-nav-hover: 0 8px 28px rgba(45, 80, 22, 0.12);

    /* 圆角 */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 56px;

    /* 动效 */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-base: 0.3s;
    --duration-slow: 0.35s;
}

/* ========== 全局重置 ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 跳过导航链接（无障碍） */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--color-primary-dark);
    outline-offset: 2px;
}

/* 选中文本样式 */
::selection {
    background: rgba(91, 168, 53, 0.2);
    color: var(--color-primary-darker);
}

/* ========== 两侧固定装饰图片 ========== */
.side-img {
    position: fixed;
    top: 20px;
    width: 150px;
    height: 150px;
    border-radius: var(--radius-sm);
    opacity: 0.5;
    z-index: 0;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.side-img-left {
    left: 20px;
}

.side-img-right {
    right: 20px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    background: var(--bg-body);
    background-attachment: fixed;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

/* 背景纹理 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(91, 168, 53, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 205, 124, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(45, 80, 22, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ========== 顶部装饰叶子 ========== */
.header-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 160px;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.leaf {
    position: absolute;
    opacity: 0.25;
    color: var(--color-primary);
    filter: drop-shadow(0 2px 8px rgba(91, 168, 53, 0.15));
    animation: leafFloat 7s ease-in-out infinite;
}

.leaf-1 { top: 10px; left: 5%; width: 36px; height: 36px; animation-delay: 0s; }
.leaf-2 { top: 45px; left: 22%; width: 26px; height: 26px; animation-delay: 1.2s; }
.leaf-3 { top: 8px; left: 50%; width: 30px; height: 30px; animation-delay: 2.4s; }
.leaf-4 { top: 35px; left: 72%; width: 32px; height: 32px; animation-delay: 3.6s; }
.leaf-5 { top: 18px; left: 90%; width: 22px; height: 22px; animation-delay: 4.8s; }

@keyframes leafFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-18px) rotate(8deg); }
    75% { transform: translateY(12px) rotate(-6deg); }
}

/* ========== 主容器 ========== */
.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 28px 40px;
}

/* ========== Logo 区 ========== */
.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 0 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    color: var(--color-primary-dark);
    filter: drop-shadow(0 2px 6px rgba(45, 80, 22, 0.2));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo-section:hover .logo-icon {
    transform: rotate(15deg) scale(1.08);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary-darker);
    letter-spacing: 3px;
}

/* ========== 日期时间区 ========== */
.datetime-section {
    text-align: center;
    padding: 16px 20px 10px;
}

.time {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--color-primary-deep);
    letter-spacing: 6px;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.date {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: 500;
    letter-spacing: 1px;
}

.greeting {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 600;
}

/* ========== 搜索区 ========== */
.search-section {
    margin: 22px auto 32px;
    max-width: 640px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--search-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-full);
    border: 2px solid var(--search-border);
    box-shadow: 0 2px 24px rgba(45, 80, 22, 0.08);
    padding: 5px;
    transition: all var(--duration-slow) var(--ease-smooth);
}

.search-box:focus-within {
    border-color: var(--search-focus-border);
    box-shadow: var(--search-focus-shadow);
    transform: translateY(-2px);
}

.search-engine {
    border: none;
    background: linear-gradient(135deg, #e8f5e0, #d0eac0);
    color: var(--text-primary);
    padding: 13px 20px;
    border-radius: 52px 0 0 52px;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    min-width: 90px;
    text-align: center;
    transition: background var(--duration-base);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 13px 10px;
    font-size: 1.05rem;
    color: var(--text-primary);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-btn {
    border: none;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    padding: 13px 24px;
    border-radius: 52px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-base) ease;
    margin: 2px;
    margin-left: 2px;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), #3d7520);
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(74, 140, 42, 0.35);
}

.search-btn:active {
    transform: scale(0.97);
}

.search-hotkeys {
    text-align: center;
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.search-hotkeys kbd {
    display: inline-block;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(91, 168, 53, 0.3);
    border-radius: 5px;
    padding: 1px 7px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a7c2e;
    margin: 0 2px;
}

/* ========== 导航分类区 ========== */
.nav-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nav-category {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 26px 28px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-card);
    transition: all var(--duration-slow) var(--ease-smooth);
}

.nav-category:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--card-border-hover);
}

.category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid rgba(124, 205, 124, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.category-icon {
    width: 22px;
    height: 22px;
    color: var(--color-primary-dark);
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(45, 80, 22, 0.18));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-category:hover .category-icon {
    color: var(--color-primary-darker);
    filter: drop-shadow(0 2px 6px rgba(91, 168, 53, 0.3));
    transform: scale(1.1);
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 10px;
}

/* ========== 导航卡片 ========== */
.nav-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card-bg-subtle);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--duration-base) var(--ease-smooth);
    border: 1.5px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

.nav-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(91, 168, 53, 0.06), rgba(124, 205, 124, 0.03));
    opacity: 0;
    transition: opacity var(--duration-base) ease;
}

.nav-card:hover {
    background: var(--card-bg-hover);
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-nav-hover);
}

.nav-card:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-md);
}

.nav-card:hover::after {
    opacity: 1;
}

.nav-card:active {
    transform: translateY(-1px) scale(0.98);
}

.card-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(45, 80, 22, 0.10))
            drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06));
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

.nav-card:hover .card-icon {
    filter: drop-shadow(0 4px 14px rgba(91, 168, 53, 0.22))
            drop-shadow(0 2px 4px rgba(45, 80, 22, 0.12));
    transform: scale(1.1) rotate(-2deg);
}

/* 全局 SVG 渲染质量优化 */
svg, .card-icon, .category-icon, .logo-icon {
    shape-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* SVG 图标内文字清晰渲染 */
.card-icon text, .category-icon text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", "Helvetica Neue", sans-serif;
    text-rendering: optimizeLegibility;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.card-name {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.card-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 页脚（计数器深度融入） ========== */
.footer {
    margin-top: 52px;
    padding: 0;
}

.footer-inner {
    max-width: 680px;
    margin: 0 auto;
    background: linear-gradient(135deg,
        var(--footer-bg-start) 0%,
        var(--footer-bg-mid) 40%,
        var(--footer-bg-end) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(124, 205, 124, 0.28);
    box-shadow:
        0 1px 4px rgba(45, 80, 22, 0.04),
        0 4px 16px rgba(91, 168, 53, 0.06),
        0 12px 40px rgba(45, 80, 22, 0.04);
    overflow: hidden;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.footer-inner:hover {
    border-color: rgba(91, 168, 53, 0.35);
    box-shadow:
        0 1px 6px rgba(45, 80, 22, 0.06),
        0 6px 24px rgba(91, 168, 53, 0.1),
        0 16px 48px rgba(45, 80, 22, 0.06);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 24px 14px;
    color: #5a8a3c;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
}

.footer-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(124, 205, 124, 0.35) 20%,
        rgba(91, 168, 53, 0.25) 50%,
        rgba(124, 205, 124, 0.35) 80%,
        transparent);
}

.footer-logo {
    color: #4a8c2a;
    flex-shrink: 0;
    opacity: 0.8;
}

/* 统计区 */
.footer-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px 20px;
    gap: 0;
}

.stat-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 28px;
    border-radius: 14px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    overflow: hidden;
}

.stat-glow {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: radial-gradient(circle at center,
        rgba(91, 168, 53, 0.08) 0%,
        rgba(124, 205, 124, 0.03) 50%,
        transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-item:hover .stat-glow {
    opacity: 1;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.55);
    transform: translateY(-2px);
}

.stat-icon {
    color: #7ab85c;
    flex-shrink: 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.stat-item:hover .stat-icon {
    color: #4a8c2a;
    transform: scale(1.12);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 500;
    letter-spacing: 0.4px;
    transition: color var(--duration-base) ease;
}

.stat-item:hover .stat-label {
    color: #4a7c2e;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary-darker) 0%, var(--color-primary-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform var(--duration-base) ease;
    line-height: 1;
}

.stat-item:hover .stat-value {
    transform: scale(1.08);
}

/* 分隔线 */
.footer-divider {
    width: 1px;
    height: 32px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(124, 205, 124, 0.4) 30%,
        rgba(91, 168, 53, 0.3) 50%,
        rgba(124, 205, 124, 0.4) 70%,
        transparent 100%);
    flex-shrink: 0;
}

/* 页脚操作区 */
.footer-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 16px 16px;
}

.footer-action-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: all var(--duration-base) ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.footer-action-link:hover {
    background: rgba(91, 168, 53, 0.08);
    color: var(--text-primary);
    border-color: rgba(91, 168, 53, 0.2);
}

.footer-action-link:active {
    transform: scale(0.96);
}

/* ========== 涟漪效果 ========== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(91, 168, 53, 0.18);
    transform: scale(0);
    animation: rippleEffect 0.7s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to { transform: scale(4); opacity: 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.shake { animation: shake 0.4s ease; }

/* ========== 响应式设计 ========== */
@media (max-width: 900px) {
    .container {
        padding: 16px 16px 30px;
    }

    .time {
        font-size: 3.2rem;
        letter-spacing: 4px;
    }

    .nav-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .side-img {
        display: none;
    }

    .time {
        font-size: 2.8rem;
    }

    .greeting {
        font-size: 1.1rem;
    }

    .search-box {
        border-radius: 28px;
        flex-wrap: wrap;
    }

    .search-engine {
        border-radius: 24px;
        padding: 10px 14px;
        font-size: 0.85rem;
        min-width: 72px;
    }

    .search-input {
        padding: 10px 8px;
        font-size: 0.92rem;
    }

    .search-btn {
        padding: 10px 18px;
    }

    .nav-category {
        padding: 18px 16px;
        border-radius: 20px;
    }

    .nav-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }

    .nav-card {
        padding: 12px;
        gap: 10px;
    }

    .card-icon {
        width: 34px;
        height: 34px;
    }

    .card-name {
        font-size: 0.85rem;
    }

    .card-desc {
        display: none;
    }

    .leaf {
        display: none;
    }
}

@media (max-width: 480px) {
    .time {
        font-size: 2.2rem;
        letter-spacing: 3px;
    }

    .logo-text {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .footer-inner {
        border-radius: 16px;
        margin: 0 8px;
    }

    .footer-brand {
        font-size: 0.73rem;
        padding: 14px 16px 12px;
    }

    .footer-stats {
        padding: 10px 12px 16px;
    }

    .stat-item {
        padding: 8px 16px;
        gap: 5px;
    }

    .stat-value {
        font-size: 1.15rem;
        min-width: 28px;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    .footer-divider {
        height: 24px;
    }

    .nav-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .nav-card {
        flex-direction: column;
        text-align: center;
        padding: 12px 6px;
        gap: 6px;
        border-radius: 14px;
    }

    .card-info {
        align-items: center;
    }

    .card-icon {
        width: 36px;
        height: 36px;
        filter: drop-shadow(0 1px 4px rgba(45,80,22,0.08));
    }
    .nav-card:hover .card-icon {
        filter: drop-shadow(0 3px 8px rgba(91,168,53,0.18));
    }

    .card-name {
        font-size: 0.78rem;
    }

    .search-hotkeys {
        display: none;
    }
}

/* ========== 暗色模式（系统偏好 + 手动切换） ========== */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-primary: #7ab85c;
        --color-primary-dark: #7ab85c;
        --color-primary-darker: #a8d5a2;
        --color-primary-deep: #c5e0b4;
        --color-primary-light: #7ab85c;

        --bg-body: linear-gradient(170deg, #1a2e12 0%, #16250e 20%, #1c3014 40%, #233b18 60%, #1a2e12 80%, #1e3416 100%);

        --text-primary: #c5e0b4;
        --text-secondary: #a8d5a2;
        --text-tertiary: #8ab87a;
        --text-muted: #6a9a5a;

        --card-bg: rgba(30, 50, 20, 0.78);
        --card-bg-hover: rgba(40, 65, 28, 0.9);
        --card-bg-subtle: rgba(30, 50, 20, 0.6);
        --card-border: rgba(91, 168, 53, 0.15);
        --card-border-hover: rgba(91, 168, 53, 0.35);

        --search-bg: rgba(25, 40, 18, 0.9);
        --search-border: rgba(91, 168, 53, 0.3);
        --search-focus-border: #7ab85c;
        --search-focus-shadow: 0 4px 32px rgba(91, 168, 53, 0.2), 0 0 0 4px rgba(91, 168, 53, 0.15);

        --footer-bg-start: rgba(25, 40, 18, 0.85);
        --footer-bg-mid: rgba(30, 50, 20, 0.88);
        --footer-bg-end: rgba(28, 44, 18, 0.9);

        --shadow-card: 0 1px 12px rgba(0, 0, 0, 0.3);
        --shadow-card-hover: 0 4px 28px rgba(0, 0, 0, 0.4);
        --shadow-nav-hover: 0 8px 28px rgba(0, 0, 0, 0.35);
    }
}

/* 手动暗色模式覆盖 */
:root[data-theme="dark"] {
    --color-primary: #7ab85c;
    --color-primary-dark: #7ab85c;
    --color-primary-darker: #a8d5a2;
    --color-primary-deep: #c5e0b4;
    --color-primary-light: #7ab85c;

    --bg-body: linear-gradient(170deg, #1a2e12 0%, #16250e 20%, #1c3014 40%, #233b18 60%, #1a2e12 80%, #1e3416 100%);

    --text-primary: #c5e0b4;
    --text-secondary: #a8d5a2;
    --text-tertiary: #8ab87a;
    --text-muted: #6a9a5a;

    --card-bg: rgba(30, 50, 20, 0.78);
    --card-bg-hover: rgba(40, 65, 28, 0.9);
    --card-bg-subtle: rgba(30, 50, 20, 0.6);
    --card-border: rgba(91, 168, 53, 0.15);
    --card-border-hover: rgba(91, 168, 53, 0.35);

    --search-bg: rgba(25, 40, 18, 0.9);
    --search-border: rgba(91, 168, 53, 0.3);
    --search-focus-border: #7ab85c;
    --search-focus-shadow: 0 4px 32px rgba(91, 168, 53, 0.2), 0 0 0 4px rgba(91, 168, 53, 0.15);

    --footer-bg-start: rgba(25, 40, 18, 0.85);
    --footer-bg-mid: rgba(30, 50, 20, 0.88);
    --footer-bg-end: rgba(28, 44, 18, 0.9);

    --shadow-card: 0 1px 12px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 4px 28px rgba(0, 0, 0, 0.4);
    --shadow-nav-hover: 0 8px 28px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] body::before {
    background-image:
        radial-gradient(circle at 20% 80%, rgba(91, 168, 53, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 205, 124, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(45, 80, 22, 0.06) 0%, transparent 60%);
}
:root[data-theme="dark"] .leaf { color: #7ab85c; opacity: 0.35; }
:root[data-theme="dark"] .side-img { opacity: 0.25; }
:root[data-theme="dark"] .search-engine { background: linear-gradient(135deg, #233b18, #1a2e12); }
:root[data-theme="dark"] .search-hotkeys kbd { background: rgba(30, 50, 20, 0.75); border-color: rgba(91, 168, 53, 0.35); }
:root[data-theme="dark"] .stat-value {
    background: linear-gradient(135deg, #a8d5a2 0%, #dcefd4 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* 暗色模式通用覆盖 */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body::before {
        background-image:
            radial-gradient(circle at 20% 80%, rgba(91, 168, 53, 0.12) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(124, 205, 124, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 50% 50%, rgba(45, 80, 22, 0.06) 0%, transparent 60%);
    }
    :root:not([data-theme="light"]) .leaf { color: #7ab85c; opacity: 0.35; }
    :root:not([data-theme="light"]) .side-img { opacity: 0.25; }
    :root:not([data-theme="light"]) .search-engine { background: linear-gradient(135deg, #233b18, #1a2e12); }
    :root:not([data-theme="light"]) .search-hotkeys kbd { background: rgba(30, 50, 20, 0.75); border-color: rgba(91, 168, 53, 0.35); }
    :root:not([data-theme="light"]) .stat-value {
        background: linear-gradient(135deg, #a8d5a2 0%, #dcefd4 100%);
        -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    }
}

/* ========== 减弱动效（无障碍） ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .ripple { display: none !important; }
    .leaf { display: none !important; }
}

/* ========== 焦点可见性（无障碍） ========== */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.search-input:focus,
.search-engine:focus {
    outline: none;
}

/* ========================================================================
 *   死链检测模块样式（专业版 v3.0）
 *   包含：FAB按钮、卡片状态、报告面板、统计卡片、筛选器、导出、响应式
 * ======================================================================== */

/* ========== 浮动入口按钮 (FAB) ========== */
.dl-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9997;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(245, 158, 11, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    outline: none;
    user-select: none;
    font-family: inherit;
}
.dl-fab:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 10px 28px rgba(245, 158, 11, .5);
}
.dl-fab:active { transform: scale(.94); }
.dl-fab .fab-tooltip {
    position: absolute;
    right: 64px;
    background: #1f2937;
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(8px);
    transition: all .2s ease;
}
.dl-fab:hover .fab-tooltip { opacity: 1; transform: translateX(0); }

/* 有死链：红色脉冲 */
.dl-fab.has-issues {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 6px 20px rgba(239, 68, 68, .4);
    animation: fab-pulse 2s infinite;
    width: auto;
    min-width: 54px;
    height: 54px;
    border-radius: 27px;
    padding: 0 16px;
    font-size: 14px;
    letter-spacing: .5px;
}
.dl-fab.has-issues:hover { box-shadow: 0 10px 28px rgba(239, 68, 68, .5); }
@keyframes fab-pulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(239, 68, 68, .4); }
    50%      { box-shadow: 0 6px 32px rgba(239, 68, 68, .7); }
}

/* 检测中：蓝色旋转 */
.dl-fab.scanning {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 6px 20px rgba(59, 130, 246, .4);
    animation: fab-scanning 1.2s infinite;
    width: auto;
    min-width: 54px;
    border-radius: 27px;
    padding: 0 14px;
    font-size: 14px;
}
@keyframes fab-scanning {
    0%, 100% { box-shadow: 0 6px 20px rgba(59, 130, 246, .4); }
    50%      { box-shadow: 0 6px 32px rgba(59, 130, 246, .7); }
}

/* ========== 卡片死链状态 ========== */
.nav-card.checking {
    animation: card-pulse .8s ease infinite;
    border-style: dashed;
    border-color: #fbbf24;
    border-width: 1.5px;
}
@keyframes card-pulse {
    0%, 100% { opacity: .75; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.02); }
}

/* 死链卡片：灰色+删除线 */
.nav-card.dl-status-dead,
.nav-card.dead {
    opacity: .38;
    text-decoration: line-through;
    border: 1.5px dashed #fca5a5;
    background: #fef2f2;
    filter: grayscale(.3);
    pointer-events: none;
}
/* 存活卡片：绿色边框 */
.nav-card.dl-status-good,
.nav-card.alive {
    border-color: #86efac;
    border-width: 1.5px;
    border-style: solid;
}
/* 警告卡片：黄色边框 */
.nav-card.dl-status-warn {
    border-color: #fcd34d;
    border-width: 1.5px;
    border-style: solid;
}

/* ========== 卡片状态徽章 ========== */
.nav-card .dead-status-icon {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 10px;
    pointer-events: none;
    z-index: 2;
}
.dl-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
    line-height: 1;
}
.dl-badge--good  { background: #dcfce7; color: #166534; }
.dl-badge--warn  { background: #fef3c7; color: #92400e; }
.dl-badge--dead  { background: #fee2e2; color: #991b1b; }

/* ========== 报告面板覆盖层 ========== */
.dl-report-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dl-overlay-in .25s ease;
}
@keyframes dl-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ========== 报告面板主体 ========== */
.dl-report-panel {
    width: 680px;
    max-width: 94vw;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: dl-panel-in .3s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes dl-panel-in {
    from { opacity: 0; transform: scale(.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ========== 报告面板头部 ========== */
.dl-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.dl-report-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}
.dl-report-header-actions {
    display: flex;
    gap: 8px;
}
.dl-btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
    line-height: 1.4;
}
.dl-btn:hover { background: #f3f4f6; border-color: #9ca3af; }
.dl-btn-close-report {
    padding: 7px 10px;
    font-size: 16px;
    line-height: 1;
    color: #6b7280;
}
.dl-btn-close-report:hover { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
.dl-btn-export {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.dl-btn-export:hover { background: #dbeafe; }
.dl-btn-retry-dead {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}
.dl-btn-retry-dead:hover { background: #fee2e2; }

/* ========== 统计卡片行 ========== */
.dl-report-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}
.dl-stat-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #f3f4f6;
}
.dl-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}
.dl-stat-label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.dl-stat-health.excellent { border-color: #86efac; background: #f0fdf4; }
.dl-stat-health.excellent .dl-stat-value { color: #166534; }
.dl-stat-health.good      { border-color: #bfdbfe; background: #eff6ff; }
.dl-stat-health.good      .dl-stat-value { color: #1d4ed8; }
.dl-stat-health.poor      { border-color: #fcd34d; background: #fefce8; }
.dl-stat-health.poor      .dl-stat-value { color: #a16207; }
.dl-stat-health.critical  { border-color: #fca5a5; background: #fef2f2; }
.dl-stat-health.critical  .dl-stat-value { color: #dc2626; }
.dl-stat-alive .dl-stat-value { color: #16a34a; }
.dl-stat-dead .dl-stat-value  { color: #dc2626; }
.dl-stat-time .dl-stat-value  { color: #7c3aed; }
.dl-stat-cache .dl-stat-value { color: #0891b2; }

/* ========== 筛选器 ========== */
.dl-report-filters {
    display: flex;
    gap: 6px;
    padding: 12px 20px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}
.dl-filter {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
}
.dl-filter:hover { background: #f3f4f6; color: #374151; }
.dl-filter.active {
    background: #111827;
    color: #fff;
    border-color: #111827;
}
.dl-filter--dead.active  { background: #dc2626; border-color: #dc2626; }
.dl-filter--warn.active  { background: #f59e0b; border-color: #f59e0b; }
.dl-filter--alive.active { background: #16a34a; border-color: #16a34a; }

/* ========== 结果列表 ========== */
.dl-report-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    min-height: 120px;
}
.dl-report-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}
.dl-report-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 6px;
    border: 1px solid #f3f4f6;
    font-size: 13px;
    transition: background .15s ease;
}
.dl-report-item:hover { background: #f9fafb; }
.dl-report-item--dead { background: #fff5f5; border-color: #fecaca; }
.dl-report-item--dead:hover { background: #fef2f2; }
.dl-report-item--warn { background: #fffbeb; border-color: #fde68a; }
.dl-report-item--warn:hover { background: #fef3c7; }
.dl-report-item--good { background: #f9fafb; border-color: #e5e7eb; }

/* 列表微章 */
.dl-badge-small {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.dl-badge-small.dl-badge--good { background: #dcfce7; color: #166534; }
.dl-badge-small.dl-badge--warn { background: #fef3c7; color: #92400e; }
.dl-badge-small.dl-badge--dead { background: #fee2e2; color: #991b1b; }

/* 列表各项 */
.dl-report-item-label { flex: 1; min-width: 0; color: #1f2937; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-report-item-url   { flex: 2; min-width: 0; color: #6b7280; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: monospace; }
.dl-report-item-time  { flex-shrink: 0; min-width: 50px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.dl-report-item-time.dl-fast   { color: #16a34a; }
.dl-report-item-time.dl-medium { color: #d97706; }
.dl-report-item-time.dl-slow   { color: #dc2626; }
.dl-report-item-retries { flex-shrink: 0; font-size: 11px; color: #f59e0b; font-weight: 500; }
.dl-report-item-cached  { flex-shrink: 0; font-size: 11px; color: #0891b2; background: #ecfeff; padding: 1px 6px; border-radius: 4px; }

/* 单个重试按钮 */
.dl-btn-retry-one {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
}
.dl-btn-retry-one:hover { background: #eff6ff; color: #2563eb; border-color: #93c5fd; }
.dl-btn-retry-one:disabled { opacity: .4; cursor: not-allowed; }

/* ========== Toast 通知 ========== */
.dl-simple-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 420px;
    animation: toast-in .3s ease;
    line-height: 1.5;
}
.dl-simple-toast b { font-weight: 700; }
.dl-simple-toast.removing { animation: toast-out .25s ease forwards; }
.dl-simple-toast.ok   { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.dl-simple-toast.warn { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.dl-simple-toast.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
@keyframes toast-in {
    from { opacity: 0; transform: translateX(80px) scale(.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to   { opacity: 0; transform: translateX(80px) scale(.95); }
}

/* ========== 响应式适配 ========== */
@media (max-width: 700px) {
    .dl-report-panel {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .dl-report-stats { grid-template-columns: repeat(3, 1fr); }
    .dl-stat-card:nth-child(4),
    .dl-stat-card:nth-child(5) { display: none; }
    .dl-report-item { flex-wrap: wrap; gap: 4px 8px; }
    .dl-report-item-url { flex: 1 1 100%; order: 3; }
    .dl-report-item-time { order: 2; }
    .dl-report-item-retries,
    .dl-report-item-cached { font-size: 10px; }
}

@media (max-width: 600px) {
    .dl-fab {
        bottom: 20px;
        right: 16px;
        width: 46px;
        height: 46px;
        font-size: 20px;
    }
    .dl-fab.has-issues,
    .dl-fab.scanning { min-width: 46px; font-size: 12px; }
    .dl-report-stats { grid-template-columns: repeat(2, 1fr); }
    .dl-report-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .dl-report-header-actions { width: 100%; justify-content: flex-end; }
    .dl-report-filters { flex-wrap: wrap; }
}

/* ========== 打印样式 ========== */
@media print {
    .deadlink-toolbar, .deadlink-panel, .deadlink-panel-overlay,
    .dl-fab, .dl-report-overlay, .dl-report-panel,
    .dl-simple-toast, .dl-report-filters, .dl-report-header-actions { display: none !important; }
    .nav-card.dead, .nav-card.dl-status-dead {
        opacity: 1; text-decoration: none; border: 1px solid #ccc;
        background: #fff; filter: none;
    }
}

/* ========== 页脚信息栏（版本/开发商） ========== */
.footer-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px 16px;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    flex-wrap: wrap;
    gap: 6px;
}
.footer-info-left,
.footer-info-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.footer-info-item {
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: color 0.3s ease;
}
.footer-info-sep {
    color: rgba(124, 205, 124, 0.4);
    user-select: none;
}
.footer-version {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(91, 168, 53, 0.1), rgba(74, 140, 42, 0.08));
    border: 1px solid rgba(91, 168, 53, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
    cursor: default;
    transition: all 0.3s ease;
}
.footer-version:hover {
    background: linear-gradient(135deg, rgba(91, 168, 53, 0.18), rgba(74, 140, 42, 0.14));
    border-color: rgba(91, 168, 53, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(91, 168, 53, 0.1);
}
.footer-tech {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.66rem;
    letter-spacing: 0.1px;
    color: var(--text-muted);
}

/* ========== 页脚法律信息栏（版权/备案） ========== */
.footer-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px 16px;
    font-size: 0.68rem;
    color: var(--text-tertiary);
    flex-wrap: wrap;
    gap: 6px;
    border-top: 1px solid rgba(124, 205, 124, 0.12);
    margin-top: 4px;
}
.footer-legal-item {
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    color: var(--text-tertiary);
}
.footer-legal-sep {
    color: rgba(124, 205, 124, 0.35);
    user-select: none;
    margin: 0 2px;
}
.footer-beian {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-tertiary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}
.footer-beian::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(91, 168, 53, 0.4), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.footer-beian:hover {
    color: var(--color-primary);
}
.footer-beian:hover::after {
    transform: scaleX(1);
}

/* 响应式 */
@media (max-width: 600px) {
    .footer-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px 16px 14px;
        gap: 4px;
    }
    .footer-info-left,
    .footer-info-right {
        justify-content: center;
    }
    .footer-info-sep {
        display: none;
    }
    .footer-version {
        padding: 2px 8px;
        font-size: 0.65rem;
    }
    .footer-legal {
        flex-direction: column;
        gap: 2px;
        padding: 8px 16px 12px;
    }
    .footer-legal-sep {
        display: none;
    }
}

/* 暗色模式 */
:root[data-theme="dark"] .footer-info {
    color: var(--text-muted);
}
:root[data-theme="dark"] .footer-version {
    background: linear-gradient(135deg, rgba(91, 168, 53, 0.15), rgba(74, 140, 42, 0.1));
    border-color: rgba(91, 168, 53, 0.3);
    color: var(--color-primary-dark);
}
:root[data-theme="dark"] .footer-version:hover {
    background: linear-gradient(135deg, rgba(91, 168, 53, 0.25), rgba(74, 140, 42, 0.18));
    border-color: rgba(91, 168, 53, 0.5);
    box-shadow: 0 2px 10px rgba(91, 168, 53, 0.15);
}
:root[data-theme="dark"] .footer-tech {
    color: var(--text-muted);
}
:root[data-theme="dark"] .footer-info-sep {
    color: rgba(91, 168, 53, 0.2);
}
:root[data-theme="dark"] .footer-legal {
    border-top-color: rgba(91, 168, 53, 0.08);
    color: var(--text-muted);
}
:root[data-theme="dark"] .footer-legal-item {
    color: var(--text-muted);
}
:root[data-theme="dark"] .footer-legal-sep {
    color: rgba(91, 168, 53, 0.15);
}
:root[data-theme="dark"] .footer-beian {
    color: var(--text-muted);
}
:root[data-theme="dark"] .footer-beian:hover {
    color: var(--color-primary-dark);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .footer-info {
        color: var(--text-muted);
    }
    :root:not([data-theme="light"]) .footer-version {
        background: linear-gradient(135deg, rgba(91, 168, 53, 0.15), rgba(74, 140, 42, 0.1));
        border-color: rgba(91, 168, 53, 0.3);
        color: var(--color-primary-dark);
    }
    :root:not([data-theme="light"]) .footer-version:hover {
        background: linear-gradient(135deg, rgba(91, 168, 53, 0.25), rgba(74, 140, 42, 0.18));
        border-color: rgba(91, 168, 53, 0.5);
        box-shadow: 0 2px 10px rgba(91, 168, 53, 0.15);
    }
    :root:not([data-theme="light"]) .footer-tech {
        color: var(--text-muted);
    }
    :root:not([data-theme="light"]) .footer-info-sep {
        color: rgba(91, 168, 53, 0.2);
    }
    :root:not([data-theme="light"]) .footer-legal {
        border-top-color: rgba(91, 168, 53, 0.08);
        color: var(--text-muted);
    }
    :root:not([data-theme="light"]) .footer-legal-item {
        color: var(--text-muted);
    }
    :root:not([data-theme="light"]) .footer-legal-sep {
        color: rgba(91, 168, 53, 0.15);
    }
    :root:not([data-theme="light"]) .footer-beian {
        color: var(--text-muted);
    }
    :root:not([data-theme="light"]) .footer-beian:hover {
        color: var(--color-primary-dark);
    }
}

/* ========== 快捷方式弹窗 ========== */
.shortcut-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

.shortcut-modal-overlay.closing {
    animation: fadeOut 0.25s ease forwards;
}

.shortcut-modal {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    width: 90%;
    max-width: 420px;
    border: 1px solid var(--card-border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shortcut-modal-overlay.closing .shortcut-modal {
    animation: slideDown 0.25s ease forwards;
}

.shortcut-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 0.5px;
}

.shortcut-modal-field {
    margin-bottom: 16px;
}

.shortcut-modal-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.shortcut-modal-field label .required {
    color: #e53e3e;
}

.shortcut-modal-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--search-border);
    border-radius: var(--radius-sm);
    background: var(--search-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--duration-base) ease, box-shadow var(--duration-base) ease;
}

.shortcut-modal-field input:focus {
    border-color: var(--search-focus-border);
    box-shadow: 0 0 0 3px rgba(91, 168, 53, 0.12);
}

.shortcut-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.shortcut-modal-cancel,
.shortcut-modal-save {
    flex: 1;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--duration-base) ease;
    font-family: inherit;
}

.shortcut-modal-cancel {
    background: rgba(128, 128, 128, 0.12);
    color: var(--text-secondary);
}

.shortcut-modal-cancel:hover {
    background: rgba(128, 128, 128, 0.2);
}

.shortcut-modal-save {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
}

.shortcut-modal-save:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), #3d7520);
    box-shadow: 0 4px 14px rgba(74, 140, 42, 0.3);
}

.shortcut-modal-cancel:active,
.shortcut-modal-save:active {
    transform: scale(0.97);
}

/* 自定义快捷方式删除按钮 */
.shortcut-remove-btn {
    position: absolute;
    top: 3px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(229, 62, 62, 0.15);
    color: #e53e3e;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 5;
}

.nav-card:hover .shortcut-remove-btn {
    opacity: 1;
}

.shortcut-remove-btn:hover {
    background: rgba(229, 62, 62, 0.9);
    color: #fff;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideDown {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(20px) scale(0.95); }
}

/* 页脚操作链接响应式 */
@media (max-width: 600px) {
    .footer-actions {
        gap: 2px;
        padding: 6px 8px 14px;
    }
    .footer-action-link {
        padding: 5px 10px;
        font-size: 0.72rem;
        gap: 3px;
    }
    .shortcut-modal {
        padding: 20px 20px;
        border-radius: 18px;
    }
    .shortcut-modal-title {
        font-size: 1.05rem;
        margin-bottom: 14px;
    }
    .shortcut-modal-buttons {
        margin-top: 18px;
    }
}

/* 暗色模式下弹窗适配 */
:root[data-theme="dark"] .shortcut-modal {
    background: rgba(25, 40, 18, 0.95);
    border-color: rgba(91, 168, 53, 0.2);
}
:root[data-theme="dark"] .shortcut-modal-field input {
    background: rgba(18, 30, 12, 0.8);
    border-color: rgba(91, 168, 53, 0.25);
}
:root[data-theme="dark"] .shortcut-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
}
:root[data-theme="dark"] .shortcut-modal-cancel {
    background: rgba(128, 128, 128, 0.15);
    color: #a8d5a2;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .shortcut-modal {
        background: rgba(25, 40, 18, 0.95);
        border-color: rgba(91, 168, 53, 0.2);
    }
    :root:not([data-theme="light"]) .shortcut-modal-field input {
        background: rgba(18, 30, 12, 0.8);
        border-color: rgba(91, 168, 53, 0.25);
    }
    :root:not([data-theme="light"]) .shortcut-modal-overlay {
        background: rgba(0, 0, 0, 0.6);
    }
    :root:not([data-theme="light"]) .shortcut-modal-cancel {
        background: rgba(128, 128, 128, 0.15);
        color: #a8d5a2;
    }
}

/* ========== 打印样式 ========== */
@media print {
    *,
    *::before,
    *::after {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .side-img,
    .header-decoration,
    .search-section,
    .footer,
    .nav-card::after,
    .stat-glow,
    .ripple { display: none !important; }

    .container { max-width: 100%; padding: 0; }
    .nav-card { border: 1px solid #ccc; break-inside: avoid; page-break-inside: avoid; }
    .nav-category { break-inside: avoid; page-break-inside: avoid; }
    .time { font-size: 2rem; }
    a { text-decoration: underline; }
    a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 0.7rem; color: #666; }
}

/* ========================================================================
 *   链接管理模块样式 v2.0
 *   管理面板、编辑表单、导入导出、链接列表
 * ======================================================================== */

/* ========== 管理面板覆盖层 ========== */
.le-manager-overlay,
.le-form-overlay,
.le-import-overlay {
    position: fixed;
    inset: 0;
    z-index: 99995;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: le-fade-in .2s ease;
}
@keyframes le-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ========== 管理面板主体 ========== */
.le-manager-panel {
    width: 720px;
    max-width: 95vw;
    max-height: 88vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: le-panel-in .3s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes le-panel-in {
    from { opacity: 0; transform: scale(.92) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* 面板头部 */
.le-manager-header {
    padding: 18px 22px 12px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.le-manager-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
}
.le-manager-summary {
    font-size: 12.5px;
    color: #6b7280;
    margin-bottom: 10px;
}
.le-manager-summary b { color: #374151; }
.le-manager-actions {
    display: flex;
    gap: 8px;
}

/* 按钮基础 */
.le-btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.le-btn:hover      { background: #f3f4f6; border-color: #9ca3af; }
.le-btn-primary    { background: #5ba835; color: #fff; border-color: #5ba835; }
.le-btn-primary:hover { background: #4a8c2a; border-color: #4a8c2a; }
.le-btn-add:hover  { background: #f0fdf4; color: #16a34a; border-color: #86efac; }
.le-btn-import:hover { background: #eff6ff; color: #2563eb; border-color: #93c5fd; }
.le-btn-export:hover { background: #fefce8; color: #a16207; border-color: #fde68a; }
.le-btn-close      { padding: 7px 10px; font-size: 15px; line-height: 1; }
.le-btn-close:hover { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
.le-btn-cancel:hover { background: #f9fafb; }

/* ========== 筛选器 ========== */
.le-manager-filter {
    display: flex;
    gap: 10px;
    padding: 12px 22px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}
.le-filter-select {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    color: #374151;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    min-width: 160px;
}
.le-filter-search {
    flex: 1;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    color: #374151;
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease;
}
.le-filter-search:focus { border-color: #5ba835; box-shadow: 0 0 0 3px rgba(91, 168, 53, .1); }

/* ========== 链接列表 ========== */
.le-manager-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 22px 16px;
}
.le-cat-group {
    margin-bottom: 14px;
}
.le-cat-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 6px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 6px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.le-cat-group-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.le-cat-group-count {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
}

/* 链接行 */
.le-link-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 3px;
    border: 1px solid transparent;
    transition: all .12s ease;
}
.le-link-row:hover { background: #f9fafb; border-color: #e5e7eb; }
.le-link-icon-preview {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f0f9ec;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
}
.le-link-info {
    flex: 1;
    min-width: 0;
}
.le-link-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.le-link-url {
    display: block;
    font-size: 11.5px;
    color: #9ca3af;
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 1px;
}

/* 徽章 */
.le-badge-builtin {
    flex-shrink: 0;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 500;
}
.le-badge-custom {
    flex-shrink: 0;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f0fdf4;
    color: #16a34a;
    font-weight: 500;
}

/* 链接行操作按钮 */
.le-link-actions {
    flex-shrink: 0;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity .15s ease;
}
.le-link-row:hover .le-link-actions { opacity: 1; }
.le-link-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: #9ca3af;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .12s ease;
}
.le-link-edit:hover { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.le-link-del:hover  { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

.le-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* ========== 编辑表单面板 ========== */
.le-form-panel {
    width: 480px;
    max-width: 94vw;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
    overflow: hidden;
    animation: le-panel-in .3s cubic-bezier(.34, 1.56, .64, 1);
}
.le-form-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
    transition: color .3s;
}
.le-form-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.le-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.le-form-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
}
.le-form-field label .required { color: #dc2626; margin-left: 1px; }
.le-form-field input,
.le-form-field select {
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    color: #1f2937;
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease;
}
.le-form-field input:focus,
.le-form-field select:focus {
    border-color: #5ba835;
    box-shadow: 0 0 0 3px rgba(91, 168, 53, .1);
}
.le-form-row {
    display: flex;
    gap: 12px;
}
.le-form-half { flex: 1; min-width: 0; }
.le-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid #f3f4f6;
}

/* ========== 导入面板 ========== */
.le-import-panel {
    width: 640px;
    max-width: 95vw;
    max-height: 88vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: le-panel-in .3s cubic-bezier(.34, 1.56, .64, 1);
}
.le-import-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
}
.le-import-tabs {
    display: flex;
    gap: 0;
    padding: 0 22px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.le-import-tab {
    padding: 10px 18px;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all .15s ease;
    font-family: inherit;
    margin-bottom: -1px;
}
.le-import-tab:hover   { color: #374151; }
.le-import-tab.active  { color: #5ba835; border-bottom-color: #5ba835; }
.le-import-content {
    padding: 16px 22px;
    flex-shrink: 0;
}
.le-hidden { display: none !important; }
.le-import-hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 10px;
    line-height: 1.6;
}
.le-import-textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 12px;
    font-size: 12.5px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #1f2937;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s ease;
}
.le-import-textarea:focus {
    border-color: #5ba835;
    box-shadow: 0 0 0 3px rgba(91, 168, 53, .1);
}

/* 文件拖放区域 */
.le-file-drop {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .15s ease;
}
.le-file-drop:hover,
.le-file-drop.le-dragover {
    border-color: #5ba835;
    background: #f7fdf4;
}
.le-file-drop-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.le-file-drop p { font-size: 13px; color: #6b7280; margin: 0; line-height: 1.6; }
.le-file-name {
    font-size: 13px;
    color: #5ba835;
    font-weight: 500;
}
.le-file-preview { padding: 10px 0 0; }

/* 预览区域 */
.le-import-preview {
    margin: 0 22px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    max-height: 220px;
    overflow-y: auto;
}
.le-import-preview-header {
    padding: 8px 14px;
    background: #f9fafb;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
}
.le-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.le-preview-table th {
    padding: 8px 12px;
    text-align: left;
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    border-bottom: 1px solid #e5e7eb;
}
.le-preview-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}
.le-url-cell {
    font-family: monospace;
    font-size: 11px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.le-import-error {
    padding: 20px;
    text-align: center;
    color: #dc2626;
    font-size: 13px;
}
.le-import-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid #f3f4f6;
    flex-shrink: 0;
}

/* ========== 导入格式选择器 ========== */
.le-import-format-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    flex-wrap: wrap;
}
.le-import-fmt-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}
.le-import-fmt-select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    min-width: 200px;
    transition: border-color .15s ease;
}
.le-import-fmt-select:focus {
    border-color: #5ba835;
    box-shadow: 0 0 0 3px rgba(91, 168, 53, .1);
}
.le-import-fmt-hint {
    font-size: 11px;
    color: #5ba835;
    font-weight: 500;
}

/* ========== 文件上传元信息 ========== */
.le-file-hint {
    font-size: 11px !important;
    color: #9ca3af !important;
    margin-top: 4px !important;
}
.le-file-meta {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

/* ========== 预览表格行状态标签 ========== */
.le-row-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    font-weight: 500;
}
.le-tag-ok {
    color: #059669;
    background: #d1fae5;
}
.le-tag-dupe {
    color: #d97706;
    background: #fef3c7;
}
.le-tag-warn {
    color: #dc2626;
    background: #fee2e2;
}
.le-row-dupe {
    background: #fffbeb;
}
.le-missing {
    color: #9ca3af;
    font-style: italic;
}
.le-preview-dupes {
    color: #d97706;
    font-weight: 600;
    margin-left: 8px;
    font-size: 12px;
}

/* ========== 导出面板 v2.0 ========== */
.le-export-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    z-index: 99996;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: le-fade-in .2s ease;
}
.le-export-panel {
    width: 520px;
    max-width: 95vw;
    max-height: 85vh;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    overflow-y: auto;
    animation: le-panel-in .3s cubic-bezier(.34, 1.56, .64, 1);
}
.le-export-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    padding: 18px 22px 12px;
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
}
.le-export-summary {
    padding: 10px 22px;
    font-size: 13px;
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
}
.le-export-summary b {
    color: #5ba835;
}
.le-export-formats {
    padding: 14px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.le-export-format {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all .15s ease;
    position: relative;
}
.le-export-format:hover {
    border-color: #a3d4a3;
    background: #f7fdf4;
}
.le-export-format:has(input:checked) {
    border-color: #5ba835;
    background: #f0fdf0;
    box-shadow: 0 0 0 3px rgba(91, 168, 53, .08);
}
.le-export-format input[type="radio"] {
    accent-color: #5ba835;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.le-fmt-icon {
    font-size: 24px;
    width: 36px;
    flex-shrink: 0;
    text-align: center;
}
.le-fmt-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.le-fmt-info b {
    font-size: 14px;
    color: #111827;
}
.le-fmt-info small {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}
.le-export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid #f3f4f6;
}
.le-btn-copy {
    gap: 4px;
}

/* ========== 响应式适配扩展 ========== */
@media (max-width: 700px) {
    .le-import-panel,
    .le-export-panel {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .le-export-format {
        padding: 10px 12px;
        gap: 8px;
    }
    .le-fmt-icon { font-size: 20px; width: 28px; }
    .le-fmt-info b { font-size: 13px; }
    .le-fmt-info small { font-size: 11px; }
    .le-import-format-row { flex-direction: column; align-items: stretch; }
    .le-import-fmt-select { width: 100%; }
}

/* ========== 响应式适配 ========== */
@media (max-width: 700px) {
    .le-manager-panel {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .le-manager-header { padding: 14px 16px 10px; }
    .le-manager-filter { padding: 10px 16px; flex-direction: column; gap: 8px; }
    .le-manager-list { padding: 10px 16px; }
    .le-link-row { flex-wrap: wrap; gap: 6px 8px; padding: 8px 10px; }
    .le-link-info { flex: 1 1 100%; order: 1; }
    .le-link-actions { opacity: 1; }
    .le-badge-custom, .le-badge-builtin { font-size: 9px; padding: 1px 6px; }

    .le-form-panel,
    .le-import-panel {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .le-form-row { flex-direction: column; }
    .le-import-tabs { padding: 0 16px; }
    .le-import-content { padding: 12px 16px; }
    .le-import-preview { margin: 0 16px 12px; }
    .le-preview-table th:nth-child(3),
    .le-preview-table td:nth-child(3) { display: none; }
}

@media (max-width: 600px) {
    .le-manager-actions { flex-wrap: wrap; }
    .le-manager-actions .le-btn { font-size: 12px; padding: 6px 10px; }
}

/* 暗色模式 */
:root[data-theme="dark"] .le-manager-panel,
:root[data-theme="dark"] .le-form-panel,
:root[data-theme="dark"] .le-import-panel {
    background: #1a2414;
    color: #d1d5c8;
}
:root[data-theme="dark"] .le-manager-header,
:root[data-theme="dark"] .le-form-title,
:root[data-theme="dark"] .le-import-title { border-color: rgba(91, 168, 53, .15); }
:root[data-theme="dark"] .le-manager-title,
:root[data-theme="dark"] .le-form-title,
:root[data-theme="dark"] .le-import-title { color: #e5e8d8; }
:root[data-theme="dark"] .le-cat-group-header { background: #1a2414; border-color: rgba(91, 168, 53, .1); }
:root[data-theme="dark"] .le-link-row:hover { background: rgba(91, 168, 53, .06); border-color: rgba(91, 168, 53, .12); }
:root[data-theme="dark"] .le-link-name { color: #e5e8d8; }
:root[data-theme="dark"] .le-filter-select,
:root[data-theme="dark"] .le-filter-search,
:root[data-theme="dark"] .le-form-field input,
:root[data-theme="dark"] .le-form-field select,
:root[data-theme="dark"] .le-import-textarea {
    background: rgba(0, 0, 0, .2);
    border-color: rgba(91, 168, 53, .15);
    color: #d1d5c8;
}
:root[data-theme="dark"] .le-filter-select:focus,
:root[data-theme="dark"] .le-filter-search:focus,
:root[data-theme="dark"] .le-form-field input:focus,
:root[data-theme="dark"] .le-form-field select:focus,
:root[data-theme="dark"] .le-import-textarea:focus { border-color: #5ba835; }
:root[data-theme="dark"] .le-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); color: #a8c998; }
:root[data-theme="dark"] .le-btn:hover { background: rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .le-preview-table th { background: rgba(0, 0, 0, .15); color: #88997a; }
:root[data-theme="dark"] .le-preview-table td { color: #c8d6b8; border-color: rgba(91, 168, 53, .08); }
:root[data-theme="dark"] .le-import-preview-header { background: rgba(0, 0, 0, .1); }
:root[data-theme="dark"] .le-manager-summary { color: #88997a; }
:root[data-theme="dark"] .le-manager-summary b { color: #a8c998; }
:root[data-theme="dark"] .le-file-drop { border-color: rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .le-file-drop:hover,
:root[data-theme="dark"] .le-file-drop.le-dragover { background: rgba(91, 168, 53, .06); border-color: #5ba835; }
/* 暗色模式下拉菜单选项可见性修复 */
:root[data-theme="dark"] .le-filter-select option,
:root[data-theme="dark"] .le-form-field select option,
:root[data-theme="dark"] .le-import-fmt-select option { background: #1a2414; color: #d1d5c8; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .le-manager-panel,
    :root:not([data-theme="light"]) .le-form-panel,
    :root:not([data-theme="light"]) .le-import-panel {
        background: #1a2414;
    }
    :root:not([data-theme="light"]) .le-manager-header,
    :root:not([data-theme="light"]) .le-form-title,
    :root:not([data-theme="light"]) .le-import-title { border-color: rgba(91, 168, 53, .15); }
    :root:not([data-theme="light"]) .le-manager-title,
    :root:not([data-theme="light"]) .le-form-title,
    :root:not([data-theme="light"]) .le-import-title { color: #e5e8d8; }
    :root:not([data-theme="light"]) .le-cat-group-header { background: #1a2414; }
    :root:not([data-theme="light"]) .le-link-row:hover { background: rgba(91, 168, 53, .06); }
    :root:not([data-theme="light"]) .le-link-name { color: #e5e8d8; }
    :root:not([data-theme="light"]) .le-filter-select,
    :root:not([data-theme="light"]) .le-filter-search,
    :root:not([data-theme="light"]) .le-form-field input,
    :root:not([data-theme="light"]) .le-form-field select,
    :root:not([data-theme="light"]) .le-import-textarea {
        background: rgba(0, 0, 0, .2); border-color: rgba(91, 168, 53, .15); color: #d1d5c8;
    }
    :root:not([data-theme="light"]) .le-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); color: #a8c998; }
    :root:not([data-theme="light"]) .le-btn:hover { background: rgba(255, 255, 255, .1); }
    :root:not([data-theme="light"]) .le-preview-table th { background: rgba(0, 0, 0, .15); color: #88997a; }
    :root:not([data-theme="light"]) .le-preview-table td { color: #c8d6b8; }
    :root:not([data-theme="light"]) .le-file-drop { border-color: rgba(255, 255, 255, .1); }
    :root:not([data-theme="light"]) .le-file-drop:hover,
    :root:not([data-theme="light"]) .le-file-drop.le-dragover { background: rgba(91, 168, 53, .06); border-color: #5ba835; }
    :root:not([data-theme="light"]) .le-import-fmt-label { color: #a8c998; }
    :root:not([data-theme="light"]) .le-import-fmt-select {
        background: rgba(0, 0, 0, .2); border-color: rgba(91, 168, 53, .15); color: #d1d5c8;
    }
    /* 暗色模式下拉菜单选项可见性修复 */
    :root:not([data-theme="light"]) .le-filter-select option,
    :root:not([data-theme="light"]) .le-form-field select option,
    :root:not([data-theme="light"]) .le-import-fmt-select option { background: #1a2414; color: #d1d5c8; }
    :root:not([data-theme="light"]) .le-import-fmt-hint { color: #5ba835; }
    :root:not([data-theme="light"]) .le-file-meta { color: #88997a; }
    :root:not([data-theme="light"]) .le-row-tag.le-tag-ok { background: rgba(5, 150, 105, .15); color: #34d399; }
    :root:not([data-theme="light"]) .le-row-tag.le-tag-dupe { background: rgba(217, 119, 6, .15); color: #fbbf24; }
    :root:not([data-theme="light"]) .le-row-tag.le-tag-warn { background: rgba(220, 38, 38, .15); color: #f87171; }
    :root:not([data-theme="light"]) .le-row-dupe { background: rgba(255, 251, 235, .06); }
}

/* 暗色主题：导出面板 */
:root[data-theme="dark"] .le-export-overlay {
    background: rgba(0, 0, 0, .6);
}
:root[data-theme="dark"] .le-export-panel {
    background: #1a2414;
    color: #d1d5c8;
}
:root[data-theme="dark"] .le-export-title {
    color: #e5e8d8;
    border-color: rgba(91, 168, 53, .15);
}
:root[data-theme="dark"] .le-export-summary {
    color: #88997a;
    border-color: rgba(91, 168, 53, .08);
}
:root[data-theme="dark"] .le-export-summary b { color: #5ba835; }
:root[data-theme="dark"] .le-export-format {
    border-color: rgba(255, 255, 255, .08);
}
:root[data-theme="dark"] .le-export-format:hover {
    border-color: #5ba835;
    background: rgba(91, 168, 53, .06);
}
:root[data-theme="dark"] .le-export-format:has(input:checked) {
    border-color: #5ba835;
    background: rgba(91, 168, 53, .1);
}
:root[data-theme="dark"] .le-fmt-info b {
    color: #d1d5c8;
}
:root[data-theme="dark"] .le-fmt-info small {
    color: #88997a;
}
:root[data-theme="dark"] .le-export-actions {
    border-color: rgba(91, 168, 53, .08);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .le-export-panel {
        background: #1a2414;
        color: #d1d5c8;
    }
    :root:not([data-theme="light"]) .le-export-title {
        color: #e5e8d8;
        border-color: rgba(91, 168, 53, .15);
    }
    :root:not([data-theme="light"]) .le-export-summary {
        color: #88997a;
        border-color: rgba(91, 168, 53, .08);
    }
    :root:not([data-theme="light"]) .le-export-summary b { color: #5ba835; }
    :root:not([data-theme="light"]) .le-export-format {
        border-color: rgba(255, 255, 255, .08);
    }
    :root:not([data-theme="light"]) .le-export-format:hover {
        border-color: #5ba835;
        background: rgba(91, 168, 53, .06);
    }
    :root:not([data-theme="light"]) .le-export-format:has(input:checked) {
        border-color: #5ba835;
        background: rgba(91, 168, 53, .1);
    }
    :root:not([data-theme="light"]) .le-fmt-info b { color: #d1d5c8; }
    :root:not([data-theme="light"]) .le-fmt-info small { color: #88997a; }
    :root:not([data-theme="light"]) .le-export-actions { border-color: rgba(91, 168, 53, .08); }
    :root:not([data-theme="light"]) .le-import-fmt-label { color: #a8c998; }
    :root:not([data-theme="light"]) .le-import-fmt-select {
        background: rgba(0, 0, 0, .2); border-color: rgba(91, 168, 53, .15); color: #d1d5c8;
    }
    :root:not([data-theme="light"]) .le-row-tag.le-tag-ok { background: rgba(5, 150, 105, .15); color: #34d399; }
    :root:not([data-theme="light"]) .le-row-tag.le-tag-dupe { background: rgba(217, 119, 6, .15); color: #fbbf24; }
    :root:not([data-theme="light"]) .le-row-tag.le-tag-warn { background: rgba(220, 38, 38, .15); color: #f87171; }
    :root:not([data-theme="light"]) .le-row-dupe { background: rgba(255, 251, 235, .06); }
}

@media print {
    .le-manager-overlay, .le-form-overlay, .le-import-overlay, .le-export-overlay,
    .le-manager-panel, .le-form-panel, .le-import-panel, .le-export-panel { display: none !important; }
}
