* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    height: 100%;
    overflow-x: hidden;
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

main {
    flex: 1;
    width: 100%;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.search-box {
    display: flex;
    max-width: 400px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-box button {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Categories Section */
.categories {
    padding: 20px 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tab-btn {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.9rem;
    color: #000;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

.tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.tab-btn.active {
    background-color: rgba(255, 255, 255, 0.9);
    color: #2575fc;
    border-color: rgba(255, 255, 255, 0.9);
    text-shadow: none;
}

/* Downloads Section */
.downloads {
    padding: 30px 0;
    background-color: white;
}

.downloads h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.6rem;
    color: #333;
}

.downloads-grid {
    display: block;
    width: 100%;
}

.download-item {
    padding: 10px 0;
    text-align: center;
}

.download-link {
    color: #2575fc;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    display: inline-block;
    transition: color 0.2s;
}

.download-link:hover {
    color: #1a5cdb;
    text-decoration: underline;
}

.download-link span {
    color: #e74c3c;
    font-weight: normal;
}

.no-results {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px 0;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 10px;
}

.pagination button {
    padding: 8px 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.pagination button:hover {
    background-color: #e9ecef;
}

.pagination button.active {
    background-color: #2575fc;
    color: white;
    border-color: #2575fc;
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-info {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.9rem;
}

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

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalopen 0.4s;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin-bottom: 20px;
    color: #555;
}

.password-input-container {
    display: flex;
    margin-bottom: 15px;
}

.password-input-container input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.password-input-container input:focus {
    border-color: #2575fc;
}

.password-input-container button {
    padding: 0 20px;
    background-color: #2575fc;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.password-input-container button:hover {
    background-color: #1a5cdb;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

/* 已解锁状态的分类按钮样式 */
.tab-btn.unlocked {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.tab-btn.unlocked:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .category-tabs {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .tab-btn {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .pagination-info {
        font-size: 12px;
        padding: 0 10px;
    }
}

/* Footer */
footer {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .search-box {
        width: 100%;
        max-width: 300px;
    }
    
    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
}