
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置基础字体和背景 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #63B3ED, #9F7AEA);
    color: #FFFFFF;
    line-height: 1.6;
    padding: 20px;
}

/* 导航栏样式 */
header {
    width: 100%;
    padding: 20px 0;
    background: rgba(30, 58, 138, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

nav .logo {
    font-size: 24px;
    font-weight: bold;
    color: #FFA500;
}

nav .nav-links {
    display: flex;
    gap: 20px;
}

nav .nav-links a {
    text-decoration: none;
    color: #FFFFFF;
    font-size: 16px;
    position: relative;
}

nav .nav-links a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #FFA500;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

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

@media (max-width: 768px) {
    nav .nav-links {
        display: none;
    }
}

/* 主要内容区域样式 */
main {
    max-width: 1200px;
    margin: 100px auto 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
}

/* Banner横幅样式 */
.banner {
    grid-column: 1 / -1;
    height: 70vh;
    background: linear-gradient(to bottom right, #1E3A8A, #63B3ED);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.banner-content {
    text-align: center;
    padding: 20px;
}

.banner-content h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.banner-button {
    background-color: #FFA500;
    border: none;
    padding: 15px 30px;
    color: #FFFFFF;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    font-size: 16px;
}

.banner-button:hover {
    background-color: #e59400;
    transform: translateY(-5px);
}

/* 模块化内容块样式 */
.section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.3s, box-shadow 0.3s;
}

.section:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

.section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #FFA500;
}

.section h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.section h4 {
    font-size: 20px;
    margin-bottom: 10px;
}

.section p {
    font-size: 16px;
    margin-bottom: 15px;
}

.section pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.section pre code {
    color: #FFD700;
    font-family: 'Courier New', Courier, monospace;
    position: relative;
}

.section pre code::before {
    content: 'CSS3 代码示例';
    display: block;
    font-size: 14px;
    color: #FFA500;
    margin-bottom: 5px;
    font-weight: bold;
}

/* 图片样式 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-grid img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 提示信息样式 */
.reference-note {
    grid-column: 1 / -1;
    background: rgba(255, 165, 0, 0.2);
    border-left: 5px solid #FFA500;
    padding: 15px;
    border-radius: 5px;
    font-size: 18px;
    color: #FFFFFF;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .banner-content h1 {
        font-size: 28px;
    }
    
    .banner-content p {
        font-size: 16px;
    }
    
    .section h2 {
        font-size: 24px;
    }
    
    .section h3 {
        font-size: 20px;
    }
    
    .section h4 {
        font-size: 18px;
    }
    
    .section p {
        font-size: 14px;
    }
}

