/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    height: 100vh;
    background-color: #1e1e1e;
    color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding-top: 50px; /* Add padding to move elements down */
}

h1 {
    font-size: 36px;
    color: #f5f5f5;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

#message {
    font-size: 18px;
    font-weight: 300;
    color: #f5f5f5;
    margin: 10px 0 20px 0;
}

/* Game Board */
#board {
    display: grid;
    grid-template-columns: repeat(3, 100px); /* 3 columns */
    grid-template-rows: repeat(3, 100px); /* 3 rows */
    gap: 10px; /* Space between squares */
    margin: 0 0 20px 0;
}

.square {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background-color: #303030;
    border-radius: 10px;
    font-size: 40px;
    font-weight: bold;
    color: #f5f5f5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.square:hover {
    background-color: #3e3e3e;
    transform: scale(1.05);
}

/* Winning & Tie Effects */
.winning-square-green {
    background-color: rgba(0, 200, 0, 0.7);
    animation: winEffect 0.5s ease forwards;
}
.winning-square-green:hover {
    background-color: rgba(1, 97, 1, 0.8);
    transform: scale(1.05);
}

.winning-square-red {
    background-color: rgba(200, 0, 0, 0.7);
    animation: winEffect 0.5s ease forwards;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.winning-square-red:hover {
    background-color: rgba(239, 4, 4, 0.8);
    transform: scale(1.25);
}

.tie-square {
    background-color: rgba(255, 255, 108, 0.7);
    animation: tieEffect 0.5s ease forwards;
}
.tie-square:hover {
    background-color: rgba(104, 104, 1, 0.8);
    transform: scale(1.05);
}

/* Animation for Winning and Tie */
@keyframes winEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes tieEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Restart Button */
#reset {
    margin: 20px 0;
    padding: 10px 20px;
    background-color: #303030;
    color: #f5f5f5;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 300;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#reset:hover {
    background-color: #3e3e3e;
    transform: scale(1.05);
}

/* Game Mode Section */
.mode-section {
    position: absolute;
    top: 50%;
    right: 50px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mode-section h2 {
    font-size: 20px;
    color: #f5f5f5;
    margin-bottom: 10px;
}

.mode-section label {
    font-size: 16px;
}

select {
    background-color: #303030;
    color: #f5f5f5;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

select:hover {
    background-color: #3e3e3e;
    transform: scale(1.05);
}

button:focus, select:focus {
    outline: none;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Logo container to position the logo on the left */
.logo-container {
    position: absolute;
    left: 20px; /* Adjust as necessary */
}

/* Logo */
.logo img {
    width: 250px;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards; /* Adjust duration as needed */
}

@media only screen and (max-width: 1179px) and (max-height: 2556px) {
    .mode-section{
        padding-top: 400px;
    }
}