body {
    background-color: #050505;
    color: #00ff9d;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.game-container {
    text-align: center;
    position: relative;
}

.canvas-wrapper {
    position: relative; 
    display: inline-block;
}

canvas {
    background-color: #000;
    border: 2px solid #00ff9d;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
    display: block;
}


.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.hidden {
    display: none !important;
}

.overlay h2 {
    color: #ff0055; 
    font-size: 2rem;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px #fff;
}

.btn-restart {
    background: transparent;
    border: 2px solid #00ff9d;
    color: #00ff9d;
    padding: 10px 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
}

.btn-restart:hover {
    background: #00ff9d;
    color: #000;
    box-shadow: 0 0 15px #00ff9d;
}


.hud {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    min-width: 400px;
}

.instruction {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 10px;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 0.7rem;
    color: #888;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dot {
    width: 10px;
    height: 10px;
    display: inline-block;
}

.yellow { background-color: #ffff00; box-shadow: 0 0 5px #ffff00; }
.green { background-color: #00ff9d; box-shadow: 0 0 5px #00ff9d; }