/* Hero Section - Import from home.css */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0 0 3rem 0;
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,112C1248,107,1344,117,1392,122.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    width: 100%;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s, background 0.3s;
}

.stat:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Category Filter */
.category-filter {
    text-align: center;
    margin-bottom: 3rem;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-btn {
    padding: 10px 20px;
    background: #ecf0f1;
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.category-btn:hover {
    background: #bdc3c7;
}

.category-btn.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

/* Games Grid */
.games-by-category .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Game Card (reuse from home.css) */
.game-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.game-card .game-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.game-card .game-info {
    padding: 1.5rem;
}

.game-card .game-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.game-card .game-genre {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.game-card .game-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.game-card .stars {
    color: #f39c12;
}

.game-card .play-btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    text-decoration: none;
    text-align: center;
}

.game-card .play-btn:hover {
    background: #229954;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #e1e8ed;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    background: #f7fafc;
    border-color: #e2e8f0;
    color: #2d3748;
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn.icon-btn {
    min-width: 36px;
    height: 36px;
    font-size: 16px;
}

.pagination-info {
    margin: 0 1rem;
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

.pagination-ellipsis {
    color: #a0aec0;
    font-weight: 600;
    padding: 0 0.5rem;
    font-size: 16px;
}

/* Loading State */
.pagination-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #718096;
    font-size: 14px;
}

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



/* 外层容器样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 分页核心容器（替换原.pagination） */
.pagination-container .pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #e1e8ed;
}

/* 重置列表样式 */
.pagination-container .pagination-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 分页按钮核心样式（对应原.pagination-btn，匹配HTML的pagination-link） */
.pagination-container .pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* 上一页/下一页图标按钮样式（对应原.pagination-btn.icon-btn） */
.pagination-container .pagination-link.prev,
.pagination-container .pagination-link.next {
    min-width: 36px;
    height: 36px;
    font-size: 16px;
}

/* hover效果（排除active和disabled状态） */
.pagination-container .pagination-link:hover:not(.current):not(.disabled) {
    background: #f7fafc;
    border-color: #e2e8f0;
    color: #2d3748;
    transform: translateY(-1px);
}

/* 激活态样式（对应原.pagination-btn.active，匹配HTML的active类+current） */
.pagination-container .pagination-item.active .pagination-link.current {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 禁用态样式 */
.pagination-container .pagination-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* 省略号样式 */
.pagination-container .pagination-ellipsis {
    color: #a0aec0;
    font-weight: 600;
    padding: 0 0.5rem;
    font-size: 16px;
    display: flex;
    align-items: center;
}

/* 分页信息文本（备用，若需要显示总页数/当前页信息） */
.pagination-container .pagination-info {
    margin: 0 1rem;
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* Loading状态样式（备用） */
.pagination-container .pagination-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #718096;
    font-size: 14px;
}

.pagination-container .pagination-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 旋转动画（用于loading spinner） */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.no-results p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat {
        padding: 1rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .filter-buttons {
        gap: 0.3rem;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .games-by-category .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .pagination-container {
        margin: 2rem 0;
    }
    
    .pagination {
        padding: 0.6rem 0.8rem;
        gap: 0.3rem;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .pagination-btn.icon-btn {
        min-width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .pagination-info {
        font-size: 12px;
        margin: 0 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-stats {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .stat {
        width: 100%;
        max-width: 200px;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .filter-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .games-by-category .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .game-card .game-info {
        padding: 1rem;
    }
    
    .pagination-container {
        margin: 1.5rem 0;
    }
    
    .pagination {
        padding: 0.5rem 0.6rem;
        gap: 0.2rem;
    }
    
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }
    
    .pagination-btn.icon-btn {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .pagination-info {
        font-size: 11px;
        margin: 0 0.6rem;
    }
    
    .pagination-ellipsis {
        font-size: 14px;
        padding: 0 0.3rem;
    }
}

/* Skeleton Screen */
.skeleton-screen {
    display: block !important;
}

.skeleton-screen.hidden {
    display: none !important;
}

/* Skeleton for category filter */
.skeleton-category-filter {
    text-align: center;
    margin-bottom: 3rem;
}

.skeleton-filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.skeleton-category-btn {
    width: 100px;
    height: 40px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 25px;
    animation: skeleton-loading 1.5s infinite;
}

/* Skeleton for pagination container */
.skeleton-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skeleton-pagination-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

/* Skeleton for game cards */
.skeleton-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.skeleton-game-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.skeleton-game-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-game-info {
    padding: 1.5rem;
}

.skeleton-game-title {
    width: 80%;
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-game-genre {
    width: 60%;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.skeleton-game-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skeleton-stars {
    width: 80px;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-rating-number {
    width: 30px;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-play-btn {
    width: 100%;
    height: 44px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 5px;
}

/* Skeleton pagination */
.skeleton-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.skeleton-pagination-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

.skeleton-pagination-info {
    width: 120px;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive skeleton screen */
@media (max-width: 768px) {
    .skeleton-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .skeleton-category-btn {
        width: 90px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .skeleton-games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .skeleton-categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .skeleton-category-btn {
        width: 85px;
        height: 32px;
    }
}