:root {
    --bg-color: #0b0c10;
    --text-color: #c5c6c7;
    --primary-color: #66fcf1;
    --secondary-color: #45a29e;
    --accent-color: #ff007f;
    --panel-bg: rgba(31, 40, 51, 0.9);
    --font-family: 'Courier New', Courier, monospace;
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3 {
    color: var(--primary-color);
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--primary-color);
}

.btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
    font-size: 1.2rem;
    font-family: var(--font-family);
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
    box-shadow: 0 0 5px var(--primary-color);
    border-radius: 4px;
}

.btn:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--primary-color);
}

.btn:disabled {
    border-color: var(--text-color);
    color: var(--text-color);
    box-shadow: none;
    cursor: not-allowed;
    background: transparent;
}

/* Modal System */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--panel-bg);
    border: 2px solid var(--primary-color);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 30px var(--primary-color);
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background: #000;
    border: 1px solid var(--secondary-color);
    color: var(--primary-color);
    font-family: var(--font-family);
    border-radius: 4px;
}

.game-container {
    display: none; /* hidden until game starts */
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

canvas {
    background: #000;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color);
    width: 100%;
    max-width: 800px;
    height: auto;
    image-rendering: pixelated; /* Retro look */
}

.hud {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 10px;
    font-size: 1.5rem;
    color: var(--primary-color);
    max-width: 800px;
}

.controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.controls button {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .controls { display: none; } /* Hide on desktop */
}

.leaderboard {
    margin-top: 2rem;
    width: 90%;
    max-width: 600px;
    background: var(--panel-bg);
    padding: 1rem;
    border: 1px solid var(--secondary-color);
}
.leaderboard table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}
.leaderboard th, .leaderboard td {
    padding: 8px;
    border-bottom: 1px solid var(--secondary-color);
}
