* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    color: #171717;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

h1 {
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
    color: #525252;
}

#game {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* The gap and background color create the perfect minimal grid lines */
    gap: 2px;
    background-color: #e5e5e5; 
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.square {
    background-color: #ffffff;
    width: clamp(80px, 20vw, 130px);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 300;
    cursor: pointer;
    transition: background-color 0.15s ease;
    user-select: none;
}

.square:hover {
    background-color: #f5f5f5;
}

/* Hide the injected <hr> tags from the JS so CSS Grid can perfectly align the squares */
hr {
    display: none;
}