/* 文档专用样式 - 移动端优先设计 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 0;
}

/* 页面顶部装饰 */
body {
    background: linear-gradient(135deg, #6a11cb10 0%, #2575fc10 100%);
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    z-index: 1000;
}

/* 内容容器 */
.doc-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: white;
    min-height: calc(100vh - 40px);
    box-shadow: 0 6px 30px rgba(0,0,0,0.08);
    position: relative;
    border-radius: 8px;
    margin-top: 15px;
    margin-bottom: 15px;

/* 内容容器内边距调整 */
.doc-container > *:first-child {
    margin-top: 0;
}

/* 标题样式 */
h1 {
    font-size: 26px;
    color: #2d3748;
    margin: 0 0 35px 0;
    padding: 25px 0 20px 0;
    border-bottom: 3px solid #6a11cb;
    text-align: center;
    position: relative;
    font-weight: 700;
}

h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #2575fc;
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
}

h2 {
    font-size: 21px;
    color: #2d3748;
    margin: 40px 0 20px 0;
    padding: 10px 0 10px 15px;
    border-left: 5px solid #6a11cb;
    background: linear-gradient(to right, rgba(106, 17, 203, 0.05), transparent);
}

h3 {
    font-size: 19px;
    color: #4a5568;
    margin: 30px 0 15px 0;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

h4 {
    font-size: 17px;
    color: #4a5568;
    margin: 25px 0 10px 0;
}

h5 {
    font-size: 16px;
    color: #718096;
    margin: 20px 0 8px 0;
}

/* 段落样式 */
p {
    margin: 0 0 20px 0;
    text-align: justify;
    color: #4a5568;
    line-height: 1.8;
    font-size: 16px;
}

/* 链接样式 */
a {
    color: #6a11cb;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: #2575fc;
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #2575fc;
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* 列表样式 */
ul, ol {
    margin: 0 0 30px 0;
    padding-left: 35px;
}

li {
    margin-bottom: 12px;
    color: #4a5568;
    position: relative;
    line-height: 1.6;
}

li strong {
    color: #6a11cb;
    font-weight: 600;
}

/* 为无序列表添加自定义样式 */
ul li::marker {
    color: #6a11cb;
    font-weight: bold;
}

/* 为有序列表添加自定义样式 */
ol {
    counter-reset: item;
}

ol li {
    counter-increment: item;
}

ol li::marker {
    color: #2575fc;
    font-weight: 600;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* 图片容器样式 */
.img-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.img-container img {
    max-width: 90%;
    border: 1px solid #e2e8f0;
    padding: 8px;
    background-color: white;
}

/* 代码块样式 */
pre, code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f7fafc;
    border-radius: 5px;
    padding: 2px 6px;
    font-size: 14px;
    color: #e53e3e;
}

pre {
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    position: relative;
    background: linear-gradient(90deg, #f7fafc 0%, #f1f5f9 100%);
    border-left: 4px solid #6a11cb;
}

pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

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

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

th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

/* 引用样式 */
blockquote {
    border-left: 4px solid #6a11cb;
    padding-left: 15px;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 20px;
    color: #718096;
    font-style: italic;
}

/* 强调样式 */
strong {
    color: #2d3748;
    font-weight: 600;
}

/* 分隔线 */
hr {
    border: none;
    height: 3px;
    background: linear-gradient(to right, transparent, #6a11cb, transparent);
    margin: 40px 0;
    opacity: 0.2;
}

/* 提示框样式 */
.note {
    background-color: #ebf8ff;
    border-left: 4px solid #4299e1;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.tip {
    background-color: #f0fff4;
    border-left: 4px solid #48bb78;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.warning {
    background-color: #fffaf0;
    border-left: 4px solid #ed8936;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .doc-container {
        padding: 15px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    h3 {
        font-size: 16px;
    }
    
    .doc-nav-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .doc-nav h2 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .doc-container {
        padding: 10px;
    }
    
    body {
        font-size: 15px;
    }
}

/* 底部信息 */
.doc-footer {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.03), rgba(37, 117, 252, 0.03));
    color: #718096;
    font-size: 14px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    margin-top: 50px;
    border-radius: 0 0 8px 8px;
    position: relative;
}

/* 移除返回顶部按钮样式 */

/* 打印友好样式 */
@media print {
    .doc-nav {
        display: none;
    }
    
    .doc-container {
        box-shadow: none;
        padding: 0;
    }
}
