/* css/style.css - 更新版，修改.code-block的margin为1rem 1rem */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '思源黑体', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-width: 1200px;
}

.container {
    width: 1200px;
    margin: 0 auto;
}

/* 导航栏 */
.navbar {
    background-color: #1e3a8a;
    height: 70px;
    line-height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
}

.logo span {
    color: #f59e0b;
}

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

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #f59e0b;
}

.btn-download {
    background-color: #f59e0b;
    padding: 0 1.5rem;
    border-radius: 4px;
    color: white !important;
    display: inline-block;
}

.btn-download:hover {
    background-color: #d97706;
}

/* 按钮通用 */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #f59e0b;
    color: white;
}

.btn-primary:hover {
    background-color: #d97706;
}

.btn-secondary {
    background-color: white;
    color: #1e3a8a;
    border: 2px solid #1e3a8a;
}

.btn-secondary:hover {
    background-color: #1e3a8a;
    color: white;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.2rem;
}

.btn-demo {
    background-color: #2d4b9e;
    color: white !important;
    border: 2px solid #2d4b9e;
}

.btn-demo:hover {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background-color: #1e3a8a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 24px;
    border: none;
    outline: none;
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    background-color: #f59e0b;
}

/* 页脚 */
.footer {
    background-color: #1a1a1a;
    color: #999;
    padding: 3rem 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 2rem;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    margin: 0 1.5rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #f59e0b;
}

.footer-copyright {
    color: #999;
}

.footer-copyright a {
    color: #999;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-copyright a:hover {
    color: #f59e0b;
}

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2d4b9e 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* 章节标题 */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: #1e3a8a;
    position: relative;
    padding-bottom: 1rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #f59e0b;
}

section {
    padding: 4rem 0;
}

/* 代码块 */
.code-block {
    background-color: #2d2d2d;
    border-radius: 4px;
    margin: 1rem 1rem; /* 修改为上下左右各1rem */
    position: relative;
}

.code-block pre {
    color: #f8f8f2;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    overflow-x: auto;
    margin: 0;
}

/* 复制按钮 */
.code-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255,255,255,0.1);
    color: #ccc;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s;
}

.code-copy-btn:hover {
    background-color: rgba(255,255,255,0.2);
    color: white;
}

/* 提示框 */
.note {
    background-color: #e7f3ff;
    border-left: 4px solid #1e3a8a;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.table th {
    background-color: #1e3a8a;
    color: white;
    padding: 0.8rem;
    text-align: left;
}

.table td {
    padding: 0.8rem;
    border-bottom: 1px solid #ddd;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* 链接样式（防止手机单独样式） */
a {
    color: #1e3a8a;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 快速体验网格 */
.quickstart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.quickstart-grid > div {
    min-width: 0;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    word-break: break-word;
}

.quickstart-grid .code-block {
    max-width: 100%;
    margin-top: 1rem;
}

.quickstart-grid .code-block pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* 工具集网格 */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.tools-grid > div {
    min-width: 0;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    word-break: break-word;
}

.tools-grid .code-block {
    max-width: 100%;
    margin-top: 1rem;
}

.tools-grid .code-block pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* 文档中心侧边栏 */
.docs-wrapper {
    display: flex;
    gap: 2rem;
    position: relative;
}

.docs-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    height: calc(100vh - 100px);
    overflow-y: auto;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: #1e3a8a;
    border-radius: 3px;
}

.docs-sidebar h3 {
    color: #1e3a8a;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f59e0b;
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 10;
}

.docs-sidebar ul {
    list-style: none;
}

.docs-sidebar li {
    margin-bottom: 0.3rem;
}

.docs-sidebar a {
    color: #666;
    text-decoration: none;
    display: block;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.docs-sidebar a:hover {
    background: #e9ecef;
    color: #1e3a8a;
    padding-left: 0.8rem;
}

.docs-sidebar a.active {
    background: #1e3a8a;
    color: white;
}

.docs-content {
    flex: 1;
    min-width: 0;
}

.docs-section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    scroll-margin-top: 90px;
}

/* 下载页面版本卡片 */
.version-grid {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.version-card {
    flex: 1;
    max-width: 400px;
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.version-card.pro {
    border: 2px solid #f59e0b;
}

.version-card h2 {
    color: #1e3a8a;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.version-card .price {
    font-size: 3rem;
    color: #f59e0b;
    margin: 1.5rem 0;
    font-weight: bold;
}

.version-card .price small {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
}

.version-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
    flex: 1;
}

.version-card li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.version-card li:before {
    content: '✓';
    color: #f59e0b;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.version-card .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    margin-top: auto;
}

/* 资源下载网格 */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.resource-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.resource-card h3 {
    color: #1e3a8a;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.resource-card p {
    flex: 1;
    margin-bottom: 1rem;
    color: #666;
}

.resource-card .btn {
    margin-top: auto;
    display: inline-block;
    padding: 0.6rem 1.5rem;
}

/* 升级日志 */
.changelog-section {
    background: #f8f9fa;
    padding: 3rem 0;
}

.changelog-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.changelog-item h3 {
    color: #1e3a8a;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    border-left: 4px solid #f59e0b;
    padding-left: 1rem;
}

.changelog-item ul {
    list-style: none;
}

.changelog-item li {
    margin-bottom: 0.5rem;
    padding-left: 1.8rem;
    position: relative;
    line-height: 1.6;
}

.changelog-item li:before {
    content: '•';
    color: #f59e0b;
    position: absolute;
    left: 0.5rem;
    font-size: 1.2rem;
}

.changelog-item .tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.changelog-item .tag-add { background: #d4edda; color: #155724; }
.changelog-item .tag-fix { background: #fff3cd; color: #856404; }
.changelog-item .tag-update { background: #cce5ff; color: #004085; }
.changelog-item .tag-remove { background: #f8d7da; color: #721c24; }