/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局样式：新增系统中文字体变量，解决乱码核心 */
:root {
    --primary-color: #3498db;
    --secondary-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    /* 新增：系统自带中文字体列表（无网络依赖，避免乱码） */
    --chinese-font: "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", "PingFang SC", "苹方", sans-serif;
}

/* 全局字体替换：所有中文用系统自带字体，彻底解决乱码 */
body {
    font-family: var(--chinese-font); /* 替换原Noto Sans SC（外部字体） */
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* 标题字体：补充中文字体，确保标题中文正常显示 */
h1, h2, h3, h4 {
    font-family: var(--chinese-font), "Montserrat", sans-serif; /* 先中后英，兼容中文 */
    font-weight: 600;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式（不变） */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

    .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

    .logo i {
        font-size: 1.8rem;
    }

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

    .nav-links a {
        text-decoration: none;
        color: var(--text-color);
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 5px;
        transition: var(--transition);
        padding: 5px 0;
        position: relative;
    }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--primary-color);
            transition: var(--transition);
        }

        .nav-links a:hover::after,
        .nav-links a.active::after {
            width: 100%;
        }

        .nav-links a:hover,
        .nav-links a.active {
            color: var(--primary-color);
        }

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* 英雄区域样式（核心：雪花文字强制用中文字体） */
.hero {
    height: 100vh;
    background: url('../images/background.jpg') center/cover no-repeat fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* 防止雪花超出主页区域 */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* 文字雪花容器（不变） */


/* 文字雪花样式：强制中文字体，确保不被覆盖 */


.hero-content {
    position: relative;
    z-index: 1; /* 确保主页内容在雪花上方 */
    color: white;
    padding: 20px;
    animation: fadeIn 1.5s ease;
}

.class-name {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.class-motto {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-style: italic;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

    .btn:hover {
        background: #2980b9;
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
    }

/* 通用区块样式（不变） */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

    .section-title i {
        color: var(--primary-color);
        margin-right: 10px;
    }

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 3px;
        background: var(--primary-color);
        border-radius: 3px;
    }

/* 班级介绍样式（不变） */
.about-section {
    background: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.class-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-box {
    background: white;
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

    .stat-box:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .stat-box i {
        font-size: 2.5rem;
        color: var(--primary-color);
        margin-bottom: 15px;
    }

    .stat-box h3 {
        font-size: 2rem;
        margin-bottom: 10px;
        color: var(--dark-color);
    }

    .stat-box p {
        color: #666;
    }

/* 班级活动样式（不变） */
.activities-section {
    background: white;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.activity-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

    .activity-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    }

.activity-info {
    padding: 20px;
}

    .activity-info h3 {
        margin-bottom: 10px;
        color: var(--dark-color);
    }

    .activity-info p {
        margin-bottom: 15px;
        color: #666;
    }

.activity-date {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* 班级相册样式（不变） */
.gallery-section {
    background: var(--light-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 200px;
}

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition);
    }

    .gallery-item:hover {
        transform: scale(1.05);
        z-index: 10;
    }

/* 页脚样式（不变） */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

    .footer-logo i {
        font-size: 3rem;
        color: var(--secondary-color);
        margin-bottom: 15px;
    }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

    .contact-info p {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .contact-info i {
        color: var(--secondary-color);
    }

#submit-email {
    color: var(--secondary-color);
    text-decoration: underline;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

    .social-links a {
        color: white;
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
    }

        .social-links a:hover {
            background: var(--secondary-color);
            transform: translateY(-5px);
        }

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #aaa;
}

/* 返回顶部按钮（不变） */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:hover {
        background: #2980b9;
        transform: translateY(-5px);
    }

/* 动画效果（不变） */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计（不变） */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .class-name {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        height: calc(100vh - 70px);
        align-items: center;
        justify-content: center;
        gap: 30px;
        font-size: 1.2rem;
        transition: var(--transition);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }

        .nav-links.active {
            right: 0;
        }

    .menu-toggle {
        display: block;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .class-stats {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    .class-name {
        font-size: 2rem;
    }

    .class-motto {
        font-size: 1.2rem;
    }

    .class-stats {
        grid-template-columns: 1fr;
    }

    .activities-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-info {
        align-items: center;
    }

    /* 响应式雪花：减少数量，缩小字体 */
    .snowflake {
        font-size: 10px;
    }
}
