/* ===== 全局样式 ===== */
:root {
    --primary: #4e54c8;
    --primary-light: #8f94fb;
    --dark-bg: #0f0f23;
    --card-bg: #ffffff;
    --card-border: #e9ecef;
    --text-main: #212529;
    --text-muted: #6c757d;
    --body-bg: #f4f6fb;
    --radius: 14px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 32px rgba(78,84,200,0.18);
    --nav-bg: linear-gradient(135deg, #1a1a3e 0%, #2d2d7c 60%, #4e54c8 100%);
    --footer-bg: linear-gradient(135deg, #1a1a3e, #2d2d7c);
    --cat-nav-bg: #ffffff;
    --cat-nav-border: var(--card-border);
    --input-bg: #ffffff;
    --table-head-bg: #f8f9fa;
    --admin-main-bg: #f4f6fb;
    --admin-topbar-bg: #ffffff;
    --admin-card-bg: #ffffff;
    --progress-color: #8f94fb;
}

/* ===== 暗黑模式 ===== */
[data-theme="dark"] {
    --card-bg: #1e1e3a;
    --card-border: #2a2a55;
    --text-main: #e2e4f0;
    --text-muted: #8a8ab8;
    --body-bg: #0f0f23;
    --shadow: 0 2px 12px rgba(0,0,0,0.4);
    --shadow-hover: 0 8px 32px rgba(78,84,200,0.4);
    --cat-nav-bg: #13132d;
    --cat-nav-border: #2a2a55;
    --input-bg: #1e1e3a;
    --table-head-bg: #1a1a38;
    --admin-main-bg: #0d0d22;
    --admin-topbar-bg: #13132d;
    --admin-card-bg: #1a1a38;
    --progress-color: #a78bfa;
}
[data-theme="dark"] body { background: var(--body-bg); color: var(--text-main); }
[data-theme="dark"] .tool-card { background: var(--card-bg); border-color: var(--card-border); }
[data-theme="dark"] .tool-card:hover { border-color: rgba(143,148,251,0.4); }
[data-theme="dark"] .tool-name { color: var(--text-main); }
[data-theme="dark"] .tool-desc { color: var(--text-muted); }
[data-theme="dark"] .tool-card-footer { border-color: var(--card-border); }
[data-theme="dark"] .cat-nav { background: var(--cat-nav-bg); border-color: var(--cat-nav-border); }
[data-theme="dark"] .cat-pill { background: #1a1a38; color: var(--text-muted); }
[data-theme="dark"] .cat-pill:hover { background: #252550; }
[data-theme="dark"] .section-title { color: var(--text-main); }
[data-theme="dark"] .section-divider { border-color: #2a2a55; }
[data-theme="dark"] .tool-detail-card { background: var(--card-bg); border-color: var(--card-border); }
[data-theme="dark"] .tool-detail-header { background: linear-gradient(135deg, #1a1a3e, #161635); border-color: var(--card-border); }
[data-theme="dark"] .tool-detail-name { color: var(--text-main); }
[data-theme="dark"] .tool-detail-desc { color: #c0c4e0; }
[data-theme="dark"] .tool-detail-body h5 { color: var(--text-main); }
[data-theme="dark"] .sidebar-card { background: var(--card-bg); border-color: var(--card-border); }
[data-theme="dark"] .sidebar-title { color: var(--text-main); border-color: var(--card-border); }
[data-theme="dark"] .breadcrumb { background: var(--card-bg); }
[data-theme="dark"] .pagination .page-link { background: var(--card-bg); border-color: var(--card-border); color: var(--primary-light); }
[data-theme="dark"] .pagination .page-item.disabled .page-link { background: #1a1a38; color: var(--text-muted); }
[data-theme="dark"] .info-list li { border-color: #2a2a55; }
[data-theme="dark"] .related-tool-item:hover { background: #252550; }
[data-theme="dark"] .filter-pill { background: #1a1a38; color: var(--text-muted); }
[data-theme="dark"] .filter-pill:hover { background: #252550; color: var(--primary-light); }
[data-theme="dark"] .search-bar-lg .form-control,
[data-theme="dark"] .search-bar-lg .input-group-text { background: var(--input-bg); border-color: var(--card-border); color: var(--text-main); }
[data-theme="dark"] .tag-link { background: #252550; color: var(--primary-light); }
[data-theme="dark"] .tag-link:hover { background: var(--primary); color: white; }

body {
    background: var(--body-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-main);
    transition: background 0.3s, color 0.3s;
}

/* ===== 导航栏 ===== */
#mainNav {
    background: linear-gradient(135deg, #1a1a3e 0%, #2d2d7c 60%, #4e54c8 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    padding: 12px 0;
}

#mainNav .navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

#mainNav .nav-link {
    font-size: 0.88rem;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}
#mainNav .nav-link:hover, #mainNav .nav-link.active {
    background: rgba(255,255,255,0.15);
}

.search-input::placeholder { color: rgba(255,255,255,0.6); }
.search-input:focus { background: rgba(255,255,255,0.2) !important; color: white; box-shadow: none; }

/* ===== Hero 区域 ===== */
.hero-section {
    background: linear-gradient(135deg, #1a1a3e 0%, #2d2d7c 50%, #4e54c8 100%);
    color: white;
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(143,148,251,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(78,84,200,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.gradient-text {
    background: linear-gradient(90deg, #a78bfa, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0;
}

.hero-search-box {
    max-width: 600px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.hero-search-box .input-group-text {
    border-radius: 50px 0 0 50px;
    padding: 0 16px;
}
.hero-search-box .form-control {
    font-size: 1rem;
}
.hero-search-box .btn {
    border-radius: 0 50px 50px 0;
    font-weight: 600;
    min-width: 90px;
}

/* 热门标签 */
.badge-tag {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.85);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    margin: 3px;
    text-decoration: none;
    transition: all 0.2s;
}
.badge-tag:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}

/* ===== 分类导航 ===== */
.cat-nav {
    background: white;
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 62px;
    z-index: 100;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted);
    background: #f0f2f5;
    border: 1.5px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.cat-pill:hover {
    color: var(--cat-color, var(--primary));
    background: color-mix(in srgb, var(--cat-color, var(--primary)) 10%, white);
    border-color: color-mix(in srgb, var(--cat-color, var(--primary)) 30%, white);
}
.cat-pill.active {
    color: white;
    background: var(--cat-color, var(--primary));
    border-color: var(--cat-color, var(--primary));
    box-shadow: 0 2px 8px color-mix(in srgb, var(--cat-color, var(--primary)) 40%, transparent);
}

/* ===== Section ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}
.section-divider {
    border-color: #e9ecef;
    margin: 2rem 0;
}

/* ===== 工具卡片 ===== */
/* 同行卡片等高 */
.cat-section .row,
.content-area > .row {
    align-items: stretch;
}
.cat-section .row [class*="col-"],
.content-area > .row [class*="col-"] {
    display: flex;
    flex-direction: column;
}
.tool-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1.5px solid var(--card-border);
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
    /* overflow 由新布局覆盖为 visible */
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(78,84,200,0.25);
}
.tool-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    /* height 由新布局覆盖为 auto */
}
.tool-card-inner {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 140px;
    /* height 由新布局覆盖为 auto */
}
.tool-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}
.tool-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.tool-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.tool-icon-fallback {
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.tool-badges {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-end;
}
.badge-hot {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 50px;
    font-weight: 600;
}
.badge-free {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 50px;
    font-weight: 600;
}
.badge-paid {
    background: #74b9ff;
    color: white;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 50px;
    font-weight: 600;
}
.tool-card-body { flex: 1; }
.tool-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main);
}
.tool-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tool-card-footer {
    /* 旧定义保留基础属性，新布局覆盖完整样式 */
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tool-cat {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 50px;
    font-weight: 500;
}
.tool-visit {
    color: var(--primary);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.tool-card:hover .tool-visit { opacity: 1; }

/* ===== 工具详情页 ===== */
.tool-detail-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.tool-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 28px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #fafbff, #f0f2ff);
}
.tool-detail-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.tool-detail-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
}
.tool-detail-icon-text {
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tool-detail-name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.tool-cat-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}
.tool-detail-body {
    padding: 24px 28px;
}
.tool-detail-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}
.tool-detail-actions {
    padding: 0 28px 24px;
}
.tag-link {
    display: inline-block;
    background: #f0f2ff;
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.82rem;
    text-decoration: none;
    margin: 2px;
    transition: all 0.2s;
}
.tag-link:hover {
    background: var(--primary);
    color: white;
}

/* ===== 侧边栏 ===== */
.sidebar-card {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    padding: 20px;
}
.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}
.info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f8f8f8;
    font-size: 0.88rem;
    overflow: hidden;
}
.info-list li:last-child { border-bottom: none; }
.info-list li i { font-size: 1rem; flex-shrink: 0; }
.info-list li a { color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.related-tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    margin-bottom: 4px;
}
.related-tool-item:hover { background: #f8f8ff; color: inherit; }
.related-tool-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}
.related-tool-icon img { width: 28px; height: 28px; object-fit: contain; }
.related-tool-name { font-size: 0.88rem; font-weight: 600; }
.related-tool-desc { font-size: 0.75rem; color: var(--text-muted); }

/* ===== 搜索页 ===== */
.search-bar-lg {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.search-bar-lg .input-group-text {
    border: 1px solid #dee2e6;
    border-right: none;
}
.search-bar-lg .form-control {
    border: 1px solid #dee2e6;
    border-left: none;
}
.filter-pill {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--text-muted);
    background: #f0f2f5;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.filter-pill:hover { background: #e8ebff; color: var(--primary); }
.filter-pill.active { background: var(--primary); color: white; }

/* ===== 页脚 ===== */
.site-footer {
    background: linear-gradient(135deg, #1a1a3e, #2d2d7c);
    color: rgba(255,255,255,0.75);
}
.site-footer p { margin: 0; }
.site-footer strong { color: white; }
.site-footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
.site-footer a:hover { color: rgba(255,255,255,0.95); }
/* 覆盖 Bootstrap text-muted 在深色背景下静不可见的问题 */
.site-footer .text-muted { color: rgba(255,255,255,0.55) !important; }

/* ===== 面包屑 ===== */
.breadcrumb {
    background: white;
    border-radius: 8px;
    padding: 10px 16px;
    box-shadow: var(--shadow);
    font-size: 0.88rem;
}
.breadcrumb-item a { color: var(--primary); text-decoration: none; }

/* ===== 分页 ===== */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: var(--primary);
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== 管理后台 ===== */
.admin-sidebar {
    background: linear-gradient(180deg, #1a1a3e 0%, #2d2d7c 100%);
    min-height: 100vh;
    width: 240px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s;
}
.admin-sidebar .sidebar-logo {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar .sidebar-logo a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}
.admin-nav {
    padding: 12px 0;
}
.admin-nav .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 10px 20px;
    border-radius: 0;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-nav .nav-link:hover, .admin-nav .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.12);
    border-left: 3px solid #8f94fb;
    padding-left: 17px;
}
.admin-nav .nav-link i { font-size: 1rem; width: 18px; }

.admin-main {
    margin-left: 240px;
    min-height: 100vh;
    background: #f4f6fb;
}
.admin-topbar {
    background: white;
    padding: 12px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-content {
    padding: 24px;
}

/* 统计卡片 */
.stat-card {
    background: white;
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2px;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 管理表格 */
.admin-table-card {
    background: white;
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.admin-table-card .card-header {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 1rem;
}

/* 登录页 */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a3e 0%, #2d2d7c 50%, #4e54c8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 12px;
}

/* ===== 响应式 ===== */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.show {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
    .admin-topbar .sidebar-toggle {
        display: inline-flex !important;
    }
}

@media (max-width: 768px) {
    .hero-section { padding: 40px 0 35px; }
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .hero-search-box { max-width: 100%; }
    .tool-detail-header { flex-direction: column; }
    .tool-detail-icon-wrap { width: 64px; height: 64px; }
    .tool-detail-name { font-size: 1.4rem; }
    .tool-detail-body, .tool-detail-header, .tool-detail-actions { padding: 16px; }
    .admin-content { padding: 16px; }
    .cat-nav { top: 58px; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 1.5rem; }
    .tool-card-inner { min-height: 140px; padding: 12px; }
    .tool-icon-wrap { width: 40px; height: 40px; }
    .tool-name { font-size: 0.88rem; }
    .section-title { font-size: 1rem; }
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.tool-card {
    animation: fadeInUp 0.4s ease both;
}
.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(n+5) { animation-delay: 0.25s; }

/* ===== 覆盖遮罩 ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* ===== 顶部加载进度条 ===== */
#page-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--progress-color), #60a5fa);
    z-index: 9999;
    transition: width 0.2s ease;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px var(--primary-light);
}

/* ===== 回到顶部按钮 ===== */
#back-to-top {
    position: fixed;
    bottom: 32px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 16px rgba(78,84,200,0.4);
    z-index: 1050;
}
#back-to-top.show { opacity: 1; transform: translateY(0); }
#back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(78,84,200,0.5); }

/* ===== 暗黑切换按钮 ===== */
.dark-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    font-size: 1rem;
    flex-shrink: 0;
}
.dark-toggle:hover { background: rgba(255,255,255,0.2); transform: rotate(15deg); }

/* ===== 卡片光晕 hover 效果 ===== */
.tool-card {
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 60%;
    height: 200%;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
    transform: skewX(-15deg);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 1;
}
.tool-card:hover::before { left: 120%; }
.tool-card-link, .tool-card-inner { position: relative; z-index: 2; }

/* 精选卡片发光边框 */
.tool-card.is-featured {
    border-color: rgba(255,183,0,0.35);
    box-shadow: 0 0 0 1px rgba(255,183,0,0.15), var(--shadow);
}
.tool-card.is-featured:hover {
    border-color: rgba(255,183,0,0.55);
    box-shadow: 0 0 0 2px rgba(255,183,0,0.2), var(--shadow-hover);
}

/* 分类数量徽标 */
.cat-pill .cat-count {
    font-size: 0.65rem;
    background: rgba(0,0,0,0.12);
    color: inherit;
    padding: 1px 5px;
    border-radius: 50px;
    margin-left: 4px;
    font-weight: 600;
}
.cat-pill.active .cat-count { background: rgba(255,255,255,0.25); }

/* ===== Hero 浮动粒子 ===== */
.hero-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.12;
    animation: heroFloat 8s ease-in-out infinite;
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    33% { transform: translateY(-20px) scale(1.05); }
    66% { transform: translateY(10px) scale(0.95); }
}

/* 渐变文字动画 */
.gradient-text {
    background: linear-gradient(90deg, #a78bfa, #60a5fa, #34d399, #a78bfa);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s linear infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* ===== 卡片骨架屏 ===== */
.skeleton-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1.5px solid var(--card-border);
    padding: 16px;
    min-height: 160px;
}
.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e8ebf4 25%, #d0d5e8 50%, #e8ebf4 75%);
    background-size: 400% 100%;
    animation: skeleton-wave 1.5s ease-in-out infinite;
    margin-bottom: 8px;
}
@keyframes skeleton-wave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
[data-theme="dark"] .skeleton-line { background: linear-gradient(90deg, #1e1e3a 25%, #252550 50%, #1e1e3a 75%); background-size: 400% 100%; }

/* ===== 搜索框聚焦发光 ===== */
.hero-search-box:focus-within {
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 3px rgba(143,148,251,0.4) !important;
}
.hero-search-box .form-control:focus { background: white !important; color: #212529 !important; }

/* ===== 工具卡片视图数 ===== */
.tool-views {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ===== 工具详情页 - 操作按钮组 ===== */
.tool-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.btn-visit {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(78,84,200,0.3);
    transition: all 0.25s;
}
.btn-visit:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(78,84,200,0.4);
}
.btn-copy {
    transition: all 0.25s;
}
.btn-copy.copied {
    background: #00b894;
    border-color: #00b894;
    color: white;
}

/* ===== Toast 通知 ===== */
.app-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(30,30,58,0.95);
    color: #e2e4f0;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.88rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    pointer-events: none;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 管理后台增强 ===== */
/* 统计卡片数字计数动效 */
.stat-num { font-variant-numeric: tabular-nums; }

/* 侧边栏改进 */
.admin-sidebar .sidebar-logo {
    padding: 18px 20px 14px;
    background: rgba(0,0,0,0.15);
}
.admin-nav .nav-link {
    position: relative;
    margin: 2px 8px;
    border-radius: 8px;
    padding: 9px 12px;
}
.admin-nav .nav-link:hover,
.admin-nav .nav-link.active {
    background: rgba(255,255,255,0.12);
    border-left: none;
    padding-left: 12px;
}
.admin-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(143,148,251,0.25), rgba(143,148,251,0.05));
    color: white;
}
.admin-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 3px;
    background: #8f94fb;
    border-radius: 0 3px 3px 0;
}

/* 顶部栏增强 */
.admin-topbar {
    background: var(--admin-topbar-bg);
}
[data-theme="dark"] .admin-topbar { background: var(--admin-topbar-bg); border-color: var(--card-border); }
[data-theme="dark"] .admin-main { background: var(--admin-main-bg); }
[data-theme="dark"] .admin-table-card { background: var(--admin-card-bg); border-color: var(--card-border); }
[data-theme="dark"] .admin-table-card .card-header { background: var(--admin-card-bg); border-color: var(--card-border); color: var(--text-main); }
[data-theme="dark"] .stat-card { background: var(--admin-card-bg); border-color: var(--card-border); }
[data-theme="dark"] .stat-label { color: var(--text-muted); }
[data-theme="dark"] .table { color: var(--text-main); }
[data-theme="dark"] .table-light { --bs-table-bg: var(--table-head-bg); --bs-table-color: var(--text-main); }
[data-theme="dark"] .table-hover tbody tr:hover { --bs-table-hover-bg: rgba(143,148,251,0.06); }
[data-theme="dark"] .table > :not(caption) > * > * { border-color: var(--card-border); }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select { background: var(--input-bg); border-color: var(--card-border); color: var(--text-main); }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus { background: var(--input-bg); color: var(--text-main); border-color: var(--primary-light); }
[data-theme="dark"] .p-3.border-bottom.bg-light { background: #161630 !important; border-color: var(--card-border) !important; }
[data-theme="dark"] .list-group-item { background: var(--admin-card-bg); border-color: var(--card-border); color: var(--text-main); }
[data-theme="dark"] .badge.bg-light { background: #252550 !important; color: var(--text-main) !important; }
[data-theme="dark"] .btn-outline-primary { color: var(--primary-light); border-color: var(--primary-light); }
[data-theme="dark"] .btn-outline-secondary { color: var(--text-muted); border-color: var(--card-border); }
[data-theme="dark"] .login-card { background: #1e1e3a; }
[data-theme="dark"] .login-card .text-muted { color: var(--text-muted) !important; }
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .fw-bold,
[data-theme="dark"] .fw-semibold { color: var(--text-main); }
[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }
[data-theme="dark"] .border-bottom { border-color: var(--card-border) !important; }
[data-theme="dark"] .border-top { border-color: var(--card-border) !important; }
[data-theme="dark"] .nav-tabs .nav-link { color: var(--text-muted); }
[data-theme="dark"] .nav-tabs .nav-link.active { background: var(--admin-card-bg); border-color: var(--card-border); color: var(--primary-light); }
[data-theme="dark"] .nav-tabs { border-color: var(--card-border); }
[data-theme="dark"] .tab-content .card { background: var(--admin-card-bg); border-color: var(--card-border); }

/* 快捷搜索提示 */
.search-kbd {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    padding: 0 5px;
    font-size: 0.7rem;
    line-height: 1.6;
    font-family: monospace;
    color: rgba(255,255,255,0.7);
    vertical-align: middle;
    margin-left: 6px;
}

/* 卡片入场动画重置（由JS控制） */
.tool-card {
    animation: none;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.tool-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 统计卡片悬停效果 */
.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
[data-theme="dark"] .stat-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

/* 表格行悬停更平滑 */
.table-hover tbody tr { transition: background 0.15s; }

/* Alert 消息样式 */
.alert { border-radius: 10px; border: none; }
.alert-success { background: linear-gradient(135deg, #d4edda, #c3e6cb); }
.alert-warning { background: linear-gradient(135deg, #fff3cd, #ffeeba); }
.alert-danger { background: linear-gradient(135deg, #f8d7da, #f5c6cb); }

/* 分类统计进度条 */
.cat-stat-bar {
    height: 4px;
    border-radius: 2px;
    background: #e9ecef;
    overflow: hidden;
    margin-top: 4px;
}
.cat-stat-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
    width: 0;
}
[data-theme="dark"] .cat-stat-bar { background: #2a2a55; }

/* ================================================
   新版布局 (ai.179393.com 风格)
   Left Sidebar + Content Area + Category Sections
   ================================================ */

/* 导航简化版 */
#mainNav .navbar-nav { display: none !important; } /* 分类移到侧栏 */

/* 页面主布局容器 */
.page-layout {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - 180px);
}

/* ===== 左侧分类侧栏 ===== */
.cat-sidebar {
    width: 210px;
    min-width: 210px;
    flex-shrink: 0;
    position: sticky;
    top: 62px;
    height: calc(100vh - 62px);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--cat-nav-bg);
    border-right: 1px solid var(--card-border);
    z-index: 50;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    transition: background 0.3s;
}
.cat-sidebar::-webkit-scrollbar { width: 3px; }
.cat-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
[data-theme="dark"] .cat-sidebar::-webkit-scrollbar-thumb { background: #2a2a55; }

.cat-sidebar-header {
    padding: 16px 16px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 4px;
}

.cat-sidebar-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.865rem;
    white-space: nowrap;
    transition: all 0.15s;
    position: relative;
    border-left: 3px solid transparent;
}
.cat-sidebar-item:hover {
    background: rgba(78,84,200,0.06);
    color: var(--primary);
}
.cat-sidebar-item.active {
    background: rgba(78,84,200,0.08);
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--cat-color, var(--primary));
}
.cat-sidebar-item i {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    color: var(--cat-color, var(--text-muted));
    transition: color 0.15s;
}
.cat-sidebar-item:hover i,
.cat-sidebar-item.active i { color: var(--cat-color, var(--primary)); }
.cat-sidebar-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.cat-sidebar-item em {
    font-style: normal;
    font-size: 0.68rem;
    color: var(--text-muted);
    background: var(--body-bg);
    padding: 1px 6px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.cat-sidebar-item.active em {
    background: var(--cat-color, var(--primary));
    color: white;
}
[data-theme="dark"] .cat-sidebar { background: #13132d; border-color: var(--card-border); }
[data-theme="dark"] .cat-sidebar-header { border-color: var(--card-border); }
[data-theme="dark"] .cat-sidebar-item em { background: #1e1e3a; }
[data-theme="dark"] .cat-sidebar-item:hover { background: rgba(143,148,251,0.08); }
[data-theme="dark"] .cat-sidebar-item.active { background: rgba(143,148,251,0.12); color: var(--primary-light); }

/* ===== 右侧内容区 ===== */
.content-area {
    flex: 1;
    min-width: 0;
    padding: 20px 20px 32px;
}

/* ===== 迷你横幅 (替代大 Hero) ===== */
.mini-banner {
    background: linear-gradient(135deg, #1a1a3e 0%, #2d2d7c 45%, #4e54c8 100%);
    border-radius: 16px;
    padding: 22px 26px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    color: white;
}
.mini-banner::before {
    content: '';
    position: absolute;
    top: -60%; right: -8%;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(143,148,251,0.22) 0%, transparent 65%);
    pointer-events: none;
}
.mini-banner::after {
    content: '';
    position: absolute;
    bottom: -70%; left: -3%;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(96,165,250,0.14) 0%, transparent 70%);
    pointer-events: none;
}
.mini-banner-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.mini-banner-title h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 3px;
    color: white;
}
.mini-banner-title p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    margin: 0;
}
.mini-banner-search {
    flex: 1;
    min-width: 200px;
    max-width: 420px;
}
.mini-banner-search .input-group {
    border-radius: 50px;
    overflow: hidden;
    background: rgba(255,255,255,0.97);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.mini-banner-search .input-group-text {
    background: transparent;
    border: none;
    color: #aaa;
    padding-left: 14px;
}
.mini-banner-search .form-control {
    border: none;
    background: transparent;
    font-size: 0.88rem;
    padding: 10px 4px;
    color: #333;
}
.mini-banner-search .form-control:focus { box-shadow: none; background: transparent; }
.mini-banner-search .btn {
    border-radius: 0 50px 50px 0;
    padding: 0 18px;
    font-weight: 600;
}
.mini-banner-stats {
    display: flex;
    gap: 18px;
    flex-shrink: 0;
}
.mini-banner-stat strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
}
.mini-banner-stat span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
}

/* ===== 分类区块 ===== */
.cat-section {
    margin-bottom: 30px;
}
.cat-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--card-border);
}
.cat-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}
.cat-section-title i { font-size: 1.1rem; }
.cat-section-count {
    font-size: 0.68rem;
    padding: 1px 7px;
    border-radius: 20px;
    font-weight: 500;
}
.cat-section-more {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: color 0.2s, transform 0.2s;
    white-space: nowrap;
}
.cat-section-more:hover { color: var(--primary); transform: translateX(2px); }
[data-theme="dark"] .cat-section-header { border-color: var(--card-border); }
[data-theme="dark"] .cat-section-title { color: var(--text-main); }
[data-theme="dark"] .cat-section-more:hover { color: var(--primary-light); }

/* ===== 工具卡片重构 (footer 在 link 外) ===== */
.tool-card {
    display: flex;
    flex-direction: column;
    overflow: visible; /* 允许 footer 显示在 link 外部 */
    border-radius: var(--radius);
}
.tool-card-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: auto !important; /* 覆盖旧 height:100% 冲突 */
    overflow: hidden; /* 内容裁切保留在链接里 */
    border-radius: var(--radius) var(--radius) 0 0;
}
.tool-card-inner {
    flex: 1; /* 充满链接高度 */
    padding: 14px 14px 10px;
    display: flex;
    flex-direction: column;
    min-height: 120px;
    height: auto !important; /* 覆盖旧 height:100% 冲突 */
}
.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 10px;
    border-top: 1px solid var(--card-border);
    margin-top: 0;
    flex-shrink: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--card-bg);
}
/* 去使用按钮 */
.btn-use {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white !important;
    border: none;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(78,84,200,0.25);
}
.btn-use:hover {
    opacity: 0.9;
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(78,84,200,0.35);
}
[data-theme="dark"] .tool-card-footer { border-color: var(--card-border); }

/* ===== 响应式：侧栏变顶部水平滚动 ===== */
@media (max-width: 991px) {
    #mainNav .navbar-nav { display: flex !important; } /* 移动端恢复少量导航 */
    .page-layout { flex-direction: column; }
    .cat-sidebar {
        width: 100%;
        min-width: auto;
        height: auto;
        position: sticky;
        top: 62px;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        padding: 6px 8px;
        gap: 4px;
        scrollbar-width: none;
        z-index: 99;
    }
    .cat-sidebar::-webkit-scrollbar { display: none; }
    .cat-sidebar-header { display: none; }
    .cat-sidebar-item {
        flex-shrink: 0;
        padding: 5px 12px;
        border-radius: 50px;
        border-left: none;
        background: #f0f2f5;
        font-size: 0.8rem;
    }
    .cat-sidebar-item.active {
        background: var(--cat-color, var(--primary));
        color: white;
        border-left: none;
    }
    .cat-sidebar-item.active i { color: white; }
    .cat-sidebar-item em { display: none; }
    [data-theme="dark"] .cat-sidebar-item { background: #1a1a38; }
    [data-theme="dark"] .cat-sidebar-item.active { background: var(--cat-color, var(--primary)); color: white; }
    .content-area { padding: 14px 14px 24px; }
    .mini-banner { padding: 16px 18px; border-radius: 12px; }
}
@media (max-width: 767px) {
    .mini-banner-title { display: none !important; }
    .mini-banner-stats { display: none !important; }
    .mini-banner-search { max-width: 100%; min-width: auto; }
    .mini-banner-inner { gap: 0; }
    .cat-section-title { font-size: 0.9rem; }
}

/* ========================================
   首页最大宽度限制（不全屏）
======================================== */
.page-layout {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   AI 资讯首页卡片（home-news-card）
======================================== */
.home-news-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
    height: 100%;
}
.home-news-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(78,84,200,0.35);
    color: inherit;
}
.home-news-cover {
    width: 90px;
    min-width: 90px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef;
    flex-shrink: 0;
}
.home-news-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.home-news-cover-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8ecff, #f0f4ff);
    color: var(--primary);
    font-size: 1.6rem;
}
.home-news-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.home-news-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-news-summary {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.home-news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
}
[data-theme="dark"] .home-news-card { background: var(--card-bg); border-color: var(--card-border); }
[data-theme="dark"] .home-news-cover-icon { background: linear-gradient(135deg, #1a1a45, #252560); }

/* ========================================
   资讯页公共布局（news-page-wrap）
======================================== */
.news-page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}
.news-page-header {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--card-border);
}
.news-page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 8px 0 6px;
}

/* 资讯分栏布局 */
.news-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.news-main {
    flex: 1;
    min-width: 0;
}
.news-sidebar {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 72px;
}

/* 分类过滤 Pills */
.news-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.news-cat-pill {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 50px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}
.news-cat-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.news-cat-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* 分类标签（卡片内） */
.news-cat-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(78,84,200,0.1);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
}
.news-cat-tag:hover { background: var(--primary); color: white; }

/* 资讯列表卡片 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.news-card {
    display: flex;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.news-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(78,84,200,0.35);
    color: inherit;
}
.news-card-cover {
    width: 200px;
    min-width: 200px;
    height: 130px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e8ecff, #f0f4ff);
}
.news-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.news-card:hover .news-card-cover img { transform: scale(1.05); }
.news-card-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.4;
}
.news-card-body {
    flex: 1;
    min-width: 0;
    padding: 16px 16px 14px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.news-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.news-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-main);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card:hover .news-card-title { color: var(--primary); }
.news-card-summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.news-card-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* 资讯右侧边栏卡片 */
.news-sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 16px;
}
.news-sidebar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--card-border);
}
.news-sidebar-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--card-border);
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.2s;
}
.news-sidebar-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-sidebar-item:hover { color: var(--primary); }
.news-sidebar-item-title {
    font-size: 0.85rem;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   文章详情页样式
======================================== */
.article-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.article-cover {
    width: 100%;
    max-height: 380px;
    overflow: hidden;
}
.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-content-wrap {
    padding: 28px 32px 24px;
}
.article-title {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
    margin: 12px 0 16px;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 24px;
}
.article-body {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-main);
}
.article-body h1, .article-body h2, .article-body h3 {
    font-weight: 700;
    margin: 1.5em 0 0.7em;
    color: var(--text-main);
}
.article-body h2 { font-size: 1.3rem; }
.article-body h3 { font-size: 1.1rem; }
.article-body p { margin-bottom: 1.1em; }
.article-body ul, .article-body ol {
    padding-left: 1.5em;
    margin-bottom: 1.1em;
}
.article-body li { margin-bottom: 0.4em; }
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}
.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 10px 16px;
    margin: 16px 0;
    background: rgba(78,84,200,0.06);
    border-radius: 0 8px 8px 0;
    color: var(--text-muted);
    font-style: italic;
}
.article-body code {
    background: rgba(78,84,200,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    color: var(--primary);
}
.article-body pre {
    background: #1e1e3a;
    color: #e2e4f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}
.article-body pre code { background: none; color: inherit; padding: 0; }
.article-body a { color: var(--primary); }
.article-body a:hover { text-decoration: underline; }
.article-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 20px;
    margin-top: 24px;
    border-top: 1px solid var(--card-border);
}

/* 暗黑模式资讯局部 */
[data-theme="dark"] .news-card { background: var(--card-bg); border-color: var(--card-border); }
[data-theme="dark"] .news-card-cover-placeholder { background: linear-gradient(135deg, #1a1a3e, #252560); }
[data-theme="dark"] .news-card-body { background: transparent; }
[data-theme="dark"] .news-sidebar-card { background: var(--card-bg); border-color: var(--card-border); }
[data-theme="dark"] .news-cat-pill { background: var(--card-bg); border-color: var(--card-border); color: var(--text-muted); }
[data-theme="dark"] .news-cat-pill.active { background: var(--primary); border-color: var(--primary); color: white; }
[data-theme="dark"] .article-card { background: var(--card-bg); border-color: var(--card-border); }
[data-theme="dark"] .news-sidebar-item { border-color: var(--card-border); color: var(--text-main); }
[data-theme="dark"] .news-sidebar-item:hover { color: var(--primary-light); }

/* 资讯页响应式 */
@media (max-width: 991px) {
    .news-layout {
        flex-direction: column;
    }
    .news-sidebar {
        width: 100%;
        min-width: auto;
        position: static;
    }
    .news-card-cover {
        width: 140px;
        min-width: 140px;
        height: 100px;
    }
    .article-content-wrap { padding: 20px 18px 18px; }
    .article-title { font-size: 1.3rem; }
}
@media (max-width: 575px) {
    .news-page-wrap { padding: 14px 14px 32px; }
    .news-card { flex-direction: column; }
    .news-card-cover { width: 100%; min-width: auto; height: 160px; }
    .news-card-body { padding: 12px 14px 12px; }
    .home-news-cover { width: 76px; min-width: 76px; height: 60px; }
    .article-content-wrap { padding: 14px 14px 14px; }
    .article-title { font-size: 1.15rem; }
    .article-body { font-size: 0.95rem; }
}
