
:root {
    --background-color: white;
    --text-color: #333;
    --border-color: #eee;
    --sidebar-active-bg: #f5f5f5;
    --accordion-header-bg: #f5f5f5;
    --card-bg: white;
    --action-btn-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: transparent;
        --text-color: #fff;
        --border-color: #444;
        --sidebar-active-bg: transparent;
        --accordion-header-bg: transparent;
        --card-bg: transparent;
        --action-btn-bg: transparent;
        --software-name-bg: transparent;
    }
    
    /* 强制所有背景色透明 */
    body,
    .sidebar,
    .main-content,
    .card,
    .wps-version-card,
    .panel-heading,
    .panel-content,
    .software-item,
    .software-name,
    .card-title,
    .panel-item-title,
    .action-btn,
    .sidebar-item,
    .sidebar-item.active {
        background-color: transparent !important;
    }
    
    /* 设置.accordion-header背景色为RGB(30,36,47) */
    .accordion-header {
        background-color: rgb(30, 36, 47) !important;
    }
    
    /* 确保所有软件集合名称和相关文本在深色模式下为白色 */
    .software-name,
    .card-title,
    .panel-item-title,
    .category-title,
    .accordion-header,
    .accordion-header *,
    .sidebar-item,
    .software-item,
    .panel-item-title {
        color: #fff !important;
        background-color: transparent !important;
    }
    
    /* 确保所有文本元素在深色模式下为白色 */
    body * {
        color: #fff !important;
    }
    
    /* 数据加载完成通知在深色模式下使用黄色字体 */
    .notification.is-success.is-light {
        color: #ffd700 !important; /* 黄色字体 */
    }
    
    .notification.is-success.is-light strong,
    .notification.is-success.is-light small {
        color: #ffd700 !important; /* 黄色字体 */
    }
    
    /* 恢复特定需要不同颜色的元素 */
    .action-btn,
    .tag,
    .icon-text {
        color: rgba(255, 255, 255, 0.8) !important;
    }
    
    .sidebar-item.active {
        color: #00d1b2 !important;
    }
    
    /* 设置.sidebar背景为透明 */
    .sidebar {
        background-color: transparent !important;
    }
    
    /* 确保侧边栏背景和所有项目完全透明 */
    .sidebar {
        background-color: transparent !important;
        background-image: none !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    /* 强化侧边栏项目背景透明 */
    .sidebar-item {
        background-color: transparent !important;
        background-image: none !important;
        color: #fff !important;
        margin-bottom: 5px;
        border-radius: 4px;
        border: none !important;
        box-shadow: none !important;
    }
    
    /* 强化激活状态的侧边栏项目也保持透明 */
    .sidebar-item.active {
        background-color: transparent !important;
        background-image: none !important;
        color: #00d1b2 !important;
        border-left-color: #00d1b2 !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    /* 确保侧边栏内所有元素背景透明 */
    .sidebar * {
        background-color: transparent !important;
        background-image: none !important;
    }
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    border-color: var(--border-color);
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.sidebar {
    position: fixed;
    height: 100vh;
    width: 120px;
    background-color: var(--background-color);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    z-index: 10;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

.sidebar-item {
    padding: 10px 20px;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item.active {
    color: #00d1b2;
    border-left-color: #00d1b2;
    background-color: transparent !important;
}

.sidebar-item i.fas.fa-star {
    color: #ffb74d;
    margin-right: 8px;
}

.sidebar-divider {
    margin: 10px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.main-content {
    margin-left: 120px;
    padding: 20px;
    background-color: var(--background-color);
    transition: all 0.3s ease;
}

/* 响应式设计 - 大屏幕缩小阶段（1200px-1025px）：缩小按钮两侧空间 */
@media (max-width: 1200px) and (min-width: 1025px) {
    .sidebar {
        width: 110px; /* 从120px缩小到110px，主要减少两侧空间 */
    }
    
    .main-content {
        margin-left: 110px;
    }
    
    .sidebar-item {
        padding: 10px 15px; /* 保持垂直间距，减少水平间距 */
        font-size: 14px; /* 保持字体大小不变 */
    }
}

/* 配置卡片宽度设置 */
.card {
    width: 100%;
    margin: 0 auto;
}

/* 确保在深色模式下卡片宽度也生效 */
@media (prefers-color-scheme: dark) {
    .card {
        width: 100%;
        margin: 0 auto;
    }
}

/* 修复column is-6容器中的卡片布局 */
.column.is-6 .card {
    width: 100%;
    margin: 0 auto;
}

/* 确保在深色模式下也生效 */
@media (prefers-color-scheme: dark) {
    .column.is-6 .card {
        width: 100%;
        margin: 0 auto;
    }
}

/* 响应式设计 - 中等屏幕（1024px-769px）：缩小按钮宽度 */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 90px; /* 进一步缩小侧边栏宽度 */
    }
    
    .main-content {
        margin-left: 90px;
        padding: 15px;
    }
    
    .sidebar-item {
        padding: 8px 10px; /* 同时缩小按钮内边距 */
        font-size: 13px; /* 稍微缩小字体 */
        text-align: center; /* 居中对齐 */
    }
    
    .sidebar-item span {
        display: inline; /* 保持文字显示 */
    }
}

/* 响应式设计 - 小屏幕（768px-481px）：进一步缩小按钮 */
@media (max-width: 768px) and (min-width: 481px) {
    .sidebar {
        width: 70px;
        padding: 15px 0;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 10px;
    }
    
    .sidebar-item {
        padding: 6px 8px;
        font-size: 12px;
        text-align: center;
    }
    
    .sidebar-item span {
        display: inline; /* 仍然显示文字 */
        font-size: 11px; /* 进一步缩小文字 */
    }
    
    .sidebar-item i {
        margin-right: 0;
        font-size: 14px;
    }
}

/* 响应式设计 - 超小屏幕（480px以下）：最后收起按钮，只显示图标 */
@media (max-width: 480px) {
    .sidebar {
        width: 60px;
        padding: 10px 0;
    }
    
    .main-content {
        margin-left: 60px;
        padding: 8px;
    }
    
    .sidebar-item {
        padding: 5px 6px;
        font-size: 11px;
        text-align: center;
    }
    
    .sidebar-item span {
        display: none; /* 在超小屏幕上隐藏文字，只显示图标 */
    }
    
    .sidebar-item i {
        font-size: 14px;
        display: block;
        margin: 0 auto;
    }
}

/* 侧边栏收起/展开功能 */
.sidebar.collapsed {
    width: 60px;
    transform: translateX(0);
}

.sidebar.collapsed .sidebar-item span {
    display: none;
}

.sidebar.collapsed .sidebar-item i {
    margin-right: 0;
    font-size: 16px;
    display: block;
    text-align: center;
}

.sidebar.collapsed + .main-content {
    margin-left: 60px;
}

/* 响应式设计 - 大屏幕收起状态（1200px-1025px） */
@media (max-width: 1200px) and (min-width: 1025px) {
    .sidebar.collapsed {
        width: 60px;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 60px;
    }
}

/* 响应式设计 - 中等屏幕收起状态（1024px-769px） */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar.collapsed {
        width: 60px;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 60px;
    }
}

/* 响应式设计 - 小屏幕收起状态（768px-481px） */
@media (max-width: 768px) and (min-width: 481px) {
    .sidebar.collapsed {
        width: 60px;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 60px;
    }
}

/* 侧边栏切换按钮 */
.sidebar-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: none;
}

.sidebar-toggle:hover {
    background: var(--primary-hover);
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.category-title {
    display: flex;
    align-items: center;
}

.category-title i {
    margin-right: 8px;
}

.software-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid rgba(239, 239, 239, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.software-item:hover {
    background-color: rgba(245, 245, 245, 0.1);
}

.software-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.software-name {
    flex: 1;
    background-color: var(--software-name-bg, transparent);
    padding: 4px 8px;
    border-radius: 4px;
    margin: 2px 0;
}

.arrow-icon {
    color: rgba(204, 204, 204, 0.6);
}

.card-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(239, 239, 239, 0.3);
}

.card-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
    background-color: var(--software-name-bg, transparent);
    padding: 4px 8px;
    border-radius: 4px;
    margin: 2px 0;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: var(--action-btn-bg);
    color: var(--text-color);
    border: none;
}

.action-btn:hover {
    opacity: 0.8;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.panel-content {
    padding: 15px;
    display: none;
    background-color: var(--background-color);
}

.panel-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(239, 239, 239, 0.2);
    display: flex;
    align-items: center;
}

.panel-item:last-child {
    border-bottom: none;
}

.panel-item-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.panel-item-title {
    margin-left: 10px;
    background-color: var(--software-name-bg, transparent);
    padding: 4px 8px;
    border-radius: 4px;
    margin: 2px 0;
}

.tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 5px;
    background-color: rgba(245, 245, 245, 0.2);
    color: var(--text-color);
}

.icon-text {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: rgba(204, 204, 204, 0.6);
}

.icon-text i {
    margin-right: 5px;
}

.accordion-section {
    margin-bottom: 20px;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: var(--accordion-header-bg);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-color);
}

.accordion-content {
    padding: 0;
    display: none;
    background-color: var(--background-color);
}

.accordion-content.active {
    display: block;
}

.wps-versions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.wps-version-card {
    background-color: var(--card-bg);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(239, 239, 239, 0.3);
}

/* 书籍网格布局样式 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.book-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(239, 239, 239, 0.3);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.book-cover {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: visible;
    border-radius: 6px;
    margin-bottom: 10px;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.book-cover:hover img {
    transform: scale(1.05);
}

.book-cover .book-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translateY(100%);
}

.book-cover:hover .book-description {
    opacity: 1;
    transform: translateY(0);
}

.book-title {
    text-align: center;
    margin-top: 10px;
}

.book-title a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
}

.book-title a:hover {
    color: #00d1b2;
}

/* 加载动画样式 */
.loader {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* 深色模式下的书籍卡片样式 */
@media (prefers-color-scheme: dark) {
    .book-card {
        background-color: transparent;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .book-cover .book-description {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .loader {
        border-color: #555;
        border-top-color: #3498db;
    }
    
    .progress-bar {
        background: #333;
    }
}

/* ========== 从 assets/css/style.css 合并的样式 ========== */

/* Basic reset and global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Container styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
.header {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2rem;
    color: #333;
    text-align: center;
}

/* Search form styles */
.search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.search-input {
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 400px;
    outline: none;
}

.search-input:focus {
    border-color: #007cba;
}

.search-button {
    padding: 12px 24px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #005a87;
}

/* Results container */
.results-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Individual result item */
.result-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.result-item:hover {
    background-color: #f9f9f9;
}

.result-item:last-child {
    border-bottom: none;
}

.result-title {
    font-size: 1.2rem;
    color: #007cba;
    margin-bottom: 8px;
    text-decoration: none;
}

.result-title:hover {
    text-decoration: underline;
}

.result-url {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.result-description {
    color: #555;
    line-height: 1.5;
}

/* Loading and error states */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    background-color: #ffe6e6;
    color: #d63031;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .search-input {
        width: 100%;
        margin-bottom: 10px;
        border-radius: 4px;
    }
    
    .search-button {
        width: 100%;
        border-radius: 4px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .header {
        background-color: #2d2d2d;
        border-bottom-color: #404040;
    }
    
    .results-container {
        background-color: #2d2d2d;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .result-item:hover {
        background-color: #3d3d3d;
    }
    
    .result-title {
        color: #4da6ff;
    }
    
    .result-url {
        color: #999;
    }
    
    .search-input {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .search-input:focus {
        border-color: #4da6ff;
    }
}

/* ========== 收藏按钮样式 ========== */
.favorite-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white !important;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 123, 186, 0.4);
    gap: 8px;
    opacity: 1 !important;
    visibility: visible !important;
}

.favorite-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a70 100%);
    box-shadow: 0 4px 12px rgba(0, 123, 186, 0.6);
    transform: translateY(-2px);
    color: white !important;
}

.favorite-btn .fas {
    margin-right: 6px;
    font-size: 14px;
    color: #ffd700 !important;
}

/* ========== 信息标题容器样式 ========== */
.item-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.item-title-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== 收藏星星按钮样式 ========== */
.favorite-star-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    color: #ffd700 !important;
    border: none;
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
}

.favorite-star-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.5);
}

.favorite-star-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.favorite-star-btn .fas,
.favorite-star-btn .far {
    transition: all 0.3s ease;
}

.favorite-star-btn:hover .fas,
.favorite-star-btn:hover .far {
    transform: scale(1.2);
}

/* 实心星星样式 */
.favorite-star-btn.favorited {
    background: #ffd700;
    color: #333 !important;
    border: none;
}

.favorite-star-btn.favorited:hover {
    background: #ffed4e;
    border: none;
}

/* 响应式设计 - 小屏幕上的收藏星星按钮 */
@media (max-width: 768px) {
    .favorite-star-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .action-buttons {
        gap: 6px;
    }
}

.item-title {
    margin: 0;
    flex: 1;
}

.download-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white !important;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 123, 186, 0.4);
    position: relative;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.download-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a70 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 123, 186, 0.6);
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 186, 0.3);
}

.download-btn .fas {
    transition: transform 0.3s ease;
}

.download-btn:hover .fas {
    transform: scale(1.1);
}

/* 更美观的下载按钮样式 - 圆形设计 */
.download-btn.circle {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.4);
}

.download-btn.circle:hover {
    transform: translateY(-2px) scale(1.05);
    background: linear-gradient(135deg, #20c997 0%, #198754 100%);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.6);
}

/* 带文字的下载按钮样式 */
.download-btn.with-text {
    width: auto;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    box-shadow: 0 2px 8px rgba(0, 123, 186, 0.4);
    gap: 8px;
    min-width: 80px;
    text-align: center;
    justify-content: center;
}

.download-btn.with-text:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a70 100%);
    box-shadow: 0 4px 12px rgba(0, 123, 186, 0.6);
    transform: translateY(-2px);
}

.download-btn.with-text .fas {
    margin-right: 6px;
    font-size: 14px;
}

/* ========== 打开按钮样式 ========== */
.open-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white !important;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
    position: relative;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
}

.open-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.open-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #198754 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.6);
}

.open-btn:hover::before {
    left: 100%;
}

.open-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.open-btn .fas {
    transition: transform 0.3s ease;
}

.open-btn:hover .fas {
    transform: scale(1.1);
}

/* 带文字的打开按钮样式 */
.open-btn.with-text {
    width: auto;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
    gap: 8px;
    min-width: 80px;
    text-align: center;
    justify-content: center;
}

.open-btn.with-text:hover {
    background: linear-gradient(135deg, #20c997 0%, #198754 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.6);
    transform: translateY(-2px);
}

.open-btn.with-text .fas {
    margin-right: 6px;
    font-size: 14px;
}

/* 深色模式下的打开按钮样式 */
@media (prefers-color-scheme: dark) {
    .open-btn {
        background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
        color: #1a1a1a !important;
        box-shadow: 0 2px 6px rgba(72, 187, 120, 0.4);
    }
    
    .open-btn:hover {
        background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
        box-shadow: 0 4px 12px rgba(72, 187, 120, 0.6);
    }
}

/* 深色模式下的下载按钮样式 */
@media (prefers-color-scheme: dark) {
    .download-btn {
        background: linear-gradient(135deg, #4da6ff 0%, #3385ff 100%);
        color: #1a1a1a !important;
        box-shadow: 0 2px 6px rgba(77, 166, 255, 0.4);
    }
    
    .download-btn:hover {
        background: linear-gradient(135deg, #3385ff 0%, #2673e6 100%);
        box-shadow: 0 4px 12px rgba(77, 166, 255, 0.6);
    }
    
    .download-btn.circle {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    }
}

/* 响应式设计 - 小屏幕上的按钮 */
@media (max-width: 768px) {
    .item-title-wrapper {
        gap: 10px;
    }
    
    .download-btn,
    .open-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        border-radius: 6px;
    }
    
    .download-btn.circle {
        border-radius: 50%;
    }
    
    .download-btn.with-text,
    .open-btn.with-text {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* 小屏幕上的图标和标题布局调整 */
    .item-title-content {
        gap: 6px;
    }
    
    .item-icon {
        width: 20px;
        height: 20px;
    }
    
    .item-title {
        font-size: 14px;
    }
}

/* 点击名称显示/隐藏描述信息的样式 */
.clickable-title {
    cursor: pointer;
    transition: all 0.3s ease;
}

.clickable-title:hover {
    color: #007cba;
}

.item-description {
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.item-description.show {
    max-height: none;
    opacity: 1;
    margin-top: 10px;
}

/* 深色模式下的描述样式 */
@media (prefers-color-scheme: dark) {
    .item-description {
        background: #2d3748;
        color: #e2e8f0;
        border-left-color: #4da6ff;
    }
}

/* 响应式设计 - 小屏幕上的描述信息 */
@media (max-width: 768px) {
    .item-description {
        padding: 10px;
        font-size: 13px;
    }
}

/* 手风琴样式 */
.child-category-section {
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.child-category-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.accordion-toggle {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin: 0;
    background-color: var(--accordion-header-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.accordion-toggle:hover {
    background-color: rgba(0, 123, 186, 0.1);
}

.accordion-icon {
    margin-right: 12px;
    transition: transform 0.3s ease;
}

.accordion-toggle.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: var(--background-color);
}

.accordion-content.active {
    max-height: none; /* 使用自动高度，不限制最大高度 */
    height: auto; /* 自动高度 */
    padding: 20px;
    background-color: var(--card-bg);
    overflow: visible; /* 允许内容正常显示 */
}

/* 深色模式下的手风琴样式 */
@media (prefers-color-scheme: dark) {
    .accordion-toggle {
        background-color: rgba(255, 255, 255, 0.05);
        color: #fff;
    }
    
    .accordion-toggle:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .accordion-content {
        background-color: transparent;
    }
}

/* 响应式设计 - 小屏幕上的手风琴 */
@media (max-width: 768px) {
    .accordion-toggle {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .accordion-content.active {
        padding: 15px;
    }
}