:root {
    --bg-color: #050510;
    --primary-color: #00f3ff;
    --secondary-color: #ff00de;
    --accent-color: #ffff00;
    --text-color: #ffffff;
    --pixel-font: 'Press Start 2P', cursive;
}

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

body {
    background-color: #000;
    color: var(--text-color);
    font-family: var(--pixel-font);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-wrapper {
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 450px;
    display: flex;
    flex-direction: column;
    border: 4px solid #333;
    background: #000;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

.game-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a0a0a;
    border-bottom: 2px solid #222;
    font-size: 10px;
}

.stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    color: var(--primary-color);
}

.back-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.2s;
}

.back-link:hover {
    text-shadow: 0 0 10px var(--secondary-color);
    transform: scale(1.05);
}

#game-container {
    flex: 1;
    position: relative;
    background-color: #050510;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
}

.overlay.hidden {
    display: none;
}

.overlay-content h1 {
    font-size: 40px;
    margin-bottom: 25px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(0, 243, 255, 0.5));
}

.overlay-content p {
    font-size: 12px;
    margin-bottom: 35px;
    letter-spacing: 1px;
    opacity: 0.9;
}

.text-red {
    background: linear-gradient(to bottom, #ff0055, #880000) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.pixel-btn {
    background: transparent;
    border: 3px solid var(--primary-color);
    color: var(--primary-color);
    padding: 18px 36px;
    font-family: var(--pixel-font);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.pixel-btn:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 25px var(--primary-color);
    transform: scale(1.1);
}

.controls-hint {
    margin-top: 40px;
    font-size: 10px;
    color: #444;
}

/* Scanline Effect */
#game-container::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 2;
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
}