/* Games Section Styles */
.games {
    padding: 5rem 0;
    background: transparent;
}

.games h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--electric-blue);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.game-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--electric-blue);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

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

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

.game-icon {
    font-size: 4rem;
    color: var(--electric-blue);
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.game-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.game-card p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 0.5rem;
    background: var(--navy-blue);
    border-radius: 8px;
    border: 1px solid var(--electric-blue);
}

.game-controls span {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.game-controls button {
    background: transparent;
    border: 1px solid var(--electric-blue);
    color: var(--electric-blue);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.game-controls button:hover {
    background: var(--electric-blue);
    color: var(--navy-blue);
}

.high-score {
    color: var(--electric-blue);
    font-weight: bold;
    margin: 1rem 0;
    font-size: 1.1rem;
}

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

.game-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    margin: 2% auto;
    background: var(--card-bg);
    border-radius: 15px;
    border: 2px solid var(--electric-blue);
    overflow: hidden;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--navy-blue);
    border-bottom: 2px solid var(--electric-blue);
}

.game-header h3 {
    color: var(--electric-blue);
    font-size: 1.5rem;
    margin: 0;
}

.game-info {
    display: flex;
    gap: 2rem;
    color: var(--text-gray);
}

.close-game {
    background: transparent;
    border: 2px solid var(--electric-blue);
    color: var(--electric-blue);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-game:hover {
    background: var(--electric-blue);
    color: var(--navy-blue);
}

#game-canvas {
    display: block;
    background: transparent;
}

.game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--navy-blue);
    border-top: 2px solid var(--electric-blue);
}

.game-controls-display {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.game-controls button {
    background: var(--navy-blue);
    border: 1px solid var(--electric-blue);
    color: var(--electric-blue);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.game-controls button:hover {
    background: var(--electric-blue);
    color: var(--navy-blue);
}

.high-score {
    background: var(--navy-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--electric-blue);
    color: var(--electric-blue);
    font-weight: 600;
}

.btn-game {
    background: var(--gradient);
    color: var(--text-light);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.btn-game:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

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

.game-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    border-radius: 15px;
    border: 2px solid var(--electric-blue);
    padding: 1rem;
    max-width: 90vw;
    max-height: 90vh;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.game-header h3 {
    color: var(--electric-blue);
    font-size: 1.5rem;
}

.game-info {
    display: flex;
    gap: 2rem;
    color: var(--text-gray);
}

.close-game {
    background: transparent;
    border: 2px solid var(--electric-blue);
    color: var(--electric-blue);
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.close-game:hover {
    background: var(--electric-blue);
    color: var(--navy-blue);
}

#game-canvas {
    border: 2px solid var(--electric-blue);
    border-radius: 10px;
    background: #000;
    display: block;
    margin: 0 auto;
}

.game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 0 1rem;
}

.game-controls-display {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Mobile Games Message */
.mobile-games-message {
    padding: 5rem 0;
    text-align: center;
}

.mobile-message {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 15px;
    border: 2px solid var(--electric-blue);
    max-width: 500px;
    margin: 0 auto;
}

.mobile-message i {
    font-size: 4rem;
    color: var(--electric-blue);
    margin-bottom: 1.5rem;
}

.mobile-message h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--electric-blue);
}

.mobile-message p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.mobile-nav-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Game-specific styles */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    z-index: 10;
}

.game-overlay h2 {
    color: var(--electric-blue);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.game-overlay p {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.game-start-btn {
    background: var(--gradient);
    color: var(--text-light);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.game-start-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* Responsive game styles */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-container {
        width: 95vw;
        height: 95vh;
    }
    
    #game-canvas {
        max-width: 100%;
        height: auto;
    }
    
    .game-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .game-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
