/* 全局样式重置 */
* {
    margin: 0;
    padding: 0px;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', 'SimSun', serif;
    line-height: 1.5;
    color: #e0e0e0;
    background-color: #000000;
    background-image:
        radial-gradient(rgba(255, 255, 255, .15) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px);
    background-size: 500px 500px, 300px 300px;
    background-position: 0 0, 25px 25px;
    font-size: 16px;
}

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

/* 头部样式 */
.header {
    background-color: transparent;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s ease;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));
    opacity: 0.4;
    transition: all 0.3s ease;
}

.header:hover {
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.9);
}

.header:hover::before {
    opacity: 0.6;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

/* 移动端汉堡菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.logo h1 {
    font-size: 28px;
    font-weight: bold;
}

.logo a {
    text-decoration: none;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav li {
    margin-left: 35px;
}

.nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.nav a:hover {
    color: #3498db;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

/* 搜索区域 */
.search-section {
    background-color: transparent;
    text-align: center;
    padding: 60px 20px 40px;
    margin-top: 70px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-radius: 25px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transform-style: preserve-3d;
    transform: translateZ(0);
    transition: transform 0.3s ease;
}

.search-box:hover {
    transform: translateZ(10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: none;
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    outline: none;
}

.search-box button {
    padding: 15px 30px;
    font-size: 16px;
    background-color: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: bold;
}

.search-box button:hover {
    background-color: #2980b9;
    transform: scale(1.02);
}

.search-box button:active {
    transform: scale(0.98);
}

/* 搜索下拉框 */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 25px 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: none;
    display: none;
}

.search-dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #333;
}

.search-dropdown-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.search-dropdown-item h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #3498db;
}

.search-dropdown-item p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* 搜索历史记录样式 */
.search-history-title {
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    color: #999;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(245, 245, 245, 0.8);
}

.search-history-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #333;
    font-size: 14px;
}

.search-history-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.search-clear-history {
    padding: 10px 15px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #e74c3c;
    font-size: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(245, 245, 245, 0.8);
}

.search-clear-history:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

/* 搜索无结果样式 */
.search-dropdown-no-result {
    padding: 15px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 搜索结果统计样式 */
#search-stats {
    text-align: center;
    font-size: 16px;
    margin-bottom: 20px;
    color: #e0e0e0;
}

/* 返回全部按钮样式 */
#back-to-all {
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: block;
    transition: background-color 0.3s;
}

#back-to-all:hover {
    background-color: #2980b9;
}

/* 搜索关键词高亮样式 */
.search-highlight {
    background-color: #ffeb3b;
    font-weight: bold;
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 搜索加载动画 */
.search-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式搜索样式 */
@media (max-width: 768px) {
    .search-box {
        max-width: 100%;
    }

    .search-dropdown {
        max-height: 200px;
        border-radius: 0 0 20px 20px;
    }

    .search-dropdown-item {
        padding: 10px 12px;
    }

    .search-dropdown-item h4 {
        font-size: 14px;
        margin-bottom: 3px;
    }

    .search-dropdown-item p {
        font-size: 12px;
    }

    .search-history-item {
        padding: 8px 12px;
        font-size: 13px;
    }

    .search-clear-history {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .search-dropdown {
        max-height: 180px;
        border-radius: 0 0 15px 15px;
    }

    .search-dropdown-item h4 {
        font-size: 13px;
    }

    .search-dropdown-item p {
        font-size: 11px;
    }
}

/* 软件分类 */
.category-section {
    padding: 80px 20px;
}

.category-section h2 {
    text-align: center;
    font-size: 40px;
    margin-bottom: 60px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.category-item {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px 30px 40px 30px;
    height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    text-decoration: none;
    transform-style: preserve-3d;
    transform: translateZ(0);
    position: relative;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.1));
    border-radius: 15px;
    transform: translateZ(-10px);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.category-item:hover {
    transform: translateY(-8px) translateZ(15px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    background-color: rgba(52, 152, 219, 0.15);
}

.category-item:hover::before {
    transform: translateZ(-15px);
    opacity: 0.8;
}

.category-item h3 {
    font-size: 28px;
    margin: 0 0 20px 0;
    color: #3498db;
    font-weight: bold;
    flex-shrink: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.3),
        0 0 5px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    transform: translateZ(5px) translateY(2px);
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.category-item h3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 8px;
    transform: translateZ(-1px);
    opacity: 0.6;
}

.category-item:hover h3 {
    transform: translateZ(10px) translateY(0) scale(1.05);
    box-shadow:
        0 5px 0 rgba(0, 0, 0, 0.4),
        0 10px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #4a90e2;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.6);
}

/* 双倍高度的分类项 */
.category-item.double-height {
    padding: 120px 30px;
}

.category-item p {
    font-size: 20px;
    color: #b0b0b0;
    line-height: 1.8;
    margin: 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-weight: bold;
    font-family: 'SimSun', serif;
    text-shadow: 0 0 8px rgba(176, 176, 176, 0.3);
    transition: all 0.3s ease;
}

.category-item:hover p {
    text-shadow: 0 0 12px rgba(176, 176, 176, 0.5);
    color: #e0e0e0;
}

/* 热门软件 */
.hot-section {
    padding: 80px 20px;
    background-color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hot-section h2 {
    text-align: center;
    font-size: 40px;
    margin-bottom: 60px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.software-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.software-item {
    background-color: rgba(255, 255, 255, 0.05);
    width: calc(25% - 15px);
    min-width: 200px;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    transform: translateZ(0);
    position: relative;
}

.software-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.1));
    border-radius: 15px;
    transform: translateZ(-10px);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.software-item:hover {
    transform: translateY(-8px) translateZ(15px) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    background-color: rgba(255, 255, 255, 0.1);
}

.software-item:hover::before {
    transform: translateZ(-15px);
    opacity: 0.8;
}

.software-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.software-icon img {
    max-width: 70px;
    max-height: 70px;
}

.software-item h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #ffffff;
    font-weight: bold;
}

.software-item p {
    color: #b0b0b0;
    margin-bottom: 20px;
    font-size: 16px;
}

.download-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

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

/* 关于我们 */
.about-section {
    padding: 80px 20px;
    text-align: center;
    background-color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(52, 152, 219, 0.1), transparent 70%);
    transform: translateZ(-20px);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.about-section:hover::before {
    transform: translateZ(-15px) scale(1.05);
    opacity: 0.8;
}

.about-section h2 {
    font-size: 40px;
    margin-bottom: 25px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: translateZ(10px);
    transition: transform 0.3s ease;
}

.about-section:hover h2 {
    transform: translateZ(15px) scale(1.02);
}

.about-section p {
    font-size: 18px;
    color: #b0b0b0;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    transform: translateZ(5px);
    transition: transform 0.3s ease;
}

.about-section:hover p {
    transform: translateZ(10px);
}

/* 底部样式 */
.footer {
    background-color: rgba(0, 0, 0, 0.9);
    color: #b0b0b0;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.8);
    transform-style: preserve-3d;
    transform: translateZ(0);
    position: relative;
    transition: transform 0.3s ease;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
    transform: translateZ(-10px);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.footer:hover {
    transform: translateZ(5px);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.9);
}

.footer:hover::before {
    transform: translateZ(-8px);
    opacity: 0.8;
}

.footer-info p {
    margin-bottom: 8px;
    font-size: 16px;
    color: #e0e0e0;
    transform: translateZ(2px);
    transition: transform 0.3s ease;
}

.footer:hover .footer-info p {
    transform: translateZ(4px);
}

/* 响应式设计 */
@media (max-width: 768px) {

    /* 字体大小优化 */
    body {
        font-size: 14px;
        line-height: 1.6;
    }

    /* 触摸交互优化 */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* 增加可点击元素的触摸区域 */
    .nav a,
    .back-btn,
    .search-box button,
    .mobile-menu-btn {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 确保分类和软件项有足够的触摸区域 */
    .category-item,
    .software-item {
        min-height: 44px;
        cursor: pointer;
    }

    /* 触摸反馈 */
    .nav a,
    .category-item,
    .software-item,
    .back-btn,
    .search-box button,
    .mobile-menu-btn {
        transition: all 0.2s ease;
    }

    .nav a:active,
    .category-item:active,
    .software-item:active,
    .back-btn:active,
    .search-box button:active,
    .mobile-menu-btn:active {
        transform: scale(0.95);
        opacity: 0.8;
    }

    .header .container {
        flex-direction: row;
        padding: 10px 20px;
    }

    /* 显示汉堡菜单，隐藏导航 */
    .mobile-menu-btn {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        z-index: 1000;
        transition: right 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav.active {
        right: 0;
    }

    .nav ul {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .nav li {
        margin: 20px 0;
    }

    .nav a {
        font-size: 18px;
        padding: 10px 20px;
        display: block;
    }

    .container {
        padding: 15px;
    }

    .search-section {
        padding: 50px 15px 30px;
        margin-top: 60px;
    }

    .search-box {
        flex-direction: row;
        max-width: 100%;
        border-radius: 20px;
    }

    .search-box input {
        padding: 12px 15px;
        font-size: 14px;
        border-radius: 20px 0 0 20px;
    }

    .search-box button {
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 0 20px 20px 0;
    }

    /* 优化移动端的网格布局 */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .software-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .software-item {
        width: 100%;
        min-width: auto;
        margin-bottom: 20px;
    }

    .software-item h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .software-item p {
        font-size: 14px;
        line-height: 1.5;
    }

    .category-item {
        margin-bottom: 20px;
        padding: 20px;
        height: auto;
        min-height: 200px;
    }

    .category-item h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .category-item p {
        font-size: 14px;
        line-height: 1.5;
    }

    /* 优化移动端的标题大小 */
    .logo h1 {
        font-size: 24px;
    }

    .search-section h1 {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .search-section h2 {
        font-size: 18px;
        margin-bottom: 30px;
    }

    .category-section h2,
    .hot-section h2,
    .about-section h2 {
        font-size: 28px;
        margin-bottom: 40px;
    }

    /* 优化移动端的间距 */
    .category-section,
    .hot-section,
    .about-section {
        padding: 60px 15px;
    }

    .footer {
        padding: 30px 15px;
    }

    .footer-info p {
        font-size: 14px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {

    /* 小屏幕设备的额外优化 */
    .logo h1 {
        font-size: 20px;
    }

    .search-section h1 {
        font-size: 28px;
    }

    .search-section h2 {
        font-size: 18px;
    }

    .category-section h2,
    .hot-section h2,
    .about-section h2 {
        font-size: 24px;
    }

    .search-box {
        border-radius: 15px;
    }

    .search-box input {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 15px 0 0 15px;
    }

    .search-box button {
        padding: 10px 15px;
        font-size: 13px;
        border-radius: 0 15px 15px 0;
    }

    .category-item {
        padding: 15px;
        min-height: 180px;
    }

    .category-item h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .category-item p {
        font-size: 14px;
        line-height: 1.4;
    }

    .footer-info p {
        font-size: 14px;
    }

    /* 装机必备页面响应式 */
    .essentials-title {
        font-size: 28px;
    }

    .essentials-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }

    .essentials-section {
        padding: 80px 15px 40px;
    }

    .back-to-home {
        margin-top: 40px;
    }

    .back-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 装机必备页面样式 */
.essentials-section {
    padding: 100px 20px 50px;
}

.essentials-title {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
    text-align: center;
    font-size: 36px;
}

.essentials-subtitle {
    color: #b0b0b0;
    text-align: center;
    margin-bottom: 60px;
    font-size: 18px;
}

.essentials-categories {
    max-width: 1200px;
    margin: 0 auto;
}

/* 一级目录纵向排列 */
.essentials-category {
    margin-bottom: 50px;
    padding: 0px;
}

.essentials-category h3 {
    color: #3498db;
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    display: inline-block;
}

/* 返回首页按钮 */
.back-to-home {
    text-align: center;
    margin-top: 60px;
}

.back-btn {
    display: inline-block;
    padding: 10px 30px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: bold;
}

.back-btn:hover {
    background-color: #2980b9;
    transform: scale(1.02);
}