/* ============================================================
   工具文章详情页独有样式
   ============================================================ */

.tools-wrapper {
    display: flex;
    gap: 32px;
    padding-bottom: 48px;
}

.tools-main {
    flex: 1;
    min-width: 0;
}

.tools-sidebar {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 45px;
}

/* ===== 面包屑 ===== */
.breadcrumb-tools {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 12px 0 16px;
}
.breadcrumb-tools a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb-tools a:hover {
    color: var(--sun-red);
}
.breadcrumb-tools .sep {
    margin: 0 6px;
    color: #d0c8c0;
}
.breadcrumb-tools .current {
    color: #2c2b28;
    font-weight: 500;
}

/* ===== 卡片主体 ===== */
.card-panel {
    background: #fff;
    border-radius: 28px;
    padding: 32px 40px 40px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* ===== 文章头部 ===== */
.article-header {
    border-bottom: 2px solid #f0ebe6;
    padding-bottom: 20px;
    margin-bottom: 28px;
}
.article-badge {
    display: inline-block;
    background: #feeeee;
    color: #b31b1b;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 14px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    border: 1px solid #fad6d6;
}
.article-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    color: #1f1e1b;
    margin-bottom: 10px;
}
.article-title .sub {
    font-weight: 400;
    font-size: 1rem;
    color: #94a3b8;
    margin-left: 12px;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    font-size: 0.9rem;
    color: #6b5f53;
    margin-top: 6px;
}
.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.article-meta .icon {
    font-size: 1.1rem;
}
.article-difficulty {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.difficulty-label {
    font-size: 0.85rem;
    color: #6b5f53;
    font-weight: 500;
}
.difficulty-stars {
    color: #f5b342;
    font-size: 1rem;
    letter-spacing: 2px;
}
.difficulty-stars .empty {
    color: #ddd;
}
.time-estimate {
    background: #f0ebe6;
    padding: 2px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #5a4f44;
}

/* ===== 目录 ===== */
.toc-wrap {
    background: #faf8f5;
    border-radius: 12px;
    padding: 18px 24px 14px;
    margin-bottom: 32px;
    border-left: 4px solid #b31b1b;
}
.toc-wrap .toc-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #2c2b28;
    margin-bottom: 6px;
}
.toc-wrap .toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc-wrap .toc-list li {
    font-size: 0.9rem;
}
.toc-wrap .toc-list li a {
    color: #4a3f35;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s;
}
.toc-wrap .toc-list li a:hover {
    border-bottom-color: #b31b1b;
    color: #b31b1b;
}
.toc-wrap .toc-list li .num {
    color: #b31b1b;
    font-weight: 600;
    margin-right: 2px;
}

/* ===== 教程正文 ===== */
.tutorial-body {
    font-size: 1.05rem;
    color: #2c2b28;
}

.chapter-block {
    margin-top: 2.4rem;
    padding-top: 0.2rem;
    border-top: 1px solid #f0ebe6;
    scroll-margin-top: 80px;
}
.chapter-block:first-of-type {
    border-top: none;
    margin-top: 0;
}

.chapter-block h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #1f1e1b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chapter-block h2 .step-num {
    display: inline-block;
    background: #b31b1b;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}

.chapter-concept {
    background: #faf8f5;
    border-radius: 8px;
    padding: 10px 18px;
    margin: 0.2rem 0 0.8rem 0;
    border-left: 3px solid #b31b1b;
    font-weight: 500;
    color: #4a3f35;
}
.chapter-concept strong {
    color: #b31b1b;
}

.chapter-desc {
    font-size: 1rem;
    color: #4a3f35;
    margin-bottom: 0.8rem;
}

.chapter-content p {
    margin-bottom: 1rem;
}
.chapter-content ul,
.chapter-content ol {
    margin: 0.8rem 0 1.2rem 1.8rem;
}
.chapter-content li {
    margin-bottom: 0.4rem;
}

.chapter-content .tip-box {
    background: #faf8f5;
    border-radius: 12px;
    padding: 18px 22px;
    margin: 1.2rem 0 1.6rem;
    border-left: 4px solid #b31b1b;
}
.chapter-content .tip-box.warning {
    border-left-color: #e67e22;
    background: #fef9f0;
}
.chapter-content .tip-box.success {
    border-left-color: #27ae60;
    background: #f0faf4;
}
.chapter-content .tip-box .tip-label {
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 4px;
}

.chapter-content .step-card {
    background: #faf8f5;
    border-radius: 14px;
    padding: 20px 24px;
    margin: 1.4rem 0;
    border: 1px solid #ede8e2;
}
.chapter-content .step-card .step-head {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1f1e1b;
    margin-bottom: 6px;
}
.chapter-content .step-card .step-head .badge {
    background: #b31b1b;
    color: #fff;
    border-radius: 30px;
    padding: 0 14px;
    font-size: 0.75rem;
    line-height: 24px;
    font-weight: 600;
}

.chapter-content .tutorial-table-wrap {
    overflow-x: auto;
    margin: 1.2rem 0 1.6rem;
}
.chapter-content .tutorial-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ede8e2;
}
.chapter-content .tutorial-table th {
    background: #f0ebe6;
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    color: #2c2b28;
}
.chapter-content .tutorial-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0ebe6;
}
.chapter-content .tutorial-table tr:last-child td {
    border-bottom: none;
}

.chapter-content .term {
    background: #f0ebe6;
    padding: 1px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #2c2b28;
}

/* ===== 底部导航（上一篇 / 下一篇） ===== */
.article-footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 2px solid #f0ebe6;
    flex-wrap: wrap;
    gap: 12px;
}
.article-footer-nav .nav-link {
    display: flex;
    flex-direction: column;
    max-width: 40%;
    color: #4a3f35;
    padding: 6px 16px;
    border-radius: 12px;
    border: 1px solid #ede8e2;
    transition: all 0.2s;
    background: #faf8f5;
    text-decoration: none;
    min-width: 120px;
}
.article-footer-nav .nav-link:hover {
    border-color: #b31b1b;
    color: #b31b1b;
    background: #feeeee;
}
.article-footer-nav .nav-link.disabled {
    color: #ccc;
    border-color: #ede8e2;
    background: #faf8f5;
    cursor: default;
    pointer-events: none;
}
.article-footer-nav .nav-link.disabled:hover {
    border-color: #ede8e2;
    color: #ccc;
    background: #faf8f5;
}
.article-footer-nav .nav-link .nav-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}
.article-footer-nav .nav-link .nav-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.article-footer-nav .nav-link .nav-title .arrow {
    font-weight: 400;
    color: var(--text-muted);
}
.article-footer-nav .nav-center {
    color: #4a3f35;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid #ede8e2;
    transition: all 0.2s;
    background: #faf8f5;
    text-decoration: none;
    font-size: 0.85rem;
}
.article-footer-nav .nav-center:hover {
    border-color: #b31b1b;
    color: #b31b1b;
    background: #feeeee;
}
@media (max-width: 600px) {
    .article-footer-nav {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .article-footer-nav .nav-link {
        max-width: 100%;
        text-align: center;
    }
    .article-footer-nav .nav-link .nav-title {
        max-width: 100%;
    }
}

/* ===== 右侧固定编号导航 ===== */
.side-number-nav {
    position: fixed;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.85);
    padding: 10px 6px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.side-number-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    color: #7a6b5e;
    background: transparent;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}
.side-number-nav a:hover {
    background: #f0ebe6;
    color: #b31b1b;
    border-color: #ddd;
}
.side-number-nav a.active {
    background: #b31b1b;
    color: #fff;
    border-color: #b31b1b;
    box-shadow: 0 2px 8px rgba(179, 27, 27, 0.3);
    transform: scale(1.1);
}

@media (max-width: 820px) {
    .side-number-nav {
        display: none;
    }
}

/* ============================================================
   侧边栏列表样式
   ============================================================ */

.sidebar-card .card-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1f1e1b;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}
.sidebar-card .card-title .more {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 400;
    color: #94a3b8;
}
.sidebar-card .card-title .more a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.sidebar-card .card-title .more a:hover {
    color: #b31b1b;
}

/* 相关阅读列表 */
.related-read-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.related-read-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0ebe6;
}
.related-read-list li:last-child {
    border-bottom: none;
}
.related-read-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a3f35;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}
.related-read-list a:hover {
    color: #b31b1b;
}
.related-read-list a .icon {
    font-size: 1rem;
    flex-shrink: 0;
}
.related-read-list a .badge {
    margin-left: auto;
    background: #f0ebe6;
    font-size: 0.6rem;
    padding: 0 10px;
    border-radius: 30px;
    color: #6b5f53;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 相关文章列表 */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.article-list li {
    padding: 7px 0;
    border-bottom: 1px solid #f0ebe6;
}
.article-list li:last-child {
    border-bottom: none;
}
.article-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2c2b28;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}
.article-list a:hover {
    color: #b31b1b;
}
.article-list a .date {
    font-size: 0.7rem;
    color: #94a3b8;
    flex-shrink: 0;
    margin-left: 8px;
}

/* 相关讨论列表 */
.discuss-item {
    padding: 7px 0;
    border-bottom: 1px solid #f0ebe6;
}
.discuss-item:last-child {
    border-bottom: none;
}
.discuss-item .title {
    font-size: 0.9rem;
    color: #2c2b28;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    transition: color 0.2s;
}
.discuss-item .title:hover {
    color: #b31b1b;
}
.discuss-item .meta {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* 热门话题卡片网格 */
.hot-topic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.hot-topic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px 8px;
    background: #faf8f5;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.25s ease;
    min-height: 64px;
}
.hot-topic-card:hover {
    border-color: #b31b1b;
    background: #feeeee;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(179, 27, 27, 0.08);
}
.hot-topic-card .topic-icon {
    font-size: 1.4rem;
    line-height: 1.4;
}
.hot-topic-card .topic-name {
    font-size: 0.78rem;
    font-weight: 500;
    color: #2c2b28;
    margin-top: 2px;
    text-align: center;
}
.hot-topic-card .topic-count {
    font-size: 0.6rem;
    color: #94a3b8;
    margin-top: 1px;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag-cloud .tag-sm {
    display: inline-block;
    background: #faf8f5;
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    color: #4a3f35;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    line-height: 1.6;
    text-decoration: none;
}
.tag-cloud .tag-sm:hover {
    background: #feeeee;
    border-color: #b31b1b;
    color: #b31b1b;
}

/* 交流社区 */
.community-qr {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.community-qr .qr-text p {
    margin: 0;
    font-size: 0.9rem;
}
.community-qr .qr-text .text-muted {
    font-size: 0.75rem;
    color: #94a3b8;
}
.community-qr .qr-code {
    width: 72px;
    height: 72px;
    background: #f0ebe6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #94a3b8;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    overflow: hidden;
}
.community-qr .qr-code .qr-placeholder {
    text-align: center;
    line-height: 1.4;
}

.community-qq {
    margin-bottom: 12px;
}
.community-qq .qq-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.community-qq .qq-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.community-qq .qq-item {
    font-size: 0.78rem;
    color: #4a3f35;
}
.community-qq .qq-item strong {
    color: #b31b1b;
}

.community-disclaimer {
    background: #fef9f0;
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid #f0e0cc;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 6px;
}
.community-disclaimer .disclaimer-icon {
    font-size: 1.1rem;
    color: #e67e22;
    flex-shrink: 0;
}
.community-disclaimer .disclaimer-text {
    font-size: 0.75rem;
    color: #6b5f53;
    line-height: 1.6;
}
.community-disclaimer .disclaimer-text strong {
    color: #b31b1b;
}

/* ============================================================
   今日黄历（使用 common.css 样式，避免冲突）
   ============================================================ */
/* 快速入口标签 */
.calendar-choose-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.calendar-choose-types .choose-tag {
    display: inline-block;
    background: #faf8f5;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 2px 12px;
    font-size: 0.72rem;
    color: #4a3f35;
    text-decoration: none;
    transition: all 0.2s;
}
.calendar-choose-types .choose-tag:hover {
    border-color: #b31b1b;
    color: #b31b1b;
    background: #feeeee;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
    .tools-sidebar {
        width: 280px;
    }
    .card-panel {
        padding: 24px 24px 32px;
    }
}

@media (max-width: 820px) {
    .tools-wrapper {
        flex-direction: column;
    }
    .tools-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .tools-sidebar .sidebar-card {
        flex: 1 1 280px;
    }
    .article-title {
        font-size: 1.6rem;
    }
    .article-title .sub {
        display: block;
        margin-left: 0;
        margin-top: 4px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 12px;
    }
    .card-panel {
        padding: 16px 16px 24px;
        border-radius: 12px;
    }
    .article-title {
        font-size: 1.3rem;
    }
    .toc-wrap .toc-list {
        flex-direction: column;
        gap: 2px;
    }
    .tutorial-body {
        font-size: 0.98rem;
    }
    .chapter-block h2 {
        font-size: 1.2rem;
    }
    .step-card {
        padding: 14px 16px;
    }
    .tools-sidebar .sidebar-card {
        flex: 1 1 100%;
    }
    .hot-topic-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .hot-topic-card {
        padding: 8px 4px 6px;
        min-height: 56px;
    }
    .hot-topic-card .topic-icon {
        font-size: 1.2rem;
    }
    .hot-topic-card .topic-name {
        font-size: 0.7rem;
    }
    .hot-topic-card .topic-count {
        font-size: 0.55rem;
    }
}
/* ============================================================
   工具教程列表页独有样式（仅覆盖/补充）
   ============================================================ */

/* 布局容器 */
.tools-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin: 32px 0 48px;
}

/* 主内容区 */
.tools-main {
    flex: 2.5;
    min-width: 0;
}

/* 侧边栏（左侧） */
.tools-sidebar {
    flex: 1.2;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
    align-self: flex-start;
    margin-top: 0;
}

/* 面包屑 */
.breadcrumb {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 15px 0 16px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--sun-red);
}

.breadcrumb .sep {
    margin: 0 6px;
    color: #d0c8c0;
}

.breadcrumb .current {
    color: #2c2b28;
    font-weight: 500;
}

/* 侧边栏卡片 */
.sidebar-card {
    background: #fff;
    border-radius: 20px;
    padding: 18px 20px 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sidebar-card .card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1f1e1b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.sidebar-card .card-title .more {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 400;
    color: #94a3b8;
}

.sidebar-card .card-title .more a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-card .card-title .more a:hover {
    color: var(--sun-red);
}

/* 分类列表（两列网格） */
.category-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.cat-item-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 6px;
    text-decoration: none;
    color: #4a3f35;
    font-size: 0.78rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    background: #faf8f5;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
}

.cat-item-row:hover {
    background: var(--sun-red-light);
    border-color: #fad6d6;
    color: var(--sun-red);
}

.cat-item-row.active {
    background: var(--sun-red);
    color: #fff;
    border-color: var(--sun-red);
    box-shadow: 0 2px 8px rgba(179, 27, 27, 0.15);
}

.cat-item-row .cat-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

.cat-item-row .cat-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.cat-item-row .cat-count {
    display: none;
}

/* 热门工具（动态渲染） */
.hot-tool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #f5f0eb;
    text-decoration: none;
    transition: all 0.2s;
}

.hot-tool-item:last-child {
    border-bottom: none;
}

.hot-tool-item:hover {
    padding-left: 4px;
}

.hot-tool-item .tool-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

.hot-tool-item .tool-info {
    flex: 1;
    min-width: 0;
}

.hot-tool-item .tool-info .tool-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #2c2b28;
    transition: color 0.2s;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-tool-item:hover .tool-info .tool-name {
    color: var(--sun-red);
}

.hot-tool-item .tool-info .tool-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 右侧文章列表 */
.page-header {
    background: #fff;
    border-radius: 20px;
    padding: 20px 28px 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.page-header .top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f1e1b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h1 .icon {
    font-size: 1.7rem;
}

.page-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-header .header-actions .btn-nav {
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    color: #4a3f35;
    background: #faf8f5;
}

.page-header .header-actions .btn-nav:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
    background: var(--sun-red-light);
}

.page-header .header-actions .btn-nav.primary {
    background: var(--sun-red);
    color: #fff;
    border-color: var(--sun-red);
}

.page-header .header-actions .btn-nav.primary:hover {
    background: var(--sun-red-dark);
    border-color: var(--sun-red-dark);
}

/* 立即使用按钮 - 动态高亮 */
.page-header .header-actions .btn-nav.use-btn {
    border-color: #27ae60;
    color: #27ae60;
}

.page-header .header-actions .btn-nav.use-btn:hover {
    background: #27ae60;
    color: #fff;
    border-color: #27ae60;
}

.page-header .header-actions .rank-link {
    color: var(--sun-red);
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 30px;
    border: 1px solid var(--sun-red);
    transition: all 0.2s;
}

.page-header .header-actions .rank-link:hover {
    background: var(--sun-red);
    color: #fff;
}

.page-header .subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.page-header .stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    font-size: 0.8rem;
    color: #6b5f53;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: 8px;
}

.page-header .stats-row .stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-header .stats-row .stat strong {
    color: var(--sun-red);
}

.article-list-section {
    background: #fff;
    border-radius: 20px;
    padding: 0 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    min-height: 400px;
}

.article-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 10px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 6px;
}

.article-list-header .list-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1f1e1b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-list-header .list-title .badge {
    font-size: 0.68rem;
    background: var(--sun-red-light);
    color: var(--sun-red);
    padding: 0 10px;
    border-radius: 30px;
    font-weight: 600;
}

.article-list-header .sort-options {
    display: flex;
    gap: 3px;
}

.article-list-header .sort-options .sort-btn {
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.article-list-header .sort-options .sort-btn:hover {
    color: var(--sun-red);
    background: var(--sun-red-light);
}

.article-list-header .sort-options .sort-btn.active {
    color: #fff;
    background: var(--sun-red);
    border-color: var(--sun-red);
}

.article-item-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0ebe6;
    gap: 10px;
    transition: background 0.15s;
}

.article-item-row:last-child {
    border-bottom: none;
}

.article-item-row:hover {
    background: #faf8f5;
    margin: 0 -12px;
    padding: 8px 12px;
    border-radius: 8px;
}

.article-item-row .item-left {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-item-row .item-left .date-badge {
    background-color: #f0e3da;
    color: var(--sun-red);
    font-size: 0.65rem;
    padding: 1px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

.article-item-row .item-left .title-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: #2c2b28;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-item-row .item-left .title-text:hover {
    color: var(--sun-red);
}

.article-item-row .item-left .tool-tag {
    font-size: 0.55rem;
    background: var(--sun-red-light);
    color: var(--sun-red);
    padding: 0 7px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
}

.article-item-row .item-left .tool-tag.learning {
    background: #e3f2fd;
    color: #0d47a1;
}

.article-item-row .item-left .tool-tag.practice {
    background: #e8f5e9;
    color: #2e7d32;
}

.article-item-row .item-left .tool-tag.advanced {
    background: #fce4ec;
    color: #b71c1c;
}

.article-item-row .item-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-item-row .item-right .item-views {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.article-item-row .item-right .read-link {
    font-size: 0.7rem;
    color: var(--sun-red);
    text-decoration: none;
    font-weight: 600;
    padding: 1px 10px;
    border-radius: 30px;
    border: 1px solid var(--sun-red);
    transition: all 0.2s;
}

.article-item-row .item-right .read-link:hover {
    background: var(--sun-red);
    color: #fff;
}

.pagination-wrap {
    padding: 12px 0 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination-wrap .info {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.pagination-wrap .info strong {
    color: #2c2b28;
}

.pagination-wrap .pages {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.pagination-wrap .pages a,
.pagination-wrap .pages span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 0.76rem;
    text-decoration: none;
    color: #4a3f35;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.pagination-wrap .pages a:hover {
    background: var(--sun-red-light);
    border-color: #fad6d6;
    color: var(--sun-red);
}

.pagination-wrap .pages .current {
    background: var(--sun-red);
    color: #fff;
    border-color: var(--sun-red);
}

.pagination-wrap .pages .disabled {
    color: #ccc;
    cursor: default;
    pointer-events: none;
}

.empty-state {
    padding: 36px 0;
    text-align: center;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 6px;
}

/* 响应式 */
@media (max-width: 768px) {
    .tools-layout {
        flex-direction: column;
    }

    .tools-sidebar {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .tools-sidebar .sidebar-card {
        flex: 1 1 280px;
    }

    .category-list {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .page-header .top-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 12px;
    }

    .page-header {
        padding: 14px 16px 12px;
        border-radius: 16px;
    }

    .page-header h1 {
        font-size: 1.2rem;
    }

    .page-header .stats-row {
        flex-direction: column;
        gap: 3px;
    }

    .page-header .header-actions .btn-nav {
        font-size: 0.68rem;
        padding: 3px 10px;
    }

    .page-header .header-actions .rank-link {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

    .article-list-section {
        padding: 0 12px;
        border-radius: 16px;
    }

    .article-item-row {
        flex-wrap: wrap;
        padding: 6px 0;
    }

    .article-item-row .item-left {
        width: 100%;
        flex-wrap: wrap;
        gap: 4px;
    }

    .article-item-row .item-left .title-text {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 0.82rem;
    }

    .article-item-row .item-left .date-badge {
        font-size: 0.58rem;
        padding: 1px 6px;
    }

    .article-item-row .item-left .tool-tag {
        font-size: 0.48rem;
        padding: 0 5px;
    }

    .article-item-row .item-right {
        width: 100%;
        justify-content: flex-start;
        padding-left: 0;
        gap: 5px;
    }

    .article-item-row .item-right .item-views {
        font-size: 0.6rem;
    }

    .article-item-row .item-right .read-link {
        font-size: 0.6rem;
        padding: 1px 8px;
    }

    .article-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .pagination-wrap {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tools-sidebar .sidebar-card {
        flex: 1 1 100%;
    }

    .category-list {
        grid-template-columns: 1fr 1fr;
        gap: 3px;
    }

    .cat-item-row {
        padding: 4px 5px;
        font-size: 0.72rem;
    }

    .cat-item-row .cat-icon {
        font-size: 0.85rem;
        width: 18px;
    }

    .cat-item-row .cat-name {
        font-size: 0.72rem;
    }
}

@media (max-width: 400px) {
    .category-list {
        grid-template-columns: 1fr 1fr;
    }

    .cat-item-row {
        font-size: 0.65rem;
        padding: 3px 4px;
    }

    .cat-item-row .cat-icon {
        font-size: 0.75rem;
        width: 16px;
    }

    .cat-item-row .cat-name {
        font-size: 0.65rem;
    }
}

/* ===== 排行榜页独有样式 ===== */
.page-hero {
    background: linear-gradient(105deg, #fff5ef, #fff0e6);
    padding: 32px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 20px;
}
.page-hero h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }
.page-hero p { color: var(--text-muted); font-size: 0.95rem; }

/* 快捷入口按钮行 */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}
.quick-actions .action-btn {
    padding: 8px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--border-color);
    color: #4a3f35;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.quick-actions .action-btn:hover {
    border-color: var(--sun-red);
    color: var(--sun-red);
    background: var(--sun-red-light);
}
.quick-actions .action-btn.primary {
    background: var(--sun-red);
    color: #fff;
    border-color: var(--sun-red);
}
.quick-actions .action-btn.primary:hover {
    background: var(--sun-red-dark);
}

/* 热门工具列表 */
.hot-tools-section {
    background: #fff;
    border-radius: 20px;
    padding: 18px 20px 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.hot-tools-section .section-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1f1e1b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}
.hot-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.hot-tools-grid .tool-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #faf8f5;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s;
}
.hot-tools-grid .tool-item:hover {
    border-color: var(--sun-red);
    background: var(--sun-red-light);
    transform: translateY(-2px);
}
.hot-tools-grid .tool-item .tool-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}
.hot-tools-grid .tool-item .tool-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: #2c2b28;
}

/* 排行榜Tab */
.rank-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.rank-tabs .tab {
    padding: 8px 24px;
    border-radius: 30px 30px 0 0;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.3s;
}
.rank-tabs .tab.active { background: var(--sun-red); color: #fff; }
.rank-tabs .tab:hover:not(.active) { background: var(--sun-red-light); color: var(--sun-red); }

.rank-list .rank-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0ebe6;
    transition: background 0.15s;
}
.rank-list .rank-item:hover { background: #faf8f5; border-radius: 8px; }
.rank-list .rank-item .rank-num {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.6;
    flex-shrink: 0;
}
.rank-list .rank-item .rank-num.top1 { color: #f59e0b; }
.rank-list .rank-item .rank-num.top2 { color: #94a3b8; }
.rank-list .rank-item .rank-num.top3 { color: #b45309; }

.rank-list .rank-item .info { flex: 1; min-width: 0; }
.rank-list .rank-item .title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 4px;
}
.rank-list .rank-item .title-row a {
    font-size: 1rem;
    font-weight: 500;
    color: #2c2b28;
    text-decoration: none;
    transition: color 0.2s;
}
.rank-list .rank-item .title-row a:hover { color: var(--sun-red); }

.rank-badge {
    font-size: 0.55rem;
    padding: 0 8px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    color: #fff;
}
.rank-badge.hot { background: #ef4444; }
.rank-badge.essence { background: #8b5cf6; }
.rank-badge.new { background: #10b981; }
.rank-badge.reward { background: #f59e0b; }
.rank-badge.paid { background: #3b82f6; }
.rank-badge.top { background: #dc2626; }

.rank-list .rank-item .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.rank-list .rank-item .post-meta .stat { display: inline-flex; align-items: center; gap: 2px; }
.rank-list .rank-item .post-meta .category-tag {
    background: #f0ebe6;
    padding: 0 10px;
    border-radius: 12px;
    color: #6b5f53;
    font-size: 0.7rem;
}

.bbs-item-mini {
    padding: 6px 0;
    border-bottom: 1px solid #f5f0eb;
}
.bbs-item-mini:last-child { border-bottom: none; }
.bbs-item-mini .bbs-title {
    font-size: 0.82rem;
    color: #2c2b28;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
.bbs-item-mini .bbs-title:hover { color: var(--sun-red); }
.bbs-item-mini .bbs-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.empty-tip {
    text-align: center;
    color: #b0a8a0;
    padding: 12px 0;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .article-layout { flex-direction: column; }
    .rank-tabs .tab { padding: 6px 16px; font-size: 0.8rem; }
    .rank-list .rank-item { padding: 10px 12px; gap: 10px; }
    .rank-list .rank-item .rank-num { font-size: 1rem; min-width: 24px; }
    .hot-tools-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 480px) {
    .page-hero h2 { font-size: 1.4rem; }
    .rank-tabs .tab { padding: 4px 12px; font-size: 0.7rem; }
    .rank-list .rank-item .title-row a { font-size: 0.85rem; }
    .quick-actions .action-btn { padding: 6px 16px; font-size: 0.8rem; }
}

