:root {
    --bg-color: #0c0c0c;
    --primary-color: #00ff41;
    --secondary-color: #ff00de;
    --xp-color: #0088ff;
    --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: 600px;
    height: 100%;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    border: 4px solid #222;
    background: #000;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.game-header {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
    border-bottom: 2px solid #333;
    font-size: 8px;
}

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

.stat-item {
    color: #888;
}

.stat-item span {
    color: #fff;
}

.back-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 8px;
}

#game-container {
    flex: 1;
    position: relative;
    background-color: var(--bg-color);
    overflow: hidden;
}

#xp-bar-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: #222;
    z-index: 5;
}

#xp-bar {
    width: 0%;
    height: 100%;
    background: var(--xp-color);
    box-shadow: 0 0 10px var(--xp-color);
    transition: width 0.3s;
}

#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.95);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
}

.overlay.hidden {
    display: none;
}

.overlay-content h1 {
    font-size: 24px;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary-color), var(--xp-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.overlay-content p {
    font-size: 10px;
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
}

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

.pixel-btn {
    background: #222;
    border: 3px solid #444;
    color: white;
    padding: 15px 25px;
    font-family: var(--pixel-font);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pixel-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #000;
}

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