:root {
    --bg-color: #0d0914;
    --primary: #9d4edd;
    --secondary: #7b2cbf;
    --black: #0d0914;
    --text: #f8f9fa;
    --border-width: 1px;
    --radius: 4px;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    padding: 10px 20px;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    transition: 0.2s;
    z-index: 100;
}
.back-btn:hover {
    background: var(--primary);
}

#game-container {
    position: relative;
    border: 1px solid var(--secondary);
    background: #110d1a;
    border-radius: var(--radius);
}

canvas {
    display: block;
    max-width: 100%;
    height: auto;
    touch-action: none;
}

#hud {
    position: absolute;
    top: 10px;
    left: 20px;
    width: 560px;
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    pointer-events: none;
    z-index: 10;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(13, 9, 20, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    z-index: 20;
}

h1 {
    font-size: 3rem;
    color: var(--primary);
    margin: 0 0 10px 0;
    line-height: 1.2;
    letter-spacing: 2px;
}
.overlay p {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #ccc;
}
.instructions {
    background: var(--secondary);
    color: var(--text);
    padding: 10px 20px;
    font-weight: 700;
    border-radius: 4px;
}

/* Mobile Controls */
.virtual-controls { display: none; flex-direction: column; align-items: center; gap: 10px; margin-top: 20px; z-index: 999; position: relative; }
.v-row { display: flex; gap: 10px; }
.v-btn { width: 50px; height: 50px; background: rgba(157, 78, 221, 0.2); border: 2px solid #9d4edd; color: #fff; font-size: 20px; border-radius: 8px; user-select: none; touch-action: none; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.v-btn:active { background: rgba(157, 78, 221, 0.6); }
.action-btn { background: rgba(224, 170, 255, 0.2); border-color: #e0aaff; border-radius: 50%; }
@media (max-width: 768px) {
    .virtual-controls { display: flex; }
    #game-wrapper, #game-container { flex-direction: column; }
}
