/*
Theme Name: Onlnlook说明书
Theme URI: https://www.onlnlook.com
Author: Onlnlook
Author URI: https://www.onlnlook.com
Description: 一个专注于说明书在线预览与下载的WordPress主题，提供美观的界面和便捷的用户体验。支持文档管理、在线预览、品牌分类等功能。
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onlnlook
*/

/* 修复滚动条样式 */
html {
    overflow-y: scroll;
    overflow-x: hidden; /* 防止水平滚动条 */
    width: 100vw;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 当body被锁定滚动时，保持页面位置 */
body.scroll-locked {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* 主导航样式 */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

/* 向下滚动时隐藏导航栏 */
.main-header.header-hidden {
    transform: translateY(-100%);
    }

/* 向上滚动时显示导航栏 */
.main-header.header-visible {
    transform: translateY(0);
    }

#main-navbar {
    height: 64px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 0;
    width: 100%;
    transition: padding-right 0.3s;
}

body.no-scroll #main-navbar {
    padding-right: 17px; /* 补偿滚动条宽度 */
}

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

.navbar-brand {
    padding: 0;
    margin-right: 0;
    flex-shrink: 0;
}

.navbar-brand img {
    height: 35px;
    width: auto;
}

/* 导航栏布局 */
.navbar-collapse {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    margin-left: 2rem;
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    margin-right: 1.5rem;
}

.nav-item {
    margin: 0;
    padding: 0;
}

.nav-item a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-item a:hover {
    color: #007bff;
    background-color: #f8f9fe;
    text-decoration: none;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.nav-item a:hover::after {
    width: calc(100% - 2rem);
}

.nav-item.current-menu-item a {
    color: #007bff;
    text-decoration: none;
}

.nav-item.current-menu-item a::after {
    width: calc(100% - 2rem);
}

/* 分隔线样式 */
.nav-divider {
    width: 1px;
    height: 16px;
    background-color: #e5e7eb;
    margin: 0 1.5rem;
}

/* 右侧操作区域样式 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

/* 用户按钮样式 */
.btn-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.btn-user:hover {
    color: #007bff;
    text-decoration: none;
}

.btn-user img {
    opacity: 0.8;
}

/* 主题切换按钮样式 */
.theme-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.theme-toggle:hover svg {
    fill: #007bff;
}

.theme-toggle svg {
    fill: #1a1a1a;
}

/* 移动端样式 */
@media (max-width: 991px) {
    .container {
        justify-content: space-between;
    }

    .navbar-collapse {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff;
        padding: 1rem;
        margin-left: 0;
        flex-direction: column;
        gap: 1rem;
        overflow-y: auto;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }

    .navbar-nav {
        width: 100%;
        flex-direction: column;
        text-align: center;
        margin-right: 0;
    }

    .nav-item {
        width: 100%;
    }

    .nav-divider {
        display: none;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin-left: 0;
    }

    .btn-user {
        width: 100%;
        justify-content: center;
    }
}

/* 搜索框样式 */
.header-search {
    margin-right: 1.5rem;
}

.search-form {
    position: relative;
}

.search-input {
    width: 280px;
    height: 40px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #cbd5e0;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* 移动端控制按钮 */
.mobile-search-btn,
.mobile-user-btn {
    padding: 0.5rem;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-search-btn img,
.mobile-user-btn img {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.mobile-search-btn:hover img,
.mobile-user-btn:hover img {
    opacity: 1;
}

/* 移动端搜索框 */
.header-search-sm {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-search-sm input {
    width: 100%;
    height: 40px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background-color: #f8f9fa;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    .header-search {
        display: none;
    }
    
    .header-mobile-controls {
        display: flex;
        align-items: center;
    }
    
    .navbar-toggler {
        padding: 0.5rem;
        margin-left: 0.5rem;
        border: none;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(44, 62, 80, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .nav-item {
        margin: 0.5rem 0;
    }
    
    .btn-user {
        display: block;
        text-align: center;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .navbar-brand img {
        height: 30px;
    }
    
    .search-input {
        width: 100%;
    }
}

body {
    background-color: #fafafa!important;
    width: 100%;
    margin-bottom: 40px; /* 与页尾高度对应 */
    overflow-y: scroll;
}

body.no-scroll {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding-right: 17px; /* 补偿滚动条宽度 */
}

/* 页面主体样式 */
main {
    padding-top: 64px; /* 导航栏的高度 */
    min-height: calc(100vh - 64px);
}

/* 管理员登录状态下的页面主体样式 */
body.admin-bar main {
    padding-top: 96px; /* 导航栏 + admin bar 的高度 */
}

body.admin-bar .main-header {
    top: 32px; /* admin bar 的高度 */
}

@media screen and (max-width: 782px) {
    body.admin-bar .main-header {
        top: 46px; /* 移动端 admin bar 的高度 */
    }
    
    body.admin-bar main {
        padding-top: 110px; /* 导航栏 + 移动端 admin bar 的高度 */
    }
}

@media screen and (max-width: 600px) {
    body.admin-bar .main-header {
        top: 0; /* 移动端时 admin bar 会消失 */
    }
    
    body.admin-bar main {
        padding-top: 64px; /* 只需要导航栏的高度 */
    }
}

.header-login-btn {
    display: block;
}

.header-nav-title {
    display: block;
}

.header-login-logo {
    display: none;
}

@media (max-width: 1024px) {
   .header-login-btn {
        display: none;
    }
   .header-login-logo {
        display: block;
    }
   .header-nav-title {
        display: none;
    }
}

.index-sum-tag {
    margin: 1rem 1rem 1rem 1rem;
}

.index-sum-tag span {
    font-size: 1rem;
}

.index-jumbotron {
    background-image: linear-gradient(to top, #fafafa 0%, #fafafa 100%);
    text-align: center;
    color: black;
    border-radius: 0;
    /*opacity: 0;*/
}

.index-search-form {
    max-width: 800px;
    margin: auto;
}

.index-search-form input {
    height: calc(1.5em + 2rem + 10px);
    border-radius: 5rem;
    line-height: 2.5rem;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
   .index-search-form {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
}

.brand-letter-box {
    background-color: #fffefb;
    padding: 1rem 1rem 1rem 1rem;
}

.brand-letter-box-links a {
    margin-left: 0.5rem;
    word-wrap: break-word;
}

.login-left {
    background-color: #f5f4f1;
    height: 100%;
}

.login-form {
    padding-top: 5rem;
    padding-bottom: 3rem;
}

.login-card {
    display: flex;
    justify-content: center;
    margin-top: 5rem;
}

.footer-box {
    margin-top: 5rem;
    background-color: #f5f5f5;
    color: #363636;
}

.footer-box-col {
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.single-content {
    max-width: 960px;
    margin: auto;
    /* 新增自适应样式 */
    min-height: auto;
    width: 100%;
}

/* 新增内容容器类 */
.content-container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* 表格内容区域优化 */
.table-container {
    display: block;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
   .custom-container {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* 移动端适配 */
    .content-container {
        padding: 0 1rem;
    }
}

.account-favorite-box {
    max-width: 800px;
    margin-top: 1rem;
    /* 新增自适应样式 */
    min-height: auto;
    width: 100%;
}

@media (max-width: 768px) {
   .account-favorite-box {
        width: 100%;
        margin-top: 1rem;
    }
}

#main-navbar {
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.02);
}

.page-bg {
    background-color: #fafafa;
}

.black-text {
    color: black;
}

/* 搜索图标按钮 */
a.btn.btn-primary[name="header-search-logo"] {
    background-color: transparent!important;
    border: none!important;
}

/* 用户图标按钮 */
a.btn.btn-primary {
    background-color: transparent!important;
    border: none!important;
}

/* 原菜单键相关样式删除 */
/* navbar-toggler {
    background-color: transparent!important;
    border: none!important;
} */

footer {
    background-color: #ffffff;
    color: #333;
    text-align: center;
    padding: 10px 0;
    width: 100%;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.05);
}

/* 登录按钮字体颜色修改 */
.header-login-btn a {
    color: black;
}
.header-login-btn a:hover {
    color: black;
}

/* 新按钮样式（原样式，这里保留但不应用到 A - Z 按键） */
.button {
    background-color: #efefef;
    color: black;
    width: 8.5em;
    height: 2.9em;
    border: #efefef 0.2em solid;
    border-radius: 11px;
    text-align: center; /* 整体居中对齐 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.button:hover {
    background-color: #303030;
    color: white;
    border-color: #303030;
}

.button svg {
    width: 1.6em;
    margin-right: 1.5em; /* 增加箭头与文字间距 */
    display: inline-block;
    position: relative; /* 相对定位 */
}

.button:hover svg {
    transform: translateX(5px);
}

.text {
    margin: 0;
    position: relative; /* 相对定位 */
}

/* 响应式样式调整布局相关 */
.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    box-sizing: border-box;
}

.col-md-6 {
    display: flex;
    align-items: center;
    justify-content: normal;
    box-sizing: border-box;
    height: auto;
    padding: 0;
    vertical-align: middle;
}

@media (max-width: 1024px) {
    /* 确保按钮和标题始终在同一行 */
    /* 重置 flex-basis 避免异常 */
   .col-md-6 {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 768px) {
    /* 继续保持行布局 */
   .col-md-6 {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* 同样保持行布局 */
   .col-md-6 {
        flex: 1;
        text-align: center;
    }
}


/* 对于登录按钮，修改其边框颜色 */
.header-login-btn a.btn.btn-primary {
    border: 1px solid black!important; /* 将边框修改为 1px 宽的紫色边框，可替换为你需要的颜色代码 */
}


.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='black' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")!important;
}


/* 修正手机端和平板端菜单展开时的背景颜色 */
@media (max-width: 1024px) {
   .navbar-collapse {
        background-color: white;
    }
}

/* 统一 single 页面和下载页面下载按钮的基本样式 */
.single-content button.btn.btn-primary,
#download_doc_download_btn {
    /* 按钮背景颜色 */
    background-color: #007bff!important; 
    /* 按钮边框颜色 */
    border-color: #007bff!important; 
    /* 按钮文字颜色 */
    color: #fff!important; 
    /* 按钮圆角 */
    border-radius: 0.25rem;
    /* 按钮内边距 */
    padding: 0.375rem 0.75rem;
    /* 按钮字体大小 */
    font-size: 1rem;
    /* 按钮行高 */
    line-height: 1.5;
    /* 按钮显示方式 */
    display: inline-flex;
    /* 按钮内容居中对齐 */
    align-items: center;
    /* 按钮内容水平居中 */
    justify-content: center;
}

/* 鼠标悬停时的样式 */
.single-content button.btn.btn-primary:hover,
#download_doc_download_btn:hover {
    background-color: #0069d9!important;
    border-color: #0062cc!important;
}

/* 按钮被点击时的样式 */
.single-content button.btn.btn-primary:active,
#download_doc_download_btn:active {
    background-color: #0062cc!important;
    border-color: #005cbf!important;
}

/* 移除之前可能影响下载按钮样式的规则 */
a.btn.btn-primary {
    background-color: transparent!important;
    border: none!important;
}

/* 选择下载按钮区域内的自定义按钮 */
.container div a.btn.btn-primary:not(#download_doc_download_btn) {
    background-color: #007bff!important;
    color: white!important;
    border-color: #007bff!important;
}

/* 鼠标悬停样式 */
.container div a.btn.btn-primary:not(#download_doc_download_btn):hover {
    background-color: #0069d9!important;
    border-color: #0062cc!important;
}

/* 按钮被点击样式 */
.container div a.btn.btn-primary:not(#download_doc_download_btn):active {
    background-color: #0062cc!important;
    border-color: #005cbf!important;
}

/* 搜索栏容器样式更新 */
.new-search {
    display: flex;
    align-items: center;
    justify-content: center; 
    text-align: center;
    margin: 0 auto; 
    max-width: 800px;
    position: relative;
}

/* 搜索输入框样式更新 */
.new-search__input {
    font-family: inherit;
    font-size: 1.1rem;
    background-color: #ffffff;
    border: 2px solid transparent;
    color: #2c3e50;
    padding: 1.2rem 1.8rem;
    padding-right: 4rem;
    border-radius: 100px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.new-search__input:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.new-search__input:focus {
    outline: none;
    border-color: transparent;
    background-color: #f8f9fa;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.new-search__input::-webkit-input-placeholder {
    color: #a0aec0;
    font-weight: 400;
}

/* 搜索按钮样式更新 */
.new-search__button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background-color: transparent;
    margin: 0;
    height: 2.8rem;
    width: 2.8rem;
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.3s ease;
    cursor: pointer;
}

.new-search__button:hover {
    background-color: #f8f9fa;
    transform: translateY(-50%);
}

.new-search__icon {
    height: 1.2rem;
    width: 1.2rem;
    fill: #6c757d;
    transition: fill 0.3s ease;
}

.new-search__input:focus + .new-search__button {
    background-color: transparent;
}

.new-search__input:focus + .new-search__button .new-search__icon {
    fill: #2c3e50;
}

.new-search__button:hover .new-search__icon {
    fill: #2c3e50;
}

/* 热门搜索样式更新 */
.popular-search {
    width: 800px; 
    margin: 1rem auto 0;
    text-align: left; 
    padding: 0 1.8rem;
    max-height: calc(1.4em * 2);
    overflow: hidden;
    position: relative;
    margin-bottom: 0 !important;
}

.popular-search p {
    margin: 0;
    font-size: 0.9rem;
    color: #718096;
    display: inline;
    line-height: 1.4;
}

.popular-search a {
    color: #4a5568;
    text-decoration: none; 
    font-size: 0.85rem;
    display: inline;
    padding: 0;
    margin-right: 0.25rem;
    line-height: 1.4;
}

.popular-search a:after {
    content: ','; /* 添加逗号分隔符 */
    margin-right: 0.25rem;
}

.popular-search a:last-child:after {
    content: ''; /* 最后一个元素不添加逗号 */
    margin-right: 0;
}

.popular-search a:hover {
    color: #007bff;
    text-decoration: none;
}

/* 移动端适配更新 */
@media (max-width: 768px) {
    body .popular-search {
        width: 100%;
        padding: 0 1rem;
        margin-top: 0.5rem;
        max-height: calc(1.4em * 4 + 20px);
        margin-bottom: -1rem !important; /* 调整为-1rem */
        line-height: 1.6;
    }
    
    body .popular-search a {
        line-height: 1.6; /* 确保链接的行高一致 */
    }
    
    body .stats-section {
        margin-top: 0 !important;
        padding: 0 1rem;
        position: relative;
        top: -1rem; /* 调整为-1rem */
    }
}

@media (max-width: 480px) {
    body .popular-search {
        padding: 0 0.8rem;
        margin-bottom: -1rem !important; /* 调整为-1rem */
        max-height: calc(1.4em * 4 + 20px);
    }
    
    body .stats-section {
        margin-top: 0 !important;
        padding: 0 0.8rem;
        top: -1rem; /* 调整为-1rem */
    }
}

/* 统计卡片样式 */
.stats-row {
    margin-top: 1rem;
}

.stats-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stats-card-content {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stats-icon {
    background: rgba(0, 123, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.stats-info {
    flex: 1;
}

.stats-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.stats-value {
    color: #212529;
    font-size: 1.25rem;
    font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .stats-card-content {
        padding: 1rem;
    }
    
    .stats-icon {
        padding: 0.75rem;
    }
    
    .stats-icon img {
        width: 24px;
        height: 24px;
    }
    
    .stats-value {
        font-size: 1.1rem;
    }
}

/* 页眉基本样式 */
.main-header {
    height: 64px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo样式 */
.header-logo {
    display: block;
}

.header-logo img {
    height: 35px;
    width: auto;
    vertical-align: middle;
}

/* 右侧区域样式 */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem; /* 减小右侧区域的间距 */
}

/* 导航菜单样式 */
.header-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.75rem; /* 减小导航菜单项之间的间距 */
}

.nav-item a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-item a:hover {
    color: #007bff;
    background-color: #f8f9fe;
    text-decoration: none;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.nav-item a:hover::after {
    width: calc(100% - 2rem);
}

.nav-item.current-menu-item a {
    color: #007bff;
    text-decoration: none;
}

.nav-item.current-menu-item a::after {
    width: calc(100% - 2rem);
}

/* 分隔线样式 */
.nav-divider {
    width: 1px;
    height: 16px;
    background-color: #e5e7eb;
    margin: 0 0.5rem; /* 减小分隔线两侧的间距 */
}

/* 用户按钮样式 */
.btn-user {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem; /* 减小用户按钮中图标和文字的间距 */
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.btn-user:hover {
    color: #007bff;
}

.btn-user img {
    opacity: 0.8;
}

/* 主题切换按钮样式 */
.theme-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem; /* 减小主题切换按钮的左侧间距 */
}

.theme-toggle svg {
    fill: #1a1a1a;
    transition: fill 0.2s ease;
}

.theme-toggle:hover svg {
    fill: #007bff;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #1a1a1a;
    transition: 0.3s;
}

/* 移动端样式 */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .header-right {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .header-right.active {
        transform: translateX(0);
    }

    .header-nav {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-divider {
        width: 100%;
        height: 1px;
        margin: 0.5rem 0;
    }

    .header-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    .btn-user {
        justify-content: center;
        width: 100%;
    }
}

/* 主页基础样式 */
.home-main {
    background-color: #fafafa;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 首页英雄区域样式 */
.hero-section {
    text-align: center;
    margin: 4rem 0 5rem; /* 增加上下间距 */
    padding-top: 2rem; /* 增加顶部内边距 */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 3rem; /* 增加与搜索区域的间距 */
}

.hero-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1.5rem; /* 增加标题和副标题的间距 */
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* 搜索区域样式 */
.search-container {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 8rem; /* 增加搜索区域底部间距到8rem */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        padding: 1.5rem 1rem;
        margin: 2rem 0 3rem; /* 移动端适当减小间距 */
    }

    .hero-content {
        margin-bottom: 2rem;
    }

    .search-container {
        margin-bottom: 5rem; /* 移动端适当减小间距 */
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        margin: 1.5rem 0 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .search-container {
        margin-bottom: 3rem; /* 小屏幕进一步减小间距 */
    }
}

/* 热门文档区域样式 */
.hot-docs-section {
    margin: 3rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

.section-header {
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.doc-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.doc-card-image {
    position: relative;
    padding-top: 56.25%; /* 16:9 宽高比 */
    background: #f8f9fe;
}

.doc-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-card-content {
    padding: 1rem;
}

.doc-card-content h3 {
    font-size: 1rem;
    margin: 0;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 18px;
    }

    .docs-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .docs-grid {
        grid-template-columns: 1fr;
    }
}

/* 保留其他必要的样式 */

/* 统计部分样式 */
.stats-section {
    padding: 2rem 1rem;
    background-color: #fff;
    margin: 2rem auto;
    max-width: 1200px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 0 auto;
}

.stats-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stats-icon {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    background: #edf2f7;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-icon img {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.7;
}

.stats-info {
    flex: 1;
}

.stats-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

.stats-label {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
    margin-top: 0.25rem;
}

/* 热门品牌区域基础样式 */
.brands-section {
    margin: 0.5rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

.brands-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.brands-header h2 {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.brand-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.brand-category-item {
    padding: 0.375rem;
    text-align: center;
    text-decoration: none;
    color: #666;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.brand-category-item:hover {
    color: #007bff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .brands-section {
        margin: 0.5rem auto;
        padding: 0 0.75rem;
    }

    .brands-header {
        margin-bottom: 0.5rem;
    }

    .brands-header h2 {
        font-size: 0.875rem;
    }

    .brand-categories-grid {
        gap: 0.375rem;
        margin: 0.375rem 0;
    }

    .brand-category-item {
        padding: 0.25rem;
        font-size: 0.75rem;
    }
}

/* 深色模式 */
[data-theme="dark"] .brand-category-item {
    color: #aaa;
    }

[data-theme="dark"] .brand-category-item:hover {
    color: #007bff;
}

/* 深色模式 */
[data-theme="dark"] .stats-item {
    background: #2d2d2d;
}

[data-theme="dark"] .stats-icon {
    background: #3d3d3d;
}

[data-theme="dark"] .stats-value {
    color: #fff;
}

[data-theme="dark"] .stats-label {
    color: #aaa;
}

@media (max-width: 768px) {
    .stats-section {
        padding: 0.75rem;
    }

    .stats-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0.5rem;
        margin-bottom: 0;  /* 移除底部边距 */
        background: #f8f9fa;
        border-radius: 0.5rem;
        gap: 1rem;
    }

    .stats-icon {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 2.5rem;
        background: #edf2f7;
        border-radius: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    .stats-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        flex: 1;
    }

    .stats-value {
        font-size: 1.25rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.2;
    }

    .stats-label {
        font-size: 0.875rem;
        color: #666;
        margin: 0;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin: 0;
    }

    /* 深色模式 */
    [data-theme="dark"] .stats-item {
        background: #2d2d2d;
    }

    [data-theme="dark"] .stats-icon {
        background: #3d3d3d;
    }

    [data-theme="dark"] .stats-label {
        color: #aaa;
    }
}

/* 品牌部分样式 */
.brands-section {
    margin: 1rem auto;  /* 默认边距 */
    max-width: 1200px;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .brands-section {
        margin: 0.5rem auto;  /* 减少移动端边距 */
    }

    .brands-header {
        flex-direction: row;
        align-items: center;
        padding: 0;
        margin-bottom: 0.5rem;  /* 减少标题底部边距 */
    }
    
    .brands-header h2 {
        margin: 0;
        font-size: 16px;
    }
    
    .az-button {
        padding: 4px 10px;
        font-size: 13px;
    }
    
    .brand-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
        margin: 0.5rem 0;  /* 减少网格上下边距 */
    }

    .brand-category-item {
        padding: 0.4rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .brands-section {
        margin: 0.5rem auto;  /* 保持小屏幕边距一致 */
        padding: 0 0.75rem;
    }

    .brand-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
        margin: 0.5rem 0;  /* 保持小屏幕边距一致 */
    }
}

.brands-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0;
}

.brands-header h2 {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin: 0;
    white-space: nowrap; /* 防止文字换行 */
}

/* A-Z 按钮样式 */
.az-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;  /* 减小内边距 */
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-left: 1rem;
    white-space: nowrap;
    min-width: auto; /* 移除最小宽度限制 */
}

.az-button:hover {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
    color: #333;
    text-decoration: none;
}

.az-button span {
    font-weight: 500;
    letter-spacing: 1px;
}

/* 品牌列表样式 */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.brand-item {
    padding: 12px;
    color: #666;
    text-decoration: none;
    text-align: center;
    transition: color 0.2s ease;
    font-size: 14px;
}

.brand-item:hover {
    color: #333;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .brands-header {
        flex-direction: row; /* 保持在一行 */
        gap: 0.5rem;
    }

    .az-button {
        padding: 4px 8px; /* 进一步减小内边距 */
    }
}

/* 品牌页面样式 */
.brand-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 英雄区域样式 */
.brand-hero {
    background: linear-gradient(135deg, #f8f9fe 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.brand-hero-content h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.brand-hero-content p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* 字母索引样式 */
.brand-alphabet {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.brand-alphabet-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-alphabet-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.brand-alphabet-header p {
    color: #666;
    margin: 0;
}

.brand-alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 0.75rem;
}

.alphabet-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    background: #f8f9fe;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.alphabet-item:hover {
    background: #007bff;
    color: #fff;
    transform: translateY(-2px);
}

/* 品牌列表样式 */
.brand-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.brand-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.brand-card-header {
    margin-bottom: 1rem;
}

.brand-card-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.brand-card-header a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.brand-card-header a:hover {
    color: #007bff;
}

.brand-card-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f8f9fe;
    border-radius: 100px;
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.category-tag:hover {
    background: #007bff;
    color: #fff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .brand-page {
        padding: 1rem;
    }

    .brand-hero {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    .brand-hero-content h1 {
        font-size: 2rem;
    }

    .brand-hero-content p {
        font-size: 1rem;
    }

    .brand-alphabet {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .brand-alphabet-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 0.5rem;
    }

    .alphabet-item {
        height: 40px;
    }

    .brand-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 登录和注册页面样式 */
.auth-main {
    min-height: calc(100vh - 64px - 40px); /* 减去头部和底部的高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8f9fe 0%, #ffffff 100%);
}

.auth-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.auth-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    overflow: hidden;
}

.auth-card-content {
    flex: 1;
    padding: 3rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
    margin: 0;
}

.auth-form {
    max-width: 400px;
    margin: 0 auto;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.auth-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fe;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: #007bff;
    background-color: #ffffff;
}

.auth-form .form-control::placeholder {
    color: #999;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    margin: 0;
}

.form-check-label {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.forgot-password {
    font-size: 0.875rem;
    color: #007bff;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-submit:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer p {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.auth-footer a {
    color: #007bff;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-image {
    flex: 1;
    background: #f8f9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-image img {
    max-width: 100%;
    height: auto;
}

.auth-alerts {
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.alert:last-child {
    margin-bottom: 0;
}

.alert-danger {
    background-color: #fee2e2;
    color: #dc3545;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fff4;
    color: #28a745;
    border: 1px solid #ebfff0;
}

.alert-link {
    font-weight: 500;
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .auth-card {
        flex-direction: column-reverse;
    }

    .auth-card-content {
        padding: 2rem;
    }

    .auth-image {
        padding: 1.5rem;
    }

    .auth-image img {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .auth-card-content {
        padding: 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.75rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* 个人中心页面样式 */
.account-main {
    padding: 40px 0;
    min-height: calc(100vh - 60px);
    background-color: var(--color-background);
}

.account-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.account-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.account-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: var(--color-card);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.account-main-content {
    background: var(--color-card);
    border-radius: 12px;
    min-height: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-panel {
    display: none;
    padding: 24px;
    width: 100%;
}

.tab-panel.active {
    display: block;
}

.panel-content {
    width: 100%;
}

.info-group {
    margin-bottom: 24px;
    width: 100%;
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
}

.info-group p {
    font-size: 16px;
    color: var(--color-text);
    margin: 0;
    padding: 12px 16px;
    background: var(--color-background);
    border-radius: 8px;
    width: 100%;
}

@media (max-width: 991px) {
    .account-content {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: relative;
        top: 0;
    }

    .account-main-content {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .account-main {
        padding: 20px 0;
    }

    .account-container {
        padding: 0 16px;
    }

    .tab-panel {
        padding: 16px;
    }

    .info-group p {
        padding: 10px 14px;
    }
}

.account-header {
    margin-bottom: 2rem;
    text-align: center;
}

.account-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.account-header p {
    color: #666;
    margin: 0;
}

.account-user-info {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.user-avatar {
    margin-bottom: 1rem;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.user-details h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.user-details p {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.account-nav {
    padding: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #666;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #f8f9fe;
    color: #333;
}

.nav-link.active {
    background: #007bff;
    color: #fff;
}

.nav-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.nav-logout {
    color: #dc3545;
    text-decoration: none;
}

.nav-logout:hover {
    background: #fff5f5;
    color: #dc3545;
}

/* 主要内容区域样式 */
.account-main-content {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h2 {
    font-size: 1.25rem;
    color: #333;
    margin: 0;
}

.panel-content {
    padding: 1.5rem;
}

/* 个人信息样式 */
.info-group {
    margin-bottom: 1.5rem;
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-group label {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.info-group p {
    font-size: 1rem;
    color: #333;
    margin: 0;
}

/* 收藏夹样式 */
.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.folder-card {
    background: #f8f9fe;
    border-radius: 8px;
    overflow: hidden;
}

.folder-header {
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.folder-header h3 {
    font-size: 1rem;
    color: #333;
    margin: 0;
}

.doc-count {
    font-size: 0.875rem;
    color: #666;
}

.folder-content {
    padding: 1rem;
}

.doc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-list li {
    margin-bottom: 0.5rem;
}

.doc-list li:last-child {
    margin-bottom: 0;
}

.doc-list a {
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.doc-list a:hover {
    color: #007bff;
}

/* 最近浏览样式 */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.recent-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transition: all 0.3s ease;
}

.recent-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.item-category {
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.view-time {
    color: #adb5bd;
}

.recent-item h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.recent-item h3 a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.recent-item h3 a:hover {
    color: #0056b3;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.clear-history {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #dc3545;
    color: #dc3545;
    background: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-history:hover {
    background: #dc3545;
    color: #fff;
}

.btn-icon {
    font-size: 1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .recent-list {
        padding: 0.5rem;
    }

    .panel-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .item-meta {
        flex-wrap: wrap;
    }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1rem;
}

/* 按钮样式 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f8f9fe;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* 弹窗样式 */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 1.25rem;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #333;
    background: #f8f9fe;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    background: #fff;
}

.form-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .account-content {
        flex-direction: column;
    }

    .account-sidebar {
        width: 100%;
    }

    .account-user-info {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 1rem;
    }

    .user-avatar {
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .user-avatar img {
        width: 60px;
        height: 60px;
    }

    .account-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-link {
        width: auto;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .account-main {
        padding: 1rem;
    }

    .account-header h1 {
        font-size: 1.75rem;
    }

    .folders-grid {
        grid-template-columns: 1fr;
    }

    .panel-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* 页尾样式 */
footer {
    background-color: #ffffff;
    color: #333;
    text-align: center;
    padding: 10px 0;
    width: 100%;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.05);
}

/* 页尾内容容器 */
footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 页尾文字样式 */
footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* 搜索结果页面样式 */
.search-main {
    background-color: #fafafa;
    min-height: calc(100vh - 64px - 40px);
    padding: 2rem 1rem;
}

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

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.search-header p {
    color: #666;
    margin: 0;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.result-content {
    padding: 1.5rem;
}

.result-title {
    font-size: 1.25rem;
    margin: 0 0 1rem;
}

.result-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.result-title a:hover {
    color: #007bff;
}

.result-meta {
    margin-bottom: 1rem;
}

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.meta-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f8f9fe;
    border-radius: 100px;
    color: #666;
    font-size: 0.875rem;
}

.result-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 分页导航样式 */
.pagination {
    margin-top: 2rem;
    text-align: center;
}

.pagination ul {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    background: #ffffff;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #f8f9fe;
    color: #007bff;
}

.pagination .current {
    background: #007bff;
    color: #ffffff;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-main {
        padding: 1rem;
    }

    .search-header h1 {
        font-size: 1.75rem;
    }

    .result-title {
        font-size: 1.1rem;
    }

    .result-content {
        padding: 1rem;
    }
}

/* 导航栏登录注册按钮样式 */
.header-auth-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-login {
    color: #1a1a1a;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-login:hover {
    color: #007bff;
    background-color: #f8f9fe;
    text-decoration: none;
}

.btn-register {
    color: #fff;
    background-color: #007bff;
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-register:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-auth-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .btn-login,
    .btn-register {
        width: 100%;
        text-align: center;
    }

    .nav-item a::after {
        display: none; /* 移动端不显示下划线动效 */
    }
}

/* 用户下拉菜单样式 */
.user-dropdown {
    position: relative;
}

.user-dropdown .btn-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.user-dropdown .btn-user:hover {
    color: #007bff;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 1000;
}

.user-dropdown:hover .user-dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #007bff;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0.5rem 0;
}

/* 分类页面样式 */
.category-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.latest-documents {
    margin: 2rem 0;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.document-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.document-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.document-card-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.document-card-content a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    background: #f7fafc;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.document-card-content a:hover {
    background: #edf2f7;
    color: #2d3748;
}

.category-section {
    margin: 2rem 0;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.model-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.model-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.model-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.model-card-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.document-link {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    background: #f7fafc;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.document-link:hover {
    background: #edf2f7;
    color: #2d3748;
}

.letter-section {
    margin: 2rem 0;
}

.letter-section h2 {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

@media (max-width: 768px) {
    .category-page {
        padding: 1rem;
    }

    .document-grid,
    .model-grid {
        grid-template-columns: 1fr;
    }

    .document-card,
    .model-card {
        padding: 1rem;
    }

    .letter-section h2 {
        font-size: 1.25rem;
    }
}

/* 搜索结果表格样式 */
.search-table {
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-table-header {
    display: flex;
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
    color: #374151;
}

.search-table-row {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

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

.search-table-row:last-child {
    border-bottom: none;
}

.column-title {
    flex: 1;
    padding-right: 2rem;
}

.column-category {
    width: 40%;
    color: #6b7280;
}

.column-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.column-title a:hover {
    color: #007bff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-table-header,
    .search-table-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .column-title,
    .column-category {
        width: 100%;
        padding-right: 0;
    }

    .column-category {
        font-size: 0.9rem;
    }
}

/* 品牌表格样式 */
.brand-table {
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.brand-table-header {
    display: flex;
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
    color: #374151;
}

.brand-table-row {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

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

.brand-table-row:last-child {
    border-bottom: none;
}

.column-brand {
    width: 30%;
    padding-right: 2rem;
}

.column-models {
    width: 70%;
    color: #6b7280;
}

.column-brand a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.column-brand a:hover {
    color: #007bff;
}

.column-models a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.column-models a:hover {
    color: #007bff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .brand-table-header,
    .brand-table-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .column-brand,
    .column-models {
        width: 100%;
        padding-right: 0;
    }

    .column-brand {
        margin-bottom: 0.5rem;
    }

    .column-models {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* 分类页面表格样式 */
.document-table,
.category-table,
.model-table {
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.document-table-header,
.category-table-header,
.model-table-header {
    display: flex;
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
    color: #374151;
}

.document-table-row,
.category-table-row,
.model-table-row {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.document-table-row:hover,
.category-table-row:hover,
.model-table-row:hover {
    background-color: #f8f9fa;
}

.document-table-row:last-child,
.category-table-row:last-child,
.model-table-row:last-child {
    border-bottom: none;
}

.column-model {
    width: 30%;
    padding-right: 2rem;
    font-weight: 500;
    color: #1a1a1a;
}

.column-document {
    width: 70%;
    color: #6b7280;
}

.column-document a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.column-document a:hover {
    color: #007bff;
}

.category-section,
.model-section {
    margin-top: 3rem;
}

.category-section h2,
.model-section h2 {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .document-table-header,
    .category-table-header,
    .model-table-header,
    .document-table-row,
    .category-table-row,
    .model-table-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .column-model,
    .column-document {
        width: 100%;
        padding-right: 0;
    }

    .column-model {
        margin-bottom: 0.5rem;
    }

    .column-document {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .category-section h2,
    .model-section h2 {
        font-size: 1.25rem;
    }
}

.column-model a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.column-model a:hover {
    color: #007bff;
}

/* 单页头部样式 */
.single-header {
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    padding: 3rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.single-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.single-header h1 {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.single-header p {
    color: #666;
    margin: 0;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: flex-end;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1a1a1a;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-button svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
    color: currentColor;
    opacity: 0.8;
}

.action-button:hover svg {
    opacity: 1;
    transform: scale(1.1);
    color: #007bff;
}

.action-button:hover {
    color: #007bff;
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 收藏按钮激活状态 */
.action-button.active svg {
    fill: #007bff;
    color: #007bff;
    opacity: 1;
}

/* 打印按钮动画 */
@keyframes printing {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-2px) scale(0.95);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.printing svg {
    animation: printing 0.3s ease;
}

/* 分享按钮动画 */
@keyframes sharing {
    0% {
        transform: rotate(0);
    }
    100% {
        transform: rotate(360deg);
    }
}

#share-button:active svg {
    animation: sharing 0.5s ease;
}

/* 下载按钮动画 */
@keyframes downloading {
    0% {
        transform: translateY(-2px);
    }
    50% {
        transform: translateY(2px);
    }
    100% {
        transform: translateY(-2px);
    }
}

.action-button[onclick*="download"]:active svg {
    animation: downloading 0.3s ease;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.action-button:hover::before {
    transform: translate(-50%, -50%) scale(2.5);
}

.action-button img {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    transition: all 0.3s ease;
    transform-origin: center;
}

.action-button:hover img {
    opacity: 1;
    transform: scale(1.1);
}

.action-button span {
    position: relative;
    z-index: 1;
}

/* 下载提示框样式 */
.download-alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

.download-alert {
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: slide-in 0.3s ease;
}

.download-alert.hiding {
    animation: slide-out 0.3s ease;
}

@keyframes slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slide-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* 收藏按钮容器 */
.favorite-container {
    position: relative;
    display: inline-flex;
}

/* 收藏切换按钮 */
.favorite-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.favorite-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.favorite-toggle:hover::before {
    transform: translate(-50%, -50%) scale(2.5);
}

.favorite-toggle:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

/* 下拉箭头 */
.favorite-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border: 2px solid #666;
    border-left: 0;
    border-top: 0;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.favorite-toggle.active .favorite-arrow {
    transform: rotate(225deg) translateY(-2px);
}

/* 收藏下拉菜单 */
.favorite-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.favorite-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.favorite-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.favorite-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(0, 123, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    pointer-events: none;
}

.favorite-item:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.favorite-item:hover {
    color: #007bff;
}

/* 分享弹窗 */
.share-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.share-popup.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.share-popup-content {
    white-space: nowrap;
    color: #666;
    font-size: 0.9rem;
    position: relative;
    padding-right: 1.5rem;
}

.share-popup::before {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 20px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    transform: rotate(45deg);
}

.share-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #10b981;
}

.share-success::before {
    content: '✓';
    font-weight: bold;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .action-buttons {
        flex-wrap: wrap;
        justify-content: stretch;
        gap: 0.75rem;
    }

    .action-button {
        flex: 1;
        min-width: calc(50% - 0.375rem);
        justify-content: center;
    }

    .favorite-container {
        flex: 1;
        min-width: calc(50% - 0.375rem);
    }

    .favorite-dropdown {
        left: 0;
        right: 0;
        width: auto;
    }

    .share-popup {
        left: 0;
        right: 0;
        width: auto;
    }
}

@media (max-width: 480px) {
    .action-button,
    .favorite-container {
        min-width: 100%;
    }
}

/* 涟漪效果 */
.ripple {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 1s linear;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

/* 复制按钮样式 */
.copy-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-button:hover {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.copy-button.copied {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.copy-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.copy-button:hover .copy-icon {
    transform: translateY(-1px);
}

/* 打印动画 */
@keyframes printing {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.printing {
    animation: printing 0.3s ease;
}

/* 分享成功动画 */
@keyframes success {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.share-success {
    animation: success 0.3s ease;
}

/* 下载页面样式 */
.download-page {
    min-height: calc(100vh - 64px - 40px);
    background-color: #fafafa;
}

/* 英雄区域样式 */
.download-hero {
    background: linear-gradient(135deg, #f8f9fe 0%, #ffffff 100%);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.download-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.download-hero h1 {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.document-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.meta-item svg {
    color: #666;
}

/* 下载内容区域 */
.download-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.download-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* 验证区域样式 */
.verification-container {
    margin-bottom: 2rem;
}

.verification-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.verification-header svg {
    color: #666;
}

.verification-header h2 {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin: 0;
}

/* 下载按钮样式 */
.download-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
}

.download-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-button:hover::before {
    transform: translate(-50%, -50%) scale(2.5);
}

.download-button svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
    color: currentColor;
}

.download-button:hover svg {
    transform: translateY(2px);
}

.download-button.primary {
    background-color: #007bff;
    color: #ffffff;
}

.download-button.primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
}

.download-button.secondary {
    background-color: #f8f9fa;
    color: #1a1a1a;
    border: 1px solid #e5e7eb;
}

.download-button.secondary:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 下载动画 */
@keyframes downloading {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
    100% {
        transform: translateY(0);
    }
}

.downloading svg {
    animation: downloading 1s infinite;
}

/* 相关文档区域 */
.related-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-header svg {
    color: #666;
}

.section-header h2 {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin: 0;
}

.related-documents {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.related-document {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-document:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.related-document svg {
    color: #666;
    transition: color 0.3s ease;
}

.related-document:hover svg {
    color: #007bff;
}

.related-document span {
    font-size: 0.95rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .download-hero {
        padding: 3rem 1rem;
    }

    .download-hero h1 {
        font-size: 1.75rem;
    }

    .document-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .download-section,
    .related-section {
        padding: 1.5rem;
    }

    .download-buttons {
        flex-direction: column;
    }

    .download-button {
        width: 100%;
        justify-content: center;
    }

    .related-documents {
        grid-template-columns: 1fr;
    }
}

/* 验证消息样式 */
.error-message,
.success-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: message-fade-in 0.3s ease;
}

.error-message {
    background-color: #fee2e2;
    color: #dc3545;
    border: 1px solid #fecaca;
}

.success-message {
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

@keyframes message-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PDF 查看器样式 */
.mpv_pdf_wrapper {
    min-height: 800px !important;
}

.mpv_pdf_wrapper iframe {
    min-height: 800px !important;
}

/* 品牌目录网格样式 */
.brand-categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.brand-category-item {
    padding: 0.5rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    font-size: 0.875rem;
    line-height: 1.2;
}

.brand-category-item:not(.placeholder):hover {
    color: #007bff;
}

.brand-category-item.placeholder {
    color: #ccc;
    cursor: default;
}

@media (max-width: 768px) {
    .brands-header {
        flex-direction: row;
        align-items: center;
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .brands-header h2 {
        margin: 0;
        font-size: 16px;  /* 更小的标题大小 */
    }
    
    .az-button {
        padding: 4px 10px;  /* 更小的内边距 */
        font-size: 13px;
    }
    
    .brand-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .brand-category-item {
        padding: 0.4rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .brand-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
    }
}

/* 分类页面样式更新 */
.category-section h2,
.model-section h2 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.doc-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.document-table,
.category-table,
.model-table {
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.document-table-header,
.category-table-header,
.model-table-header {
    display: flex;
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
    color: #374151;
}

.document-table-row,
.category-table-row,
.model-table-row {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.document-table-row:hover,
.category-table-row:hover,
.model-table-row:hover {
    background-color: #f8f9fa;
}

.document-table-row:last-child,
.category-table-row:last-child,
.model-table-row:last-child {
    border-bottom: none;
}

.column-model {
    width: 30%;
    padding-right: 2rem;
    font-weight: 500;
    color: #1a1a1a;
}

.column-document {
    width: 70%;
    color: #6b7280;
}

.column-document a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.column-document a:hover {
    color: #007bff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .document-table-header,
    .category-table-header,
    .model-table-header,
    .document-table-row,
    .category-table-row,
    .model-table-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .column-model,
    .column-document {
        width: 100%;
        padding-right: 0;
    }

    .column-model {
        margin-bottom: 0.5rem;
    }

    .column-document {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .category-section h2,
    .model-section h2 {
        font-size: 1.1rem;
    }

    .doc-count {
        font-size: 0.85rem;
    }
}

/* 移动端样式调整 */
@media (max-width: 991px) {
    .header-container {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0 1rem;
        height: 100%;
    }

    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 20px;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        z-index: 100;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #1a1a1a;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* 搜索按钮样式 */
    .mobile-search-toggle {
        display: block;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        padding: 0;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 100;
    }

    .mobile-search-toggle .search-icon,
    .mobile-search-toggle .close-icon {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transition: opacity 0.3s ease;
        color: #1a1a1a;
    }

    .mobile-search-toggle .close-icon {
        opacity: 0;
    }

    .mobile-search-toggle.active .search-icon {
        opacity: 0;
    }

    .mobile-search-toggle.active .close-icon {
        opacity: 1;
    }

    /* 搜索面板样式 */
    .mobile-search-panel {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #ffffff;
        z-index: 999;
        transform: translateY(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        opacity: 0;
        visibility: hidden;
        overflow-y: auto;
    }

    .mobile-search-panel.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-search-container {
        max-width: 600px;
        margin: 0 auto;
    }

    .mobile-search-form {
        width: 100%;
    }

    .mobile-search-input {
        width: 100%;
        padding: 12px 16px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 16px;
        outline: none;
        background: var(--input-background);
    }

    .mobile-search-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px var(--primary-color-light);
    }

    .mobile-hot-search {
        width: 100%;
        padding: 0 1rem;
    }

    .mobile-hot-search p {
        font-size: 0.9rem;
        color: #666;
        margin-bottom: 1rem;
        text-align: left;
    }

    .mobile-hot-search a {
        display: inline-block;
        padding: 0.5rem 1rem;
        margin: 0 0.5rem 0.5rem 0;
        background: #f8f9fa;
        border-radius: 20px;
        color: #333;
        font-size: 0.9rem;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-hot-search a:hover {
        background: #e9ecef;
        color: #007bff;
    }

    .header-logo {
        margin: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .header-right {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff;
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        z-index: 99;
    }

    .header-right.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

/* WordPress管理栏移动端固定样式 */
@media (max-width: 600px) {
    #wpadminbar {
        position: fixed !important;
        top: 0 !important;
        width: 100% !important;
    }
    
    /* 为了防止内容被固定导航栏遮挡，给body添加上边距 */
    body.admin-bar {
        padding-top: 46px !important;
    }
}

/* 移动端登录注册页面样式 */
@media (max-width: 768px) {
    .auth-image {
        display: none !important;
    }
    
    .auth-card {
        max-width: 100% !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    .auth-card-content {
        padding: 20px !important;
    }
    
    .auth-main {
        min-height: calc(100vh - 60px) !important;
        padding: 0 !important;
    }
}

/* 桌面端隐藏搜索按钮 */
@media screen and (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

/* 移动端搜索按钮样式 */
@media screen and (max-width: 768px) {
    .mobile-search-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        color: var(--text-color);
        z-index: 1000;
    }

    .mobile-search-toggle .search-icon {
        display: block;
    }

    .mobile-search-toggle .close-icon {
        display: none;
    }

    .mobile-search-toggle.active .search-icon {
        display: none;
    }

    .mobile-search-toggle.active .close-icon {
        display: block;
    }

    .mobile-search-panel {
        display: block !important;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--background-color);
        padding: 16px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }

    .mobile-search-panel.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-search-container {
        max-width: 600px;
        margin: 0 auto;
        padding: 0 16px;
    }

    .mobile-search-form {
        width: 100%;
    }

    .mobile-search-input {
        width: 100%;
        height: 44px;
        padding: 0 16px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 16px;
        background: var(--input-background);
        color: var(--text-color);
    }

    .mobile-search-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px var(--primary-color-light);
    }
}

/* 桌面端强制隐藏搜索相关元素 */
@media screen and (min-width: 769px) {
    .mobile-search-panel,
    .mobile-search-container,
    .mobile-search-form,
    .mobile-search-input {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
    }
}

@media screen and (max-width: 768px) {
    .mobile-search-panel {
        display: block !important;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ffffff;
        padding: 16px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }

    .mobile-search-panel.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* 深色模式 */
    [data-theme="dark"] .mobile-search-panel {
        background-color: #1a1a1a;
    }

    .mobile-search-container {
        max-width: 600px;
        margin: 0 auto;
        padding: 0 16px;
    }

    .mobile-search-form {
        width: 100%;
        background-color: inherit;
    }

    .mobile-search-input {
        width: 100%;
        height: 44px;
        padding: 0 16px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 16px;
        background-color: #f5f5f5;
        color: var(--text-color);
    }

    [data-theme="dark"] .mobile-search-input {
        background-color: #2d2d2d;
    }

    .mobile-search-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px var(--primary-color-light);
    }
}

/* 移动端搜索面板样式 */
.mobile-search-panel {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    z-index: 999;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

/* 深色模式搜索面板 */
[data-theme="dark"] .mobile-search-panel {
    background-color: #1a1a1a;
}

.mobile-search-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

.mobile-search-form {
    width: 100%;
    position: relative;
}

.mobile-search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background-color: #f5f5f5;
    color: var(--text-color);
}

[data-theme="dark"] .mobile-search-input {
    background-color: #2d2d2d;
    border-color: #3a3a3a;
}

.mobile-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color-light);
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* 移动端样式 */
@media screen and (max-width: 768px) {
    html, 
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .mobile-search-panel {
        -webkit-overflow-scrolling: touch; /* 优化移动端滚动 */
    }

    /* 移动端滚动条样式 */
    ::-webkit-scrollbar {
        width: 4px;
    }
}

@media screen and (max-width: 991px) {
    .header-right {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        height: calc(100vh - 60px);
        background-color: #ffffff;
        padding: 20px;
        z-index: 998;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .header-right.active {
        transform: translateX(0);
    }

    /* 深色模式背景色 */
    [data-theme="dark"] .header-right {
        background-color: #1a1a1a;
    }

    /* 菜单遮罩层 */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 997;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* 菜单项样式 */
    .header-right .menu {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .header-right .menu-item {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .header-right .menu-item:last-child {
        border-bottom: none;
    }
}

@media screen and (max-width: 991px) {
    .header-right {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        height: calc(100vh - 60px);
        background-color: #ffffff;
        padding: 20px;
        z-index: 998;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .header-right.active {
        transform: translateX(0);
    }

    /* 深色模式背景色 */
    [data-theme="dark"] .header-right {
        background-color: #1a1a1a;
    }

    /* 菜单遮罩层 */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 997;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* 菜单项样式 */
    .header-right .menu {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .header-right .menu-item {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .header-right .menu-item:last-child {
        border-bottom: none;
    }
}

@media screen and (max-width: 768px) {
    .hero-content {
        padding-top: 3rem;
    }
}

@media (max-width: 768px) {
    .stats-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .stats-card {
        margin: 0;
        padding: 0.5rem;
        background: #f8f9fa;
        border-radius: 0.5rem;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    .stats-card-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.5rem;
        padding: 0;
    }

    .stats-icon {
        width: 1.5rem;
        height: 1.5rem;
        margin: 0;
        padding: 0.25rem;
        background: rgba(0, 123, 255, 0.1);
        border-radius: 0.25rem;
    }

    .stats-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.125rem;
    }

    .stats-value {
        font-size: 1rem;
        font-weight: 600;
        color: #333;
        margin: 0;
        line-height: 1;
    }

    .stats-label {
        font-size: 0.75rem;
        color: #666;
        margin: 0;
    }

    [data-theme="dark"] .stats-card {
        background: #2d2d2d;
    }

    [data-theme="dark"] .stats-value {
        color: #fff;
    }

    [data-theme="dark"] .stats-label {
        color: #aaa;
    }
}

@media (max-width: 768px) {
    .stats-section {
        padding: 0.75rem;
    }
    
    .stats-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0.5rem;
        margin-bottom: 0;  /* 移除底部边距 */
        background: #f8f9fa;
        border-radius: 0.5rem;
        gap: 1rem;
    }

    .stats-icon {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 2.5rem;
        background: #edf2f7;
        border-radius: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    .stats-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        flex: 1;
    }

    .stats-value {
        font-size: 1.25rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.2;
    }

    .stats-label {
        font-size: 0.875rem;
        color: #666;
        margin: 0;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin: 0;
    }

    /* 深色模式 */
    [data-theme="dark"] .stats-item {
        background: #2d2d2d;
    }

    [data-theme="dark"] .stats-icon {
        background: #3d3d3d;
    }

    [data-theme="dark"] .stats-label {
        color: #aaa;
    }
}

/* 热门搜索和统计区域的基础样式 */
body .popular-search {
    width: 800px; 
    margin: 1rem auto 0;
    text-align: left; 
    padding: 0 1.8rem;
    max-height: calc(1.4em * 2);
    overflow: hidden;
    position: relative;
    margin-bottom: 0 !important;
}

body .stats-section {
    padding: 2rem 1rem;
    background-color: #fff;
    margin: 2rem auto;
    max-width: 1200px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    body .popular-search {
        width: 100%;
        padding: 0 1rem;
        margin-top: 0.5rem;
        max-height: calc(1.4em * 4 + 20px); /* 增加容器高度，确保第四行显示完整 */
        margin-bottom: -1rem !important; /* 调整为-1rem */
        line-height: 1.6; /* 调整行高 */
    }
    
    body .popular-search a {
        line-height: 1.6; /* 确保链接的行高一致 */
    }
    
    body .stats-section {
        margin-top: 0 !important;
        padding: 0 1rem;
        position: relative;
        top: -1rem; /* 调整为-1rem */
    }
}

@media (max-width: 480px) {
    body .popular-search {
        padding: 0 0.8rem;
        margin-bottom: -1rem !important; /* 调整为-1rem */
        max-height: calc(1.4em * 4 + 20px); /* 保持一致的高度 */
    }
    
    body .stats-section {
        margin-top: 0 !important;
        padding: 0 0.8rem;
        top: -1rem; /* 调整为-1rem */
    }
}

/* 确保这些样式不被覆盖 */
body main .stats-section,
.home-main .stats-section,
#main .stats-section {
    margin-top: 0 !important;
    position: relative;
    top: -1rem; /* 调整为-1rem */
}

@media (max-width: 768px) {
    body main .stats-section,
    .home-main .stats-section,
    #main .stats-section {
        margin-top: 0 !important;
        top: -1rem; /* 调整为-1rem */
    }
}

@media (max-width: 768px) {
    .stats-value {
        font-size: 1.2rem;
        line-height: 1.2;
        margin-bottom: 0;
        display: inline-block;
    }
    
    .stats-label {
        font-size: 0.85rem;
        color: #718096;
        display: inline-block;
        margin-left: 4px;
        line-height: 1.2;
    }
    
    .stats-info {
        text-align: left;
        padding: 0.5rem;
        display: flex;
        align-items: center;
    }
}

/* 移除桌面端菜单hover效果 */
@media (min-width: 769px) {
    .nav-item a:hover::after {
        display: none;
    }
    .nav-item a::after {
        display: none;
    }
}

/* 修复移动端导航栏遮挡问题 */
@media (max-width: 768px) {
    body:not(.home):not(.page-template-page-login):not(.page-template-page-register) .main-header {
        position: relative;
    }
    
    body:not(.home):not(.page-template-page-login):not(.page-template-page-register) main {
        padding-top: 0;
    }
    
    /* 确保搜索面板在相对定位的header上方 */
    .mobile-search-panel {
        position: fixed;
        z-index: 1000;
    }
}

@media (max-width: 768px) {
    .stats-item {
        background: transparent;
        border-radius: 12px;
        padding: 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .stats-icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
    }

    .stats-icon img {
        width: 24px;
        height: 24px;
        object-fit: contain;
        opacity: 0.75;
        background: transparent;
    }

    .stats-info {
        flex: 1;
        display: flex;
        align-items: baseline;
        gap: 4px;
        min-height: 24px;
        display: flex;
        align-items: center;
        background: transparent;
    }

    .stats-value {
        font-size: 1.1rem;
        font-weight: 600;
        color: #2d3748;
        margin: 0;
        line-height: 1;
    }

    .stats-label {
        font-size: 0.85rem;
        color: #718096;
        margin: 0;
        line-height: 1;
    }

    /* 暗色模式适配 */
    [data-theme="dark"] .stats-item {
        background: transparent;
    }

    [data-theme="dark"] .stats-value {
        color: #e2e8f0;
    }

    [data-theme="dark"] .stats-label {
        color: #a0aec0;
    }

    /* 确保网格布局也没有背景色 */
    .stats-grid {
        background: transparent;
    }
}

@media (max-width: 768px) {
    .stats-item {
        background: transparent;
        padding: 0.75rem;
        display: flex;
        align-items: center;
        gap: 1rem; /* 增加图标和文字之间的间距 */
    }

    .stats-icon {
        width: 28px; /* 增加图标容器尺寸 */
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: flex-end; /* 图标右对齐 */
        background: transparent;
        margin-left: 0.5rem; /* 向右移动图标 */
    }

    .stats-icon img {
        width: 28px; /* 增加图标尺寸 */
        height: 28px;
        object-fit: contain;
        opacity: 0.75;
        background: transparent;
    }

    .stats-info {
        flex: 1;
        display: flex;
        align-items: baseline;
        gap: 4px;
        min-height: 28px; /* 与图标高度保持一致 */
        align-items: center;
        background: transparent;
        justify-content: flex-start; /* 文字左对齐 */
    }

    .stats-value {
        font-size: 1.1rem;
        font-weight: 600;
        color: #2d3748;
        margin: 0;
        line-height: 1;
    }

    .stats-label {
        font-size: 0.85rem;
        color: #718096;
        margin: 0;
        line-height: 1;
    }

    /* 暗色模式适配 */
    [data-theme="dark"] .stats-item {
        background: transparent;
    }

    [data-theme="dark"] .stats-value {
        color: #e2e8f0;
    }

    [data-theme="dark"] .stats-label {
        color: #a0aec0;
    }

    /* 确保网格布局没有背景色 */
    .stats-grid {
        background: transparent;
        gap: 0.5rem; /* 调整网格间距 */
    }
}

@media (max-width: 768px) {
    .stats-item {
        background: transparent;
        padding: 0.75rem;
        display: flex;
        align-items: center;
        gap: 1rem; /* 增加图标和文字之间的间距 */
    }

    .stats-icon {
        width: 32px; /* 增加到32px */
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        background: transparent;
        margin-left: 0.5rem;
    }

    .stats-icon img {
        width: 32px; /* 增加到32px */
        height: 32px;
        object-fit: contain;
        opacity: 0.75;
        background: transparent;
    }

    .stats-info {
        flex: 1;
        display: flex;
        align-items: baseline;
        gap: 4px;
        min-height: 32px; /* 与图标高度保持一致 */
        align-items: center;
        background: transparent;
        justify-content: flex-start;
    }

    /* 其他样式保持不变 */
    .stats-value {
        font-size: 1.1rem;
        font-weight: 600;
        color: #2d3748;
        margin: 0;
        line-height: 1;
    }

    .stats-label {
        font-size: 0.85rem;
        color: #718096;
        margin: 0;
        line-height: 1;
    }

    [data-theme="dark"] .stats-item {
        background: transparent;
    }

    [data-theme="dark"] .stats-value {
        color: #e2e8f0;
    }

    [data-theme="dark"] .stats-label {
        color: #a0aec0;
    }

    .stats-grid {
        background: transparent;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .stats-item {
        background: transparent;
        padding: 0.75rem;
        display: flex;
        align-items: center;
        gap: 1rem; /* 增加图标和文字之间的间距 */
    }

    .stats-icon {
        width: 42px; /* 增加到42px */
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        background: transparent;
        margin-left: 0.5rem;
    }

    .stats-icon img {
        width: 42px; /* 增加到42px */
        height: 42px;
        object-fit: contain;
        opacity: 0.75;
        background: transparent;
    }

    .stats-info {
        flex: 1;
        display: flex;
        align-items: baseline;
        gap: 4px;
        min-height: 42px; /* 与图标高度保持一致 */
        align-items: center;
        background: transparent;
        justify-content: flex-start;
    }

    /* 其他样式保持不变 */
    .stats-value {
        font-size: 1.1rem;
        font-weight: 600;
        color: #2d3748;
        margin: 0;
        line-height: 1;
    }

    .stats-label {
        font-size: 0.85rem;
        color: #718096;
        margin: 0;
        line-height: 1;
    }

    [data-theme="dark"] .stats-item {
        background: transparent;
    }

    [data-theme="dark"] .stats-value {
        color: #e2e8f0;
    }

    [data-theme="dark"] .stats-label {
        color: #a0aec0;
    }

    .stats-grid {
        background: transparent;
        gap: 0.5rem;
    }
}

/* 非主页的页面顶部间距 */
body:not(.home) main {
    padding-top: 84px; /* 64px导航栏高度 + 20px间距 */
}

@media (max-width: 768px) {
    body:not(.home):not(.page-template-page-login):not(.page-template-page-register) main {
        padding-top: 74px; /* 移动端导航栏高度 + 间距 */
    }
}

/* 各页面顶部间距 */
.search-main,
.brand-page,
.category-page,
.account-main,
.download-page {
    padding-top: 2rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .search-main,
    .brand-page,
    .category-page,
    .account-main,
    .download-page {
        padding-top: 1.5rem;
    }
}

/* 文件夹操作按钮样式 */
.folder-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6c757d;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: #0056b3;
    background-color: rgba(0, 86, 179, 0.1);
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.folder-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.doc-count {
    font-size: 0.875rem;
    color: #6c757d;
    margin-right: 8px;
}

/* 确保模态框中的表单样式正确 */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .folder-actions {
        gap: 4px;
    }

    .btn-icon {
        padding: 3px;
    }

    .folder-header {
        padding: 8px 12px;
    }
}

/* 收藏夹样式优化 */
.loading-spinner {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.folder-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.folder-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.folder-card.folder-deleted {
    animation: folder-delete 0.3s ease forwards;
}

@keyframes folder-delete {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

.folder-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.folder-icon {
    font-size: 1.2rem;
}

.folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.folder-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
}

.folder-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.25rem;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: #0056b3;
    background-color: rgba(0, 86, 179, 0.1);
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.folder-content {
    padding: 1rem;
}

.doc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-list li {
    margin-bottom: 0.5rem;
}

.doc-list li:last-child {
    margin-bottom: 0;
}

.doc-list a {
    color: #0056b3;
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.doc-list a:hover {
    background-color: rgba(0, 86, 179, 0.1);
    color: #0056b3;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .folders-grid {
        grid-template-columns: 1fr;
        padding: 0.5rem;
        gap: 1rem;
    }

    .folder-header {
        padding: 0.75rem;
    }

    .folder-content {
        padding: 0.75rem;
    }

    .btn-icon {
        padding: 0.2rem;
    }
}

/* 模态框样式优化 */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 80px;
    width: 44px;
    height: 44px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: #d0d0d0;
}

.back-to-top svg {
    width: 16px;
    height: 16px;
    stroke: #666;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
    margin-top: -2px;
}

.back-to-top span {
    font-size: 10px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-top: -2px;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

[data-theme="dark"] .back-to-top {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .back-to-top svg {
    stroke: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .back-to-top span {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .back-to-top:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .action-buttons {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
        padding: 0 10px;
    }

    .action-button {
        flex: 1;
        min-width: 0;
        padding: 8px;
        font-size: 14px;
    }

    .action-button svg {
        width: 18px;
        height: 18px;
    }

    .action-button span {
        font-size: 12px;
        white-space: nowrap;
    }

    .favorite-container {
        flex: 1;
        min-width: 0;
    }

    .favorite-toggle {
        width: 100%;
        padding: 8px;
        font-size: 14px;
    }
}

/* 收藏功能样式 */
.favorite-container {
    position: relative;
    display: inline-block;
}

.favorite-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 200px;
    margin-top: 8px;
}

.favorite-dropdown.show {
    display: block;
}

.favorite-dropdown-content {
    padding: 8px 0;
}

.favorite-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.favorite-item:hover {
    background-color: #f5f5f5;
}

.favorite-item svg {
    color: #666;
}

.favorite-item.new-folder {
    border-top: 1px solid #e0e0e0;
    margin-top: 8px;
    padding-top: 16px;
}

/* 分享功能样式 */
.share-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 200px;
    margin-top: 8px;
}

.share-popup.show {
    display: block;
}

.share-popup-content {
    padding: 8px 0;
}

.share-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: inherit;
    text-decoration: none;
}

.share-item:hover {
    background-color: #f5f5f5;
    text-decoration: none;
    color: inherit;
}

.share-item svg {
    color: #666;
}

/* 二维码样式 */
#qrcode {
    display: inline-block;
    padding: 16px;
    background: #fff;
    border-radius: 4px;
}

/* 提示框样式 */
.header-alert-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    min-width: 300px;
    text-align: center;
}

.header-alert-box .alert {
    margin-bottom: 10px;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 16px;
    font-weight: 500;
    animation: fadeInUp 0.3s ease-out;
    opacity: 0.95;
}

.header-alert-box .alert-success {
    background-color: #28a745;
    color: #fff;
    border: none;
}

.header-alert-box .alert-danger {
    background-color: #dc3545;
    color: #fff;
    border: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* 分享按钮样式 */
.share-container {
    position: relative;
    display: inline-block;
}

.share-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 160px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.share-dropdown.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

.share-dropdown-content {
    max-height: 300px;
    overflow-y: auto;
}

.share-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333333;
    text-decoration: none;
}

.share-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.share-item svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: #666666;
}

.share-item span {
    font-size: 14px;
    color: #333333;
}

/* 暗色模式样式 */
[data-theme="dark"] .share-dropdown {
    background: #2d2d2d;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .share-item {
    color: #ffffff;
}

[data-theme="dark"] .share-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .share-item svg {
    color: #999999;
}

[data-theme="dark"] .share-item span {
    color: #ffffff;
}

/* 删除旧的分享弹出样式 */
.share-popup {
    display: none;
}

@media (max-width: 768px) {
    .action-buttons {
        flex-wrap: wrap;
        gap: 8px;
        padding: 16px;
    }

    .action-button {
        flex: 1 1 calc(25% - 6px);
        min-width: auto;
        padding: 8px;
    }

    /* 确保收藏和分享按钮容器与按钮本身宽度一致 */
    .favorite-container,
    .share-container {
        flex: 1 1 calc(25% - 6px);
        width: auto;
    }

    /* 收藏和分享按钮样式 */
    .favorite-container .action-button,
    .share-container .action-button {
        width: 100%;
        flex: 1 1 100%;
    }

    .action-button svg {
        margin-right: 0;
    }

    .action-button span {
        font-size: 12px;
        margin-top: 4px;
    }
}

/* 暗黑模式样式 */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --text-tertiary: #495057;
    --border-color: #dee2e6;
    --link-color: #007bff;
    --link-hover: #0056b3;
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --header-bg: #ffffff;
    --header-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --btn-primary-bg: #007bff;
    --btn-primary-color: #ffffff;
    --btn-secondary-bg: #f8f9fa;
    --btn-secondary-color: #212529;
    --input-bg: #ffffff;
    --input-border: #ced4da;
    --input-focus-border: #80bdff;
    --input-placeholder: #adb5bd;
    --divider-color: #e9ecef;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #252525;
    --text-primary: #e0e0e0;
    --text-secondary: #acacac;
    --text-tertiary: #909090;
    --border-color: #383838;
    --link-color: #4dabf7;
    --link-hover: #74c0fc;
    --card-bg: #1e1e1e;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    --header-bg: #1a1a1a;
    --header-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    --btn-primary-bg: #4dabf7;
    --btn-primary-color: #ffffff;
    --btn-secondary-bg: #2c2c2c;
    --btn-secondary-color: #e0e0e0;
    --input-bg: #2c2c2c;
    --input-border: #444;
    --input-focus-border: #4dabf7;
    --input-placeholder: #707070;
    --divider-color: #383838;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
}

/* 主体样式适配暗黑模式 */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 导航栏暗黑模式 */
.main-header {
    background-color: var(--header-bg);
    box-shadow: var(--header-shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 链接暗黑模式 */
a {
    color: var(--link-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover);
}

/* 导航项暗黑模式 */
.nav-item a {
    color: var(--text-primary);
}

.nav-item a:hover {
    color: var(--link-color);
    background-color: var(--bg-secondary);
}

/* 分隔线暗黑模式 */
.nav-divider {
    background-color: var(--border-color);
}

/* 按钮暗黑模式 */
.btn-login {
    color: var(--text-primary);
}

.btn-login:hover {
    color: var(--link-color);
}

.btn-register {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-color);
}

.btn-register:hover {
    background-color: var(--link-hover);
}

.btn-user {
    color: var(--text-primary);
}

.btn-user:hover {
    color: var(--link-color);
}

/* 用户下拉菜单暗黑模式 */
.user-dropdown-menu {
    background-color: var(--card-bg);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--link-color);
}

.dropdown-divider {
    border-top: 1px solid var(--border-color);
}

/* 卡片暗黑模式 */
.card, 
.auth-card, 
.doc-card, 
.brand-card,
.folder-card,
.model-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

/* 表格暗黑模式 */
.document-table,
.brand-table,
.search-table {
    background-color: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.document-table-header,
.brand-table-header,
.search-table-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.document-table-row,
.brand-table-row,
.search-table-row {
    border-bottom: 1px solid var(--border-color);
}

.document-table-row:hover,
.brand-table-row:hover,
.search-table-row:hover {
    background-color: var(--bg-secondary);
}

/* 输入框暗黑模式 */
.form-control,
.search-input,
.mobile-search-input {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
}

.form-control:focus,
.search-input:focus,
.mobile-search-input:focus {
    border-color: var(--input-focus-border);
    background-color: var(--input-bg);
    color: var(--text-primary);
}

.form-control::placeholder,
.search-input::placeholder,
.mobile-search-input::placeholder {
    color: var(--input-placeholder);
}

/* 移动菜单暗黑模式 */
.mobile-menu-toggle span {
    background-color: var(--text-primary);
}

.menu-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .menu-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

/* 主题切换按钮 */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-left: auto;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
}

.theme-toggle .sun,
.theme-toggle .moon {
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .sun {
    opacity: 0;
    transform: scale(0.5);
}

.theme-toggle .moon {
    opacity: 1;
    transform: scale(1);
}

.theme-toggle .sun path,
.theme-toggle .moon path {
    stroke: var(--text-primary);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[data-theme="dark"] .theme-toggle .sun {
    opacity: 1;
    transform: scale(1);
}

[data-theme="dark"] .theme-toggle .moon {
    opacity: 0;
    transform: scale(0.5);
}

/* 品牌页面暗黑模式 */
.brand-hero {
    background-color: var(--bg-secondary);
}

.brand-alphabet {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

.alphabet-item {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.alphabet-item:hover {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-color);
}

/* 文档页面暗黑模式 */
.single-header {
    background-color: var(--bg-secondary);
}

.action-button {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.action-button:hover {
    background-color: var(--bg-secondary);
    color: var(--link-color);
}

.action-button svg path {
    stroke: var(--text-primary);
}

.action-button:hover svg path {
    stroke: var(--link-color);
}

/* 滚动条暗黑模式 */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background-color: var(--bg-primary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
}