* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    color: #333;


    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;

}

.dark-mode {
    background-color: #1e1e1e;
    color: #f1f1f1;
}

.game-container {
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
    position: relative;
    top: 60px;
    bottom: 100px;

}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: inherit;
}

.mode-select {
    margin-bottom: 20px;
}

.mode-btn {
    margin: 10px;
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 1.1rem;
}

.mode-btn:hover {
    background-color: #45a049;
}

.theme-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.theme-toggle input {
    width: 50px;
    height: 30px;
    border-radius: 20px;
    appearance: none;
    background-color: #ccc;
    position: relative;
    transition: background-color 0.3s ease;
}

.theme-toggle input:checked {
    background-color: #4caf50;
}

.theme-toggle input::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    transition: transform 0.3s ease;
}

.theme-toggle input:checked::before {
    transform: translateX(20px);
}

#game-board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-gap: 10px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.square {
    width: 100px;
    height: 100px;
    border: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 10px;
}

.square:hover {
    background-color: #f0f0f0;
}

#game-status {
    margin-top: 20px;
}

button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    background-color: #4caf50;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

button:disabled {
    background-color: #ccc;
}

#scoreboard {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

#timer {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
}

.winner {
    background-color: #ffcc00;
    font-weight: bold;
}

.hidden {
    display: none;
}

#game-board.hidden {
    display: none;
}

#reset-btn.hidden {
    display: none;
}

#game-status p {
    font-size: 1.2rem;
    font-weight: bold;
}

.dark-mode button,
.dark-mode .mode-btn {
    background-color: #333;
    color: #fff;
}

.dark-mode .square {
    border-color: #bbb;
}

.dark-mode .square:hover {
    background-color: #444;
}

.dark-mode .winner {
    background-color: #ffcc00;
}












.footer {
    background: linear-gradient(45deg, #4caf50, #3e8e41);
    color: #fff;
    text-align: center;
    padding: 15px 20px;
    font-size: 0.9rem;
    position: absolute;
    bottom: -210px;
    width: 100%;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease-out;
}

.footer p {
    margin: 5px 0;
}

.footer a {
    color: #ffeb3b;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #fff;
}

/* Animation for Footer Appearance */
@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}







/* Square Animations */
.square {
    width: 100px;
    height: 100px;
    border: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border-radius: 10px;
}

.square:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}

.square:active {
    transform: scale(0.95);
}

.winner {
    background-color: #ffcc00;
    font-weight: bold;
    animation: glow 1s infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px #ffcc00;
    }

    to {
        box-shadow: 0 0 20px #ffcc00;
    }
}

/* Winning Animation for Scoreboard */
#player-x-score,
#player-o-score {
    transition: transform 0.3s ease, color 0.3s ease;
}

.flash {
    transform: scale(1.2);
    color: #4caf50;
}

/* Button Transitions */
button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    background-color: #4caf50;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #45a049;
    transform: scale(1.1);
}

button:disabled {
    background-color: #ccc;
}

/* Dark Mode Glow Effect */
.dark-mode .square {
    border-color: #bbb;
    box-shadow: 0 0 10px #444;
}

.dark-mode .square:hover {
    background-color: #444;
}

.dark-mode button,
.dark-mode .mode-btn {
    background-color: #333;
    color: #fff;
}

.dark-mode button:hover {
    background-color: #555;
}

/* Scoreboard Styles */
#scoreboard {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 10px;
    background: #f9f9f9;
    transition: background-color 0.3s ease;
}

.dark-mode #scoreboard {
    background: #444;
    color: #fff;
}














.difficulty-container {
    text-align: center;
    background-color: #4caf50;
    padding: 4px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.difficulty-container.hidden {
    transform: scale(0.8);
    opacity: 0;
    pointer-events: none;
}

.difficulty-dropdown {
    width: 50%;
    padding: 5px;
    border-radius: 5px;
    border: 2px solid #333;
    font-size: 1.2rem;
    margin: 20px 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.difficulty-dropdown:focus {
    border-color: #4caf50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.start-ai-game-btn {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.start-ai-game-btn:hover {
    background-color: #4caf50;
    transform: scale(1.1);
}

.start-ai-game-btn:active {
    transform: scale(0.95);
}





#difficulty-options,
#marker-selection {
    margin-top: 20px;
}

button {
    margin: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}


.input1 {

    padding: 10px;


}



/* @media (max-width: 600px) {
    #game-board {
        grid-template-columns: repeat(3, 70px);
    }

    .square {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
} */









