/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
   background: #333333; 
    min-height: 100vh;
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand i {
    font-size: 1.8rem;
    color: #764ba2;
}

.nav-brand h1 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* 按钮样式 */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-box input {
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    width: 300px;
    font-size: 0.9rem;
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* 主内容区 */
main {
    padding: 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 头部 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header h2 {
    color: #333;
    font-size: 1.8rem;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-view {
    width: 40px;
    height: 40px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-view.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-view:hover:not(.active) {
    background: #f8f9fa;
}

/* 缩略图网格 */
.thumbnail-grid {
    transition: all 0.3s ease;
}

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

.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 缩略图卡片 */
.thumbnail-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.thumbnail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.grid-view .thumbnail-card {
    
    height: 320px;
}

.list-view .thumbnail-card {
    height: 120px;
    display: flex;
    align-items: center;
    padding-right: 1rem;
}

.list-view .thumbnail-container {
    width: 200px;
    height: 100%;
    margin-right: 1rem;
}

.thumbnail-container {
    width: 100%;
    height: 220px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.thumbnail-container canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnail-info {
    padding: 1rem;
}

.grid-view .thumbnail-info {
   
    height: 100px;
}

.list-view .thumbnail-info {
    flex: 1;
    padding: 0;
}

.thumbnail-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.thumbnail-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

.thumbnail-meta span {
    display: inline-block;
    margin-right: 1rem;
}

.thumbnail-meta i {
    margin-right: 0.3rem;
}

/* 加载动画 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.btn-pagination {
    padding: 0.8rem 1.5rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-pagination:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

.page-info {
    color: #333;
    font-weight: 500;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-controls {
        flex-direction: column;
        align-items: flex-end;
        gap: 1rem;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .grid-view {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .grid-view {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-brand, .nav-controls {
        width: 100%;
        justify-content: center;
    }
}
