/* style.css - 软件下载单页应用样式表 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: #f5f7fb;
    color: #1e293b;
    line-height: 1.4;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.header {
    margin-bottom: 32px;
    text-align: center;
}
.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}
.header p {
    color: #475569;
    margin-top: 8px;
    font-size: 1rem;
}

.main-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

.sidebar {
    flex: 0 0 260px;
    background: white;
    border-radius: 28px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03), 0 2px 6px rgba(0,0,0,0.05);
    padding: 20px 0;
    height: fit-content;
    position: sticky;
    top: 24px;
    transition: all 0.2s;
}
.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0 20px 14px 20px;
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
}
.category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.category-item {
    padding: 12px 20px;
    margin: 0 8px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 12px;
}
.category-item:hover {
    background: #f1f5f9;
    color: #1e40af;
}
.category-item.active {
    background: #eef2ff;
    color: #2563eb;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.category-badge {
    background: #e2e8f0;
    border-radius: 30px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: auto;
    color: #334155;
}
.category-item.active .category-badge {
    background: #cbdffc;
    color: #1e40af;
}

.content-area {
    flex: 1;
    min-width: 260px;
}
.category-header {
    background: white;
    border-radius: 20px;
    padding: 12px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.current-cat {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
}
.right-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.search-box {
    position: relative;
    display: inline-flex;
    align-items: center;
}
#searchInput {
    padding: 8px 32px 8px 16px;
    border-radius: 40px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.85rem;
    width: 220px;
    transition: all 0.2s;
    outline: none;
}
#searchInput:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.clear-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #94a3b8;
    padding: 0 4px;
    border-radius: 20px;
}
.clear-btn:hover {
    color: #1e293b;
}
.software-count {
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #2563eb;
}
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 22px;
}
.software-card {
    background: white;
    border-radius: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #edf2f7;
}
.software-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.1);
    border-color: #d9e2ef;
}
.card-content {
    padding: 20px 22px 18px;
    flex: 1;
}
.software-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.software-name span {
    background: #f1f5f9;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 30px;
    color: #475569;
}
.version-size {
    display: flex;
    gap: 18px;
    font-size: 0.75rem;
    color: #5b6e8c;
    margin-bottom: 12px;
    border-bottom: 1px dashed #eef2f6;
    padding-bottom: 10px;
}
.description {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.5;
    margin: 12px 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.official-link {
    font-size: 0.75rem;
    margin: 8px 0 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.official-link a {
    color: #3b82f6;
    text-decoration: none;
    word-break: break-all;
}
.official-link a:hover {
    text-decoration: underline;
}
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2563eb;
    color: white;
    padding: 10px 18px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s;
    margin-top: 8px;
    width: fit-content;
    border: none;
    cursor: pointer;
}
.download-btn:hover {
    background: #1d4ed8;
    transform: scale(0.98);
}
.empty-state {
    background: white;
    border-radius: 28px;
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
}
footer {
    margin-top: 48px;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
}
.icon-emoji {
    font-size: 1.2rem;
}
@media (max-width: 780px) {
    .sidebar {
        flex: 0 0 100%;
        position: static;
        top: 0;
    }
    .category-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .category-item {
        flex: 1 0 auto;
        justify-content: center;
    }
    .software-grid {
        grid-template-columns: 1fr;
    }
    .main-layout {
        gap: 20px;
    }
    .search-box {
        width: 100%;
    }
    #searchInput {
        width: 100%;
    }
}