/* --- VARIABLES & RESET --- */
:root {
    --bg-color: #050510;
    --card-bg: #100020; 
    --neon-green: #00ff00;
    --neon-pink: #ff00de;
    --neon-blue: #00f3ff;
    --neon-gold: #FFD700;
    --text-color: #e0e0e0;
    --scanline-color: rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* [NEW] SMOOTH SCROLLING MAGIC */
html {
    scroll-behavior: smooth;
    /* This ensures that when you click a link, it doesn't snap 
       right to the very top edge, giving it 80px of breathing room */
    scroll-padding-top: 80px; 
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'VT323', monospace; 
    font-size: 20px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- CRT SCANLINE EFFECT --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, .logo {
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 2px solid var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    /* [OPTIONAL] Uncomment these if you want the header to stick to the top */
    /* position: sticky; */
    /* top: 0; */
    /* background-color: var(--bg-color); */
    /* z-index: 1000; */
}

.logo {
    color: var(--neon-green);
    font-size: 1.2rem;
    text-shadow: 2px 2px 0px #000;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 20px;
    font-size: 1.2rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 5px var(--neon-pink);
}

/* --- HERO SECTION --- */
.hero {
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, #1a0b2e 0%, #050510 70%);
}

.hero h1 {
    font-size: 2.5rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* --- LOGO STYLES --- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: default;
}

.lab-logo {
    width: 44px; /* Slightly wider for the joystick base */
    height: 44px;
    transition: filter 0.3s ease;
}

.logo-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--neon-green);
    text-shadow: 2px 2px 0px #000;
}

/* ANIMATION: The Joystick "Wobble" */
@keyframes wobble {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); } /* Tilt Left */
    50% { transform: rotate(0deg); }
    75% { transform: rotate(15deg); }  /* Tilt Right */
    100% { transform: rotate(0deg); }
}

/* Apply animation to the whole SVG on hover */
.logo-container:hover .lab-logo {
    animation: wobble 0.4s ease-in-out;
    filter: drop-shadow(0 0 5px var(--neon-pink)); /* Glows pink on hover */
}

.highlight {
    color: var(--neon-pink);
    text-shadow: 3px 3px 0px #4a004a;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--neon-blue);
    margin-bottom: 40px;
}

.btn-main {
    display: inline-block;
    padding: 15px 30px;
    background: transparent;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-main:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 20px var(--neon-green);
    transform: translateY(-3px);
}

/* --- GAMES GRID --- */
.container {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    color: var(--neon-blue);
    margin-bottom: 50px;
    font-size: 1.8rem;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.game-card {
    background: var(--card-bg);
    border: 1px solid #333;
    transition: transform 0.3s, border-color 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 222, 0.3);
}

.card-image {
    height: 200px;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #333;
}

.space-invaders-bg {
    background: linear-gradient(45deg, #000 25%, #100020 25%, #100020 50%, #000 50%, #000 75%, #100020 75%, #100020 100%);
    background-size: 20px 20px;
}

.pixel-icon {
    font-size: 4rem;
}

.card-info {
    padding: 20px;
    text-align: center;
}

.card-info h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #fff;
}

.card-info p {
    margin-bottom: 20px;
    color: #aaa;
    font-size: 1.1rem;
}

.btn-play {
    display: inline-block;
    padding: 10px 20px;
    background: var(--neon-pink);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border: none;
}

.btn-play:hover {
    background: #d900bd;
    box-shadow: 0 0 10px var(--neon-pink);
}

.btn-disabled {
    padding: 10px 20px;
    background: #333;
    color: #555;
    border: none;
    cursor: not-allowed;
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
}

/* --- ABOUT TERMINAL --- */
.terminal-box {
    background: #000;
    border: 1px solid var(--neon-green);
    padding: 30px;
    font-family: 'Courier New', Courier, monospace;
    color: var(--neon-green);
    box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.1);
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid #333;
    margin-top: 50px;
    color: #666;
}

/* COFFEE BUTTON STYLES */
.support-section {
    margin-bottom: 30px;
}

.btn-coffee {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid var(--neon-gold);
    color: var(--neon-gold);
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    transition: all 0.3s;
    background: transparent;
}

.btn-coffee:hover {
    background: var(--neon-gold);
    color: #000;
    box-shadow: 0 0 20px var(--neon-gold);
    transform: translateY(-2px);
}

.legal {
    font-size: 0.8rem;
    margin-top: 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- MOBILE TWEAKS --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    header { flex-direction: column; gap: 15px; }
    nav a { margin: 0 10px; }
}