/* === 导航站前端样式 === */

:root {
    --bg: #f5f6f8;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --primary: #4a6cf7;
    --primary-hover: #3651d5;
    --border: #e2e8f0;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

[data-theme="dark"] {
    --bg: #0f1119;
    --bg-card: #1a1d2e;
    --bg-header: #151827;
    --text: #e8eaed;
    --text-secondary: #9aa0a6;
    --border: #2a2d3e;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.5);
}

/* 主题: 海蓝 */
[data-theme="ocean"] {
    --bg: #f0f7ff;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --text: #1a3650;
    --text-secondary: #5a7d9f;
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --border: #d4e4f7;
}

/* 主题: 日落 */
[data-theme="sunset"] {
    --bg: #fff8f5;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --text: #3d2e1e;
    --text-secondary: #7a6955;
    --primary: #f97316;
    --primary-hover: #ea580c;
    --border: #f0e0d0;
}

/* 主题: 薄荷 */
[data-theme="mint"] {
    --bg: #f5fdf8;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --text: #1a3d2a;
    --text-secondary: #5a7d65;
    --primary: #10b981;
    --primary-hover: #059669;
    --border: #d0f0dd;
}

/* 主题: 玫瑰 */
[data-theme="rose"] {
    --bg: #fef5f7;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --text: #3d1a25;
    --text-secondary: #8b5a6a;
    --primary: #f43f5e;
    --primary-hover: #e11d48;
    --border: #f5d0d8;
}

/* 主题: 琥珀 */
[data-theme="amber"] {
    --bg: #fffdf5;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --text: #3d301a;
    --text-secondary: #8b765a;
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --border: #f5e8c8;
}

/* 主题: 翠绿 */
[data-theme="green"] {
    --bg: #f5fdf5;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --text: #1a3d1a;
    --text-secondary: #5a7d5a;
    --primary: #22c55e;
    --primary-hover: #16a34a;
    --border: #d0f0d0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background var(--transition), color var(--transition);
    user-select: none;
    -webkit-user-select: none;
}

.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    opacity: var(--bg-opacity, 1);
}

[data-theme="dark"] body {
    background: var(--bg);
}

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

/* Header */
.site-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

body.glass-on .site-header {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    pointer-events: none;
}

.logo-img {
    height: 32px;
    width: auto;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background var(--transition);
}

.icon-btn:hover {
    background: var(--border);
}

.search-title {
    font-size: 36px;
    margin-bottom: 30px;
    color: var(--text);
}

/* Engine Tabs (保留兼容，不再使用) */
.search-engine-tabs {
    display: none;
}

.engine-tab {
    display: none;
}

/* Search Form */
.search-form-wrap {
    position: relative;
    max-width: 650px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    max-width: 650px;
    margin: 0 auto;
    gap: 0;
    position: relative;
    border: 2px solid var(--border);
    border-radius: 25px;
    background: var(--bg-card);
    transition: border-color var(--transition);
}

.search-form:focus-within {
    border-color: var(--primary);
}

/* 搜索引擎下拉菜单 */
.engine-dropdown {
    position: relative;
    flex-shrink: 0;
}

.engine-dropdown-btn {
    height: 50px;
    padding: 0 4px 0 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: none;
    border-radius: 23px 0 0 23px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    transition: background var(--transition);
    user-select: none;
}

.engine-dropdown-btn:hover {
    background: rgba(128, 128, 128, 0.08);
}

.engine-dropdown-icon {
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.engine-dropdown-icon .engine-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.engine-dropdown-label {
    display: none;
}

.engine-dropdown-arrow {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.engine-dropdown.open .engine-dropdown-arrow {
    transform: rotate(180deg);
}

.engine-dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    min-width: 150px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    overflow: hidden;
    padding: 4px;
    transform-origin: top left;
}

.engine-dropdown-menu.open {
    display: block;
    animation: engineMenuIn 0.18s ease;
}

@keyframes engineMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.engine-dropdown-item {
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    transition: background 0.1s;
}

.engine-dropdown-item .engine-icon-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.engine-dropdown-item:hover {
    background: var(--bg);
}

.engine-dropdown-item.active {
    background: var(--primary);
    color: #fff;
}

.engine-dropdown-item.active:hover {
    background: var(--primary-hover);
}

.search-input-wrap {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    height: 50px;
    padding: 0 40px 0 16px;
    font-size: 16px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    outline: none;
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
}

.search-input:not(:placeholder-shown)~.search-clear,
.search-input:not(:placeholder-shown)+.search-clear {
    display: block;
}

.search-btn {
    height: 50px;
    padding: 0 30px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: 0 23px 23px 0;
    cursor: pointer;
    transition: background var(--transition);
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--primary-hover);
}

/* Inline Results */
.search-inline-results {
    max-width: 650px;
    margin: 8px auto 0;
    text-align: left;
    display: none;
}

.search-inline-results.show {
    display: block;
}

.inline-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text);
}

.inline-result-item:hover {
    background: var(--border);
}

.inline-result-item .item-icon {
    font-size: 20px;
}

.inline-result-item .item-info {
    flex: 1;
}

.inline-result-item .item-name {
    font-weight: 500;
    font-size: 14px;
}

.inline-result-item .item-url {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.cat-filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
}

.cat-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cat-filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Category Sections */
.category-section {
    margin-bottom: 32px;
}

/* === 侧栏锚点模式（内联 CSS 在 index.php head 中动态输出）=== */

.cat-sidebar-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12.5px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-sidebar-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.cat-sidebar-btn.active {
    background: var(--primary);
    color: #fff;
}

/* 顶栏项目搜索 */
.header-proj-search {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    margin-right: 12px;
}

.header-proj-search.hidden {
    display: none;
}

.header-search-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.header-search-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.header-search-input {
    width: 0;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
    opacity: 0;
}

.header-proj-search.open .header-search-input {
    width: 220px;
    padding: 0 10px;
    border: 1px solid var(--primary);
    opacity: 1;
    margin-left: 8px;
}

/* 毛玻璃模式：顶栏搜索/按钮/面板 */
body.glass-on .header-search-btn,
body.glass-on .header-search-input,
body.glass-on .icon-btn,
body.glass-on .theme-panel {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.45);
}

/* 毛玻璃模式：侧边栏 */
body.glass-on .sidebar-nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
}

body.glass-on .icon-btn {
    border: 1px solid var(--border);
}

body.glass-on .theme-panel {
    border: 1px solid var(--border);
}

/* 搜索区 + 项目区 */
.search-section {
    padding: 60px 0 40px;
    text-align: center;
}

.nav-section {}

.search-suggestions {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    overflow: hidden;
}

.search-suggestions.show {
    display: block;
}

.suggest-item {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}

body.glass-on .search-suggestions,
body.glass-on .search-history,
body.glass-on .engine-dropdown-menu {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.suggest-item:hover {
    background: var(--bg);
}

.suggest-icon {
    color: var(--text-secondary);
    font-size: 12px;
}

/* 搜索历史下拉 */
.search-history {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 9998;
    overflow: hidden;
}

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

.history-item {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}

.history-item:hover {
    background: var(--bg);
}

.history-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.history-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-del {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    line-height: 1;
    padding: 0;
}

.history-del:hover {
    background: var(--bg);
    color: #e53e3e;
}

.history-clear {
    color: var(--primary);
    font-weight: 500;
    border-top: 1px solid var(--border);
}

/* 侧栏回到顶部 */
.cat-sidebar-top {
    font-weight: 600;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.project-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
}

.project-icon img,
.project-icon svg {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

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

.project-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.project-desc {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* 项目卡片悬停提示 */
.project-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 300px;
    padding: 10px 14px;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    line-height: 1.5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.project-tooltip.show {
    opacity: 1;
}

.project-tooltip .tt-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--primary);
}

.project-tooltip .tt-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* === 公告弹窗 === */
.notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
}

.notice-overlay.show {
    display: block;
}

.notice-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.notice-modal.show {
    display: flex;
}

.notice-modal-inner {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
}

.notice-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.notice-modal-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.notice-modal-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: background 0.15s;
}

.notice-modal-close:hover {
    background: var(--border);
}

.notice-modal-body {
    padding: 20px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.7;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-bottom: 0;
}

/* === 新版底部信息栏 === */
.footer-legal {
    background: #0d1a2b;
    color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem 1.5rem 1rem;
    font-size: 0.88rem;
    line-height: 1.6;
    margin-top: auto;
    width: 100%;
}

.footer-legal .footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem 2rem;
}

.footer-copyright {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
}

.footer-copyright .copy {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
}

.footer-copyright .copy strong {
    color: #fff;
    font-weight: 500;
}

.footer-icp {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.15rem 0.8rem 0.15rem 0.5rem;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.78rem;
    letter-spacing: 0.2px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.footer-icp:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.footer-icp .badge {
    background: rgba(59, 124, 255, 0.25);
    color: #b6d0ff;
    font-size: 0.58rem;
    font-weight: 600;
    padding: 0.08rem 0.45rem;
    border-radius: 40px;
    letter-spacing: 0.4px;
}

.footer-icp .badge-green {
    background: rgba(0, 200, 150, 0.15);
    color: #9de0d0;
}

.footer-icp .icp-number {
    font-family: 'Inter', ui-monospace, 'SF Mono', monospace;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.footer-extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
}

.footer-extra a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
    transition: color 0.2s, border-color 0.2s;
}

.footer-extra a:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

.footer-extra .sep {
    color: rgba(255, 255, 255, 0.15);
    user-select: none;
}

.footer-note {
    max-width: 1100px;
    margin: 0.6rem auto 0;
    padding: 0.6rem 0 0;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.3rem 1rem;
}

.footer-note span {
    opacity: 0.7;
}

.footer-note .highlight {
    color: rgba(255, 255, 255, 0.35);
}

.footer-html-extra {
    max-width: 1100px;
    margin: 0.3rem auto 0;
    padding: 0.3rem 0 0;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    text-align: center;
}

/* === 起始页模式 === */
body.startpage-mode .site-header {
    display: none;
}

body.startpage-mode .footer-legal {
    display: none;
}

body.startpage-mode .wrapper {
    justify-content: center;
}

body.startpage-mode .search-section {
    margin-top: 5vh;
    margin-bottom: 2vh;
}

/* 起始页顶栏精简版（搜索+主题） */
.startpage-strip {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9991;
    padding: 8px 16px;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

body.startpage-mode .startpage-strip {
    display: flex;
}

body.startpage-mode .startpage-strip .header-proj-search {
    margin-right: 0;
}

/* 锚点模式下隐藏顶部分类筛选栏 */
body.sidebar-mode .category-filters {
    display: none;
}

.startpage-footer {
    display: none;
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.startpage-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.startpage-footer a:hover {
    color: var(--primary);
}

body.startpage-mode .startpage-footer {
    display: block;
}

@media (max-width: 650px) {
    .footer-legal .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .footer-copyright {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .footer-extra {
        margin-top: 0.2rem;
    }

    .footer-note {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .search-title {
        font-size: 24px;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .search-btn {
        padding: 0 20px;
        font-size: 14px;
        height: 44px;
    }

    .search-input {
        height: 44px;
        font-size: 14px;
    }

    .engine-dropdown-btn {
        height: 44px;
        padding: 0 8px 0 12px;
        font-size: 12px;
    }

    .engine-dropdown-icon {
        font-size: 15px;
    }

    .engine-dropdown-arrow {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

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

    .project-icon {
        font-size: 24px;
        width: 28px;
    }

    .project-name {
        font-size: 12px;
    }

    .project-desc {
        display: none;
    }

    .search-input {
        height: 44px;
        font-size: 14px;
        padding: 0 32px 0 10px;
    }

    .search-btn {
        height: 44px;
        padding: 0 16px;
        font-size: 13px;
    }

    .engine-dropdown-btn {
        height: 44px;
        padding: 0 6px 0 10px;
    }

    .engine-dropdown-icon {
        font-size: 14px;
    }

    .engine-dropdown-arrow {
        display: none;
    }

    /* 移动端隐藏悬停详细信息提示 */
    .project-tooltip {
        display: none !important;
    }
}

/* === 背景图片 + 毛玻璃效果 === */
body.has-bg .site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] body.has-bg .site-header {
    background: rgba(30, 31, 53, 0.85);
}

/* ===== 毛玻璃模式 ===== */
body.glass-on .site-header {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.glass-on .icon-btn {
    border: 0;
    color: var(--text);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

body.glass-on .icon-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

body.glass-on .search-form {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.glass-on .engine-dropdown-btn {
    background: transparent;
}

body.glass-on .search-input {
    background: transparent;
}

body.glass-on .search-btn {
    background: rgba(74, 108, 247, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

body.glass-on .project-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
}

body.glass-on .project-card:hover {
    background: rgba(255, 255, 255, 0.52);
    border-color: rgba(255, 255, 255, 0.35);
}

/* 毛玻璃 - 分类筛选按钮 */
body.glass-on .cat-filter-btn {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(255, 255, 255, 0.2);
    color: inherit;
}

body.glass-on .cat-filter-btn:hover {
    background: rgba(255, 255, 255, 0.52);
    border-color: var(--primary);
}

body.glass-on .cat-filter-btn.active {
    background: rgba(74, 108, 247, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    border-color: transparent;
}

body.glass-on .category-title {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 8px;
    padding: 6px 14px;
    display: inline-block;
}

body.glass-on .search-title {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

/* 毛玻璃 - 底部信息 */
body.glass-on .footer-legal {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(0, 0, 0, 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

body.glass-on .footer-legal .copy,
body.glass-on .footer-legal .copy strong {
    color: rgba(0, 0, 0, 0.75);
}

body.glass-on .footer-legal .footer-icp {
    color: rgba(0, 0, 0, 0.65);
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

body.glass-on .footer-legal .footer-icp:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.85);
}

body.glass-on .footer-legal .badge {
    background: rgba(74, 108, 247, 0.18);
    color: #4a6cf7;
}

body.glass-on .footer-legal .badge-green {
    background: rgba(0, 200, 150, 0.15);
    color: #0d9488;
}

body.glass-on .footer-legal .icp-number {
    color: rgba(0, 0, 0, 0.55);
}

body.glass-on .footer-legal .footer-extra a {
    color: rgba(0, 0, 0, 0.6);
    border-bottom-color: rgba(0, 0, 0, 0.12);
}

body.glass-on .footer-legal .footer-extra a:hover {
    color: rgba(0, 0, 0, 0.85);
    border-bottom-color: rgba(0, 0, 0, 0.3);
}

body.glass-on .footer-legal .sep {
    color: rgba(0, 0, 0, 0.15);
}

body.glass-on .footer-legal .footer-note {
    color: rgba(0, 0, 0, 0.35);
    opacity: 1;
    border-top-color: rgba(0, 0, 0, 0.06);
}

body.glass-on .footer-legal .highlight {
    color: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

/* dark footer glass */
[data-theme="dark"] body.glass-on .footer-legal {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] body.glass-on .footer-legal .copy,
[data-theme="dark"] body.glass-on .footer-legal .copy strong {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] body.glass-on .footer-legal .footer-icp {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] body.glass-on .footer-legal .footer-icp:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] body.glass-on .footer-legal .icp-number {
    color: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] body.glass-on .footer-legal .footer-extra a {
    color: rgba(255, 255, 255, 0.6);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] body.glass-on .footer-legal .footer-extra a:hover {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] body.glass-on .footer-legal .sep {
    color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] body.glass-on .footer-legal .footer-note {
    color: rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] body.glass-on .footer-legal .highlight {
    color: rgba(255, 255, 255, 0.5);
}

/* ===== 毛玻璃 - 深色主题适配 ===== */
[data-theme="dark"] body.glass-on .site-header {
    background: rgba(30, 31, 53, 0.45);
}

[data-theme="dark"] body.glass-on .icon-btn {
    background: rgba(30, 31, 53, 0.35);
}

[data-theme="dark"] body.glass-on .icon-btn:hover {
    background: rgba(30, 31, 53, 0.55);
}

[data-theme="dark"] body.glass-on .search-form {
    background: rgba(30, 31, 53, 0.35);
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] body.glass-on .engine-dropdown-btn {
    background: transparent;
}

[data-theme="dark"] body.glass-on .engine-dropdown-menu {
    background: rgba(30, 31, 53, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] body.glass-on .sidebar-nav {
    background: rgba(30, 31, 53, 0.35);
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] body.glass-on .search-suggestions,
[data-theme="dark"] body.glass-on .search-history {
    background: rgba(30, 31, 53, 0.45);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] body.glass-on .project-card {
    background: rgba(30, 31, 53, 0.35);
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] body.glass-on .project-card:hover {
    background: rgba(30, 31, 53, 0.52);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] body.glass-on .cat-filter-btn {
    background: rgba(30, 31, 53, 0.35);
    border-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] body.glass-on .cat-filter-btn:hover {
    background: rgba(30, 31, 53, 0.55);
}

[data-theme="dark"] body.glass-on .cat-filter-btn.active {
    background: rgba(96, 165, 250, 0.55);
    border-color: transparent;
}

[data-theme="dark"] body.glass-on .category-title {
    background: rgba(30, 31, 53, 0.3);
}

[data-theme="dark"] body.glass-on .search-title {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ===== 毛玻璃 - 海蓝主题适配 ===== */
[data-theme="ocean"] body.glass-on .project-card {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(14, 165, 233, 0.12);
}

[data-theme="ocean"] body.glass-on .cat-filter-btn.active {
    background: rgba(14, 165, 233, 0.55);
}

[data-theme="ocean"] body.glass-on .search-btn {
    background: rgba(14, 165, 233, 0.6);
}

[data-theme="ocean"] body.glass-on .icon-btn {
    background: rgba(212, 228, 247, 0.35);
}

/* ===== 毛玻璃 - 日落主题适配 ===== */
[data-theme="sunset"] body.glass-on .project-card {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(249, 115, 22, 0.1);
}

[data-theme="sunset"] body.glass-on .cat-filter-btn.active {
    background: rgba(249, 115, 22, 0.55);
}

[data-theme="sunset"] body.glass-on .search-btn {
    background: rgba(249, 115, 22, 0.6);
}

[data-theme="sunset"] body.glass-on .icon-btn {
    background: rgba(245, 230, 216, 0.35);
}

/* ===== 毛玻璃 - 薄荷主题适配 ===== */
[data-theme="mint"] body.glass-on .project-card {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(16, 185, 129, 0.1);
}

[data-theme="mint"] body.glass-on .cat-filter-btn.active {
    background: rgba(16, 185, 129, 0.55);
}

[data-theme="mint"] body.glass-on .search-btn {
    background: rgba(16, 185, 129, 0.6);
}

[data-theme="mint"] body.glass-on .icon-btn {
    background: rgba(209, 250, 229, 0.35);
}

/* ===== 毛玻璃 - 玫瑰主题适配 ===== */
[data-theme="rose"] body.glass-on .project-card {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(244, 63, 94, 0.1);
}

[data-theme="rose"] body.glass-on .cat-filter-btn.active {
    background: rgba(244, 63, 94, 0.55);
}

[data-theme="rose"] body.glass-on .search-btn {
    background: rgba(244, 63, 94, 0.6);
}

[data-theme="rose"] body.glass-on .icon-btn {
    background: rgba(255, 228, 230, 0.35);
}

/* ===== 毛玻璃 - 琥珀主题适配 ===== */
[data-theme="amber"] body.glass-on .project-card {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(245, 158, 11, 0.1);
}

[data-theme="amber"] body.glass-on .cat-filter-btn.active {
    background: rgba(245, 158, 11, 0.55);
}

[data-theme="amber"] body.glass-on .search-btn {
    background: rgba(245, 158, 11, 0.6);
}

[data-theme="amber"] body.glass-on .icon-btn {
    background: rgba(254, 243, 199, 0.35);
}

/* ===== 毛玻璃 - 翠绿主题适配 ===== */
[data-theme="green"] body.glass-on .project-card {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(34, 197, 94, 0.1);
}

[data-theme="green"] body.glass-on .cat-filter-btn.active {
    background: rgba(34, 197, 94, 0.55);
}

[data-theme="green"] body.glass-on .search-btn {
    background: rgba(34, 197, 94, 0.6);
}

[data-theme="green"] body.glass-on .icon-btn {
    background: rgba(220, 252, 231, 0.35);
}