#top {
    scroll-margin-top: 50px; /* 等于你导航栏的高度 */
}
/* ===== 基础样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth;
}
a {
    text-decoration: none;
    color: #444;
    transition: color 0.3s;
}
a:hover {
    color: #3498db;
}
ul {
    list-style: none;
}
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}
button {
    cursor: pointer;
    border: none;
    background: none;
}
input:focus {
    outline: none;
}

/* ===== 导航栏 ===== */
.header {
    background-color: rgb(240, 245, 249);
    padding: 10px 0;
}
.nav {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 0 15px;
}

/* Logo */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}
.logo {
    font-size: 20px;
    font-weight: bold;
    color: #3498db;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.2;
}
.logo:hover {
    color: #2980b9;
}
.logo-url {
    font-size: 12px;
    color: #666;
    margin-top: 0;
    white-space: nowrap;
}

/* ===== 搜索框 ===== */
.search-wrapper {
    display: flex;
    align-items: center;
    transition: all 0.3s;
}
.search-form {
    display: flex;
    align-items: center;
    width: 100%;
}
.search-input {
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #ddd;
    width: 80%;
    max-width: 300px;
    font-size: 14px;
}
.search-btn {
    background-color: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    margin-left: 10px;
    transition: background-color 0.3s;
    white-space: nowrap;
}
.search-btn:hover {
    background-color: #2980b9;
}

/* 移动端搜索触发按钮 */
.search-toggle-btn {
    display: none;
    cursor: pointer;
    padding: 8px;
    color: #3498db;
}
.search-toggle-btn svg {
    display: block;
}

/* ===== 导航链接 ===== */
.nav-links {
    display: flex;
    align-items: center;
}
.nav-links li {
    margin: 0 10px;
}
.nav-links a {
    font-size: 15px;
    white-space: nowrap;
}

/* ===== 横幅 ===== */
.banner {
    background-color: #3498db;
    padding: 40px 0;
    text-align: center;
    color: #fff;
}
.banner h1 {
    font-size: 32px;
    margin-bottom: 10px;
}
.banner p {
    font-size: 18px;
    opacity: 0.9;
}

/* ===== 主要内容区 ===== */
.main-content {
    display: flex;
    margin-bottom: 50px;
    padding-top: 30px;
}
.content-left {
    flex: 3;
    margin-right: 20px;
}
.content-right {
    flex: 1;
    max-width: 300px;
}

/* 侧边栏 sticky */
.sidebar-sticky {
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    width: 100%;
}

/* ===== 资料板块 ===== */
.section {
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.section-title {
    padding: 6px 20px;
    color: #fff;
    border-radius: 8px;
    background: rgb(25, 181, 251);
    font-size: 16px;
}
.doc-list {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 10px 0 10px;
}
.doc-card {
    width: 25%;
    padding: 0 5px 20px;
}
.doc-card-inner {
    border-radius: 6px;
    padding: 5px;
    transition: transform 0.3s;
    height: 100%;
}
.doc-card-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.doc-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #f1f1f1;
}
.doc-title {
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    transition: color 0.3s;
}
.doc-title:hover {
    color: #3498db;
}
.price-container {
    display: flex;
    align-items: center;
}
.doc-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 16px;
}
.price-beautify {
    color: #3498db;
    margin-left: 5px;
    font-size: 14px;
    opacity: 0.8;
}

/* 热门资料 2 列 */
.two-columns {
    padding-bottom: 10px;
}
.two-columns .doc-card {
    width: 50%;
    padding: 0;
}
.two-columns .doc-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.two-columns .doc-card-inner:hover {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.15);
    border-color: #bde0fe;
}
.two-columns .doc-title {
    margin-bottom: 0;
    font-size: 14px;
    flex: 1;
}
.two-columns .price-container {
    min-width: 38px;
    justify-content: flex-end;
}
.two-columns .doc-price {
    font-size: 15px;
}

/* 序号 */
.two-columns .rank-num {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    margin-right: 8px;
}
.two-columns .doc-card:nth-child(1) .rank-num { background-color: #FF6B6B; }
.two-columns .doc-card:nth-child(2) .rank-num { background-color: #4ECDC4; }
.two-columns .doc-card:nth-child(3) .rank-num { background-color: #45B7D1; }
.two-columns .doc-card:nth-child(4) .rank-num { background-color: #96CEB4; }
.two-columns .doc-card:nth-child(5) .rank-num { background-color: #FFEAA7; }
.two-columns .doc-card:nth-child(6) .rank-num { background-color: #DDA0DD; }
.two-columns .doc-card:nth-child(7) .rank-num { background-color: #FFA07A; }
.two-columns .doc-card:nth-child(8) .rank-num { background-color: #87CEEB; }
.two-columns .doc-card:nth-child(9) .rank-num { background-color: #F08080; }
.two-columns .doc-card:nth-child(10) .rank-num { background-color: #98D8C8; }

/* ===== 右侧边栏 ===== */
.sidebar-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px 15px 5px 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sidebar-title {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.contact-info {
    display: flex;
    align-items: center;
    padding: 5px;
    margin-bottom: 12px;
    border-bottom: 1px solid #ededed;
}
.contact-info .contact-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    background-color: #f1f1f1;
    border-radius: 50%;
    background-image: url(/skin/wlogo.png);
    background-size: cover;
    background-position: center;
}
.help-content {
    font-size: 14px;
    line-height: 1.6;
}
.help-item {
    margin-bottom: 12px;
}
.help-question {
    font-weight: bold;
    margin-bottom: 4px;
}

/* ===== 页脚 ===== */
.footer {
    background-color: rgb(240, 245, 249);
    color: #333;
    padding: 30px 0;
    text-align: center;
}
.footer-info {
    margin-bottom: 15px;
    font-size: 14px;
}
.footer-copyright {
    font-size: 13px;
}
.footer a {
    color: #007bff;
}

/* ===== 回到顶部/底部（已修复） ===== */
.fa { display: inline-block; font-size: inherit; text-rendering: auto; }
i { font-style: normal; }
i.fa { padding-right: 5px; }

/* 回到顶部/底部按钮容器 */
.backtop {
    z-index: 999;
    bottom: 130px;
    position: fixed;
    right: 10px;
    cursor: pointer;
}

/* 按钮盒子 */
.backtop a {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
    background-color: #58a5c3;
    border-radius: 4px;
    transition: background-color 0.2s;
    padding-left: 5px; /* 整体右移 */
}

/* hover 变色 */
.backtop a:hover {
    background-color: #999;
}

/* 图标基础 */
.backtop i {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.fa-angle-up:before {
    content: '';
    display: block;
    width: 12px;        /* ← 原来是 10px，改大 */
    height: 12px;       /* ← 原来是 10px，改大 */
    border-top: 2px solid white;   /* ← 线条加粗一点 */
    border-left: 2px solid white;
    transform: rotate(45deg);
}

.fa-angle-down:before {
    content: '';
    display: block;
    width: 12px;        /* ← 同上 */
    height: 12px;
    border-bottom: 2px solid white;
    border-right: 2px solid white;
    transform: rotate(45deg);
}

/* ===== 响应式 ===== */

/* 平板 */
@media (max-width: 992px) {
    .doc-card {
        width: 33.333%;
    }
}

/* 移动端 */
@media (max-width: 768px) {
    .nav {
        padding-bottom: 0;
    }

    /* 搜索触发按钮 */
    .search-toggle-btn {
        display: block;
        margin-left: 0;
        margin-right: 10px;
    }

    /* 搜索框默认隐藏 */
    .search-wrapper {
        display: none;
        position: absolute;
        left: 15px !important;
        right: 15px !important;
        top: calc(100% + 9px);
        background-color: rgb(240, 245, 249);
        padding: 10px;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        z-index: 10;
        width: auto !important;
        margin: 0 !important;
    }

    /* JS 添加的 active class 控制显示 */
    .search-wrapper.active {
        display: flex;
    }

    .search-input {
        max-width: none;
    }

    .nav-links {
        margin-left: auto;
    }
    .nav-links li:nth-child(n+4) {
        display: none;
    }

    /* 横幅不再留白 */
    .banner {
        padding: 40px 0;
    }

    .main-content {
        flex-direction: column;
        padding-top: 20px;
        margin-bottom: 20px;
    }
    .content-left {
        margin-right: 0;
    }
    .content-right {
        max-width: 100%;
        margin-top: 15px;
    }
    .sidebar-sticky {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    .banner h1 {
        font-size: 26px;
    }
    .banner p {
        font-size: 16px;
    }
    .doc-card {
        width: 50%;
    }
    .two-columns .doc-card {
        width: 100%;
    }
    .two-columns .doc-title {
        font-size: 13px;
    }
}

/* 小屏手机 */
@media (max-width: 576px) {
    .logo {
        font-size: 16px;
    }
    .logo-url {
        font-size: 10px;
    }
    .search-input {
        padding: 6px 10px;
        font-size: 13px;
    }
    .nav-links a {
        font-size: 13px;
    }
    .banner {
        padding: 25px 0;
    }
    .banner h1 {
        font-size: 22px;
    }
    .main-content {
        margin-bottom: 15px;
    }
    .content-right {
        margin-top: 10px;
    }
    .sidebar-box {
        margin-bottom: 10px;
    }
}

/* 桌面端 */
@media (min-width: 769px) {
    .search-toggle-btn {
        display: none;
    }
    .search-wrapper {
        display: flex !important;
        margin-left: 20px;
    }
    .search-input {
        max-width: none;
    }
    .nav-links {
        margin: 0 auto;
    }
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    body {
        padding-top: 50px;
    }
}