: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;
    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-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-end;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
    color: var(--primary);
    letter-spacing: 2px;
}

.score-box {
    background: #1a1525;
    border: 1px solid var(--secondary);
    border-radius: var(--radius);
    padding: 15px 20px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}
.score-box div:first-child {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.instructions-panel {
    background: #1a1525;
    color: var(--text);
    border: 1px solid var(--secondary);
    border-radius: var(--radius);
    padding: 15px;
    font-size: 1rem;
}
.instructions-panel p { margin: 5px 0; }

#game-container {
    position: relative;
    border: 1px solid var(--secondary);
    background: #110d1a;
    border-radius: var(--radius);
    overflow: hidden;
}

canvas {
    display: block;
    max-width: 100%;
    height: auto;
    touch-action: none;
}

.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: 10;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 0 0 10px 0;
}
.overlay p {
    font-size: 1.2rem;
    font-weight: 700;
    background: transparent;
    padding: 10px 20px;
    border: 1px solid var(--secondary);
    color: var(--text);
}

.virtual-controls { display: none; flex-direction: column; align-items: center; gap: 10px; margin-top: 20px; }
.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; }
.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 { flex-direction: column; align-items: center; }
}
