*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    user-select:none;
}

body{
    font-family: Arial, sans-serif;
    height:100vh;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    padding-top:20px;
    color:white;
    overflow:hidden;

    background: linear-gradient(-45deg, #ff00cc, #3333ff, #00ffcc, #ff9900);
    background-size: 400% 400%;
    animation: gradientBG 12s ease infinite;
}

/* Background Animation */
@keyframes gradientBG {
    0%{background-position:0% 50%;}
    50%{background-position:100% 50%;}
    100%{background-position:0% 50%;}
}

/* Floating Lights */
.light{
    position:absolute;
    width:300px;
    height:300px;
    border-radius:50%;
    background: radial-gradient(circle, rgba(255,255,255,0.3), transparent);
    animation: floatLights 10s infinite alternate ease-in-out;
    filter: blur(50px);
    z-index:-1;
}

@keyframes floatLights {
    from{transform: translate(-100px, -100px);}
    to{transform: translate(100px, 100px);}
}

/* Animated Text Glow */
.animated-text{
    animation: textGlow 2s infinite ease-in-out alternate;
}

@keyframes textGlow {
    0% { text-shadow: 0 0 10px cyan, 0 0 20px blue; }
    50% { text-shadow: 0 0 20px #00ffff, 0 0 50px #0088ff; }
    100% { text-shadow: 0 0 15px cyan, 0 0 30px blue; }
}

h1{
    font-size:40px;
    margin-bottom:5px;
}

/* Timer + Score */
#timer, #score{
    font-size:22px;
    margin:7px;
}

/* Game Board */
.board{
    display:grid;
    grid-template-columns:repeat(3,110px);
    gap:10px;
    margin-top:20px;
}

.cell{
    width:110px;
    height:110px;
    background:rgba(0,0,0,0.45);
    border:2px solid rgba(255,255,255,0.6);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:55px;
    border-radius:18px;
    cursor:pointer;
    transition:0.3s;
    color:white;

    /* Floating Animation */
    animation: xoFloat 2.3s infinite ease-in-out;
}

@keyframes xoFloat {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.cell:hover{
    background:rgba(255,255,255,0.3);
    transform:scale(1.15);
    border-color:#00ffff;
}

/* Button */
button{
    margin-top:20px;
    padding:12px 25px;
    font-size:18px;
    border:none;
    border-radius:10px;
    background:#00ffff;
    color:black;
    font-weight:bold;
    cursor:pointer;
    transition:0.3s;
}

button:hover{
    transform:scale(1.15);
    background:white;
}

/* Footer */
footer{
    margin-top:30px;
    font-size:20px;
}
