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

/* 基础设置 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #4CAF50;
}

/* 为所有主要元素设置中文字体 */
h1, h2, h3, h4, h5, h6, p, a, li, span, div {
    font-family: inherit !important;
}

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

/* 导航栏 */
.navbar {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(51, 51, 51, 0.9);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center; /* 确保垂直居中 */
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 8px 0;
    will-change: transform, color;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4CAF50;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: #4CAF50;
    transform: translateY(-2px);
}

.nav-links a:hover::after {
    width: 100%;
}

/* 英雄区域 */
.hero {
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%), url('img/bgimg.png') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 150px 0 100px;
    margin-top: 70px;
    display: flex;
    align-items: center;
    min-height: 80vh;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

/* 浮动动画 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: float 6s ease-in-out infinite;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: float 6s ease-in-out infinite;
    animation-delay: 1s;
}

/* 视差滚动效果 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

/* 渐入动画类 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 从左渐入 */
.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* 从右渐入 */
.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* 缩放渐入 */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* 向上渐入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #4CAF50;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, background-color;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background-color: #45a049;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 波纹动画效果 */
.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-secondary {
    background-color: #333;
}

.btn-secondary:hover {
    background-color: #555;
}

/* 软件展示区域 */
.software-section {
    padding: 80px 0;
    background-color: #fff;
}

.software-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

/* 分类筛选按钮样式 */
.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 0;
    flex: 1 1 auto;
}

.category-filter.vertical {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.filter-btn {
    background-color: #f0f0f0;
    color: #333;
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, background-color;
}

.category-filter.vertical .filter-btn {
    text-align: left;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 5px;
    font-size: 1rem;
}

.category-filter.vertical .filter-btn:hover {
    transform: translateX(5px);
}

.category-filter.vertical .filter-btn.active {
    background-color: #4CAF50;
    color: #fff;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.filter-btn:hover::before {
    width: 200px;
    height: 200px;
}

.filter-btn:hover {
    background-color: #e0e0e0;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.filter-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background-color: #4CAF50;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.filter-btn.active:hover {
    background-color: #45a049;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.filter-btn.active::before {
    background: rgba(255, 255, 255, 0.2);
}

/* 筛选功能区样式 */
.filter-section {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 2rem;
    box-shadow: none;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
}

/* 侧边栏布局样式 */
.software-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.sidebar {
    flex: 0 0 250px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.sidebar h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.main-content {
    flex: 1;
}

.main-content h2 {
    margin-bottom: 30px;
    text-align: left;
    font-size: 2rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .software-layout {
        flex-direction: column;
    }
    
    .sidebar {
        flex: none;
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }
    
    .category-filter.vertical {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .category-filter.vertical .filter-btn {
        width: auto;
        flex: 1 1 auto;
        text-align: center;
        padding: 8px 15px;
        border-radius: 20px;
        margin-bottom: 0;
    }
    
    .category-filter.vertical .filter-btn:hover {
        transform: translateY(-2px);
    }
    
    .main-content h2 {
        text-align: center;
    }
}

/* 搜索框样式 */
@media (min-width: 768px) {
    .filter-controls {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
}

/* 搜索框样式 */
.search-box {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

/* 付费类型筛选样式（已移除对应HTML） */

/* 搜索提示样式 */
.search-container {
    position: relative;
    flex: 1;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestions.visible {
    display: block;
}

.search-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-suggestion-item:hover {
    background-color: #f0f0f0;
}

.search-suggestion-item.active {
    background-color: #e0e0e0;
}

/* 重置按钮样式已移除 */

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

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

.software-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, box-shadow;
}

.software-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.software-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.software-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.software-card:hover .software-img img {
    transform: scale(1.05);
}

.software-info {
    padding: 25px;
}

.software-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.software-info p {
    margin-bottom: 1.5rem;
    color: #666;
}

.software-tags {
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-block;
    background-color: #e0e0e0;
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* 关于我区域 */
.about-section {
    padding: 80px 0;
    background-color: #f5f5f5;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
}

.about-img {
    flex: 0 0 200px;
}

.about-img img {
    width: 100%;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
    max-width: 600px;
}

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

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 50px;
}

.footer p {
    font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        margin-top: 1rem;
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
    }

    .nav-links li {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .software-section h2,
    .about-section h2 {
        font-size: 2rem;
    }

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

    .about-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 80px;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .software-section,
    .about-section {
        padding: 60px 0;
    }
}

/* 模态框样式 */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #fff;
    margin: 5%;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* 模态框退出动画 */
.modal:not(.active) .modal-content {
    transform: translateY(0) scale(0.9);
    opacity: 0;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover,
.close-btn:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.modal-img {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.modal-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.modal-info {
    flex: 1;
    min-width: 300px;
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.modal-info h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem;
    color: #333;
}

.modal-info p {
    margin-bottom: 1rem;
    color: #666;
    line-height: 1.6;
}

.modal-info ul {
    margin-left: 20px;
    margin-bottom: 1.5rem;
}

.modal-info li {
    margin-bottom: 0.5rem;
    color: #666;
}

.modal-info .btn {
    margin-top: 1rem;
}

/* 加载动画样式 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    width: 100%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 脉冲加载动画 */
.loading-pulse {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #4CAF50;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.7;
    }
}

/* 页面加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.page-loader .loading-spinner {
    width: 70px;
    height: 70px;
    border-width: 7px;
}

/* 深色模式样式 */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

/* 深色模式滚动条 */
body.dark-mode ::-webkit-scrollbar-track {
    background: #121212;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #444;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #4CAF50;
}

/* 导航栏 */
body.dark-mode .navbar {
    background-color: #1f1f1f;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-links a {
    color: #e0e0e0;
}

body.dark-mode .nav-links a:hover {
    color: #4CAF50;
}

/* 英雄区域 */
body.dark-mode .hero {
    background: radial-gradient(circle, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.9) 100%), url('img/bgimg.png') no-repeat center center/cover;
}

/* 软件展示区域 */
body.dark-mode .software-section {
    background-color: #121212;
}

body.dark-mode .software-section h2 {
    color: #e0e0e0;
}

body.dark-mode .sidebar {
    background-color: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode .sidebar h3 {
    color: #e0e0e0;
    border-bottom-color: #333;
}

body.dark-mode .filter-btn {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .filter-btn:hover {
    background-color: #3d3d3d;
}

body.dark-mode .filter-btn.active {
    background-color: #4CAF50;
    color: #fff;
}

body.dark-mode .software-card {
    background-color: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .software-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body.dark-mode .software-img img {
    opacity: 0.9;
}

body.dark-mode .software-card:hover .software-img img {
    opacity: 1;
}

body.dark-mode .software-info h3 {
    color: #e0e0e0;
}

body.dark-mode .software-info p {
    color: #aaa;
}

body.dark-mode .tag {
    background-color: #2d2d2d;
    color: #ccc;
}

/* 关于我区域 */
body.dark-mode .about-section {
    background-color: #121212;
}

body.dark-mode .about-section h2 {
    color: #e0e0e0;
}

body.dark-mode .about-text p {
    color: #aaa;
}

body.dark-mode .about-img img {
    border-color: #1e1e1e;
}

/* 页脚 */
body.dark-mode .footer {
    background-color: #1f1f1f;
    color: #aaa;
}

/* 模态框 */
body.dark-mode .modal-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .modal-info h2,
body.dark-mode .modal-info h3 {
    color: #e0e0e0;
}

body.dark-mode .modal-info p,
body.dark-mode .modal-info li {
    color: #aaa;
}

body.dark-mode .close-btn:hover {
    color: #fff;
}

/* 搜索框 */
body.dark-mode .search-box input {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .search-box input:focus {
    border-color: #4CAF50;
}

body.dark-mode .search-suggestions {
    background-color: #2d2d2d;
    border-color: #444;
}

body.dark-mode .search-suggestion-item {
    color: #e0e0e0;
}

body.dark-mode .search-suggestion-item:hover {
    background-color: #3d3d3d;
}

/* 页面加载器深色模式 */
body.dark-mode .page-loader {
    background-color: #121212;
}

body.dark-mode .loading-spinner {
    border-color: #333;
    border-top-color: #4CAF50;
}

/* 主题切换按钮 */
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    color: #fff;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    transform: rotate(15deg) scale(1.1);
}

body.dark-mode .theme-btn {
    color: #e0e0e0;
}
