/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background-color: #000000;
    color: #000000;
    line-height: 1.5;
    font-size: 15px; /* 全局缩小字体基础大小 */
}

/* Header Styles */
.site-header {
    text-align: center;
    padding: 25px 0 15px 0; /* 增大上下padding */
}

.logo-container {
    margin-bottom: 15px; /* 增大底部间距 */
}

.logo-container h1 {
    font-size: 3.2rem; /* 显著增大标题字体 */
    font-weight: bold;
    letter-spacing: 3px; /* 增大字母间距 */
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* 添加文字阴影增强效果 */
}

.banner {
    color: #e74c3c; /* 红色文字 */
    padding: 7px 0;
    font-size: 1.0rem;
    background-color: transparent; /* 去掉红色背景 */
    margin-bottom: 15px; /* 增加底部边距 */
    font-weight: 520; /* 稍微加粗字体 */
}

/* 统一容器 - 包含搜索框和主内容区 */
.unified-container {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 0 10px;
}

/* 控件布局 - 新的布局结构 */
.controls-layout {
    display: flex;
    margin-bottom: 0; /* 移除底部间距 */
}

/* 侧边栏宽度容器 */
.sidebar-width {
    width: 200px; /* 与侧边栏宽度一致 */
    flex-shrink: 0; /* 防止收缩 */
    padding-right: 0; /* 移除右侧间距 */
}

/* 安装教程按钮样式 */
.tutorial-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 4px 0 0 0; /* 只保留左上角圆角 */
    padding: 10px 15px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    box-shadow: none; /* 移除阴影 */
    transition: background-color 0.2s;
    width: 100%; /* 占满容器宽度 */
    height: 42px; /* 与搜索框高度一致 */
}

.tutorial-button i {
    margin-right: 5px;
}

.tutorial-button:hover {
    background-color: #219653;
}

/* 搜索区域 */
.search-area {
    flex: 1; /* 占据剩余空间 */
}

.search-container-full {
    background-color: #fff; /* 改为白色与主容器匹配 */
    padding: 0;
    border-radius: 0;
}

.search-box-full {
    display: flex;
    background-color: #f5f7fa; /* 与侧边栏背景色匹配 */
    border-radius: 0 4px 0 0; /* 只保留右上角圆角 */
    border: 1px solid #ddd;
    border-left: none; /* 移除左侧边框 */
    overflow: hidden;
    box-shadow: none; /* 移除阴影 */
    height: 42px;
    width: 100%; /* 占满容器宽度 */
}

.search-box-full:focus-within {
    border-color: #3498db;
    box-shadow: 0 1px 4px rgba(52, 152, 219, 0.2);
}

.search-box-full input {
    flex: 1;
    border: none;
    padding: 8px 15px;
    font-size: 0.95rem;
    outline: none;
    background-color: #f5f7fa; /* 与外框背景色匹配 */
}

.search-box-full input::placeholder {
    color: #95a5a6;
}

.search-box-full button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px; /* 减小按钮宽度 */
    transition: background-color 0.2s;
}

.search-box-full button i {
    font-size: 0.95rem;
    margin-right: 5px;
}

.search-box-full button:hover {
    background-color: #2980b9;
}

/* Main Layout */
.main-container {
    display: flex;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 调整阴影与搜索框匹配 */
    border-radius: 0 0 5px 5px; /* 只在底部有圆角 */
    overflow: hidden;
    margin-top: 0; /* 确保与上方控件无缝连接 */
}

/* Sidebar Styles */
.sidebar {
    width: 200px; /* 缩小侧边栏宽度 */
    background-color: #f5f7fa; /* 稍微变浅一点的灰色 */
    /* 移除右侧边框线 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); /* 添加微妙的阴影效果代替边框 */
}

/* 原侧边栏教程按钮样式 - 不再使用但保留代码 */
.sidebar-tutorial-container {
    display: none; /* 隐藏旧的侧边栏教程按钮 */
}

/* 原搜索框样式保留，但不使用 */
.search-container {
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f0f3f6;
    border-bottom: 1px solid #eee;
    display: none; /* 隐藏原搜索框 */
}

/* 软件分类列表样式 - 简化版 */
.category-list {
    list-style: none;
}

.category-list li {
    padding: 13px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 600;
    font-size: 0.95rem;
    color: #2c3e50;
}

.category-list li:hover {
    background-color: #ecf0f1;
}

.category-list li.active {
    background-color: #3498db;
    color: white;
    font-weight: 700;
    position: relative;
}

/* 为活跃项添加左侧蓝色指示条 */
.category-list li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: #2980b9;
}

/* Content Styles */
.content {
    flex: 1;
    padding: 15px;
}

/* 软件列表布局 - 单列 */
.software-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.software-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.software-item:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.software-header {
    display: flex;
    align-items: center;
    padding: 13px;
    background-color: #f5f5f5;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
}

.software-header:hover {
    background-color: #edf0f5;
    border-left-color: #3498db;
}

.software-item.expanded .software-header {
    background-color: #edf0f5;
    border-left-color: #2980b9;
    border-bottom: 1px solid #e0e0e0;
}

.software-icon {
    width: 35px;
    height: 35px;
    margin-right: 12px;
    object-fit: contain;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.software-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a52a0;
}

.dropdown-icon {
    color: #3498db;
    font-size: 0.8rem;
    transition: transform 0.3s;
    margin-left: 8px;
}

.software-item.expanded .dropdown-icon {
    transform: rotate(180deg);
}

/* Software Content (展开/折叠部分) - 移除动画 */
.software-content {
    display: none; /* 默认隐藏，不使用max-height动画 */
    background-color: #f8fbff;
    padding: 10px;
}

.software-content.show {
    display: block; /* 显示时直接显示，不使用动画 */
}

/* 版本列表 - 两列布局 */
.software-versions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.version-item {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #e8f0f8; /* 软件版本有明显的背景色区别 */
    transition: background-color 0.2s;
    min-height: 48px;
}

.version-item:hover {
    background-color: #d6e6f5;
}

.version-info {
    display: flex;
    flex: 1;
    min-width: 0;
}

.version-name {
    font-size: 0.9rem;
    color: #000000;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-links {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.download-btn {
    display: inline-block;
    padding: 4px 8px;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.75rem;
    transition: background-color 0.2s;
    font-weight: 600;
    white-space: nowrap;
}

.download-btn:hover {
    opacity: 0.9;
}
.download-btn.thunder {
    background-color: #2980b9;
}

.download-btn.thunder:hover {
    background-color: #27ae60;
}

.download-btn.quark {
    background-color: #2980b9;
}

.download-btn.quark:hover {
    background-color: #27ae60;
}

.download-btn.baidu {
    background-color: #2980b9;
}

.download-btn.baidu:hover {
    background-color: #27ae60;
}

.download-btn.jiaocheng {
    background-color: #d35400;
}

.download-btn.jiaocheng:hover {
    background-color: #27ae60;
}

/* Footer Styles */
.site-footer {
    background-color: #000000;
    color: white;
    text-align: center;
    padding: 15px 10px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.site-footer p {
    margin-bottom: 8px;
}

.site-footer .disclaimer {
    font-size: 0.75rem;
    color: #bdc3c7;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
}

.site-footer .copyright {
    margin-top: 8px;
    font-size: 0.75rem;
}

/* Responsive Styles - 优化移动端 */
@media (max-width: 980px) {
    .software-versions {
        grid-template-columns: 1fr;
    }
}

/* 移动端响应式样式调整 */
@media (max-width: 768px) {
    .logo-container h1 {
        font-size: 2.2rem; /* 移动端缩小标题 */
    }

    /* 控件布局在移动端改为垂直排列 */
    .controls-layout {
        flex-direction: column;
    }

    .sidebar-width {
        width: 100%;
        padding-right: 0;
        margin-bottom: 0; /* 确保与搜索框无缝衔接 */
    }

    .tutorial-button {
        height: 38px; /* 移动端按钮高度稍小 */
        border-radius: 4px 4px 0 0; /* 移动端两个上角都有圆角 */
    }

    .search-area {
        width: 100%;
    }

    .search-box-full {
        height: 38px;
        border-radius: 0 0 4px 4px; /* 移动端两个下角都有圆角 */
        border-left: 1px solid #ddd; /* 移动端恢复左侧边框 */
        border-top: none; /* 移动端移除上边框 */
    }

    .search-box-full button {
        min-width: auto;
        padding: 0 10px;
    }

    .search-box-full button span {
        display: none; /* 隐藏按钮文字，只保留图标 */
    }

    .search-box-full button i {
        margin-right: 0;
    }

    .main-container {
        margin: 0px 0 0; /* 移动端与上方控件有一定间隔 */
        /* 移动端保持左侧菜单右侧软件的结构 */
        flex-direction: row;
        border-radius: 4px; /* 恢复四角圆角 */
    }

    .sidebar {
        width: 35%; /* 移动端减小侧边栏宽度 */
        min-width: 120px;
    }

    .category-list li {
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    .content {
        width: 65%;
        padding: 10px 8px;
    }

    .software-header {
        padding: 10px 8px;
    }

    .software-name {
        font-size: 0.9rem;
    }

    .software-icon {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }

    .software-versions {
        grid-template-columns: 1fr; /* 移动端一列显示 */
    }

    .version-item {
        padding: 8px;
        flex-direction: column;
        align-items: flex-start;
    }

    .download-links {
        margin-top: 6px;
        width: 100%;
        justify-content: space-between;
    }

    .download-btn {
        flex: 1;
        text-align: center;
        padding: 5px 6px; /* 调整移动端按钮高度以便点击 */
    }
}

/* 针对小屏手机的优化 */
@media (max-width: 480px) {
    .logo-container h1 {
        font-size: 1.8rem;
    }

    .banner {
        font-size: 0.8rem;
        padding: 5px 0;
    }

    .tutorial-button {
        font-size: 0.85rem;
        padding: 8px;
    }

    .search-box-full input {
        padding: 8px;
    }

    .sidebar {
        width: 38%; /* 小屏幕稍微调整比例 */
        min-width: 100px;
    }

    .content {
        width: 62%;
    }

    .category-list li {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .software-name {
        font-size: 0.85rem;
    }

    .software-icon {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }

    .download-btn {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
}
