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

/* 基本字体与背景 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(to bottom, #001f3f, #34495e);
    color: #ffffff;
    line-height: 1.6;
    letter-spacing: 0.5px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 31, 63, 0.9);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s ease;
}

.header.scrolled {
    background: rgba(0, 31, 63, 1);
}

.header .logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff7f50;
    text-decoration: none;
}

.header nav {
    display: flex;
    gap: 20px;
}

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

.header nav a:hover {
    color: #ff7f50;
}

.header .search-box {
    margin-left: 20px;
}

.header .search-box input {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
}

/* 主内容区 */
.main {
    flex: 1;
    padding: 120px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 卡片网格布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 60px;
}

/* 单个卡片样式 */
.card {
    background: #ffffff;
    color: #34495e;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.card img {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

.card h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #001f3f;
}

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

.card a {
    display: inline-block;
    padding: 10px 20px;
    background: #ff7f50;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.card a:hover {
    background: #e67348;
}

/* 示例文章展示区 */
.article-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 60px;
}

.article-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #ff7f50;
    text-align: center;
}

.article-section h3 {
    font-size: 22px;
    margin: 20px 0 10px 0;
    color: #ff7f50;
}

.article-section p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #ffffff;
}

.article-section pre {
    background: #2c3e50;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 15px;
}

.article-section code {
    color: #ecf0f1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 提示信息样式 */
.reference-note {
    background: rgba(255, 127, 80, 0.9);
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    margin-bottom: 40px;
}

/* 页脚样式 */
.footer {
    background: rgba(0, 31, 63, 0.9);
    padding: 20px 40px;
    text-align: center;
    color: #ffffff;
    position: relative;
}

.footer a {
    color: #ff7f50;
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
}

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

/* 响应式设计 */

@media (max-width: 1440px) {
    .main {
        padding: 100px 30px 30px 30px;
    }
}

@media (max-width: 1200px) {
    .header {
        padding: 15px 30px;
    }

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

    .header nav a {
        font-size: 14px;
    }

    .main {
        padding: 100px 20px 20px 20px;
    }

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

    .card p {
        font-size: 13px;
    }

    .article-section h2 {
        font-size: 26px;
    }

    .article-section h3 {
        font-size: 20px;
    }

    .article-section p {
        font-size: 15px;
    }

    .footer a {
        font-size: 13px;
    }
}

@media (max-width: 1024px) {
    .header {
        padding: 10px 20px;
    }

    .header nav {
        display: none;
    }

    .header .search-box {
        display: none;
    }

    .main {
        padding: 90px 15px 15px 15px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .card {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .article-section {
        padding: 30px;
    }

    .footer {
        padding: 15px 20px;
    }
}

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

    .main {
        padding: 80px 10px 10px 10px;
    }

    .card h4 {
        font-size: 16px;
    }

    .card p {
        font-size: 12px;
    }

    .article-section h2 {
        font-size: 24px;
    }

    .article-section h3 {
        font-size: 18px;
    }

    .article-section p {
        font-size: 14px;
    }
}

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

    .main {
        padding: 70px 5px 5px 5px;
    }

    .card {
        padding: 10px;
    }

    .article-section {
        padding: 20px;
    }
}

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

body {
    animation: fadeIn 1s ease-in;
}

.card a {
    transition: background 0.3s ease, transform 0.3s ease;
}

.card a:hover {
    transform: translateY(-5px);
}

.logo-animation {
    animation: fadeIn 2s ease-in-out;
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #ff7f50;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.button:hover {
    background: #e67348;
}

/* 图标样式 */
.icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

/* 搜索框样式 */
.search-box input {
    width: 200px;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
}

/* 代码块样式 */
pre {
    background: #2c3e50;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

code {
    color: #ecf0f1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
}

/* 链接样式 */
a {
    color: #ff7f50;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

th, td {
    padding: 10px;
    border: 1px solid #34495e;
    text-align: left;
}

th {
    background: #001f3f;
    color: #ffffff;
}

td {
    background: #2c3e50;
    color: #ecf0f1;
}

/* 列表样式 */
ul, ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 10px;
}

/* 表单样式 */
input, textarea, select, button {
    font-family: 'Roboto', sans-serif;
}

/* 可访问性优化 */
.button:focus, a:focus, input:focus {
    outline: 2px dashed #ff7f50;
    outline-offset: 4px;
}


