﻿/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 0;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 65px;
    width: auto;
    margin-right: 10px;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: #1677ff;
}

.nav-links {
    display: flex;
    list-style: none;
    margin-left: 40px;
}

.nav-links li {
    margin-left: 10px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s;
    display: inline-block;
}

.nav-links a:hover {
    color: white;
    background-color: #1677ff;
    text-decoration: none;
    border-radius: 5px;
}

.nav-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 0 !important;
}
.nav-actions font,
.nav-actions b,
.nav-actions a {
    margin-left: 4px !important;
    margin-right: 0 !important;
}
.nav-actions font:first-child {
    margin-left: 0 !important;
}
/* ========== 首页搜索框 ========== */
.search-box {
  width: 100% !important;
  max-width: 700px !important;
  margin: 20px auto 10px !important;
  padding: 0 !important;
}

.search-box form {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  gap: 0 !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  background: #fff !important;
}

/* 输入框：只加右分隔线 */
#keyboard.inputText {
  flex: 1 !important;
  height: 50px !important;
  padding: 0 15px !important;
  font-size: 16px !important;
  border: none !important;
  border-right: 1px solid #ddd !important;
  outline: none !important;
  background: transparent !important;
}

/* 下拉框：只加右分隔线，左边彻底无边框 */
.search-select {
  height: 50px !important;
  padding: 0 25px 0 10px !important;
  font-size: 15px !important;
  border: none !important;
  border-right: 1px solid #ddd !important;
  outline: none !important;
  background: transparent !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
}

/* 搜索按钮 */
.inputSub {
  height: 50px !important;
  padding: 0 25px !important;
  font-size: 16px !important;
  color: #fff !important;
  background: #1677ff !important;
  border: none !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

.inputSub:hover {
  background: #0d6adc !important;
}

.search-box form:focus-within {
  border-color: #1677ff !important;
}
/* ========== END ========== */
.nav-actions a {
    margin-left: 15px;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.login-btn {
    color: #1677ff;
    border: 1px solid #1677ff;
}

.login-btn:hover {
    background-color: #e6f7ff;
}

.register-btn {
    background-color: #1677ff;
    color: white;
}

.register-btn:hover {
    background-color: #4096ff;
}

/* 说明文字样式 */
.description {
    padding: 15px;
    background-color: #f0f7ff;
    border-radius: 4px;
    counter-reset: li-count;
    line-height: 35px !important; /* 统一全局行高 */
}
.description {
    font-size: 16px;
}
.description li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 6px;
    list-style: none;
    font-size: 16px;
    line-height: 30px !important; /* 统一行高 */
    min-height: 30px;
}
.description li::before {
    content: counter(li-count);
    counter-increment: li-count;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    border-radius: 3px;
}
.description li:nth-child(1)::before { background: #1677ff; }
.description li:nth-child(2)::before { background: #52c41a; }
.description li:nth-child(3)::before { background: #faad14; }
.description li:nth-child(4)::before { background: #f5222d; }
.description li:nth-child(5)::before { background: #722ed1; }

.description strong {
    color: #1677ff;
}

/* 表格容器样式 */
.table-container {
    margin-top: 10px;
}

/* 双列布局 */
.dual-table-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.table-column {
    flex: 1;
}

.table-column h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 18px;
}

/* 加载更多按钮样式 */
.load-more {
    text-align: center;
    margin-top: 20px;
}

.load-more button {
    padding: 10px 20px;
    background-color: #1677ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.load-more button:hover {
    background-color: #4096ff;
}

.load-more button:disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border: 1px solid #e8e8e8;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e8e8e8;
}

th:first-child, td:first-child {
    width: auto;
}

th:last-child, td:last-child {
    width: 120px;
    min-width: 120px;
}

th {
    background-color: #fafafa;
    font-weight: 600;
    color: #666;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 链接样式 */
a {
    color: #001dff;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #4096ff;
    text-decoration: underline;
}

/* 页脚样式 */
.footer {
    background-color: #f8f9fa;
    color: #666;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #e8e8e8;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 14px;
}

/* 返回顶部按钮样式 */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #1677ff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
    z-index: 999;
}

.back-to-top-btn:hover {
    background-color: #0958d9;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        padding: 15px;
        border-radius: 0;
        box-shadow: none;
    }

    .nav-container {
        flex-direction: column;
        padding: 10px;
    }

    .logo {
        margin-bottom: 10px;
    }

    .nav-links {
        margin: 10px 0;
        flex-wrap: wrap;
    }

    .nav-links li {
        margin: 5px 10px;
    }

    /* 双列布局在移动设备上改为单列 */
    .dual-table-container {
        flex-direction: column;
    }

    .table-column {
        margin-bottom: 20px;
    }

    .table-cell {
        padding: 8px 10px;
        font-size: 14px;
    }

    .description {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px;
    }

    .table-cell {
        padding: 6px 8px;
        font-size: 12px;
    }

    .description p {
        font-size: 14px;
    }
}

/* 表格头部固定 */
/* 隐藏超出显示数量的行 */
.hidden-row {
    display: none !important;
}

/* 接口标题链接样式 */
.interface-title {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.interface-title:hover {
    color: #1677ff;
    text-decoration: none;
}

/* ====================== 下载页面专属样式 ====================== */
/* 1. 重置外层容器：去掉背景、阴影和圆角，让背景透明白色 */
.container-down .container-new {
    background-color: transparent; /* 透明背景 */
    box-shadow: none; /* 移除阴影 */
    border-radius: 0; /* 移除圆角 */
    padding: 0; /* 去除内边距，让内容顶满 */
    max-width: 1200px;
    margin: 0 auto;
}

/* 2. 核心下载方框样式：大气、宽距、行距拉开 */
.download-box {
    max-width: 800px;
    margin: 60px auto; /* 上下外边距，控制距离导航栏的高度 */
    padding: 60px 50px; /* 内边距，控制内容宽窄 */
    background: #ffffff; /* 纯白背景 */
    border-radius: 12px; /* 精致圆角 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* 柔和阴影 */
    border: 1px solid #e8e8e8; /* 细边框增加质感 */
}

/* 标题样式 */
.download-box h2 {
    font-size: 20px;
    color: #222;
    margin-bottom: 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
}

/* 说明文字：拉大行距 */
.download-desc {
    color: #555;
    font-size: 16px;
    margin-bottom: 40px;
    line-height: 2.2; /* 关键：拉大行距，更透气 */
}

/* 下载地址区域：美化背景框 */
.download-btn-group {
    padding: 25px 30px;
    background-color: #f8f9fa; /* 浅灰背景区分 */
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.8;
    text-align: left;
    word-break: break-all; /* 防止长链接撑开 */
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.download-btn-group strong {
    color: #333;
    margin-right: 10px;
}

.download-btn-group a {
    color: #0925ff;
    font-weight: 500;
    text-decoration: underline;
}

.download-btn-group a:hover {
    color: #4096ff;
    text-decoration: underline;
}

/* 下载信息区域 - 一行三列 + 直角边框 + 文字左对齐 */
.download-info {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.info-row {
    display: flex;
    width: 100%;
    border: 1px solid #e8e8e8;
    overflow: hidden;
}

.info-item {
    flex: 1;
    padding: 18px 20px;
    border-right: 1px solid #e8e8e8;
    font-size: 15px;
    line-height: 1.6;
}

/* 最后一列去掉右边框 */
.info-item:last-child {
    border-right: none;
}

.info-label {
    color: #333;
    font-weight: 500;
}

.info-value {
    color: #666;
    margin-left: 4px;
}

/* ====================== 文章内容页专用样式 ====================== */
.article-box {
    max-width: 800px;
    margin: 60px auto;
    padding: 60px 50px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.article-title {
    font-size: 26px;
    font-weight: 600;
    color: #222;
    line-height: 1.5;
    margin-bottom: 25px;
    text-align: center;
}

.article-info {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.article-info span {
    margin: 0 10px;
}

/* 内容折叠区域 */
.article-content-wrap {
    position: relative;
    max-height: 360px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.article-content-wrap.expanded {
    max-height: 9999px;
}

.article-content-wrap::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s;
}

.article-content-wrap.expanded::after {
    opacity: 0;
}

.article-content {
    font-size: 16px;
    line-height: 30px; /* 固定行高，JS才能准确算行数 */
    color: #333;
}

.article-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.article-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 20px auto 0;
}

:root {
    scroll-padding-top: 140px !important;
}

.article-content h2,
.article-content h3 {
    margin: 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    scroll-margin-top: 0 !important;
}

/* 展开按钮 */
.article-expand-box {
    text-align: center;
    margin-top: 20px;
}

.expand-btn {
    padding: 10px 24px;
    background: #1677ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.expand-btn:hover {
    background: #4096ff;
}

.expand-btn.expanded {
    background: #666;
}

@media (max-width: 768px) {
    .article-box {
        margin: 40px 15px;
        padding: 40px 25px;
    }

    .article-title {
        font-size: 22px;
    }
}

/* ====================== 目录专用样式 ====================== */
/* 文章页面整体容器 */
.article-wrapper {
    position: relative;
    max-width: 800px;
    margin: 60px auto;
}

/* 左侧悬浮目录 - 固定在屏幕上，不随滚动乱跑 */
.article-catalog {
    width: 300px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);

    /* 核心：固定在屏幕上，永远不动 */
    position: fixed;
    right: calc(50% + 400px + 10px);
    top: 135px;

    z-index: 99;
}

.article-catalog h3 {
    font-size: 18px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* 彻底清除小圆点+列表样式 */
.article-catalog ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.article-catalog li {
    line-height: 35px;
    padding-left: 0;
}

.article-catalog li a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.article-catalog li a:hover {
    text-decoration: underline;
}

/* 文章主体 - 保持原样 */
.article-box {
    max-width: 800px;
    margin: 60px auto;
    padding: 60px 50px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-left: auto;
}

/* 移动端适配 */
@media (max-width: 1024px) {
    .article-catalog {
        display: none;
    }

    .article-box {
        max-width: 100%;
        padding: 30px 20px;
        margin: 40px auto;
    }
}