
/* 
整体页面样式定义
包含响应式设计、网格系统、色彩搭配等
*/

/* 页面背景及字体 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #2D9CDB 70%, #9B51E0 25%, #F2994A 5%);
    font-family: 'Roboto', sans-serif;
    color: #333333;
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
    background: rgba(45, 156, 219, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
}

.navbar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: #F2994A;
}

/* 主容器设置 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* 卡片样式 */
.card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    margin: 0 0 10px;
    color: #2D9CDB;
    font-size: 18px;
}

.card-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #555555;
}

/* 提示文字样式 */
.reference-note {
    text-align: center;
    font-size: 18px;
    color: #FFFFFF;
    margin-bottom: 50px;
    animation: fadeIn 2s ease-in-out;
}

/* 按钮样式 */
.button {
    background-color: #2D9CDB;
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background-color: #9B51E0;
    transform: scale(1.05);
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    right: 20px;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chapter-nav a {
    background-color: rgba(255, 255, 255, 0.8);
    color: #2D9CDB;
    padding: 10px 15px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.chapter-nav a:hover {
    background-color: #F2994A;
    color: #ffffff;
}

/* 响应式图片样式 */
.responsive-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.responsive-img:hover {
    transform: scale(1.02);
}

/* 文章内容样式 */
article {
    line-height: 1.8;
    font-size: 17px;
    color: #333333;
}

article h2 {
    font-size: 24px;
    color: #2D9CDB;
    margin-top: 40px;
    margin-bottom: 20px;
}

article section {
    margin-bottom: 30px;
}

article pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

article pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    color: #333333;
}

/* CSS3代码示例样式 */
.code-sample {
    background-color: #f0f0f0;
    padding: 15px;
    border-left: 4px solid #2D9CDB;
    margin: 20px 0;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    white-space: pre-wrap;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 底部样式 */
footer {
    background-color: #2D9CDB;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* 隐藏属性 */
img {
    alt: "";
}

