/* Main container */
#games-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* always start at top */
    align-items: center;
    padding: 2rem 5vw;
    box-sizing: border-box;
    background-color: #1A1A1A;
    color: #fff;
    text-align: center;
}

/* Page heading */
#games-page h1 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: white;
}

/* Grid layout for game cards */
.games-grid {
    display: grid;
    width: 100%;
    max-width: 900px;
    gap: 1.5rem;
    justify-items: center; /* center horizontally */
    grid-template-columns: 1fr; /* default: mobile view */
}

/* Medium+ screens: 2 cards per row */
@media (min-width: 996px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Individual game cards */
.game-card {
    background-color: #2C2C2C;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 0 5px 1px rgba(242, 73, 73, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 400px; /* prevents stretching too wide */
}

/* Card hover effect */
.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(242, 73, 73, 0.6);
}

/* Card headings */
.game-card h2 {
    color: whitesmoke;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}

/* Card descriptions */
.game-card p {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Buttons inside cards */
.game-card .btn {
    padding: 0.6rem 1.2rem;
    border-radius: 15px;
    background-color: #F24949;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
}

.game-card .btn:hover {
    background-color: #f37c7c;
}

.game-card .btn:active {
    background-color: #1C1C1C;
    color: #F24949;
}

.webapp-tag {
    font-size: 0.75rem;
    background-color: rgba(39, 73, 245, 0.3);
    width: max-content;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    align-content: center;
    margin: 0 auto 0 auto;
}

.minigame-tag {
    font-size: 0.75rem;
    background-color: rgba(63, 245, 39, 0.3);
    width: max-content;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    align-content: center;
    margin: 0 auto 0 auto;
}

/* Mobile tweaks */
@media (max-width: 996px) {
    #games-page h1 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .game-card {
        padding: 1rem;
    }
    .game-card h2 {
        font-size: 1.3rem;
    }
    .game-card p {
        font-size: 0.9rem;
    }
    .game-card .btn {
        padding: 0.5rem 1rem;
    }
}
