@import url('https://fonts.googleapis.com/css2?family=Agdasima:wght@400;700&family=Londrina+Sketch&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: "Agdasima", sans-serif;
    box-sizing: border-box;
    color: #000000;
}

body {
    background: linear-gradient(90deg, rgb(238,174,202), rgb(148,187,233));
    background-size: cover;
    background-position: center;
    padding-bottom: 2rem;
}

/* title */
#title {
    padding: 2.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

#tictactoe-icon {
    width: 50px;
    height: 50px;
}

h1 {
    text-align: center;
    font-family: "Londrina Sketch", sans-serif;
    font-size: 3.75rem;
    margin: 0;
}

/* grid */
#board {
    margin: 0 auto; /* center the board */
    min-width: none;
    width: 100%;
    max-width: 450px;
    border: 2px solid #434343;
    display: grid;  /* grid layout */
    grid-template-columns: repeat(3, 1fr);  /* with 3 columns */
}

/* style for each square */
.square {
    width: 100%;    /* make the squares responsive */
    aspect-ratio: 1 / 1;    /* make the squares a square */
    border: 1px solid #434343;
    font-size: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background-color: rgba(148,187,233,0.25);

    transition: background-color 0.3s ease;
}

.x-or-o {
    width: 70%; /* make the X and O images responsive */
}

.square:hover {
    background-color: rgba(238,174,202,0.95) !important;
}

/* style for winning squares */
.square.winning-square {
    background-color: #198754  !important;
}

/* styles for restart button */
#restartButton {
    display: block;
    margin: 1rem auto;
    height: 50px;
    width: 160px;
    background-color: #4CAF50;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    color: #FFFFFF;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#restartButton:hover {
    background-color: #45a049;
    transform: translateY(-2px);    /* slight lift effect */
}

#restartButton:active {
    transform: translateY(1px); /* push down effect */
}