/* Game Styles for Dynamic Loading */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
}

/* Loading Styles */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    display: inline-block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent-color, #c9b037);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Game Card Styles */
.game-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 176, 55, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(201, 176, 55, 0.4);
    border-color: var(--accent-color, #c9b037);
}

.game-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.game-provider {
    background: var(--accent-color, #c9b037);
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    align-self: flex-start;
    text-transform: uppercase;
}

.game-volatility {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    align-self: flex-end;
    margin-top: auto;
}

.game-content {
    padding: 1.5rem;
}

.game-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-align: center;
}

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

.stars {
    display: flex;
    gap: 0.1rem;
}

.star {
    font-size: 1rem;
    color: #ffd700;
}

.star.empty {
    color: rgba(255, 255, 255, 0.3);
}

.star.half {
    background: linear-gradient(90deg, #ffd700 50%, rgba(255, 255, 255, 0.3) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rating-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.game-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.game-details > div {
    text-align: center;
}

.game-details .label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.game-details .value {
    color: var(--accent-color, #c9b037);
    font-weight: 700;
    font-size: 0.875rem;
}

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

.game-actions {
    display: flex;
    gap: 1rem;
}

.btn-play,
.btn-demo {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-play {
    background: linear-gradient(135deg, var(--accent-color, #c9b037), #f4d03f);
    color: #000;
    box-shadow: 0 4px 15px rgba(201, 176, 55, 0.4);
}

.btn-play:hover {
    background: linear-gradient(135deg, #f4d03f, var(--accent-color, #c9b037));
    box-shadow: 0 6px 25px rgba(201, 176, 55, 0.6);
    transform: translateY(-2px);
}

.btn-demo {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-demo:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.btn-text {
    margin-right: 0.5rem;
}

.btn-icon {
    font-size: 1rem;
}

/* Error Message Styles */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #fff;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-message h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.error-message p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.btn-retry {
    background: var(--accent-color, #c9b037);
    color: #000;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    background: #f4d03f;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 480px) {
    .game-card {
        border-radius: 15px;
    }
    
    .game-content {
        padding: 1rem;
    }
    
    .game-title {
        font-size: 1.1rem;
    }
    
    .game-actions {
        flex-direction: column;
    }
    
    .btn-play,
    .btn-demo {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
}

/* Animation for game cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card[data-aos="fade-up"] {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Additional important styles to prevent conflicts */
.games-grid .game-card {
    margin: 0 !important;
}

.game-card * {
    box-sizing: border-box !important;
}