/* ========================================
   软件下载页样式
   ======================================== */

/* 页面专属配色 - 松石绿（沉稳工业感） */
:root {
    --primary-color: #3d7a5f;
    --primary-hover: #4d8f72;
    --primary-light: rgba(61, 122, 95, 0.08);
    --primary-light-hover: rgba(61, 122, 95, 0.12);
    --border-color-hover: rgba(61, 122, 95, 0.2);
    --shadow-primary: 0 0 16px rgba(61, 122, 95, 0.15);
}

/* ========== 顶部导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    cursor: default;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a5a42 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.25);
    transition: transform var(--transition-normal);
}

.logo:hover .logo-icon {
    transform: rotate(15deg) scale(1.05);
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.logo-text p {
    font-size: 12px;
    color: var(--text-muted);
}

/* 搜索框 */
.search-box {
    flex: 1;
    max-width: 480px;
    position: relative;
    transition: transform var(--transition-fast);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    transition: color var(--transition-fast);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-sans);
    outline: none;
    transition: all var(--transition-normal);
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
    background: var(--bg-card-hover);
}

.search-input:focus ~ .search-icon,
.search-box:hover .search-icon {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ========== 主内容区 ========== */
.main-content {
    padding-top: 100px;
    padding-bottom: 100px;
    position: relative;
    z-index: 10;
}

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

/* ========== 分类标签栏 ========== */
.category-tabs {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.2);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a5a42 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.25);
    transform: translateY(-2px);
}

.tab-count {
    background: rgba(255, 255, 255, 0.15);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.tab-btn:not(.active) .tab-count {
    background: rgba(255, 255, 255, 0.05);
}

/* ========== 软件卡片网格 ========== */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ========== 软件卡片 ========== */
.sw-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.sw-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), #2a5a42, transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sw-card:hover::before {
    opacity: 1;
}

.sw-card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(6, 182, 212, 0.08);
}

.sw-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sw-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.sw-card:hover .sw-icon {
    transform: scale(1.1);
}

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

.sw-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.sw-version::before {
    content: 'v';
}

.sw-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sw-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 11px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.sw-card:hover .tag {
    background: rgba(6, 182, 212, 0.05);
    border-color: rgba(6, 182, 212, 0.1);
    color: var(--text-secondary);
}

.sw-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.sw-category {
    font-size: 11px;
    color: var(--text-muted);
}

.sw-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.sw-link:hover {
    background: var(--primary-color);
    color: white;
}

.sw-link:hover i {
    transform: translateX(2px);
}

.sw-link i {
    font-size: 11px;
    transition: transform var(--transition-fast);
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}

/* 底部 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-content p { margin: 0; }

.footer-content a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-content a:hover { color: var(--primary-color); }

/* 动画 */
.sw-card {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sw-card:nth-child(1) { animation-delay: 0.05s; }
.sw-card:nth-child(2) { animation-delay: 0.1s; }
.sw-card:nth-child(3) { animation-delay: 0.15s; }
.sw-card:nth-child(4) { animation-delay: 0.2s; }
.sw-card:nth-child(5) { animation-delay: 0.25s; }
.sw-card:nth-child(6) { animation-delay: 0.3s; }
.sw-card:nth-child(7) { animation-delay: 0.35s; }
.sw-card:nth-child(8) { animation-delay: 0.4s; }

/* 响应式 */
@media (max-width: 1200px) {
    .nav-actions .btn span { display: none; }
    .nav-actions .btn { padding: 12px; }
}

@media (max-width: 768px) {
    .nav-container { flex-direction: column; gap: 16px; }
    .logo { align-self: flex-start; }
    .search-box { width: 100%; max-width: none; }
    .nav-actions { width: 100%; justify-content: center; }
    .nav-actions .btn span { display: inline; }
    .main-content { padding-top: 220px; }
    .software-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .footer-content { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
    .main-content { padding-top: 240px; }
    .software-grid { grid-template-columns: 1fr; }
    .sw-icon { width: 44px; height: 44px; font-size: 20px; }
    .sw-info h3 { font-size: 14px; }
    .sw-link { padding: 6px 12px; font-size: 11px; }
}
