/* Games Page Styles */
.games-wrapper {
    padding: 4rem 0;
    min-height: 100vh;
}

.games__title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #2bbc8a, #64ffda);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.game-card.loaded {
    opacity: 1;
    transform: translateY(0);
}

.game-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(43, 188, 138, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2bbc8a;
}

.game-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #b0b8c1;
}

.game-controls {
    background: rgba(43, 188, 138, 0.1);
    border: 1px solid rgba(43, 188, 138, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.game-controls p {
    margin: 0;
    font-size: 0.9rem;
    color: #2bbc8a;
}

/* 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.8);
    backdrop-filter: blur(10px);
}

.game-modal-content {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 50%, #16213e 100%);
    margin: 5% auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.game-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-modal-header h2 {
    margin: 0;
    color: #2bbc8a;
    font-size: 1.5rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #2bbc8a;
}

.game-container {
    padding: 2rem;
    text-align: center;
}

#pongCanvas {
    border: 2px solid rgba(43, 188, 138, 0.5);
    border-radius: 8px;
    background: #0a0e14;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.score {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2bbc8a;
}

.game-status {
    font-size: 1rem;
    color: #b0b8c1;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .games__title {
        font-size: 2rem;
    }

    .game-card {
        padding: 1.5rem;
    }

    .game-modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .game-container {
        padding: 1rem;
    }

    #pongCanvas {
        width: 100%;
        height: auto;
        max-width: 400px;
    }

    .game-info {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .game-modal-header {
        padding: 1rem 1.5rem;
    }

    .game-container {
        padding: 0.5rem;
    }
}
