/* ============================================================
   全局重置 & 基础样式
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(to right, #acecea, #f3d9e4);
    min-height: 100vh;
    padding-bottom: 0;
    color: #2d3748;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 容器：用于居中宽度 1300px 的内容 */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   鱼骨屏（Skeleton Screen）基础样式
   ============================================================ */
.skeleton {
    background: #e2e8f0;
    border-radius: 8px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text {
    height: 14px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text.title {
    height: 20px;
    width: 70%;
}

.skeleton-text.full {
    width: 100%;
}

.skeleton-img {
    width: 100%;
    height: 150px;
    background: #e2e8f0;
    border-radius: 8px 8px 0 0;
}

@keyframes skeleton-pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

/* ============================================================
   1. 头部区域 (Header)
   ============================================================ */
.site-header {
    width: 100%;
    height: 410px;
    background: url('../assets/logo.png') no-repeat center center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* 导航栏 */
.navbar {
    width: 100%;
    max-width: 1300px;
    height: 60px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    border-radius: 40px;
    padding: 0 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 10;
}

.navbar .logo {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.navbar .logo span {
    color: #38b2ac;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-right: 20px;
}
.nav-links a {
    font-size: 16px;
    color: #2d3748;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-links a:hover {
    color: #38b2ac;
}
.nav-links .external-link::after {
    content: " ↗";
    font-size: 12px;
    opacity: 0.6;
}
/* 当前页面高亮 */
.nav-links a.active {
    color: #38b2ac;
    font-weight: 700;
}

.nav-user {
    font-size: 14px;
    font-weight: 600;
    background: #38b2ac;
    color: #fff;
    padding: 6px 18px;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    white-space: nowrap;
}
.nav-user:hover {
    background: #2c9a94;
}
.nav-user.logged-in {
    background: #2d3748;
}

/* ============================================================
   悬浮天气模块
   ============================================================ */
.weather-float {
    position: fixed;
    top: 95px;
    left: 10px;
    width: 120px;
    height: 91px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    z-index: 999;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.weather-float.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
}
.weather-float .city {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
}
.weather-float .temp {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin: 2px 0;
}
.weather-float .desc {
    font-size: 12px;
    color: #718096;
}
.weather-float .desc::before {
    content: "☁️ ";
    margin-right: 4px;
}

/* ============================================================
   2. 网站简介三栏模块
   ============================================================ */
.intro-section {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.intro-card {
    background: #f3f3f3;
    border-radius: 16px;
    padding: 16px 20px;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.intro-card .label {
    font-size: 1.5em;
    font-weight: 700;
    color: #2d3748;
    text-align: center;
    margin-bottom: 4px;
}
.intro-card .content {
    font-size: 14px;
    color: #4a5568;
    text-align: center;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ============================================================
   3. 内容区域 (轮播+动态)
   ============================================================ */
.content-row {
    display: flex;
    gap: 8px;
    margin-top: 30px;
    height: 450px;
}

.carousel-left {
    flex: 0 0 866px;
    height: 450px;
    border-radius: 28px;
    overflow: hidden;
    background: #e2e8f0;
    position: relative;
}
.carousel-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.updates-right {
    flex: 1;
    height: 450px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.update-card {
    flex: 1;
    background: #ffffffcc;
    backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
}
.update-card .title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}
.update-card .desc {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ============================================================
   新闻动态 & 博客动态 共用卡片样式
   ============================================================ */
.news-section,
.blog-section {
    margin-top: 40px;
}
.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
    text-align: left;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.news-card {
    background: #ffffffd9;
    backdrop-filter: blur(4px);
    border-radius: 24px;
    padding: 18px 16px 20px;
    height: 400px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.news-card .news-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
    line-height: 1.4;
    flex-shrink: 0;
}
.news-card .news-content {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    margin-bottom: 12px;
}
.news-card .btn-detail {
    align-self: center;
    background: #38b2ac;
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 6px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: auto;
    flex-shrink: 0;
}
.news-card .btn-detail:hover {
    background: #2c9a94;
}

.news-more {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}
.news-more .btn-more {
    background: transparent;
    border: 2px solid #38b2ac;
    color: #38b2ac;
    border-radius: 40px;
    padding: 8px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.news-more .btn-more:hover {
    background: #38b2ac;
    color: #fff;
}

/* 博客卡片 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.blog-card {
    background: #ffffffd9;
    backdrop-filter: blur(4px);
    border-radius: 24px;
    overflow: hidden;
    height: 330px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.blog-card .blog-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: #e2e8f0;
}
.blog-card .blog-body {
    padding: 12px 16px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.blog-card .blog-content {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    flex: 1;
}
.blog-card .blog-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.blog-card.more-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border: 2px dashed #b0c4d9;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.blog-card.more-card:hover {
    background: #e2e8f0;
    border-color: #38b2ac;
}
.blog-card.more-card .more-btn {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.blog-card.more-card .more-btn small {
    font-size: 14px;
    font-weight: 400;
    color: #718096;
}

/* ============================================================
   页脚区域
   ============================================================ */
.site-footer {
    margin-top: 60px;
    background: linear-gradient(to right, #b2f0ef, #f8d8e8);
    padding: 40px 40px 20px;
    width: 100%;
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-top .brand {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: 1px;
}
.footer-top .explore-btn {
    background: #38b2ac;
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 8px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.footer-top .explore-btn:hover {
    background: #2c9a94;
}
.footer-top .explore-btn::after {
    content: "→";
    font-size: 18px;
}

.footer-divider {
    border: none;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 12px 0 28px;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.2fr;
    gap: 30px;
    margin-bottom: 28px;
}
.footer-col h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 14px;
}
.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-col ul li a {
    font-size: 15px;
    color: #2d3748;
    transition: color 0.2s;
}
.footer-col ul li a:hover {
    color: #38b2ac;
}

.about-badges {
    display: flex;
    flex-wrap: nowrap;          /* 强制不换行 */
    gap: 8px;
    overflow-x: auto;           /* 若宽度不足，出现水平滚动条 */
    padding-bottom: 4px;        /* 避免滚动条遮挡文字 */
    -webkit-overflow-scrolling: touch; /* 移动端平滑滚动 */
}
.about-badges .badge {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 40px;
    padding: 6px 16px;
    font-size: 14px;
    color: #2d3748;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background 0.2s;
    cursor: default;
}
.about-badges .badge:hover {
    background: rgba(255, 255, 255, 0.95);
}

.footer-col .subscribe-text {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.5;
}
.subscribe-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.subscribe-form input {
    flex: 1;
    min-width: 140px;
    padding: 10px 16px;
    border: none;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    outline: none;
    transition: background 0.2s;
}
.subscribe-form input:focus {
    background: #fff;
}
.subscribe-form input::placeholder {
    color: #a0aec0;
}
.subscribe-form button {
    background: #38b2ac;
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.subscribe-form button:hover {
    background: #2c9a94;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom .copyright {
    font-size: 14px;
    color: #4a5568;
}
.footer-bottom .legal-links {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #4a5568;
}
.footer-bottom .legal-links a {
    transition: color 0.2s;
}
.footer-bottom .legal-links a:hover {
    color: #38b2ac;
}

/* ============================================================
   响应式设计
   ============================================================ */
@media (max-width: 1300px) {
    .container {
        padding: 0 24px;
    }
    .navbar {
        padding: 0 20px;
    }
    .content-row {
        flex-direction: column;
        height: auto;
    }
    .carousel-left {
        flex: 0 0 auto;
        width: 100%;
        height: 320px;
    }
    .updates-right {
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .update-card {
        flex: 1 1 calc(33.33% - 8px);
        min-height: 120px;
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

@media (max-width: 900px) {
    .site-header {
        height: 320px;
    }
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 18px;
        gap: 10px;
        border-radius: 28px;
        margin-top: 12px;
    }
    .nav-links {
        gap: 14px;
        flex-wrap: wrap;
        margin-right: 0;
    }
    .nav-links a {
        font-size: 14px;
    }
    .intro-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .intro-card {
        min-height: 70px;
    }
    .news-grid {
        grid-template-columns: 1fr 1fr;
    }
    .blog-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-columns {
        grid-template-columns: 1fr 1fr;
    }
    .weather-float {
        top: 70px;
        left: 6px;
        width: 140px;
        height: 78px;
        padding: 10px 12px;
    }
    .weather-float .temp {
        font-size: 17px;
    }
}

@media (max-width: 600px) {
    .site-header {
        height: 260px;
    }
    .navbar .logo {
        font-size: 18px;
    }
    .nav-links {
        gap: 10px;
        justify-content: center;
        width: 100%;
    }
    .nav-links a {
        font-size: 13px;
    }
    .nav-user {
        font-size: 13px;
        padding: 4px 14px;
    }
    .weather-float {
        top: 60px;
        left: 4px;
        width: 120px;
        height: 68px;
        padding: 8px 10px;
        border-radius: 12px;
    }
    .weather-float .city {
        font-size: 13px;
    }
    .weather-float .temp {
        font-size: 15px;
    }
    .weather-float .desc {
        font-size: 11px;
    }
    .carousel-left {
        height: 200px;
    }
    .update-card {
        flex: 1 1 100%;
        min-height: 80px;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-card {
        height: auto;
        min-height: 200px;
    }
    .blog-grid {
        grid-template-columns: 1fr 1fr;
    }
    .blog-card {
        height: 280px;
    }
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-top .brand {
        font-size: 22px;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .footer-bottom .legal-links {
        flex-wrap: wrap;
        gap: 12px;
    }
    .subscribe-form {
        flex-direction: column;
    }
    .subscribe-form input {
        min-width: auto;
    }
    .about-badges .badge {
        font-size: 12px;
        padding: 4px 12px;
    }
}

@media (max-width: 420px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-card.more-card {
        height: 200px;
    }
}