
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72 70%, #2a5298 25%, #ff7e5f 5%);
    color: #333;
    line-height: 1.6;
}
/* 容器设置为响应式的网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    padding: 40px;
}
/* 头部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}
.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    margin: 0;
}
.navbar li {
    position: relative;
    margin: 0 15px;
}
.navbar a {
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    transition: background 0.3s ease;
}
.navbar a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.navbar ul ul {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    background: rgba(42, 82, 152, 0.9);
    padding: 10px 0;
    border-radius: 4px;
}
.navbar li:hover > ul {
    display: block;
}
.navbar ul ul li {
    margin: 0;
}
.navbar ul ul a {
    padding: 8px 20px;
}
.navbar ul ul a:hover {
    background: rgba(30, 60, 114, 0.9);
}
/* 主要内容区域 */
.main-content {
    padding-top: 80px;
}
.hero-section {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    padding: 100px 20px;
    text-align: center;
    position: relative;
}
.hero-section h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}
.hero-section p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px;
}
.hero-section .button {
    background: linear-gradient(45deg, #ff7e5f, #feb47b);
    border: none;
    border-radius: 25px;
    color: #fff;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}
.hero-section .button:hover {
    background: linear-gradient(45deg, #feb47b, #ff7e5f);
    transform: scale(1.05);
}
/* 卡片样式 */
.card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}
.card-header {
    background: linear-gradient(120deg, #89f7fe 0%, #66a6ff 100%);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: 15px;
    color: #fff;
    font-size: 1.2em;
}
.card img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.card img:hover {
    transform: scale(1.05);
}
/* 加入背景装饰图片的样式 */
.decorative-image {
    width: 320px;
    height: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.decorative-image:hover {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
/* 文章内容样式 */
article h2 {
    font-size: 2em;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #1e3c72;
}
article h3 {
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2a5298;
}
article p {
    font-size: 1em;
    margin-bottom: 20px;
}
article pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
}
article code {
    font-family: 'Courier New', Courier, monospace;
}
article code::before {
    content: attr(class);
    display: block;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
}
/* 订阅表单样式 */
.subscribe-form {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: #1e3c72;
    color: #fff;
    flex-wrap: wrap;
}
.subscribe-form input[type="email"] {
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-right: 10px;
    transition: width 0.4s ease;
    width: 200px;
}
.subscribe-form input[type="email"]:focus {
    width: 300px;
    outline: none;
}
.subscribe-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(45deg, #ff7e5f, #feb47b);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}
.subscribe-form button:hover {
    background: linear-gradient(45deg, #feb47b, #ff7e5f);
}
/* 提示信息样式 */
.reference-notice {
    text-align: center;
    font-size: 1.2em;
    color: #fff;
    padding: 20px;
    background: rgba(46, 204, 113, 0.8);
    border-radius: 10px;
    margin: 20px 0;
}
/* 响应式布局调整 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
    }
    .navbar li {
        margin: 10px 0;
    }
    .hero-section {
        padding: 60px 20px;
    }
    .hero-section h1 {
        font-size: 2em;
    }
    .container {
        padding: 20px;
    }
    .subscribe-form {
        flex-direction: column;
    }
    .subscribe-form input[type="email"] {
        margin: 0 0 10px 0;
        width: 100%;
    }
}

