/* ==========================================
   全新导航风格全局样式表 - style.css
   ========================================== */

:root {
    --primary-color: #4f46e5;       /* 主题Indigo蓝 */
    --primary-hover: #4338ca;
    --bg-color: #f8fafc;            /* 浅灰底色 */
    --card-bg: #ffffff;
    --text-main: #1e293b;           /* 深色文字 */
    --text-muted: #64748b;          /* 辅助文字 */
    --border-color: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 60px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* 顶部公共导航栏（仿高档导航站Header） */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 40px;
}
.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-logo {
    font-size: 20px;
    font-weight: 700;
    color: #d72929;
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-logo::before {
    content: "🧭";
    font-size: 22px;
}

/* ==================== 首页导航卡片流 ==================== */
.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 导航网格：仿知名导航站的精美卡片布局 */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.nav-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 150px;
    position: relative;
    overflow: hidden;
}

.nav-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 20px -8px rgba(79, 70, 229, 0.15);
}

.nav-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: var(--transition);
}
.nav-card:hover::before {
    opacity: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 10px;
}

.card-badge {
    background: #edf2f7;
    color: #4a5568;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

/* 分页组件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px 0;
}
.pagination a, .pagination span {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #4f46e5;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s ease;
    padding: 0 10px; /* 适配“上一页”等较长中文字符 */
}
.pagination a:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.pagination .active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    font-weight: bold;
    cursor: default;
}
.pagination .disabled {
    color: #cbd5e1;
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
}
/* ==================== 内页详情优美样式 ==================== */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 25px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.article-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 15px;
}

.article-meta {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.article-meta a {
    color: var(--primary-color);
    font-weight: 500;
}
.article-meta a:hover {
    text-decoration: underline;
}

.tdk-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 35px;
    border: 1px solid #e2e8f0;
}
.tdk-tag {
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-main);
}
.tdk-tag strong {
    color: #475569;
}

.article-body {
    font-size: 16px;
    color: #334155;
    text-align: justify;
}
.article-body p {
    margin-bottom: 24px;
    text-indent: 2em;
    letter-spacing: 0.5px;
}

/* 翻页导航 */
.sibling-nav {
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
    padding-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.nav-item {
    display: flex;
    align-items: center;
    font-size: 15px;
}
.nav-item .label {
    color: var(--text-muted);
    font-weight: 600;
    width: 70px;
    flex-shrink: 0;
}
.nav-item a {
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-item a:hover {
    color: var(--primary-color);
}
.nav-item span.none {
    color: #cbd5e1;
}

/* 空状态说明 */
.no-data {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 60px 0;
}

@media (max-width: 640px) {
    .nav-grid {
        grid-template-columns: 1fr;
    }
}