body {
    margin: 0;
    min-height: 100vh;

    text-align: center;
    color: white;

    position: relative;
    isolation: isolate;

    overflow-x: hidden;

    background:
        radial-gradient(
            circle at 10% 22%,
            rgba(128, 0, 255, 0.38) 0%,
            rgba(90, 0, 220, 0.18) 12%,
            transparent 30%
        ),

        radial-gradient(
            circle at 88% 68%,
            rgba(0, 90, 255, 0.30) 0%,
            rgba(0, 60, 220, 0.14) 14%,
            transparent 32%
        ),

        radial-gradient(
            circle at 80% 20%,
            rgba(0, 50, 255, 0.20),
            transparent 28%
        ),

        linear-gradient(
            135deg,
            #08001f 0%,
            #09002d 28%,
            #02051d 65%,
            #000817 100%
        );

    background-size: 120% 120%;

    animation: ambientBackground 18s ease-in-out infinite alternate;
}
body::before {
    content: "";

    position: fixed;

    width: 260px;
    height: 260px;

    left: -70px;
    top: 80px;

    border-radius: 50%;

    background: rgba(120, 0, 255, 0.75);

    filter: blur(75px);

    opacity: 0.7;

    z-index: -1;

    pointer-events: none;

    animation: purpleOrb 9s ease-in-out infinite alternate;
}
body::after {
    content: "";

    position: fixed;

    width: 280px;
    height: 280px;

    right: -70px;
    bottom: 100px;

    border-radius: 50%;

    background: rgba(0, 100, 255, 0.75);

    filter: blur(80px);

    opacity: 0.65;

    z-index: -1;

    pointer-events: none;

    animation: blueOrb 11s ease-in-out infinite alternate;
}

.floating-orbs {
    position: fixed;

    inset: 0;

    z-index: -1;

    pointer-events: none;
}
.floating-orbs span {
    position: absolute;

    display: block;

    border-radius: 50%;

    filter: blur(4px);

    animation:
        floatingOrb 7s ease-in-out infinite alternate,
        orbPulse 4s ease-in-out infinite;
}
.floating-orbs span:nth-child(1) {
    width: 28px;
    height: 28px;

    left: 23%;
    top: 48%;

    background: #7d00ff;

    box-shadow:
        0 0 15px #7d00ff,
        0 0 35px rgba(125, 0, 255, 0.8);

    animation-delay: 0s;
}
.floating-orbs span:nth-child(2) {
    width: 18px;
    height: 18px;

    right: 19%;
    top: 32%;

    background: #00aaff;

    box-shadow:
        0 0 15px #00aaff,
        0 0 30px rgba(0, 170, 255, 0.8);

    animation-delay: 1.5s;
}
.floating-orbs span:nth-child(3) {
    width: 70px;
    height: 70px;

    right: 10%;
    bottom: 25%;

    background: rgba(0, 90, 255, 0.8);

    filter: blur(15px);

    box-shadow:
        0 0 30px #006eff,
        0 0 70px rgba(0, 100, 255, 0.8);

    animation-delay: 2s;
}
.floating-orbs span:nth-child(4) {
    width: 15px;
    height: 15px;

    left: 24%;
    top: 20%;

    background: #8c00ff;

    box-shadow:
        0 0 12px #8c00ff,
        0 0 25px rgba(140, 0, 255, 0.8);

    animation-delay: 3s;
}

    h1 {
    margin-bottom: 10px;

    font-size: 3.2rem;
    font-weight: 800;

    letter-spacing: 4px;
    text-transform: uppercase;

    /* Gradient text */
    background: linear-gradient(
        90deg,
        #ffffff,
        #c77dff,
        #7c3cff,
        #00aaff,
        #ffffff
    );

    background-size: 300% auto;

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* Neon glow */
    filter:
        drop-shadow(0 0 5px rgba(168, 85, 247, 0.8))
        drop-shadow(0 0 15px rgba(0, 140, 255, 0.5));

    animation:
        headingGradient 6s linear infinite,
        headingFloat 3s ease-in-out infinite;

    position: relative;
    z-index: 2;
}
h1:hover {
    filter:
        drop-shadow(0 0 6px rgba(190, 80, 255, 1))
        drop-shadow(0 0 20px rgba(150, 50, 255, 0.9))
        drop-shadow(0 0 40px rgba(0, 140, 255, 0.7));

    transform: scale(1.03);

    transition: transform 0.3s ease, filter 0.3s ease;
}

.start-message {

    font-size: 1rem;
    font-weight: 500;

    letter-spacing: 2px;
    text-transform: uppercase;

    color: rgba(230, 225, 255, 0.85);

    text-shadow:
        0 0 8px rgba(140, 80, 255, 0.7),
        0 0 20px rgba(80, 120, 255, 0.35);

    animation: startMessageGlow 2s ease-in-out infinite;
}
.game-over {
    margin-top: 25px;
    margin-bottom: 10px;

    font-size: 1.5rem;
    font-weight: 800;

    letter-spacing: 4px;
    text-transform: uppercase;

    color: #ff304f;

    text-shadow:
        0 0 5px #ff304f,
        0 0 12px rgba(255, 48, 79, 0.9),
        0 0 30px rgba(255, 0, 60, 0.65);

    animation: gameOverGlow 1.5s ease-in-out infinite;
}
.game-subtitle {
    margin-top: 5px;
    margin-bottom: 40px;

    font-size: 0.55rem;
    font-weight: 500;

    letter-spacing: 3px;
    text-transform: uppercase;

    color: rgba(220, 210, 255, 0.7);

    text-shadow:
        0 0 8px rgba(130, 80, 255, 0.5);

    animation: subtitleFade 2s ease-in-out infinite alternate;
}

.container{
  display: grid;

    grid-template-columns: repeat(2, 150px);

    gap: 40px;

    justify-content: center;
    align-items: center;

    margin-top: 45px;

}
.btn{
    margin-bottom: 2.5rem; 
    height: 150px;
    width: 150px;

    border-radius: 28px;

    border: 2px solid rgba(255, 255, 255, 0.25);

    cursor: pointer;

    position: relative;

    transition:
        transform 0.2s ease,
        box-shadow 0.3s ease,
        filter 0.3s ease;

    overflow: hidden;

    isolation: isolate;
}
.btn:hover {
    transform: translateY(-5px) scale(1.03);

    filter: brightness(1.18);

    box-shadow:
        0 0 20px currentColor,
        0 0 45px currentColor,
        0 10px 25px rgba(0, 0, 0, 0.4);
}
.btn::before {
    content: "";

    position: absolute;

    top: -100%;
    left: -75%;

    width: 50%;
    height: 300%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.22),
        transparent
    );

    transform: rotate(25deg);

    transition: left 0.6s ease;

    pointer-events: none;
}
.btn:hover::before {
    left: 130%;
}

.red{

    background: linear-gradient(
        145deg,
        #ff3131,
        #c40000
    );

    box-shadow:
        0 0 12px rgba(255, 30, 30, 0.55),
        0 0 30px rgba(255, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);

}

 .blue {
    background: linear-gradient(
        145deg,
        #315cff,
        #001fc4
    );

    box-shadow:
        0 0 12px rgba(30, 90, 255, 0.55),
        0 0 30px rgba(0, 60, 255, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

 .yellow {
    background: linear-gradient(
        145deg,
        #fff72e,
        #d4c900
    );

    box-shadow:
        0 0 12px rgba(255, 240, 0, 0.55),
        0 0 30px rgba(255, 230, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
 .purple {
    background: linear-gradient(
        145deg,
        #c02cff,
        #7300a8
    );

    box-shadow:
        0 0 12px rgba(190, 30, 255, 0.55),
        0 0 30px rgba(150, 0, 255, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}
.red:hover {
    box-shadow:
        0 0 20px #ff2222,
        0 0 45px rgba(255, 0, 0, 0.75),
        0 15px 30px rgba(0, 0, 0, 0.4);
}

.blue:hover {
    box-shadow:
        0 0 20px #2463ff,
        0 0 45px rgba(0, 80, 255, 0.75),
        0 15px 30px rgba(0, 0, 0, 0.4);
}

.yellow:hover {
    box-shadow:
        0 0 20px #fff000,
        0 0 45px rgba(255, 230, 0, 0.75),
        0 15px 30px rgba(0, 0, 0, 0.4);
}

.purple:hover {
    box-shadow:
        0 0 20px #c000ff,
        0 0 45px rgba(180, 0, 255, 0.75),
        0 15px 30px rgba(0, 0, 0, 0.4);
}
.btn:active {
    transform: scale(0.94);

    filter: brightness(1.35);

    transition: transform 0.08s ease;
}
.red.flash {
    box-shadow:
        0 0 20px #ff0000,
        0 0 50px #ff0000,
        0 0 100px rgba(255, 0, 0, 0.9);
}

.blue.flash {
    box-shadow:
        0 0 20px #0055ff,
        0 0 50px #0055ff,
        0 0 100px rgba(0, 80, 255, 0.9);
}

.yellow.flash {
    box-shadow:
        0 0 20px #fff000,
        0 0 50px #fff000,
        0 0 100px rgba(255, 240, 0, 0.9);
}

.purple.flash {
    box-shadow:
        0 0 20px #c000ff,
        0 0 50px #c000ff,
        0 0 100px rgba(190, 0, 255, 0.9);
}
.flash{
    background-color: white;
    animation: simonFlash 0.35s ease-out;
}
.userflash{
    background-color: green;
}
@keyframes simonFlash {

    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    25% {
        transform: scale(1.08);
        filter: brightness(2);
    }

    50% {
        transform: scale(1.12);
        filter: brightness(2.5);
    }

    75% {
        transform: scale(1.05);
        filter: brightness(1.6);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }

}
@keyframes ambientBackground {

    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 50% 30%;
    }

    100% {
        background-position: 100% 70%;
    }

}
@keyframes purpleOrb {

    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.55;
    }

    50% {
        transform: translate(80px, 40px) scale(1.15);
        opacity: 0.75;
    }

    100% {
        transform: translate(30px, 100px) scale(0.9);
        opacity: 0.6;
    }

}
@keyframes blueOrb {

    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-70px, -40px) scale(1.15);
        opacity: 0.75;
    }

    100% {
        transform: translate(-30px, 60px) scale(0.9);
        opacity: 0.55;
    }

}
@keyframes bottomArc {

    0% {
        transform: translateX(0) rotate(8deg);
    }

    50% {
        transform: translateX(50px) rotate(10deg);
    }

    100% {
        transform: translateX(100px) rotate(6deg);
    }

}
@keyframes topArc {

    0% {
        transform: translate(0, 0) rotate(12deg);
    }

    50% {
        transform: translate(-40px, 30px) rotate(15deg);
    }

    100% {
        transform: translate(-80px, 60px) rotate(9deg);
    }

}
@keyframes floatingOrb {

    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(25px, -35px);
    }

    100% {
        transform: translate(-20px, 25px);
    }

}
@keyframes orbPulse {

    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

}
@keyframes headingGradient {

    0% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }

    100% {
        background-position: 0% center;
    }

}
@keyframes headingFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

}
@keyframes subtitleFade {

    from {
        opacity: 0.55;
    }

    to {
        opacity: 1;
    }

}
@keyframes startMessageGlow {

    0%,
    100% {
        opacity: 0.55;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-3px);
    }

}
@keyframes gameOverGlow {

    0%,
    100% {
        transform: scale(1);

        text-shadow:
            0 0 5px #ff304f,
            0 0 12px rgba(255, 48, 79, 0.8),
            0 0 25px rgba(255, 0, 60, 0.5);
    }

    50% {
        transform: scale(1.04);

        text-shadow:
            0 0 8px #ff304f,
            0 0 20px #ff304f,
            0 0 45px rgba(255, 0, 60, 0.8);
    }

}

@media (max-width: 600px) {

    .btn {
        width: 125px;
        height: 125px;

        border-radius: 24px;
    }

    .container {
        grid-template-columns: repeat(2, 125px);

        gap: 22px;
    }

}

@media (max-width: 380px) {

    .btn {
        width: 105px;
        height: 105px;
    }

    .container {
        grid-template-columns: repeat(2, 105px);

        gap: 18px;
    }

}
@media (max-width: 600px) {

    h1 {
        font-size: 2.2rem;
        letter-spacing: 2px;
        margin-top: 25px;
    }

    .game-subtitle {
        font-size: 0.65rem;
        letter-spacing: 1.5px;
        padding: 0 15px;
    }
     .game-over {
        font-size: 2rem;
        letter-spacing: 2px;
    }

}