/* GitHub Games Grid Styling */

.more-games-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.more-games-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 48, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #2d3748;
    position: relative;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #718096;
    margin-bottom: 60px;
    font-weight: 500;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(102, 126, 234, 0.1),
        transparent
    );
    transition: left 0.6s ease;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.game-thumbnail {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 
        0 8px 20px rgba(102, 126, 234, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.game-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.2) rotate(5deg);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

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

.play-text {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2d3748;
    transition: color 0.3s ease;
}

.game-card:hover .game-name {
    color: #667eea;
}

.game-description {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.5;
    margin: 0;
    transition: color 0.3s ease;
}

.game-card:hover .game-description {
    color: #4a5568;
}

/* Game Modal Styles */
.game-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.game-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 800px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.close-button, .fullscreen-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.close-button:hover, .fullscreen-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.game-iframe {
    width: 100%;
    height: calc(100% - 80px);
    border: none;
    background: #f8f9fa;
}

/* Loading states */
.game-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.game-card.loading .game-thumbnail {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .more-games-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        padding: 0 15px;
    }
    
    .game-card {
        padding: 20px;
    }
    
    .game-thumbnail {
        width: 100px;
        height: 100px;
        margin-bottom: 15px;
    }
    
    .game-icon {
        font-size: 2.5rem;
    }
    
    .game-name {
        font-size: 1.2rem;
    }
    
    .game-description {
        font-size: 0.9rem;
    }
    
    .game-modal-content {
        width: 95%;
        height: 95%;
        border-radius: 15px;
    }
    
    .game-modal-header {
        padding: 15px;
    }
    
    .game-modal-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .game-card {
        padding: 15px;
    }
    
    .game-thumbnail {
        width: 80px;
        height: 80px;
        margin-bottom: 12px;
    }
    
    .game-icon {
        font-size: 2rem;
    }
    
    .game-name {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .game-description {
        font-size: 0.85rem;
    }
}

/* Hover effects for touch devices */
@media (hover: none) {
    .game-card:active {
        transform: scale(0.95);
    }
    
    .game-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
    }
}

/* Game badges */
.game-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

.game-badge.local {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.game-badge.soon {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

/* Coming soon games styling */
.game-card.coming-soon {
    opacity: 0.7;
    cursor: not-allowed;
}

.game-card.coming-soon:hover {
    transform: none;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.05);
}

.game-card.coming-soon .game-overlay {
    opacity: 1;
    background: rgba(255, 152, 0, 0.8);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .more-games-section {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    .section-title {
        color: #f7fafc;
    }
    
    .section-subtitle {
        color: #a0aec0;
    }
    
    .game-card {
        background: #2d3748;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .game-name {
        color: #f7fafc;
    }
    
    .game-card:hover .game-name {
        color: #90cdf4;
    }
    
    .game-description {
        color: #a0aec0;
    }
    
    .game-card:hover .game-description {
        color: #cbd5e0;
    }
}