body {
    background: radial-gradient(circle at top left, #1a0029, #001d3d, #0a0a0a);
    color: #00ffcc; /* Neon cyan */
    font-family: 'Courier New', monospace;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(to right, rgba(0, 255, 204, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 0, 255, 0.07) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}
/* Neon flicker effect */
@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 
            0 0 5px #ff00ff,
            0 0 10px #ff00ff,
            0 0 20px #00ffcc,
            0 0 40px #ff00ff;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.neon {
    animation: flicker 2.5s infinite alternate;
}

header {
    background: linear-gradient(90deg, #000, #0a0a0a, #111, #0a0a0a, #000);
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid #ff00ff;
    box-shadow: 0 0 20px #ff00ff;
}

header h1 {
    margin: 0;
    font-size: 2.8em;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ff00ff, #00ffcc, #fffb00, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textflow 5s linear infinite;
}

@keyframes textflow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
}

nav a {
    color: #00ffcc;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s, text-shadow 0.3s;
}

nav a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    left: 0;
    bottom: -5px;
    background: #ff00ff;
    transition: width 0.3s;
}

nav a:hover {
    color: #fffb00; /* Neon yellow */
    text-shadow: 0 0 10px #ff00ff, 0 0 20px #00ffcc;
}

nav a:hover::after {
    width: 100%;
}

/* Soft glowing background behind sections */
section {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(255, 0, 255, 0.2), 0 0 40px rgba(0, 255, 204, 0.2);
}
/* Cards */
.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.card {
    background: #111;
    border: 1px solid #00ffcc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 0 15px #00ffcc, 0 0 25px rgba(255, 0, 255, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: scale(1.08) rotate(-1deg);
    box-shadow: 0 0 25px #ff00ff, 0 0 40px #00ffcc, 0 0 60px #fffb00;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 1.6em;
    color: #fffb00;
    text-shadow: 0 0 10px #ff00ff;
}

.card p {
    margin: 0 0 15px;
    font-size: 1em;
    color: #ccc;
}

/* Buttons */
.card button {
    background: linear-gradient(90deg, #ff00ff, #00ffcc);
    color: #000;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 0 15px #ff00ff;
}

.card button:hover {
    background: linear-gradient(90deg, #00ffcc, #fffb00);
    transform: scale(1.1);
    box-shadow: 0 0 25px #fffb00, 0 0 40px #00ffcc;
}

/* Modal */
#gameModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.95), #000);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#gameFrame {
    width: 100%;
    height: 90%;
    border: none;
    box-shadow: 0 0 30px #ff00ff, 0 0 50px #00ffcc;
    border-radius: 8px;
}

#closeButton {
    background: linear-gradient(90deg, #ff00ff, #00ffcc);
    color: #000;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 15px;
    border-radius: 6px;
    font-weight: bold;
    transition: transform 0.2s;
    box-shadow: 0 0 15px #ff00ff;
}

#closeButton:hover {
    background: linear-gradient(90deg, #00ffcc, #fffb00);
    transform: scale(1.1);
}

/* Footer */
footer {
    background: linear-gradient(90deg, #000, #0a0a0a, #111, #0a0a0a, #000);
    padding: 20px;
    text-align: center;
    border-top: 3px solid #ff00ff;
    box-shadow: 0 -5px 20px #00ffcc;
    font-size: 0.9em;
}

/* Mobile */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    section {
        padding: 25px 15px;
    }

    .card {
        padding: 15px;
    }

    #gameFrame {
        height: 75%;
    }
}
