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

:root {
    --primary-color: #0077b6;
    --primary-dark: #005a87;
    --primary-light: #00a8e8;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f5f7fa;
    --border-color: #e0e0e0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: #fafbfc;
}

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.logo-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 响应式导航 */
@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
        font-size: 0.9em;
    }

    .nav-container {
        height: 60px;
    }

    .logo-text {
        display: none;
    }
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 119, 182, 0.3);
}

.btn-secondary {
    background: #e8ecf1;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 通用卡片样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.card-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 119, 182, 0.15);
}

/* 代码块 */
.code-block {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 20px 0;
}

.code-block code {
    display: block;
    white-space: pre;
}

/* 提示框 */
.alert {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid;
}

.alert-info {
    background: #e7f3ff;
    border-color: #0077b6;
    color: #0066cc;
}

.alert-success {
    background: #e7f4e4;
    border-color: #28a745;
    color: #155724;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-danger {
    background: #ffe7e7;
    border-color: #dc3545;
    color: #721c24;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background: var(--primary-color);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: var(--bg-light);
}

/* 列表 */
ul, ol {
    margin-left: 20px;
    margin-top: 10px;
}

li {
    margin: 8px 0;
    line-height: 1.6;
}

/* 标题 */
h1, h2, h3, h4, h5, h6 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 700;
}

h1 {
    font-size: 2.5em;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
}

h2 {
    font-size: 1.8em;
}

h3 {
    font-size: 1.3em;
    color: var(--primary-color);
}

/* 链接 */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 代码 */
code {
    background: #f5f7fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.code-block code {
    background: none;
    padding: 0;
    color: #f8f8f2;
}

/* 分割线 */
hr {
    border: none;
    height: 2px;
    background: var(--border-color);
    margin: 30px 0;
}

/* 页脚 */
footer {
    background: #1a1a1a;
    color: #ccc;
    text-align: center;
    padding: 40px 20px;
    margin-top: 80px;
}

footer a {
    color: var(--primary-color);
}

footer p {
    margin: 8px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    .card-container {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        display: none;
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

.p-20 {
    padding: 20px;
}

.rounded {
    border-radius: 8px;
}

.shadow {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}