/* Enhanced Game Cards Design - Original Features Restored */

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* Enhanced Game Card */
.game-card {
    position: relative;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.3);
}

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

/* Game Image Container */
.game-card-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

/* Badges Container */
.game-card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
}

/* Badge Styles */
.game-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.5s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TOP RATED Badge with Fire */
.badge-top-rated {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    animation: pulse 2s infinite;
}

.badge-top-rated::before {
    content: '🔥';
    font-size: 1rem;
}

/* POPULAR Badge */
.badge-popular {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
    color: white;
    animation: bounce 2s infinite;
}

.badge-popular::before {
    content: '⭐';
    font-size: 1rem;
}

/* NEW Badge */
.badge-new {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
    animation: shake 3s infinite;
}

.badge-new::before {
    content: '✨';
    font-size: 1rem;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* BEST PRICE Badge */
.badge-best-price {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    color: white;
    animation: glow 2s infinite;
}

.badge-best-price::before {
    content: '💎';
    font-size: 1rem;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(245, 158, 11, 0.8);
    }
}

/* Discount Badge */
.game-discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.32);
    z-index: 2;
}

/* Game Content */
.game-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.game-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Platform Badge */
.game-card-platform {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
}

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

.game-card-stars {
    display: flex;
    gap: 0.2rem;
    color: #FBBF24;
}

.game-card-rating-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Price Section */
.game-card-price-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.game-card-old-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.game-card-new-price {
    color: #FF1B6B;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Add to Cart Button */
.game-card-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.game-card-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.game-card-btn:hover::before {
    width: 300px;
    height: 300px;
}

.game-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.game-card-btn i,
.game-card-btn span {
    position: relative;
    z-index: 1;
}

/* Light Theme Support */
[data-theme="light"] .game-card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .game-card:hover {
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.2);
}

/* Background and Section Styles */
.site-bg {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: -1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

#gamesCount {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Logo enhancement */
.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .game-card-image-container {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card-content {
        padding: 1.25rem;
    }
}