body {
    margin: 0;
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    background-color: rgb(50, 50, 50);
    color: antiquewhite;
    height: 100vh;
}

canvas {
    width: 600px;
    height: 600px;
    background-color: rgb(70, 70, 70);
}

#title {
    font-family: "Iceberg";
    font-size: 48pt;
    color: coral;
}

#desc {
    display: flex;
    gap: 40px;
    font-family: "Iceberg";
    color: coral;
}

#gameWrapper {
    position: relative;
    width: 600px;
    margin: 0 auto;
    display: block;
}

#endGameMenu {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    gap: 20px;
    z-index: 100;
}

#endGameMenu button {
    font-family: 'Iceberg';
    font-size: 20px;
    padding: 8px 20px;
    cursor: pointer;
    background: transparent;
    border: 2px solid;
    border-radius: 5px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

#restartBtn {
    color: orangered;
    border-color: orangered;
}

#restartBtn:hover {
    background: orangered;
    color: white;
}

#nextLevelBtn {
    color: rgb(1, 187, 1);
    border-color: rgb(1, 187, 1);
}

#nextLevelBtn:hover {
    background: rgb(1, 187, 1);
    color: white;
}

#gameArea {
    position: relative;
}

#colorLegend {
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 140px;
    background: rgb(60, 60, 60);
    border-radius: 8px;
    padding: 16px;
    font-family: "Iceberg";
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#legendTitle {
    margin: 0 0 14px 0;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 3px;
    text-align: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legend-item:last-child {
    border-bottom: none;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-text {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.legend-text span {
    font-size: 24px;
    margin-left: 3px;
    color: white;
    font-weight: bold;
}

.legend-empty {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.25);
    text-align: center;
    padding: 10px 0;
}