:root {
    --bg-color: #0d0d0d;
    --accent-color: #ff00ff;
    --text-color: #ffffff;
    --secondary-accent: #00ffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif;
    overflow-x: hidden;
}

/* Canvas Background */
#gameCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Content Styling */
main {
    position: relative;
    z-index: 1;
    /* Add some transparency to bg to ensure readability but let canvas show */
    background: rgba(13, 13, 13, 0.6); 
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 0, 255, 0.2);
    backdrop-filter: blur(2px);
}

h1, h2 {
    font-family: 'Press Start 2P', cursive;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px var(--secondary-accent);
    text-align: center;
    line-height: 1.5;
}

h1 {
    font-size: 3rem;
    position: relative;
}

p {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px;
    text-align: center;
    text-shadow: 1px 1px 2px #000;
}

a {
    color: var(--text-color);
    margin: 0 1rem;
    font-weight: bold;
    transition: color 0.3s;
}

/* Hero Section Glitch Effect */
.hero-logo {
    max-width: 250px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 10px var(--accent-color));
    pointer-events: none;
}

.glitch-wrapper {
    position: relative;
    pointer-events: none;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(21px, 9999px, 86px, 0); }
    20% { clip: rect(6px, 9999px, 34px, 0); }
    40% { clip: rect(54px, 9999px, 20px, 0); }
    60% { clip: rect(12px, 9999px, 67px, 0); }
    80% { clip: rect(98px, 9999px, 14px, 0); }
    100% { clip: rect(43px, 9999px, 7px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(81px, 9999px, 16px, 0); }
    20% { clip: rect(16px, 9999px, 94px, 0); }
    40% { clip: rect(24px, 9999px, 60px, 0); }
    60% { clip: rect(52px, 9999px, 27px, 0); }
    80% { clip: rect(88px, 9999px, 4px, 0); }
    100% { clip: rect(3px, 9999px, 17px, 0); }
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
}

.game-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--accent-color);
    padding: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px var(--accent-color);
}

.game-card img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1rem;
    filter: grayscale(50%);
    transition: filter 0.3s;
}

.game-card:hover img {
    filter: grayscale(0%);
}

.game-card h3 {
    color: var(--secondary-accent);
    margin-bottom: 0.5rem;
}

.game-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.game-btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.7rem;
    font-family: 'Press Start 2P', cursive;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.game-btn:hover {
    background: var(--accent-color);
    color: #000;
}

.game-btn.secondary {
    border-color: var(--secondary-accent);
}

.game-btn.secondary:hover {
    background: var(--secondary-accent);
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
}

input, textarea {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--accent-color);
    color: white;
    padding: 1rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
}

button {
    background: var(--accent-color);
    color: black;
    border: none;
    padding: 1rem;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: var(--secondary-accent);
}

/* Support Section */
.support-links {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.support-btn {
    text-decoration: none;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 1rem 2rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.support-btn:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 15px var(--accent-color);
}

/* Scroll Progress Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: var(--accent-color);
    font-family: 'Press Start 2P';
    font-size: 0.8rem;
    z-index: 100;
    pointer-events: none;
}

.score-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    color: var(--secondary-accent);
    font-family: 'Press Start 2P';
    font-size: 0.8rem;
    z-index: 100;
    pointer-events: none;
}

.email {
    position: fixed;
    bottom: 20px;
    left: 50%; 
    transform: translateX(-50%);
    font-family: 'Press Start 2P';
    font-size: 0.8rem;
    z-index: 100;
}

/* Side Navigation */
#side-nav {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

#side-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#side-nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    display: block;
    transition: all 0.3s ease;
    padding-bottom: 10px;
    border-bottom: 2px solid transparent;
    text-transform: uppercase;
    position: relative;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

#side-nav a:hover,
#side-nav a.active {
    color: var(--accent-color);
    padding-bottom: 20px;
    border-bottom: 2px solid var(--secondary-accent);
    text-shadow: 0 0 5px var(--accent-color);
}

#side-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary-accent);
    box-shadow: 0 0 10px var(--secondary-accent);
}