* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.body {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: linear-gradient(-45deg, #0a0a0a, #1a0d2e, #16213e, #0f3460);
}

.body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 131, 16, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
}

.text {   
    font-family: 'Orbitron', monospace;
    font-size: clamp(4rem, 8vw, 6rem);
    text-align: center;
    margin-top: 1rem;
    color: #ffaa50;
    text-shadow:
        0 0 15px #ff8310,
        0 0 30px #ff8310,
        0 0 60px #ff8310,
        0 0 120px #ff8310,
        0 0 160px #c7c410;
    letter-spacing: -5px;
    position: relative;
}

.main {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.container {
    height: 60vh;
    width: min(90vw, 500px);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.game-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
    padding: 30px;
    border: 2px solid rgba(255, 131, 16, 0.3);
    border-radius: 25px;
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
}

.game-box::before {
    content: '';
    position: absolute;
    inset: -2px;
    padding: 2px;
    background: linear-gradient(45deg, #ff8b1e, #3a3abb, #7a3d04, #4848b4);
    border-radius: 25px;
    background-size: 400% 400%;
    animation: borderGlow 3s linear infinite;
    z-index: -1;
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }

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

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

.box {
    background: linear-gradient(145deg, #404457, #1e1f2e);
    border: 2px solid rgba(255, 131, 16, 0.2);
    border-radius: 15px;
    outline: none;
    color: #ff8310;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: bold;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.box:hover {
    transform: scale(0.99);
    border-color: #ff8310;
}

.re-con {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    position: relative;
}

.restart {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, #ff8310, #ffaa50);
    color: #0a0a0a;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: -1px;
    position: relative;
    overflow: hidden;
    outline: none;
}

.restart:hover {
    opacity: 0.5;
}

.restart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.restart:hover::before {
    left: 100%;
}

/* Responsive design */
@media (max-width: 768px) {
    .text {
        margin: 2.5rem 0;
    }
    
    .game-box {
        gap: 10px;
        padding: 20px;
        max-width: 350px;
    }

    .container {
        height: auto;
    }

    .re-con {
        margin-top: 3rem;

    }
}

@media (max-width: 480px) {
    .text {
        margin-left: 15px;
        margin-right: 15px;
        margin-top: 2rem;
    }
    
    .game-box {
        gap: 8px;
        padding: 15px;
        max-width: 300px;
    }

    .container {
        height: auto;
    }
}