/* 1. Reset & Base Styling */
* {
    box-sizing: border-box; /* Ensures padding doesn't break width */
    margin: 0;
    padding: 0;
}

body {
    background-image: url('../images/gameBack.avif');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Poppins', sans-serif; /* A cleaner, gaming font */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 2. Header Alignment */
h1 {
    margin-top: 120px;
    margin-bottom: 60px; /* Space between title and games */
    color: #ffffff;
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
}

/* 3. The Grid Container (Fixed Alignment) */
.parent {
    display: flex;
    flex-wrap: wrap;      /* Allows cards to move to next line on mobile */
    justify-content: center; /* Centers cards horizontally */
    align-items: center;     /* Centers cards vertically */
    gap: 30px;            /* Consistent spacing between all cards */
    max-width: 1200px;    /* Prevents the cards from spreading too wide */
    padding: 20px;
}

/* 4. Unified Card Styling */
/* I combined your individual game classes into one clean card rule */
.numGuess, .xoGuess, .rpsGuess, .wordle {
    height: 250px;
    width: 260px;
    background: rgba(255, 255, 255, 0.1); /* Subtle transparency */
    backdrop-filter: blur(12px);          /* Glass effect */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;                  /* Softer corners */
    
    /* Center the content inside the card */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    color: white;
}

/* 5. Interactive Polish */
.numGuess:hover, .xoGuess:hover, .rpsGuess:hover, .wordle:hover {
    transform: translateY(-10px); /* Lift effect */
    transform: translateY(20px); /* Lift effect */
    
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.5);
}