/* ==========================================================================
   1. 核心变量系统 (Design System Tokens)
   ========================================================================== */
:root {
    /* 字体栈 - 优先使用现代系统字体 */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* 色彩系统 - 亮色模式 */
    --bg-base: #f0f2f5;             /* 页面底色 */
    --bg-glass: rgba(255, 255, 255, 0.7); /* 毛玻璃背景 */
    --bg-card: rgba(255, 255, 255, 0.6);  /* 卡片背景 */
    --bg-sidebar: rgba(255, 255, 255, 0.85);

    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #a1a1a6;

    /* 品牌色 - 渐变风格 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-solid: #667eea;
    --accent-color: #5b6cf9;

    /* 功能色 */
    --danger: #ff4757;
    --warning: #ffa502;
    --success: #2ed573;
    --proxy-on-color: #2ed573; /* 绿色表示连通 */

    /* 边框与分割线 */
    --border-light: rgba(0, 0, 0, 0.06);
    --border-glass: rgba(255, 255, 255, 0.4);

    /* 阴影系统 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.15); /* 发光效果 */

    /* 布局参数 */
    --sidebar-width: 260px;
    --header-height: 60px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
}

/* 暗色模式变量重写 */
html[data-theme='dark'] {
    --bg-base: #0f172a;             /* 深蓝灰背景 */
    --bg-glass: rgba(30, 41, 59, 0.7);
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-sidebar: rgba(15, 23, 42, 0.85);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;

    --border-light: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.1);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(118, 75, 162, 0.3);
}

/* ==========================================================================
   2. 全局重置与基础样式 (Reset & Base)
   ========================================================================== */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* SVG 图标通用样式 */
.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: middle;
    display: inline-block;
}

/* 背景装饰层 */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background:
            radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 40%),
            radial-gradient(circle at 90% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 40%);
    background-color: var(--bg-base);
}

/* ==========================================================================
   3. 布局架构 (Layout)
   ========================================================================== */
.container {
    display: flex;
    min-height: 100vh;
}

/* 3.1 悬浮侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - 40px);
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3.2 主内容区 */
.main-content {
    margin-left: calc(var(--sidebar-width) + 40px);
    width: calc(100% - var(--sidebar-width) - 40px);
    padding-top: 20px;
    padding-bottom: 40px;
    padding-right: 20px;
    transition: all 0.3s ease;
}

.main-content-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* 移动端控件 - 默认隐藏 */
.mobile-header, .sidebar-overlay {
    display: none;
}

/* ==========================================================================
   4. 侧边栏样式细节 (Sidebar Details)
   ========================================================================== */
.sidebar-header {
    padding: 24px 24px 10px;
    flex-shrink: 0;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 10px 16px;
    scrollbar-width: none;
}
.sidebar-scroll-area::-webkit-scrollbar { display: none; }

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-list a:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
}

.category-list a.active {
    background: var(--bg-card);
    color: var(--primary-solid);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
html[data-theme='dark'] .category-list a:hover { background: rgba(255,255,255,0.05); }
html[data-theme='dark'] .category-list a.active { background: rgba(255,255,255,0.1); }

/* 侧边栏底部功能区 */
.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    background: rgba(0,0,0,0.01);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.control-label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* 自定义下拉选择器 */
.custom-select {
    position: relative;
    outline: none;
    margin-bottom: 15px;
}
.custom-select-trigger {
    background: var(--bg-base);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}
.custom-select-trigger:hover { border-color: var(--text-tertiary); }
.custom-select.open .custom-select-options {
    display: block;
    animation: fadeIn 0.2s ease;
}
.custom-select-options {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 6px;
    display: none;
    z-index: 200;
    backdrop-filter: blur(20px);
}
.custom-select-option {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
}
.custom-select-option:hover { background: var(--border-light); }
.custom-select-option.selected { color: var(--primary-solid); font-weight: 600; }

/* 按钮组 */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}
.icon-btn-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.icon-btn-text .icon {
    width: 16px;
    height: 16px;
    margin-bottom: 4px;
}
.icon-btn-text:hover { background: var(--bg-base); color: var(--text-primary); border-color: var(--text-tertiary); }
.icon-btn-text.danger:hover { color: var(--danger); border-color: var(--danger); background: rgba(255, 71, 87, 0.05); }

/* GitHub 连接按钮 (新) */
.btn-github-connect {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    gap: 8px;
}
.btn-github-connect:hover {
    background: var(--bg-base);
    border-color: var(--text-tertiary);
}
.btn-github-connect.active {
    background: rgba(46, 213, 115, 0.1);
    border-color: var(--success);
    color: var(--success);
}

/* 状态指示灯 (新) */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-tertiary);
    transition: background-color 0.3s;
    margin-left: auto; /* 推到最右 */
}
.status-idle { background-color: var(--success); }
.status-pending { background-color: var(--warning); }
.status-syncing {
    background-color: var(--primary-solid);
    animation: pulse 1s infinite;
}
.status-success { background-color: var(--success); box-shadow: 0 0 8px var(--success); }
.status-error { background-color: var(--danger); }
.status-disconnected { background-color: var(--text-tertiary); opacity: 0.5; }

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

/* 底部工具栏 */
.footer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.social-links { flex: 1; display: flex; }
.social-links a {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: color 0.2s;
}
.social-links a .icon { width: 20px; height: 20px; }
.social-links a:hover { color: var(--primary-solid); }

/* 通用开关 Toggle */
.theme-toggle-wrapper { position: relative; cursor: pointer; }
.theme-switch-input { display: none; }
.theme-switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 44px;
    height: 24px;
    background: var(--border-light);
    border-radius: 20px;
    padding: 2px 4px;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
}
.theme-switch-label::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 2;
}
.theme-switch-input:checked + .theme-switch-label { background: var(--bg-base); }
.theme-switch-input:checked + .theme-switch-label::after { transform: translateX(20px); }

/* 代理开关特定样式 */
.proxy-label .globe-icon, .proxy-label .shield-icon {
    width: 12px; height: 12px; color: var(--text-tertiary); z-index: 1;
}
.theme-switch-input:checked + .proxy-label {
    background-color: rgba(46, 213, 115, 0.15);
}
.theme-switch-input:checked + .proxy-label .globe-icon {
    color: var(--proxy-on-color);
}

.sun-icon, .moon-icon { width: 12px; height: 12px; color: var(--text-tertiary); z-index: 1; }
.copyright { font-size: 11px; color: var(--text-tertiary); text-align: center; opacity: 0.6; }

/* ==========================================================================
   5. Hero 区域 & 搜索 (Hero & Search)
   ========================================================================== */
.hero-section {
    padding: 60px 20px 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.search-container {
    width: 100%;
    max-width: 680px;
    position: relative;
    z-index: 50;
}

.search-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.category-btn {
    padding: 6px 16px;
    font-size: 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    margin-bottom: 4px;
}
.category-btn:hover { color: var(--text-primary); background: var(--bg-card); }
.category-btn.active {
    background: var(--text-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
html[data-theme='dark'] .category-btn.active { background: var(--primary-solid); }

.search-box { position: relative; width: 100%; }
.search-input-group {
    display: flex;
    align-items: center;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}
.search-input-group:focus-within {
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.search-icon { width: 20px; height: 20px; color: var(--text-tertiary); margin-right: 12px; }
#search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--text-primary);
    outline: none;
    height: 48px;
}

.search-btn-submit {
    width: 48px; height: 48px; border-radius: 50%; border: none;
    background: var(--primary-gradient); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
}
.search-btn-submit .icon { width: 20px; height: 20px; }
.search-btn-submit:hover { transform: scale(1.05); }

.engine-selector {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}
.engine-checkbox { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.engine-checkbox input { accent-color: var(--primary-solid); }

.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 20px;
    right: 20px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    z-index: 100;
    display: none;
    border: 1px solid var(--border-light);
}
.suggestion-item {
    padding: 10px 20px;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s;
}
.suggestion-item:hover { background: var(--bg-base); }

/* ==========================================================================
   6. 内容卡片 (Cards & Content)
   ========================================================================== */
.category-section { margin-bottom: 50px; scroll-margin-top: 20px; contain-intrinsic-size: 1px 600px; }
.category-title-container {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; padding-left: 8px; border-left: 4px solid var(--primary-solid);
}
.category-title {
    font-size: 20px; font-weight: 700; margin: 0; padding-left: 10px; letter-spacing: -0.5px;
}
.title-actions { display: flex; align-items: center; }

.action-btn {
    display: inline-flex; align-items: center; padding: 6px 14px;
    font-size: 13px; background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: 8px; color: var(--text-secondary); cursor: pointer; margin-left: 8px;
    transition: all 0.2s;
}
.action-btn .icon { margin-right: 4px; width: 14px; height: 14px; }
.action-btn:hover { color: var(--primary-solid); border-color: var(--primary-solid); background: #fff; }
.action-btn.active { background: var(--primary-solid); color: #fff; border-color: transparent; }

.card-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    padding: 18px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; flex-direction: column; height: 100%;
    box-shadow: var(--shadow-sm);
    user-select: none;
}
html[data-theme='dark'] .card { border-color: rgba(255,255,255,0.05); }
html:not([data-proxy-mode="true"]) .card[data-proxy="true"] { display: none !important; }

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md), 0 0 0 2px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.8);
}
html[data-theme='dark'] .card:hover { background: rgba(30, 41, 59, 0.9); box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.1); }

.card-header { display: flex; align-items: center; margin-bottom: 12px; }
.card-icon-wrapper {
    width: 42px; height: 42px; border-radius: 10px; background: var(--bg-base);
    display: flex; align-items: center; justify-content: center; margin-right: 14px; flex-shrink: 0;
}
.card-icon { width: 24px; height: 24px; object-fit: contain; }
.card-title {
    font-size: 15px; font-weight: 600; margin: 0; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.card-desc {
    font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 38px;
}
.proxy-dot {
    position: absolute; top: 12px; right: 12px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--warning); box-shadow: 0 0 5px var(--warning);
}

.custom-source-section .card.dragging { opacity: 0.4; transform: scale(0.95); }
.placeholder {
    background: rgba(102, 126, 234, 0.1);
    border: 2px dashed var(--primary-solid);
    border-radius: var(--radius-md);
}

.card-overlay-edit {
    position: absolute; inset: 0; background: rgba(255,255,255,0.6);
    backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md); opacity: 0; transition: opacity 0.2s, background-color 0.2s;
    color: var(--text-primary);
}
.card-overlay-edit .icon { display: none; width: 32px; height: 32px; }
.content-wrapper.is-editing .custom-source-section .card:hover .card-overlay-edit { opacity: 1; cursor: grab; }
.content-wrapper.is-editing .card-overlay-edit .icon-drag { display: block; }
.content-wrapper.is-deleting .custom-source-section .card:hover .card-overlay-edit { opacity: 1; cursor: pointer; background: rgba(255, 71, 87, 0.8); }
.content-wrapper.is-deleting .card-overlay-edit .icon-delete { display: block; color: white; }

/* ==========================================================================
   7. 模态框 (Modals)
   ========================================================================== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    opacity: 1; transition: opacity 0.3s;
}
.modal-overlay.modal-hidden { opacity: 0; pointer-events: none; }

.modal-glass {
    background: var(--bg-sidebar); backdrop-filter: blur(30px);
    border: 1px solid var(--border-glass); padding: 30px;
    border-radius: var(--radius-xl); width: 90%; max-width: 500px;
    box-shadow: var(--shadow-lg); transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-hidden .modal-glass { transform: scale(0.9); }

.modal-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.modal-header h3 { margin: 0; font-size: 20px; }
.close-modal-btn {
    background: transparent; border: none; color: var(--text-secondary);
    cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center;
}
.close-modal-btn .icon { width: 24px; height: 24px; }

.form-item { margin-bottom: 16px; }
.form-item label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.form-row { display: flex; gap: 15px; }
.form-row .form-item { flex: 1; }

input[type="text"], input[type="url"], input[type="password"], textarea {
    width: 100%; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--border-light); background: var(--bg-base);
    color: var(--text-primary); font-size: 15px; outline: none; transition: border-color 0.2s;
}
input:focus, textarea:focus { border-color: var(--primary-solid); }

.input-with-icon { position: relative; }
.input-with-icon .icon {
    position: absolute; left: 12px; top: 12px; width: 18px; height: 18px; color: var(--text-tertiary);
}
.input-with-icon input { padding-left: 38px; }

.checkbox-item { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.checkbox-item input { width: 16px; height: 16px; accent-color: var(--primary-solid); }

.btn-primary-glass {
    width: 100%; padding: 12px; background: var(--primary-gradient);
    border: none; border-radius: 12px; color: white;
    font-weight: 600; font-size: 16px; cursor: pointer;
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3); transition: transform 0.2s;
    display: flex; justify-content: center; align-items: center; gap: 8px;
}
.btn-primary-glass:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(118, 75, 162, 0.4); }

.btn-ghost {
    background: transparent; border: 1px solid var(--border-light);
    color: var(--text-secondary); padding: 10px 20px; border-radius: 10px; cursor: pointer;
}
.btn-ghost:hover { background: var(--border-light); color: var(--text-primary); }

.modal-footer { display: flex; gap: 10px; margin-top: 24px; }
.center-footer { justify-content: center; }

.import-mode-options { margin-bottom: 20px; }
.import-mode-options > label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.radio-option { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.radio-option input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary-solid); cursor: pointer; }
.radio-option label { margin-bottom: 0; color: var(--text-primary); cursor: pointer; font-size: 14px; }
#import-name-input:disabled { background-color: var(--bg-base); opacity: 0.5; cursor: not-allowed; }

/* GitHub User Card (新) */
.user-card {
    display: flex; align-items: center; padding: 15px;
    background: var(--bg-base); border-radius: var(--radius-md); border: 1px solid var(--border-light);
}
.user-avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 12px; }
.user-card h4 { margin: 0 0 4px 0; font-size: 16px; }
.text-xs { font-size: 12px; }
.mb-3 { margin-bottom: 12px; }

/* ==========================================================================
   8. 底部致谢 (Footer)
   ========================================================================== */
.footer-section { margin-top: 60px; text-align: center; }
.divider {
    display: flex; align-items: center; color: var(--text-tertiary);
    font-size: 12px; margin-bottom: 20px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }
.divider span { padding: 0 10px; }

.acknowledgements-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.mini-card {
    font-size: 12px; color: var(--text-secondary); padding: 6px 12px;
    background: var(--bg-card); border-radius: 20px; text-decoration: none;
    border: 1px solid transparent; transition: all 0.2s;
}
.mini-card:hover { border-color: var(--primary-solid); color: var(--primary-solid); background: #fff; }

/* ==========================================================================
   9. 响应式适配 (Responsive)
   ========================================================================== */
@media (max-width: 768px) {
    .mobile-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 0 20px; height: 60px; position: fixed; top: 0; left: 0; right: 0;
        background: var(--bg-glass); backdrop-filter: blur(20px);
        z-index: 90; border-bottom: 1px solid var(--border-light);
    }
    .icon-btn {
        background: none; border: none; color: var(--text-primary);
        padding: 0; display: flex; align-items: center; justify-content: center;
    }
    .icon-btn .icon { width: 24px; height: 24px; }
    .mobile-logo { font-weight: 800; font-size: 18px; }
    .mobile-placeholder { width: 24px; }

    .sidebar {
        top: 0; left: 0; height: 100vh; border-radius: 0;
        transform: translateX(-100%); border-right: none; width: 280px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 200;
    }
    .sidebar.open { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,0.2); }

    .sidebar-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
        z-index: 150; opacity: 0; pointer-events: none; transition: opacity 0.3s;
    }
    .sidebar-overlay.visible { display: block; opacity: 1; pointer-events: auto; }

    .main-content { margin-left: 0; width: 100%; padding: 80px 16px 40px; }
    .hero-section { padding: 20px 0 40px; }
    .search-input-group { padding: 4px 4px 4px 16px; }
    #search-input { height: 44px; font-size: 16px; }
}