@font-face {
    font-family: "Netflix";
    src: url('Netflix_Fonts/NetflixSans-Regular.otf');
}

* {
    margin: 0;
    box-sizing: border-box;
    font-family: "Netflix";
}

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    background: 
    linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

footer {
    width: 100%;
    height: 80px;
    background-color: black;
    color: white;
    justify-content: center;
    align-content: center;
    text-align: center;
    font-size: 1.3rem;
    bottom: 0px;
    padding-top: 15px;
    padding-bottom: 15px;
}

a {
    color: #fff;
    text-decoration: none;
}

.main-content {
    width: 90%;
    background: #fff;
    max-width: 400px;
    min-width: 500px;
    min-height: 600px;
    padding: 20px;
    border: 1px solid black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 100px;
}

.main-content h1{
    width: 80%;
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid black;
    padding-bottom: 20px;
}

#game-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    margin-top: 30px;
    position: relative;
}

.winning-line {
    position: absolute;
    background-color: red;
    height: 5px;
    width: 100%;
    top: 50%;
    left: 0%;
    transform-origin: left center;
    display: none;
}

.grid {
    width: 100px;
    height: 100px;
    font-size: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.grid-0 {
    border-bottom: 2px solid black;
    border-right: 2px solid black;
}

.grid-1 {
    border-left: 2px solid black;
    border-bottom: 2px solid black;
    border-right: 2px solid black;
}

.grid-2 {
    border-left: 2px solid black;
    border-bottom: 2px solid black;
}

.grid-3 {
    border-top: 2px solid black;
    border-bottom: 2px solid black;
    border-right: 2px solid black;
}

.grid-4 {
    border: 2px solid black;
}

.grid-5 {
    border-left: 2px solid black;
    border-bottom: 2px solid black;
    border-top: 2px solid black;
}

.grid-6 {
    border-right: 2px solid black;
    border-top: 2px solid black;
}

.grid-7 {
    border-left: 2px solid black;
    border-top: 2px solid black;
    border-right: 2px solid black;
}

.grid-8 {
    border-left: 2px solid black;
    border-top: 2px solid black;
}

#result-display {
    margin-top: 20px;
}

#result {
    font-size: 1.8rem;
}

.result {
    color: rgb(175, 175, 175);
}

#restart-display {
    margin-top: 20px;
}

#restart-btn {
    padding: 10px 15px 10px;
    font-size: 1.15rem;
    background: black;
    color: #fff;
    border: none;
    transition: all 0.3s;
}

#restart-btn:hover {
    transform: scale(1.035);
}

.win {
    color: rgb(6, 179, 78);
}

.lose {
    color: rgb(179, 6, 6);
}

.draw {
    color: rgb(6, 116, 179);
}

.hidden {
    display: none;
}

.X {
    color: #3498db;
}

.O {
    color: #e74c3c;
}