/* Hero Section */
.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%);
    display: block !important;
}

.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;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    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;
}



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

.game-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.game-info {
    padding: 1rem;
}

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

.game-genre {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

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

.stars {
    color: #f39c12;
    font-size: 0.9rem;
}

.play-btn {
    display: inline-block;
    width: 100%;
    padding: 10px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    text-decoration: none;
    text-align: center;
}

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

/* Search Section */
.search-container {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

#searchInput {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

#searchInput:focus {
    outline: none;
    border-color: #3498db;
}

/* Filter Section */
.filter-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-container select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* Section Headers */
.category-section {
    margin-bottom: 3rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
    margin-top: 2.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 0;
}

/* No Games State */
.no-games-found {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.no-games-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-games-found h3 {
    color: #6c757d;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.no-games-found p {
    color: #adb5bd;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat {
        padding: 0.8rem 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .filter-container {
        justify-content: flex-start;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-info {
        padding: 0.8rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
}

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

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

/* Search Section Skeleton */
.skeleton-search {
    text-align: center;
    margin-bottom: 3rem;
}

.skeleton-search-container {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

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

/* Games Section Skeleton */
.skeleton-games-section {
    margin-bottom: 3rem;
}

.skeleton-section-title {
    width: 200px;
    height: 32px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin: 2.5rem auto 2rem;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: auto;
    grid-template-rows: repeat(2, auto);
    gap: 1.5rem;
    margin-top: 2rem;
}

/* 响应式布局 - 平板和手机 */
@media (max-width: 1024px) {
    .skeleton-games-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, auto);
    }
}

@media (max-width: 768px) {
    .skeleton-games-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
    }
}

@media (max-width: 480px) {
    .skeleton-games-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, auto);
    }
}

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

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

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

.skeleton-game-title {
    width: 80%;
    height: 18px;
    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: 14px;
    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.8rem;
}

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

.skeleton-stars {
    width: 60px;
    height: 14px;
    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: 25px;
    height: 14px;
    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: 36px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

/* Skeleton animations */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive Skeleton */
@media (max-width: 768px) {
    .skeleton-hero {
        padding: 3rem 0;
    }
    
    .skeleton-hero-title {
        width: 250px;
        height: 32px;
    }
    
    .skeleton-hero-desc {
        width: 400px;
        height: 16px;
    }
    
    .skeleton-hero-stats {
        gap: 1rem;
    }
    
    .skeleton-stat {
        width: 60px;
        height: 60px;
    }
    
    .skeleton-search-container {
        flex-direction: column;
    }
    
    .skeleton-search-btn {
        width: 100%;
    }
    
    .skeleton-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .skeleton-section-title {
        width: 160px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .skeleton-games-grid {
        grid-template-columns: 1fr;
    }
    
    .skeleton-game-info {
        padding: 0.8rem;
    }
    
    .skeleton-section-title {
        width: 140px;
        height: 20px;
    }
}