:root {
    --bg-body: #1d2b45;
    --bg-body-alt: #2f4166;
    --bg-surface: rgba(37, 51, 80, 0.82);
    --bg-surface-soft: rgba(52, 68, 103, 0.72);
    --text-main: #fff9ef;
    --text-muted: #ece2d4;
    --text-light: #d0c3b1;
    --primary: #d9ab63;
    --primary-hover: #e5be82;
    --accent: #78c7ff;
    --border: rgba(236, 199, 138, 0.3);
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 12px 26px rgba(8, 15, 30, 0.24);
    --shadow-soft: 0 8px 18px rgba(8, 15, 30, 0.2);
    --container-w: 1240px;
    --font-serif: "Noto Serif SC", "Songti SC", "STSong", "FangSong", serif;
    --font-sans: "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background:
        radial-gradient(circle at 88% -10%, rgba(120, 199, 255, 0.24), transparent 42%),
        radial-gradient(circle at -10% 10%, rgba(217, 171, 99, 0.2), transparent 45%),
        linear-gradient(160deg, var(--bg-body) 0%, var(--bg-body-alt) 100%);
    color: var(--text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 42px 42px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: 0.4px;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 120;
    backdrop-filter: blur(10px);
    background: rgba(24, 35, 58, 0.72);
    border-bottom: 1px solid rgba(217, 171, 99, 0.15);
    box-shadow: 0 10px 24px rgba(8, 15, 30, 0.18);
}

.header-topline {
    border-bottom: 1px solid rgba(217, 171, 99, 0.14);
    background: linear-gradient(90deg, rgba(217, 171, 99, 0.11), rgba(120, 199, 255, 0.1));
}

.header-topline-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.header-note {
    margin: 0;
    color: var(--text-light);
    font-size: 12px;
    letter-spacing: 1px;
}

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

.header-shortcuts a {
    color: var(--text-muted);
    font-size: 12px;
}

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

.header-main {
    min-height: 84px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text-main);
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(217, 171, 99, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 16px rgba(217, 171, 99, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    font-family: var(--font-serif);
    background: linear-gradient(145deg, rgba(66, 84, 121, 0.96), rgba(47, 63, 95, 0.92));
}

.brand-text {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.brand-text strong {
    font-family: var(--font-serif);
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 600;
    letter-spacing: 2px;
    color: #fff4e3;
    text-shadow: 0 0 18px rgba(217, 171, 99, 0.22);
}

.brand-text em {
    margin-top: 3px;
    font-style: normal;
    font-size: 11px;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: rgba(120, 199, 255, 0.8);
}

.header-nav {
    border-top: 1px solid rgba(217, 171, 99, 0.15);
    border-bottom: 1px solid rgba(217, 171, 99, 0.15);
}

.header-nav-inner {
    min-height: 62px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 14px;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
}

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

.nav-list a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-muted);
    border: 1px solid transparent;
}

.nav-list a:hover {
    border-color: rgba(217, 171, 99, 0.3);
    color: var(--primary-hover);
}

.nav-list a.active {
    color: #1a130a;
    background: linear-gradient(140deg, var(--primary) 0%, #f0cb97 100%);
    box-shadow: 0 6px 14px rgba(217, 171, 99, 0.35);
}

.search-box {
    justify-self: end;
    display: flex;
    align-items: center;
    width: min(330px, 100%);
    padding: 6px 10px 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(217, 171, 99, 0.3);
    background: rgba(53, 69, 104, 0.66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search-box:focus-within {
    border-color: rgba(217, 171, 99, 0.7);
    box-shadow: 0 0 0 3px rgba(217, 171, 99, 0.16);
}

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

.search-input::placeholder {
    color: rgba(198, 191, 178, 0.72);
}

.search-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: rgba(217, 171, 99, 0.16);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

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

.header-divider {
    height: 6px;
}

.header-divider > .container {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-divider span {
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(217, 171, 99, 0.5), transparent);
}

.site-main {
    flex: 1;
    padding: 28px 0 52px;
}

.site-footer {
    border-top: 1px solid rgba(217, 171, 99, 0.22);
    background:
        radial-gradient(circle at 20% -20%, rgba(217, 171, 99, 0.18), transparent 38%),
        rgba(28, 40, 62, 0.9);
    color: var(--text-light);
    padding: 42px 0 28px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(217, 171, 99, 0.2);
}

.footer-links a:hover {
    border-color: rgba(217, 171, 99, 0.55);
}

.footer-text {
    max-width: 980px;
    line-height: 1.9;
    font-size: 13px;
}

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

.card {
    background: linear-gradient(165deg, var(--bg-surface), var(--bg-surface-soft));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -60px;
    top: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 171, 99, 0.13), transparent 72%);
    pointer-events: none;
}

.section-title {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.section-title::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid var(--primary);
    transform: rotate(45deg);
    border-radius: 2px;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 26px;
    bottom: -7px;
    width: 54%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(217, 171, 99, 0.8), transparent);
}

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

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

.tag-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(217, 171, 99, 0.35);
    color: var(--primary);
    font-size: 12px;
}

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

    .header-nav-inner {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 0;
    }

    .search-box {
        justify-self: start;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .site-main {
        padding-top: 20px;
    }

    .card {
        padding: 16px;
        border-radius: 12px;
    }

    .header-main {
        min-height: 72px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .brand-text strong {
        font-size: 22px;
    }

    .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-sm);
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.base-link-label {
    display: inline-block;
    padding: 5px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bg-body);
    background: var(--primary);
    border-radius: var(--radius-sm) 0 var(--radius-sm) 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-light);
    transition: color 0.2s;
}

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