/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 语义化区块背景色 */
header {
    background: linear-gradient(135deg, #ffebee, #f8bbd0);
    padding: 2rem 0;
    text-align: center;
}

nav {
    background-color: #2c3e50;
}

main {
    width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

footer {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* 头部样式 */
.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #c62828;
}

header p {
    font-size: 1.2rem;
    color: #666;
}

/* 导航样式 */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
    margin: 0 auto;
}

.nav-grid a {
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 0.8rem 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.nav-grid a:hover {
    background-color: #34495e;
}

/* 主要内容样式 */
section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2e7d32;
    text-align: center;
}

section p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: justify;
    line-height: 1.8;
}

.intro-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 卡片网格系统 */
.cards-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card h3 {
    color: #1b5e20;
    margin-bottom: 0.8rem;
}

.card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* 文字模块样式 */
.quote-section {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    font-style: italic;
    font-size: 1.2rem;
    text-align: center;
    padding: 2rem;
    border-left: 4px solid #ff9800;
    border-right: 4px solid #ff9800;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #e91e63;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #c2185b;
    transform: scale(1.1);
}

img{
    max-width: 100%;
    height: 100%;
}

.cards-container .card img{
    object-fit: cover;
}
/* 响应式设计 */
@media (max-width: 960px) {
    main {
        width: 100%;
        padding: 1.5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    section {
        padding: 1.5rem;
    }

    section h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .nav-grid a {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header .avatar {
        width: 100px;
        height: 100px;
    }
}