:root {
    --bg-color: #050505;
    --grid-color: #1a1a1a;
    --primary-color: #00ff88;
    /* Neon Green */
    --secondary-color: #00ccff;
    /* Neon Blue */
    --accent-color: #ff0055;
    /* Neon Red */
    --text-color: #ffffff;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(5, 5, 5, 0.95);
    z-index: 10;
    transition: opacity 0.3s ease;
}

.screen.active {
    display: flex;
}

.title {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 4px;
}

.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 300px;
}

label {
    font-family: var(--font-display);
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--secondary-color);
    color: var(--text-color);
    font-family: var(--font-display);
    font-size: 1.2rem;
    text-align: center;
    border-radius: 5px;
    outline: none;
    transition: box-shadow 0.3s ease;
}

input[type="text"]:focus {
    box-shadow: 0 0 15px var(--secondary-color);
}

input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 0 10px var(--primary-color);
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--grid-color);
    border-radius: 2px;
    border: 1px solid var(--secondary-color);
}

#difficulty-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.btn {
    padding: 15px 40px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--primary-color);
}

.btn.secondary {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    font-size: 1rem;
    padding: 10px 30px;
}

.btn.secondary:hover {
    background: var(--secondary-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--secondary-color);
}

#game-screen {
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.hud {
    position: absolute;
    top: 20px;
    width: 600px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-color);
    z-index: 20;
}

.hud-item span {
    color: var(--primary-color);
}

canvas {
    border: 2px solid var(--grid-color);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    background-color: rgba(0, 0, 0, 0.8);
}

.stats {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.stats p {
    margin: 10px 0;
}

.leaderboard-list {
    width: 80%;
    max-width: 500px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 2rem;
    border: 1px solid var(--grid-color);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-body);
    font-size: 1.1rem;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item .rank {
    color: var(--secondary-color);
    width: 30px;
}

.leaderboard-item .name {
    flex-grow: 1;
    text-align: left;
    padding-left: 10px;
}

.leaderboard-item .score {
    color: var(--primary-color);
    width: 80px;
    text-align: right;
}

.leaderboard-item .time {
    color: var(--text-color);
    width: 80px;
    text-align: right;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--grid-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}