:root {
    --primary: #9d4edd;
    --secondary: #7b2cbf;
    --bg: #0d0914;
    --text: #f8f9fa;
    --border: 1px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
}

.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);
    transition: 0.2s;
    z-index: 100;
}
.back-btn:hover {
    background: var(--primary);
    color: var(--text);
}

#game-container {
    position: relative;
    border: 1px solid var(--secondary);
    background: #1a1525;
    overflow: hidden;
}

canvas {
    display: block;
    max-width: 100%;
    height: auto;
    touch-action: none;
}

#hud {
    position: absolute;
    top: 10px;
    left: 20px;
    width: 860px;
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    pointer-events: none;
}

@media (max-width: 768px) {
    #hud {
        width: calc(100% - 40px);
        font-size: 1rem;
    }
    h1 {
        font-size: 2.5rem;
    }
}

.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;
    color: var(--text);
    z-index: 50;
    cursor: pointer;
}

h1 {
    font-size: 4rem;
    color: var(--primary);
    line-height: 1.2;
    margin: 0 0 20px 0;
    font-weight: 900;
    letter-spacing: 2px;
}
p {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 0 20px 0;
    color: #ccc;
}
.instructions {
    font-size: 1rem;
    font-weight: 700;
    background: var(--secondary);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 4px;
}
