* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #212121, #616161, #00c6ff);
    background-size: 400% 400%;
    animation: gradientAnimation 10s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    flex-direction: column;
}

h1 {
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-gap: 10px;
    margin: 20px auto;
}

.cell {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    cursor: pointer;
    background: #333;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.cell:hover {
    transform: scale(1.1);
}

.x {
    color: #ff5722;
    font-weight: bold;
}

.o {
    color: #2196f3;
    font-weight: bold;
}

#status {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 20px;
}

.options {
    margin-bottom: 20px;
}

button {
    padding: 12px 25px;
    font-size: 1.2rem;
    background: #ff4081;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #ff79a8;
}

.celebration,
.loss {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    font-size: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: animation 1s ease forwards;
}

.celebration {
    background: rgba(0, 255, 0, 0.8);
}

.loss {
    background: rgba(255, 0, 0, 0.8);
}

@keyframes animation {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Existing styles remain the same */

.win-overlay, .lose-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.win-overlay {
    background: rgba(0, 255, 0, 0.7);
    color: #0f0;
    text-shadow: 2px 2px 10px #000;
}

.lose-overlay {
    background: rgba(255, 0, 0, 0.7);
    color: #f00;
    text-shadow: 2px 2px 10px #000;
}

.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* Responsive design */
@media (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
    }

    .board {
        grid-template-columns: repeat(3, 1fr);
        max-width: 90%;
    }

    .cell {
        font-size: 2rem;
        height: 80px;
    }

    button {
        width: 100%;
    }
}
