/* Games Page Styles */

.games-header {
    text-align: center;
    margin-top: 15vh;
    margin-bottom: 4rem;
    color: white;
}

.games-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Funnel Display', sans-serif;
}

.games-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    font-family: 'Funnel Display', sans-serif;
    color: rgba(255, 255, 255, 0.8);
}

/* Games Sections */
.games-section {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.section-heading {
    color: white;
    font-size: 1.8rem;
    font-family: 'Funnel Display', sans-serif;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(232, 129, 127, 0.3);
}

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

.games-grid.featured {
    grid-template-columns: 1fr;
}

.games-grid.small {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Game Cards */
.game-card {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(232, 129, 127, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(232, 129, 127, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    background: rgba(232, 129, 127, 0.15);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

.game-card.large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch; 
}

.game-card.mini {
    flex-direction: row;
    align-items: center;
}

/* Game Banner Container */
.game-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9; 
    background: linear-gradient(135deg, rgba(90, 51, 110, 0.4), rgba(49, 31, 98, 0.4));
    display: block;
    overflow: hidden;
}

/* --- PHẦN SỬA LỖI SCALE ẢNH QUAN TRỌNG --- */

/* 1. Ép placeholder chiếm hết diện tích khung */
.banner-placeholder {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex; /* Dùng flex để căn giữa icon nếu không có ảnh */
    align-items: center;
    justify-content: center;
    font-size: 4rem; /* Giữ font size cũ cho icon placeholder */
}

/* 2. Ảnh giãn full và cắt gọn gàng */
.game-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cắt ảnh để lấp đầy, không méo */
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

/* --- HẾT PHẦN SỬA LỖI --- */

.game-card:hover .game-banner-image {
    transform: scale(1.05);
}

/* Các biến thể của Banner */
.game-card.large .game-banner {
    aspect-ratio: auto;
    height: 100%;
    min-height: 300px;
}

.game-banner.mini {
    width: 80px;
    height: 80px;
    min-width: 80px;
    aspect-ratio: 1;
}

.game-banner.mini .banner-placeholder {
    font-size: 2rem;
}

/* Game Status & Rating Badges */
.game-status,
.game-rating {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Funnel Display', sans-serif;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.game-status.now-playing {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #0a2e1a;
    animation: pulse-status 2s infinite;
}

.game-rating {
    background: rgba(232, 129, 127, 0.9);
    color: white;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

/* Game Info */
.game-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.game-card.large .game-info {
    justify-content: center; 
    padding: 2rem;
}

.game-card.mini .game-info {
    padding: 0.75rem;
}

.game-title {
    color: white;
    font-size: 1.4rem;
    font-family: 'Funnel Display', sans-serif;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.game-card.large .game-title {
    font-size: 2rem;
}

.game-card.mini .game-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.game-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Game Meta */
.game-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.game-platform {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    text-transform: uppercase;
}

.game-hours {
    color: #00ff88;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Game Tags */
.game-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.game-tag {
    color: #ffd1d0;
    font-size: 0.75rem;
    padding: 0.25rem 0.7rem;
    background: rgba(232, 129, 127, 0.2);
    border: 1px solid rgba(232, 129, 127, 0.3);
    border-radius: 20px;
}

/* Genre Groups */
.genre-group {
    margin-bottom: 3rem;
}

.genre-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.4rem;
    font-family: 'Funnel Display', sans-serif;
    margin-bottom: 1rem;
    padding-left: 0.8rem;
    border-left: 4px solid #e8817f;
}

/* Gaming Profiles */
.gaming-profiles {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(232, 129, 127, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(232, 129, 127, 0.18);
    color: white;
    text-decoration: none;
    font-family: 'Funnel Display', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.profile-btn:hover {
    background: rgba(232, 129, 127, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.profile-icon {
    font-size: 1.5rem;
}

.profile-btn.steam:hover { border-color: #1b2838; background: rgba(27, 40, 56, 0.6); }
.profile-btn.discord:hover { border-color: #5865F2; background: rgba(88, 101, 242, 0.5); }
.profile-btn.twitch:hover { border-color: #9146FF; background: rgba(145, 70, 255, 0.5); }

/* Responsive */
@media (max-width: 900px) {
    .game-card.large {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
    
    .game-card.large .game-banner {
        width: 100%;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .games-title {
        font-size: 2.5rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .games-grid.small {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .gaming-profiles {
        flex-direction: column;
        align-items: center;
    }
    
    .profile-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}