/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局样式 */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 750px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
}

/* 导航菜单 */
.nav-menu {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 90px;
    z-index: 99;
}

.nav-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #4facfe;
    user-select: none;
}

.nav-toggle .arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.nav-toggle.active .arrow {
    transform: rotate(180deg);
}

.nav-list {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-list.active {
    max-height: 700px;
    border-top: 1px solid #e9ecef;
}

.nav-list li {
    border-bottom: 1px solid #e9ecef;
}

.nav-list li:last-child {
    border-bottom: none;
}

.nav-list a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-list a:hover,
.nav-list a:active {
    background: #4facfe;
    color: #fff;
    padding-left: 50px;
}

/* 主内容 */
.content {
    padding: 20px;
}

/* 引言 */
.intro {
    background: linear-gradient(135deg, #4facfe15 0%, #00f2fe15 100%);
    border-left: 4px solid #4facfe;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    scroll-margin-top: 110px;
}

.intro-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4facfe;
    margin-bottom: 20px;
}

.intro-content {
    color: #495057;
    font-size: 0.9rem;
}

.intro-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.intro-text {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.highlight {
    color: #0056b3;
    font-weight: 500;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 8px;
    margin: 15px 0;
    display: block;
}

/* 章节 */
.section {
    margin-bottom: 40px;
    scroll-margin-top: 110px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4facfe;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4facfe;
}

.section-content {
    color: #495057;
    font-size: 0.9rem;
}

.section-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* 子标题 */
.subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin: 25px 0 15px;
}

.item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #6c757d;
    margin: 20px 0 10px;
}

/* 信息框 */
.info-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.info-box p {
    color: #0c5460;
    margin-bottom: 8px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box a {
    color: #0c5460;
    font-weight: 600;
    text-decoration: none;
}

.info-box a:hover {
    text-decoration: underline;
}

/* 提示框 */
.notice-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.notice-box p,
.notice-box strong {
    color: #856404;
}

.notice-box p {
    margin-bottom: 10px;
}

.notice-box p:last-child {
    margin-bottom: 0;
}

.notice-text {
    color: #856404;
    font-style: italic;
    background: #fff3cd;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0;
    display: block;
}

/* 警告框 */
.warning-box {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.warning-box p {
    color: #721c24;
    margin-bottom: 10px;
}

.warning-box p:last-child {
    margin-bottom: 0;
}

/* 联系框 */
.contact-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #4facfe;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.contact-box h3 {
    color: #0277bd;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
}

.contact-box p {
    color: #01579b;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.contact-box p:last-child {
    margin-bottom: 0;
}

.contact-box a {
    color: #0277bd;
    font-weight: 600;
    text-decoration: none;
}

.contact-box a:hover {
    text-decoration: underline;
    color: #01579b;
}

/* 列表 */
.section-content ul,
.intro-content ul {
    margin: 15px 0;
    padding-left: 30px;
}

.section-content ul li,
.intro-content ul li {
    margin-bottom: 12px;
    line-height: 1.8;
}

/* 页脚 */
.footer {
    background: #343a40;
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

.footer .copyright {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #495057;
    color: #adb5bd;
    font-size: 0.85rem;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .content {
        padding: 15px;
    }

    .nav-toggle {
        padding: 12px 15px;
    }

    .nav-list a {
        padding: 10px 15px 10px 30px;
        font-size: 0.85rem;
    }

    .nav-list a:hover,
    .nav-list a:active {
        padding-left: 35px;
    }

    .section-title,
    .intro-title {
        font-size: 1.1rem;
    }

    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 45px;
        height: 45px;
    }
}

/* 平板设备 */
@media (min-width: 751px) {
    .container {
        margin: 20px auto;
        border-radius: 10px;
        overflow: hidden;
    }

    .header {
        position: relative;
        border-radius: 0;
    }

    .nav-menu {
        position: relative;
        top: 0;
    }
}

/* 打印样式 */
@media print {
    body {
        background: #fff;
    }

    .container {
        box-shadow: none;
    }

    .nav-menu,
    .back-to-top {
        display: none;
    }

    .section {
        page-break-inside: avoid;
    }
}

