:root {
    --bg-color: #0b0114;
    --text-color: #d946ef;
    --border-color: #d946ef;
    --glow-color: rgba(217, 70, 239, 0.4);
    --card-bg: rgba(217, 70, 239, 0.05);
    --input-bg: #1a0826;
    --input-text: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'VT323', monospace;
    overflow-x: hidden;
    min-height: 100vh;
}

/* CRT Scanline Effect */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.6;
}

header {
    text-align: center;
    padding: 60px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.2rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--text-color);
    text-shadow: 0 0 10px var(--text-color);
    cursor: default;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

h1:hover {
    animation: neon-starter 0.5s ease-out forwards;
}

@keyframes neon-starter {
    0% {
        opacity: 0.6;
        text-shadow: 0 0 4px var(--text-color);
    }
    15% {
        opacity: 1;
        text-shadow: 0 0 25px var(--text-color), 0 0 40px #ffffff;
    }
    30% {
        opacity: 0.4;
        text-shadow: none;
    }
    45% {
        opacity: 0.9;
        text-shadow: 0 0 15px var(--text-color);
    }
    60% {
        opacity: 0.3;
        text-shadow: none;
    }
    75% {
        opacity: 1;
        text-shadow: 0 0 35px var(--text-color), 0 0 50px #ffffff;
    }
    100% {
        opacity: 1;
        color: #ffffff;
        text-shadow: 0 0 10px var(--text-color), 0 0 25px var(--text-color), 0 0 45px var(--text-color), 0 0 70px var(--glow-color);
    }
}

/* Glowing Pulse */
.typing {
    display: inline-block;
    animation: glow-pulse 2s infinite alternate;
}

@keyframes glow-pulse {
    from { text-shadow: 0 0 5px var(--text-color); }
    to { text-shadow: 0 0 20px var(--text-color); }
}

/* Buttons */
button {
    font-family: 'VT323', monospace;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}

button:hover {
    background: var(--border-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--border-color);
}

/* Game Grid */
#game-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    padding: 30px 20px 80px 20px;
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.game-card {
    width: 320px;
    max-width: 100%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.game-card:hover {
    box-shadow: 0 0 25px var(--glow-color);
    transform: translateY(-8px);
    border-color: #ffffff;
}

.game-card h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1rem;
    margin: 15px 0 10px 0;
    color: var(--text-color);
}

.game-card p {
    font-size: 1.15rem;
    line-height: 1.4;
    color: #cbd5e1;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.game-card small {
    font-size: 0.95rem;
    color: var(--border-color);
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    padding-top: 10px;
    width: 100%;
    display: block;
}

/* Themes */
body.theme-green {
    --bg-color: #050505;
    --text-color: #00ff41;
    --border-color: #00ff41;
    --glow-color: rgba(0, 255, 65, 0.4);
    --card-bg: rgba(0, 255, 65, 0.05);
    --input-bg: #111111;
    --input-text: #ffffff;
}

body.theme-purple {
    --bg-color: #0b0114;
    --text-color: #d946ef;
    --border-color: #d946ef;
    --glow-color: rgba(217, 70, 239, 0.4);
    --card-bg: rgba(217, 70, 239, 0.05);
    --input-bg: #1a0826;
    --input-text: #ffffff;
}

body.theme-light {
    --bg-color: #f1f5f9;
    --text-color: #0284c7;
    --border-color: #0284c7;
    --glow-color: rgba(2, 132, 199, 0.3);
    --card-bg: rgba(255, 255, 255, 0.8);
    --input-bg: #ffffff;
    --input-text: #0f172a;
}