:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --neon-pink: #ff0055;
    --neon-blue: #00ccff;
    --neon-purple: #cc00ff;
    --text-main: #ffffff;
    --text-dim: #aaaaaa;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.1));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
}

/* Typography */
h1,
h2,
h3,
.logo {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.accent {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 8px var(--neon-pink);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
}

.hero-content {
    margin-top: -30px;
    /* Offset to feel more centered below the fixed header */
    z-index: 2;
}

h1.glitch {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    position: relative;
    color: white;
}

h1.glitch::before,
h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    /* Matches body bg to hide main text partially */
}

h1.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff0055;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

h1.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00ccff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(0, 9999px, 0, 0);
    }

    90% {
        clip: rect(0, 9999px, 0, 0);
    }

    /* Long pause */
    91% {
        clip: rect(15px, 9999px, 85px, 0);
    }

    92% {
        clip: rect(0, 9999px, 0, 0);
    }

    95% {
        clip: rect(65px, 9999px, 5px, 0);
    }

    100% {
        clip: rect(0, 9999px, 0, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(0, 9999px, 0, 0);
    }

    92% {
        clip: rect(0, 9999px, 0, 0);
    }

    /* Long pause */
    93% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    94% {
        clip: rect(0, 9999px, 0, 0);
    }

    97% {
        clip: rect(80px, 9999px, 5px, 0);
    }

    100% {
        clip: rect(0, 9999px, 0, 0);
    }
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-dim);
    margin-bottom: 40px;
    letter-spacing: 5px;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: transparent;
    border: 2px solid var(--neon-pink);
    color: var(--neon-pink);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--neon-pink);
    color: white;
    box-shadow: 0 0 20px var(--neon-pink);
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    text-align: center;
    border-bottom: 2px solid var(--neon-blue);
    /* Underline style */
    display: inline-block;
    padding-bottom: 10px;
    /* Center the underline visual hack: wrapper usually needed, 
       but here we can just center the text block in parent */
}

.section h2 {
    /* Targeting the h2 directly for centering */
    display: table;
    margin: 0 auto 60px auto;
}


/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 204, 255, 0.2);
    border-color: var(--neon-blue);
}

.card-image {
    height: 200px;
    width: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #000;
}

.card-content {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.card-content h3 {
    color: var(--neon-purple);
    margin-top: 30px;
    margin-bottom: 15px;
    width: 100%;
}

.card-content p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 15px;
    /* Removed flex-grow to stop pushing button down */
}

.btn-small {
    font-size: 0.8rem;
    color: white;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn-small:hover {
    color: var(--neon-blue);
}

/* Contact */
.contact-container {
    max-width: 600px;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

input,
textarea {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    color: white;
    font-family: _var(--font-heading);
    /* Typo intended to fallback or just 'inherit' if variable fail, fixing below */
    font-family: var(--font-body);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #222;
    color: #555;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    nav {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        align-items: center;
        background: rgba(5, 5, 5, 0.95);
        /* Ensure readability */
    }

    .logo {
        font-size: 1rem;
        /* Small enough to essentially never wrap */
        white-space: nowrap;
        /* Hard constraint */
        margin-bottom: 0;
        letter-spacing: 1px;
        /* Slightly tighter */
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        /* FORCE single line */
        justify-content: center;
        margin-top: 10px;
        gap: 4px;
        /* Tiny gap */
        width: 100%;
        padding: 0;
        background: transparent;
        overflow-x: auto;
        /* Allow scroll if it REALLY doesn't fit, better than wrapping */
    }

    .nav-links li {
        list-style: none;
        flex-shrink: 0;
        /* Prevent crushing */
    }

    .nav-links a {
        font-size: 0.65rem;
        /* Very small text */
        padding: 4px 6px;
        color: #ddd;
        text-transform: uppercase;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 4px;
        white-space: nowrap;
        /* Don't break text inside button */
    }

    /* Hero adjustments */
    .hero {
        height: auto;
        min-height: 50vh;
        /* Good balance */
        padding: 100px 0 50px 0;
        /* Space for fixed header if needed, or just visual balance */
        align-items: center;
    }

    header {
        position: relative;
        /* Not fixed on mobile to give more screen space */
        background: #050505;
    }

    h1.glitch {
        font-size: 1.8rem;
        /* Correctly sized for mobile width */
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }

    /* Section tweaks */
    .section {
        padding: 50px 0;
    }

    .section h2 {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 10px;
        /* Slight side padding for cards */
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }
}