:root {
    --red: #ff5f6d;
    --orange: #ff9f43;
    --green: #2fd6a0;
    --blue: #4d9bff;
    --purple: #8b7cff;
    --pink: #ff6bae;
    --ink: #2b3546;
    --muted: #66758a;
    --line: rgba(70, 100, 140, 0.12);
    --shadow: 0 8px 24px rgba(50, 80, 140, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f6f9fd;
    background-image:
        radial-gradient(560px 560px at 8% -6%, rgba(255, 95, 109, 0.12), transparent 62%),
        radial-gradient(640px 640px at 104% 16%, rgba(77, 155, 255, 0.13), transparent 62%),
        radial-gradient(560px 560px at 58% 112%, rgba(47, 214, 160, 0.12), transparent 62%),
        linear-gradient(180deg, #fbfdff 0%, #f2f7fd 100%);
    background-attachment: fixed;
}

/* 导航栏：毛玻璃 + 多彩底边 */
nav {
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
    box-shadow: 0 2px 14px rgba(60, 90, 140, 0.08);
}

nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: linear-gradient(90deg, var(--red), var(--orange), var(--green), var(--blue), var(--purple));
}

nav .logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    white-space: nowrap;
}
nav .logo .lg-mark {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    overflow: visible;
    filter: drop-shadow(0 3px 7px rgba(20, 50, 90, 0.28));
    transition: transform 0.3s ease;
}
nav .logo:hover .lg-mark {
    transform: scale(1.08);
}
nav .logo .lg-word {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
    font-size: 23px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1;
}
nav .logo .lg-word > span {
    display: inline-block;
}
nav .logo .lg-word .c-g,
nav .logo .lg-word .c-b {
    margin-left: -0.36em;
}
nav .logo .c-r,
nav .logo .c-g,
nav .logo .c-b {
    color: #2b3546;
    text-shadow: none;
}

nav .nav-list {
    margin-left: 40px;
    display: flex;
    gap: 8px;
}

nav .nav-list a {
    color: var(--muted);
    text-decoration: none;
    padding: 6px 12px 8px;
    font-size: 15px;
    transition: color 0.2s;
    position: relative;
    white-space: nowrap;
    border-radius: 8px;
}

nav .nav-list a:hover {
    color: var(--blue);
}

nav .nav-list a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--red), var(--orange), var(--green), var(--blue));
    background-size: 200% auto;
    transition: width 0.28s ease;
}

nav .nav-list a.active {
    color: var(--blue);
    font-weight: 600;
}

nav .nav-list a.active::after {
    width: calc(100% - 24px);
    animation: gradMove 5s linear infinite;
}

nav .nav-list a:hover::after {
    width: calc(100% - 24px);
}

/* 页面专属：导航高亮随栏目变色 */
.p-read nav .nav-list a.active {
    color: #e03636;
}
.p-read nav .nav-list a.active::after {
    background: #e03636;
    animation: none;
}
.p-life nav .nav-list a.active {
    color: #16a05f;
}
.p-life nav .nav-list a.active::after {
    background: #16a05f;
    animation: none;
}
.p-me nav .nav-list a.active {
    color: #2a6fdb;
}
.p-me nav .nav-list a.active::after {
    background: #2a6fdb;
    animation: none;
}

/* 内容区 */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 84px 20px 40px;
    flex: 1 0 auto;
}

/* 页面标题 */
.container h2 {
    font-size: 30px;
    color: var(--ink);
    position: relative;
    padding-bottom: 14px;
}
.container h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 5px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--red), var(--orange), var(--green), var(--blue));
    background-size: 200% auto;
    animation: gradMove 6s linear infinite;
}

.container h3 {
    color: var(--ink);
}

.page-intro {
    color: var(--muted);
    margin: 14px 0 0;
}

/* 首页横幅 */
.banner {
    text-align: center;
    padding: 56px 0 30px;
}

.banner h1 {
    font-size: 46px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 14px;
    line-height: 1.3;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .banner h1 {
        background: linear-gradient(90deg, var(--red), var(--orange), var(--green), var(--blue), var(--purple), var(--red));
        background-size: 260% auto;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        animation: gradMove 9s linear infinite;
    }
}

.banner p {
    font-size: 18px;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 32px;
}

.banner > * {
    animation: rise 0.7s ease both;
}
.banner > *:nth-child(2) {
    animation-delay: 0.12s;
}
.banner > *:nth-child(3) {
    animation-delay: 0.24s;
}
.banner > *:nth-child(4) {
    animation-delay: 0.36s;
}

/* 按钮：多彩渐变 + 滑动光效 */
.btn {
    display: inline-block;
    padding: 13px 32px;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    margin: 0 6px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    background-image: linear-gradient(90deg, #4d9bff, #6f7bff, #8b7cff, #4d9bff);
    background-size: 220% auto;
    background-position: left center;
    box-shadow: 0 8px 18px rgba(77, 120, 255, 0.28);
    transition: background-position 0.5s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(77, 120, 255, 0.36);
}

.btn + .btn {
    background-image: linear-gradient(90deg, #ff5f6d, #ff9f43, #ffb26b, #ff5f6d);
    box-shadow: 0 8px 18px rgba(255, 120, 90, 0.3);
}
.btn + .btn:hover {
    box-shadow: 0 14px 26px rgba(255, 120, 90, 0.4);
}

/* 卡片：四色描边 + 悬浮 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin: 44px 0 20px;
}

.card,
.article {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card {
    padding: 26px 24px 24px;
}

.card::before,
.article::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--red), var(--orange));
}

.card:nth-child(4n + 1)::before,
.article:nth-child(4n + 1)::before {
    background: linear-gradient(90deg, #ff5f6d, #ff9f43);
}
.card:nth-child(4n + 2)::before,
.article:nth-child(4n + 2)::before {
    background: linear-gradient(90deg, #2fd6a0, #3fe3c0);
}
.card:nth-child(4n + 3)::before,
.article:nth-child(4n + 3)::before {
    background: linear-gradient(90deg, #4d9bff, #6f7bff);
}
.card:nth-child(4n + 4)::before,
.article:nth-child(4n + 4)::before {
    background: linear-gradient(90deg, #8b7cff, #ff6bae);
}

.card:hover,
.article:hover {
    transform: translateY(-6px);
}

.card:nth-child(4n + 1):hover,
.article:nth-child(4n + 1):hover {
    box-shadow: 0 16px 30px rgba(255, 95, 109, 0.22);
}
.card:nth-child(4n + 2):hover,
.article:nth-child(4n + 2):hover {
    box-shadow: 0 16px 30px rgba(47, 214, 160, 0.24);
}
.card:nth-child(4n + 3):hover,
.article:nth-child(4n + 3):hover {
    box-shadow: 0 16px 30px rgba(77, 155, 255, 0.26);
}
.card:nth-child(4n + 4):hover,
.article:nth-child(4n + 4):hover {
    box-shadow: 0 16px 30px rgba(139, 124, 255, 0.26);
}

.card h3 {
    font-size: 19px;
    margin-bottom: 10px;
    color: var(--ink);
}

.card p {
    color: var(--muted);
    font-size: 15px;
}

.card {
    animation: rise 0.6s ease both;
}
.card:nth-child(2) {
    animation-delay: 0.1s;
}
.card:nth-child(3) {
    animation-delay: 0.2s;
}
.card:nth-child(4) {
    animation-delay: 0.3s;
}

/* 阅读页：文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 26px;
    margin-top: 34px;
}

.article {
    padding: 30px 28px 28px;
}

.article .meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.article time {
    font-size: 13px;
    color: #9aa6ba;
}

.tag {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 999px;
    letter-spacing: 1px;
}
.tag-red {
    background: rgba(255, 95, 109, 0.12);
    color: #e0454f;
}
.tag-green {
    background: rgba(47, 214, 160, 0.16);
    color: #0e9c74;
}
.tag-blue {
    background: rgba(77, 155, 255, 0.15);
    color: #2b78e0;
}
.tag-purple {
    background: rgba(139, 124, 255, 0.15);
    color: #6a56e8;
}

.article h3 {
    font-size: 23px;
    color: var(--ink);
    margin-bottom: 10px;
    line-height: 1.4;
}

.article p {
    color: #4b5a70;
    font-size: 15.5px;
    margin: 10px 0;
    text-align: justify;
}

.article {
    animation: rise 0.7s ease both;
}
.article:nth-child(2) {
    animation-delay: 0.08s;
}
.article:nth-child(3) {
    animation-delay: 0.16s;
}
.article:nth-child(4) {
    animation-delay: 0.24s;
}
.article:nth-child(5) {
    animation-delay: 0.32s;
}

/* 影像图集：分类切换按钮（跳转独立页） */
.catbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 30px 0 4px;
}
.catbar a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 4px 9px;
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.catbar a:hover {
    color: var(--ink);
}
.catbar a.active {
    color: var(--ink);
    border-color: var(--blue);
}
.cat-page {
    color: var(--muted);
    margin: 12px 0 4px;
    font-size: 15px;
}
.g-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.d-green {
    background: #16a05f;
}
.d-blue {
    background: #2a6fdb;
}
.d-red {
    background: #e03636;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 18px;
}
.g-item {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #eef1f5;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(50, 80, 140, 0.08);
    transition: box-shadow 0.25s ease;
}
.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}
.g-item:hover img {
    transform: scale(1.06);
}
.g-item:hover {
    box-shadow: 0 10px 22px rgba(50, 80, 140, 0.18);
}


/* 首页：诗化主视觉 + 动态光晕 */
body.home {
    overflow-x: hidden;
}
.home .container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 92px 20px 48px;
}
.home .banner {
    position: relative;
}
.home .banner > * {
    position: relative;
    z-index: 1;
}
.home .container::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 640px;
    height: 640px;
    transform: translate(-50%, -52%);
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 45%, rgba(47, 214, 160, 0.16), rgba(47, 214, 160, 0) 70%);
    animation: orbC 24s ease-in-out infinite alternate;
}
.home .banner::before,
.home .banner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(22px);
    z-index: 0;
    pointer-events: none;
}
.home .banner::before {
    width: 430px;
    height: 430px;
    left: -16%;
    top: -70px;
    background: radial-gradient(circle at 34% 34%, rgba(255, 95, 109, 0.5), rgba(255, 95, 109, 0) 68%);
    animation: orbA 16s ease-in-out infinite alternate;
}
.home .banner::after {
    width: 400px;
    height: 400px;
    right: -14%;
    bottom: -90px;
    background: radial-gradient(circle at 62% 45%, rgba(77, 155, 255, 0.48), rgba(77, 155, 255, 0) 70%);
    animation: orbB 21s ease-in-out infinite alternate;
}

/* 页脚备案 */
footer {
    width: 100%;
    padding: 18px 20px 22px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    background: transparent;
    flex-shrink: 0;
}
footer a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.2s;
}
footer a:hover {
    color: var(--red);
}

/* 动效 */
@keyframes gradMove {
    to {
        background-position: 220% center;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes markFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-3px) rotate(3deg);
    }
}

@keyframes orbA {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(28px, 20px) scale(1.14);
    }
}

@keyframes orbB {
    from {
        transform: translate(0, 0) scale(1.1);
    }
    to {
        transform: translate(-26px, -18px) scale(0.95);
    }
}

@keyframes orbC {
    from {
        transform: translate(-50%, -52%) scale(1);
    }
    to {
        transform: translate(-46%, -48%) scale(1.16);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* 手机端适配 */
@media (max-width: 768px) {
    nav {
        position: static;
        height: auto;
        padding: 14px 16px 10px;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 2px 16px;
    }
    nav .logo .lg-mark {
        width: 24px;
        height: 24px;
    }
    nav .logo .lg-word {
        font-size: 20px;
        letter-spacing: 2px;
    }
    nav .nav-list {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        gap: 4px;
        flex-wrap: wrap;
    }
    nav .nav-list a {
        font-size: 14px;
        padding: 6px 10px 8px;
    }
    nav .nav-list a::after {
        left: 10px;
        right: 10px;
    }
    nav .nav-list a.active::after,
    nav .nav-list a:hover::after {
        width: calc(100% - 20px);
    }

    .container {
        padding: 24px 16px 32px;
    }

    .container h2 {
        font-size: 25px;
    }

    .banner {
        padding: 26px 0 16px;
    }
    .banner h1 {
        font-size: 29px;
    }
    .banner p {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .btn {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 14px;
        text-align: center;
        padding: 13px 20px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 26px 0 12px;
    }
    .card {
        padding: 20px 18px 18px;
    }

    .article-list {
        gap: 18px;
        margin-top: 22px;
    }
    .article {
        padding: 22px 18px 20px;
    }
    .article h3 {
        font-size: 20px;
    }
    .article p {
        font-size: 15px;
    }

    .catbar {
        gap: 6px;
        margin: 22px 0 2px;
    }
    .catbar a {
        font-size: 15px;
        gap: 6px;
        padding: 6px 2px 8px;
    }
    .cat-page {
        margin: 10px 0 2px;
        font-size: 14px;
    }
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 12px;
    }

    footer {
        padding: 18px 16px 22px;
    }
}

/* �ֻ��ˣ���ҳ������С */
@media (max-width: 768px) {
    .home .container::after {
        width: 380px;
        height: 380px;
    }
    .home .banner::before {
        width: 250px;
        height: 250px;
        left: -22%;
        top: -20px;
        filter: blur(16px);
    }
    .home .banner::after {
        width: 230px;
        height: 230px;
        right: -20%;
        bottom: -30px;
        filter: blur(16px);
    }
}

/* ͼ������ CSS ���䣨��ͼ������Ļ�� */
.lb {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}
.lb:target {
    display: flex;
}
.lb-bg {
    position: absolute;
    inset: 0;
    background: rgba(12, 16, 24, 0.92);
    cursor: zoom-out;
}
.lb-img {
    position: relative;
    margin: auto;
    max-width: 94vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lb-x {
    position: absolute;
    top: 10px;
    right: 18px;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.lb-x:hover {
    opacity: 1;
}

/* �ֻ��ˣ�������۸ж��� */
@media (max-width: 768px) {
    nav .logo .lg-mark {
        width: 27px;
        height: 27px;
    }
    nav .logo .lg-word {
        font-size: 22px;
        font-weight: 500;
        letter-spacing: 0;
    }
    nav .logo .lg-word .c-g,
    nav .logo .lg-word .c-b {
        margin-left: -0.37em;
    }
    .home .container {
        justify-content: flex-start;
        padding: 32px 20px 44px;
    }
    .home .banner h1 {
        font-size: 29px;
    }
    .home .banner h1 .l1 {
        display: block;
    }
    .container h2 {
        font-size: 26px;
    }
}

/* ����������� */
.read-more {
    display: inline-block;
    margin-top: 10px;
    color: var(--blue);
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
    transition: color 0.2s;
}
.read-more:hover {
    color: var(--red);
    text-decoration: underline;
}

/* ��ҳ���������ⱳ�� */
body.home::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(255,95,109,0.5), rgba(255,159,67,0.4), rgba(47,214,160,0.48), rgba(77,155,255,0.5), rgba(139,124,255,0.45), rgba(255,95,109,0.5));
    background-size: 320% 320%;
    filter: blur(64px);
    opacity: 0.24;
    animation: auroraShift 22s ease-in-out infinite alternate;
}
body.home::before {
    content: "";
    position: fixed;
    inset: -20%;
    z-index: -1;
    pointer-events: none;
    background: repeating-linear-gradient(120deg, rgba(255,255,255,0) 0 46px, rgba(255,255,255,0.5) 46px 48px);
    mix-blend-mode: overlay;
    opacity: 0.35;
    animation: gridDrift 30s linear infinite;
}
@keyframes auroraShift {
    0% {
        background-position: 0% 20%;
    }
    50% {
        background-position: 60% 80%;
    }
    100% {
        background-position: 100% 30%;
    }
}
@keyframes gridDrift {
    to {
        transform: translate(0, 48px);
    }
}

@media (max-width: 768px) {
    body.home::after {
        filter: blur(28px);
        opacity: 0.15;
        animation: auroraShift 26s ease-in-out infinite alternate;
    }
    body.home::before {
        opacity: 0.18;
    }
}

/* ҳ��˫���� */
footer p {
    margin: 0;
}
footer p + p {
    margin-top: 7px;
}
.f-gov a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue);
}
.f-gov a:hover {
    color: var(--red);
}
.f-gov-icon {
    width: 15px;
    height: 15px;
    object-fit: contain;
    flex-shrink: 0;
}
