:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f7fa;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --light-text: #666;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, var(--primary-color), #6a11cb);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: var(--box-shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.search-container {
    flex-grow: 1;
    max-width: 500px;
    margin: 0 2rem;
}

#search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#search-input:focus {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

nav {
    background-color: white;
    padding: 1rem 2rem;
    box-shadow: var(--box-shadow);
}

.categories {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-btn {
    background-color: var(--secondary-color);
    color: var(--light-text);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-btn:hover, .category-btn.active {
    background-color: var(--primary-color);
    color: white;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

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

.software-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.software-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--primary-color);
}

.software-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.software-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.software-category {
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.software-desc {
    font-size: 0.9rem;
    color: var(--light-text);
    flex-grow: 1;
}

footer {
    background-color: var(--text-color);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .search-container {
        margin: 1rem 0;
        max-width: 100%;
    }

    .categories {
        justify-content: center;
    }

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

/* 模态弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--box-shadow);
    position: relative;
    transform: scale(0.7);
    opacity: 0;
    animation: modalShow 0.3s ease forwards;
}

@keyframes modalShow {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--light-text);
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.software-info {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-desc {
    margin: 0 0 0 1.5rem;
    color: var(--light-text);
    line-height: 1.6;
}

.download-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.download-btn i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.official-btn {
    background-color: var(--primary-color);
}

.cloud-btn {
    background-color: var(--accent-color);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.download-btn:active {
    transform: translateY(0);
}

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

    .download-links {
        grid-template-columns: 1fr;
    }

    .software-info {
        flex-direction: column;
        text-align: center;
    }

    .modal-desc {
        margin: 1rem 0 0 0;
    }
}