/* Games Page Specific Styles */

/* Games Header */
.games-header {
    padding: var(--space-2xl) var(--container-padding) var(--space-xl);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.games-header h1 {
    font-size: var(--font-4xl);
    font-weight: 900;
    margin-bottom: var(--space-md);
    background: var(--title-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.games-header p {
    font-size: var(--font-lg);
    color: var(--text-color);
    opacity: 0.7;
    max-width: var(--content-max);
    margin: 0 auto var(--space-lg);
    line-height: 1.6;
}

.games-count {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: var(--font-sm);
}

/* Games Grid */
.games-section {
    padding: var(--space-2xl) var(--container-padding);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
    gap: var(--card-gap);
    max-width: var(--container-max);
    margin: 0 auto;
}

/* Game Card Styling */
.game-card {
    position: relative;
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    box-shadow: var(--shadow-md);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.game-thumbnail {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
}

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

.game-thumbnail.loading {
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    position: relative;
}

.game-thumbnail.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.game-thumbnail.error {
    background: linear-gradient(45deg, #2a1a1a, #3a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    opacity: 0.5;
    font-size: var(--font-sm);
    flex-direction: column;
}

.game-thumbnail.error::before {
    content: '🎰';
    font-size: var(--font-2xl);
    margin-bottom: var(--space-xs);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, 0.1) 0%, 
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-md);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.game-title {
    font-size: var(--font-lg);
    font-weight: 700;
    color: white;
    line-height: 1.2;
    text-align: center;
    margin-bottom: var(--space-sm);
}

.game-cta {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.game-cta:hover {
    background: linear-gradient(45deg, var(--primary-hover), var(--secondary-hover));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.game-cta:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 45vw, 200px), 1fr));
        gap: var(--space-md);
    }

    .game-overlay {
        opacity: 1;
        background: linear-gradient(
            to bottom, 
            rgba(0, 0, 0, 0.1) 0%, 
            rgba(0, 0, 0, 0.6) 100%
        );
    }

    .game-title {
        font-size: var(--font-base);
    }

    .game-cta {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--font-xs);
    }
}