* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-red: #9D2235;
    --primary-dark: #2C3E50;
    --accent-gold: #FFD700;
    --light-bg: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-dark: #333333;
    --text-light: #6C757D;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* 导航栏样式 - 改进版 */
header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-red) 100%);
    color: white;
    padding: 0.8rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo img {
    height: 45px;
    width: auto;
    border-radius: 50%;
    transition: var(--transition);
}

.logo:hover img {
    transform: rotate(5deg) scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 1.3rem;
    font-weight: 700;
}

.logo-text p {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* 导航菜单按钮 - 移动端 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.15);
}

/* 滚动时导航栏变化 */
header.scrolled {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-red) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header.scrolled .logo img {
    height: 40px;
}

/* 主横幅区域 - 美化版 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
        url('/files/img/1.jpg') center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 7rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(157, 34, 53, 0.15) 0%, transparent 70%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.visitor-count {
    margin: 1.5rem 0;
    font-size: 1rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.btn {
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
    box-shadow: 0 4px 15px rgba(157, 34, 53, 0.3);
}

.btn-primary:hover {
    background-color: #7a1a2a;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(157, 34, 53, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 功能卡片区域 - 美化版 */
.features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-red);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    border: none;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-red), #e74c3c);
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.card:hover::before {
    opacity: 1;
}

.card-img {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.8rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card h3 i {
    color: var(--primary-red);
}

.card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.card-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.3rem 0;
    position: relative;
}

.card-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-red);
    transition: var(--transition);
}

.card-link:hover {
    gap: 0.7rem;
}

.card-link:hover::after {
    width: 100%;
}

/* 公告区域 - 改进版 */
.announcements {
    background-color: var(--primary-dark);
    color: white;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.announcements::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.announcements .section-title h2 {
    color: white;
}

.announcements .section-title p {
    color: rgba(255, 255, 255, 0.8);
}

.announcements-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.announcement-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.announcement-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.announcement-card h3 {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: white;
}

.announcement-card h3 i {
    color: var(--accent-gold);
}

.announcement-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    display: block;
}

.announcement-card p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.view-all {
    text-align: center;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

/* 班级工作日志区域 */
.work-log {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--light-bg);
}

.log-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.log-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.log-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--primary-dark);
    border-radius: 3px 0 0 3px;
}

.log-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.log-date {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: block;
}

.log-card h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.log-content {
    color: var(--text-dark);
    line-height: 1.7;
}

.log-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

.log-content a {
    color: var(--primary-red);
    text-decoration: none;
    transition: var(--transition);
}

.log-content a:hover {
    text-decoration: underline;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--primary-red);
    background-color: rgba(0, 0, 0, 0.05);
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.modal-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.modal-body {
    color: var(--text-dark);
    line-height: 1.8;
}

.modal-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.modal-body a {
    color: var(--primary-red);
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}


/* 新增容器样式 */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

/* 修改image-6样式 */
.image-6 {
    width: 40%;
    max-width: 400px;
    object-fit: contain;
    border: none;
    box-shadow: none;
    margin: 0;
    border-radius: 12px;
}

/* 修改text-6样式 */
.text-6 {
    width: 55%;
    padding: 2rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-6 h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #FFD700;
    position: relative;
    padding-bottom: 0.8rem;
}

.text-6 h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #FFD700, transparent);
}

.text-6 p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .image-6 {
        width: 70%;
        max-width: 300px;
    }

    .text-6 {
        width: 100%;
    }

    .text-6 h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 576px) {
    .image-6 {
        width: 85%;
    }

    .text-6 {
        padding: 1.5rem;
    }

    .text-6 h2 {
        font-size: 1.8rem;
    }

    .text-6 p {
        font-size: 1rem;
    }
}

/* 页脚样式 - 改进版 */
footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 5rem 2rem 2rem;
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--primary-red), var(--accent-gold));
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 50px;
    width: auto;
    border-radius: 50%;
}

.footer-logo-text h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.footer-logo-text p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.contact-info {
    margin: 2.5rem 0;
}

.contact-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.contact-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background-color: var(--accent-gold);
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
}

.contact-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.contact-item i {
    color: var(--accent-gold);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.copyright {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* 响应式设计 - 增强版 */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.5rem;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        gap: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-red) 100%);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 1rem 0;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 0.8rem;
        margin: 0.2rem 0;
    }

    .hero {
        padding: 5rem 2rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .section-title p {
        font-size: 1rem;
    }

    .features,
    .announcements,
    .work-log {
        padding: 4rem 2rem;
    }

    .modal-content {
        padding: 1.5rem;
        max-height: 75vh;
    }
}

@media (max-width: 576px) {
    .logo-text h1 {
        font-size: 1.1rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .card-content,
    .announcement-card,
    .log-card {
        padding: 1.5rem;
    }

    .contact-links {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .contact-item {
        width: 100%;
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}