:root {
    --bg-color: #050510;
    --card-bg: rgba(20, 20, 35, 0.6);
    --primary-neon: #00ffff;
    --secondary-neon: #ff00ff;
    --text-color: #ffffff;
    --grid-color: rgba(0, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animated Grid Background */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: grid-move 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes grid-move {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px);
    }
}

/* Header & Hero */
header {
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

h1 {
    font-family: 'Press Start 2P', cursive;
    /* Fallback will be handled in HTML import */
    font-size: 3rem;
    background: linear-gradient(to right, var(--primary-neon), var(--secondary-neon));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Game Cards Container */
.games-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    flex-wrap: wrap;
    flex: 1;
    z-index: 10;
}

/* Game Card */
.game-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 300px;
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-neon);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.game-card:hover::before {
    left: 100%;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.card-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-neon);
}

.card-desc {
    font-size: 0.9rem;
    color: #aaa;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    z-index: 10;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .games-container {
        flex-direction: column;
        align-items: center;
    }
}