
/* 
整体页面样式设计
使用现代CSS3技术实现响应式布局与丰富的视觉效果
*/

/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* 渐变背景色，增加科技感 */
    color: #ffffff;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background: rgba(0, 0, 0, 0.7); /* 半透明背景 */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #ff9800;
    text-decoration: none;
}

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

.navbar ul li {
    position: relative;
}

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

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

/* 下拉菜单样式 */
.navbar ul li .dropdown {
    display: none;
    position: absolute;
    top: 35px;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 10px 0;
    border-radius: 4px;
}

.navbar ul li:hover .dropdown {
    display: block;
}

.navbar ul li .dropdown a {
    display: block;
    padding: 10px 20px;
    color: #ffffff;
    white-space: nowrap;
}

.navbar ul li .dropdown a:hover {
    background: #ff9800;
    color: #ffffff;
}

/* 主内容区样式 */
.main {
    padding-top: 80px; /* 预留导航栏高度 */
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 特色提示 */
.featured {
    background: rgba(255, 152, 0, 0.8);
    color: #000000;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 30px;
    animation: fadeIn 2s ease-in-out;
}

/* 文章内容样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

article section {
    margin-bottom: 40px;
}

article h2 {
    font-size: 2em;
    color: #ff9800;
    margin-bottom: 10px;
    position: relative;
}

article h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #ff9800;
    margin-top: 5px;
    border-radius: 2px;
}

article p {
    font-size: 1em;
    color: #ffffff;
    margin-bottom: 15px;
}

/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
}

code {
    color: #ff9800;
    font-family: Consolas, monospace;
    font-size: 0.9em;
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 10px;
}

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

/* 卡片布局 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: calc(33% - 20px);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card h3 {
    font-size: 1.2em;
    color: #ff9800;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.95em;
    color: #ffffff;
    margin-bottom: 15px;
}

.card a {
    color: #ff5722;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.card a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .card {
        width: calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar ul {
        flex-direction: column;
        width: 100%;
    }
    .navbar ul li {
        width: 100%;
    }
    .navbar ul li .dropdown {
        position: static;
        width: 100%;
    }
    .card {
        width: 100%;
    }
    .featured {
        font-size: 1em;
    }
}

/* 底部样式 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 20px;
    text-align: center;
}

.footer a {
    color: #ff9800;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

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