body {
    margin: 0;
    overflow: hidden;
    background-color: #0d0d12;
    font-family: 'Courier New', Courier, monospace;
    color: #fff;
    user-select: none;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: auto;
    transition: opacity 0.3s;
}

.overlay-content {
    text-align: center;
}

.pulse-text {
    font-size: 24px;
    color: #4df8ff;
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 5px;
    animation: pulse-glow 2s infinite;
}

.hint {
    font-size: 14px;
    color: #888;
}

@keyframes pulse-glow {
    0% { opacity: 0.6; text-shadow: 0 0 5px #4df8ff; }
    50% { opacity: 1; text-shadow: 0 0 20px #4df8ff; }
    100% { opacity: 0.6; text-shadow: 0 0 5px #4df8ff; }
}

#hud {
    padding: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

h1 {
    margin: 0;
    color: #4df8ff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 24px;
}

#stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,255,100,0.1);
    border: 1px solid rgba(0,255,100,0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #00ff66;
    margin-top: 5px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #00ff66;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff66;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.6; }
    100% { transform: scale(0.9); opacity: 1; }
}

#timer {
    font-size: 32px;
    font-weight: bold;
    margin-top: 10px;
    color: #fff;
}

#charge-bar-container {
    width: 200px;
    height: 10px;
    background: rgba(255,255,255,0.2);
    margin-top: 15px;
    border: 1px solid #4df8ff;
    border-radius: 5px;
    overflow: hidden;
}

#charge-bar {
    width: 0%;
    height: 100%;
    background: #4df8ff;
    transition: width 0.05s linear;
}

.instructions {
    margin-top: 10px;
    font-size: 14px;
    color: #aaa;
}

#leaderboard-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(10, 10, 15, 0.85);
    border: 1px solid #4df8ff;
    padding: 15px;
    width: 280px;
    pointer-events: auto;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

#leaderboard-panel h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(77, 248, 255, 0.3);
    padding-bottom: 5px;
    color: #4df8ff;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 12px;
}

#leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

#leaderboard-list li {
    font-size: 14px;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hidden {
    display: none !important;
}

#end-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.9);
    border: 2px solid #4df8ff;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    pointer-events: auto;
    box-shadow: 0 0 30px rgba(77, 248, 255, 0.2);
}

#end-screen h2 {
    color: #fff;
    margin-top: 0;
    font-size: 32px;
}

#final-time {
    font-size: 48px;
    color: #4df8ff;
    margin: 20px 0;
}

button {
    background: #4df8ff;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin: 5px;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.2s;
}

button:hover {
    background: #fff;
    box-shadow: 0 0 15px #4df8ff;
}

#player-name {
    display: block;
    margin: 0 auto 20px auto;
    padding: 10px;
    font-size: 16px;
    background: rgba(0,0,0,0.5);
    border: 1px solid #4df8ff;
    color: #4df8ff;
    text-align: center;
    border-radius: 4px;
    outline: none;
    font-family: inherit;
}
#player-name:focus {
    box-shadow: 0 0 10px rgba(77, 248, 255, 0.5);
}
