
/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 颜色变量 */
:root {
    --deep-blue: #003366;
    --bright-blue: #0074D9;
    --green: #2ECC40;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --text-color: #333333;
}

/* 全局字体与背景 */
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--deep-blue), var(--bright-blue));
    padding-top: 60px;
}

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

.navbar .logo {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    color: var(--white);
    font-weight: bold;
}

.navbar .nav-links a {
    color: var(--white);
    margin-left: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
    color: var(--green);
}

/* 主内容区样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0;
}

/* 卡片网格布局 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.card h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--deep-blue);
}

.card p {
    font-size: 14px;
    margin-bottom: 15px;
}

.card .tags {
    font-size: 12px;
    color: var(--green);
    margin-bottom: 15px;
}

.card .operations a {
    text-decoration: none;
    color: var(--bright-blue);
    margin-right: 10px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.card .operations a:hover {
    color: var(--green);
}

/* 文章部分样式 */
.article {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 50px;
}

.article h2, .article h3, .article h4 {
    font-family: 'Roboto', sans-serif;
    color: var(--deep-blue);
    margin-bottom: 15px;
}

.article p {
    margin-bottom: 15px;
}

.article ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.article pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

.article code {
    font-family: 'Courier New', Courier, monospace;
}

/* 表格样式 */
.article table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.article table, .article th, .article td {
    border: 1px solid #ddd;
}

.article th, .article td {
    padding: 10px;
    text-align: left;
}

.article th {
    background: var(--bright-blue);
    color: var(--white);
}

.article td {
    background: var(--white);
}

/* 提示信息样式 */
.footer-note {
    text-align: center;
    font-size: 14px;
    color: var(--white);
    padding: 20px;
    background: rgba(0, 51, 102, 0.9);
    position: fixed;
    width: 100%;
    bottom: 0;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .navbar {
        padding: 10px 20px;
    }

    .navbar .logo {
        font-size: 20px;
    }

    .navbar .nav-links a {
        margin-left: 15px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .article {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar .nav-links {
        margin-top: 10px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .article {
        padding: 15px;
    }
}

@media (max-width: 320px) {
    .navbar .logo {
        font-size: 18px;
    }

    .navbar .nav-links a {
        margin-left: 10px;
        font-size: 12px;
    }

    .card h3 {
        font-size: 18px;
    }

    .card p, .card .tags, .card .operations a {
        font-size: 12px;
    }

    .article h2 {
        font-size: 22px;
    }
}

