:root {
    --bg-body: #f7f9fa;
    --bg-surface: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --text-light: #999999;
    --primary: #f04444;
    --primary-hover: #d93939;
    --border: #ebebeb;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.08);

    --font-sans: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --container-w: 1200px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-main);
}

.container {
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 16px;
}

.site-header {
    background-color: var(--bg-surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.site-brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-brand i {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    text-align: center;
    line-height: 32px;
    font-size: 18px;
    font-style: normal;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 4px 16px;
    width: 300px;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
    background: #fff;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-main);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    display: flex;
    align-items: center;
}

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

.header-nav {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
}

.nav-list {
    display: flex;
    gap: 32px;
    height: 44px;
    align-items: center;
}

.nav-list a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--primary);
}

.nav-list a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
}

.site-main {
    flex: 1;
    padding: 24px 0 40px;
}

.site-footer {
    background-color: #2b2b2b;
    color: #999;
    padding: 40px 0 24px;
    font-size: 13px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #ccc;
}

.footer-links a:hover {
    color: #fff;
}

.footer-text {
    line-height: 1.8;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background-color: var(--primary);
    border-radius: 2px;
}

.grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.grid-layout > .main-column,
.grid-layout > .sidebar-column {
    min-width: 0;
}

.tag-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

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

    .header-top {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        gap: 12px;
        justify-content: center;
    }

    .search-box {
        width: 100%;
    }

    .nav-list {
        overflow-x: auto;
        white-space: nowrap;
        gap: 20px;
    }

    .nav-list::-webkit-scrollbar {
        display: none;
    }

    .base-link-section { margin-bottom: 14px; }
    .base-link-list { padding: 12px 14px; }
    .base-link-list a { padding: 3px 8px; font-size: 12px; }
}

/* ══════════════════════════════════
   BASE LINK SECTIONS
   ══════════════════════════════════ */
.base-links {
    padding-top: 24px;
}

.base-link-section {
    background: var(--bg-surface);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.base-link-label {
    display: inline-block;
    padding: 5px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border-radius: var(--radius) 0 var(--radius) 0;
}

.base-link-list {
    display: flex;
    flex-wrap: wrap;
    padding: 14px 16px;
}

.base-link-list a {
    padding: 3px 10px;
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.base-link-list a:hover { color: var(--primary); }

