body {
    font-family: 'Open Sans', sans-serif;
    background-color: #7e4b8b;
    background: linear-gradient(135deg, #7e4b8b, #d982b5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

/* stylization id for the index.html page */
#style {
    padding: 0 10%;
    background-color: #7e4b8b;
    background: linear-gradient(135deg, #7e4b8b, #d982b5);
    color: #fbf1f9;
    font-family: "Open Sans", sans-serif;
    font-size: 2em;
    white-space: nowrap;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* stylize start button in index.html page */
.start-button {
    background-color: #ae9da9;
    border: none;
    color: #fbf1f9;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    position: fixed;
    top: 60%;
    left: 44%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.start-button:hover {
    background-color: #d982b5;
    transform: scale(1.1);
}

.blinking-cursor {
    user-select: none;
    animation: blink 1s steps(2, start) infinite;
}

/* animations in index.html page */
@keyframes blink {
    to {
        visibility: hidden;
    }
}

/* game board container */
.container {
    text-align: center;
    max-width: 600px;
    padding: 20px;
    background-color: #fbf1f9;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 5%;
}

h1 {
    margin: 0;
    color: #333;
}

#heading {
    text-decoration: none;
    color: white;
}

/* Modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: rgba(0,0,0,0.4); /* Black with opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.modal-content h2 {
    color: #7e4b8b;
}

.modal-content ul {
    text-align: left;
    padding-left: 20px;
    margin-bottom: 20px;
}

.modal-content ul li {
    margin-bottom: 10px;
}

.modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.modal .close:hover, .modal .close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#closeModalBtn {
    padding: 10px 20px;
    background-color: #7e4b8b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#closeModalBtn:hover {
    background-color: #ae9da9;
}

.scoreboard {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.score {
    font-size: 1.5rem;
    color: #444;
}

/* square cells area */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background-color: #fff;
    border-radius: 10px;
    border: 2px solid #333;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cell:hover {
    transform: scale(1.05);
    background-color: #e0c4e4;
}

/* winning condition highlight */
.cell.winning {
    background-color: #ffd700;
    border-color: #ff5722;
    animation: glow 1.5s infinite;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 10px rgba(255, 87, 34, 0.7);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 87, 34, 1);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 87, 34, 0.7);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid {
    animation: fadeIn 1s ease-in-out;
}

.modal-content {
    animation: fadeIn 1s ease-in-out;
}

.status {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #555;
}

.controls {
    display: flex;
    justify-content: space-between;
}

button {
    padding: 12px 25px;
    font-size: 1.1rem;
    border: none;
    background-color: #7e4b8b;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #d982b5;
    transform: translateY(-3px);
}

button:active {
    transform: translateY(1px);
}

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: #ae9da9;
    font-size: 14px;
    color: #f0f0f0;
}

/*@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(3, 80px);
        grid-template-rows: repeat(3, 80px);
    }

    .cell {
        font-size: 2rem;
    }

    .container {
        width: 90%;
    }
}*/

@media (max-width: 480px) {
    .grid {
        grid-template-columns: repeat(3, 60px);
        grid-template-rows: repeat(3, 60px);
        justify-content: center;
    }

    .cell {
        font-size: 1.5rem;
    }

    .container {
        width: 100%;
    }
}