/* 檔案下載中心樣式 */

/* 頁面標題區域 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
}

/* 下載區域佈局 */
.downloads-section {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding: 40px 0;
}

/* 側邊欄 */
.downloads-sidebar {
    position: sticky;
    top: 110px;
    align-self: start;
}

.sidebar-box {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.sidebar-box h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

/* 分類列表 */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 8px;
}

.category-icon {
    margin-right: 8px;
}

.category-list a {
    display: inline-flex;
    align-items: center;
    color: var(--text-dark);
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

.category-list a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.category-list a.active {
    background: var(--primary-color);
    color: white;
}

/* 熱門下載列表 */
.hot-downloads-list {
    list-style: none;
}

.hot-downloads-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.hot-downloads-list li:last-child {
    border-bottom: none;
}

.hot-downloads-list span:first-child {
    font-size: 20px;
    margin-right: 10px;
}

.hot-downloads-list a {
    flex: 1;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
}

.hot-downloads-list a:hover {
    color: var(--primary-color);
}

.hot-downloads-list .count {
    font-size: 12px;
    color: var(--text-light);
}

/* 檔案列表 */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* 檔案卡片 */
.file-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
}

.file-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.file-icon {
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-title {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.file-title a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}

.file-title a:hover {
    color: var(--primary-color);
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.file-meta span {
    font-size: 12px;
    padding: 4px 8px;
    background: var(--bg-light);
    border-radius: 4px;
    color: var(--text-light);
}

.file-description {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
    flex: 1;
}

.file-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.download-count {
    font-size: 12px;
    color: var(--text-light);
}

.btn-download {
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-download:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 10px;
}

/* 響應式 */
@media (max-width: 1024px) {
    .downloads-section {
        grid-template-columns: 1fr;
    }

    .downloads-sidebar {
        position: static;
    }

    .sidebar-box {
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
    }

    .sidebar-box > * {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 60px 0;
    }

    .page-header h1 {
        font-size: 32px;
    }

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

    .file-card {
        gap: 12px;
    }

    .file-icon {
        font-size: 40px;
        min-width: 48px;
    }
}

/* 開發者署名 */
.developer-credit {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-top: 8px;
}
