/* Importing Google Font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #5758e8;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    color: #ffffff;
}

.game-container {
    background: #ffffff;
    padding: 6px;
    border-radius: 15px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    max-width: 95%;
    width: 95%;
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    color: #333;
}

.game-icon {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    margin-right: 10px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.game-details {
    flex: 1;
}

.game-title {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 5px;
    font-family: 'Montserrat', sans-serif;
}

.game-description,
.game-how-to-play {
    margin-bottom: 8px;
    color: #000000;
    font-size: 16px;
    line-height: 1.6;
    font-family: 'Montserrat', sans-serif;
}

.game-how-to-play {
    white-space: pre-line;
}

.play-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 18px;
    color: #ffffff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin: 10px auto 0;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.play-button:hover {
    background-color: #0056b3;
}

/* Recommended section */
.recommended-section {
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
}

.recommended-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    color: #ffffff;
}

/* Recommended games layout (using Flexbox for compatibility) */
.recommended-games {
    display: flex; /* Use flexbox for layout */
    flex-wrap: wrap; /* Allow wrapping to new rows */
    gap: 10px; /* Spacing between items */
    justify-content: space-between; /* Distribute items evenly */
    width: 100%; /* Ensure it spans the container width */
}

.recommended-game {
    width: calc(50% - 10px); /* Two items per row, accounting for the gap */
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease, background-color 0.3s ease;
    margin-bottom: 10px; /* Add spacing between rows */
}

.recommended-game:hover {
    transform: translateY(-5px);
    background-color: #f0f0f5;
}

.recommended-game img {
    width: 100%;
    height: 120px;
    border-radius: 10px 10px 0 0;
    object-fit: cover;
}

.recommended-game-title {
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    font-family: 'Montserrat', sans-serif;
}

/* Footer */
.footer {
    padding: 10px;
    text-align: center;
    width: 100%;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.footer-button {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
}

.footer-button:hover {
    color: #0056b3;
    text-decoration: none;
}

.footer-text {
    text-align: center;
    font-size: 12px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .game-icon {
        margin: 0 auto 10px;
        width: 100px;
        height: 100px;
    }

    .game-details {
        text-align: center;
        width: 100%;
    }

    .game-title {
        font-size: 22px;
    }

    .game-description {
        font-size: 14px;
    }

    .game-how-to-play {
        font-size: 14px;
        line-height: 1.4;
        margin: 5px 0;
        text-align: left;
    }

    .play-button {
        margin: 10px auto;
        width: 80%;
        text-align: center;
        font-size: 16px;
    }

    .recommended-games {
        justify-content: space-evenly; /* Ensure even spacing */
    }

    .recommended-game {
        width: calc(50% - 10px); /* Two items per row */
    }
}
