:root {
    --bg-color: #fdf6e3;
    --board-bg: #ffffff;
    --grid-line: #111111;
    --color-1: #ff85a2;
    --color-2: #b5e48c;
    --color-3: #9f86c0;
    --color-4: #f4a261;
    --color-5: #6dd3ce;
    --text-color: #111111;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Dela Gothic One", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body,
html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    overflow: hidden;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    position: relative;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: transparent;
}

/* UI SCORE DI POJOK KIRI ATAS */
#scoreHUD {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.5rem;
    color: var(--text-color);
    z-index: 5;
    pointer-events: none;
    text-shadow: 2px 2px 0px #fff; /* Biar gampang dibaca kalau ketimpa balok */
}

/* OVERLAY GAME OVER */
#gameOverOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(253, 246, 227, 0.95);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.5s ease,
        visibility 0.5s;
    pointer-events: none;
}

#gameOverOverlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#gameOverOverlay h1 {
    font-size: 3rem;
    text-transform: uppercase;
    -webkit-text-stroke: 2px var(--bg-color);
    margin-bottom: 20px;
}

#playAgainButton {
    margin-top: 20px;
    padding: 14px 28px;
    border: none;
    border-radius: 14px;
    background-color: #111;
    color: #fdf6e3;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background-color 0.15s ease;
}

#playAgainButton:hover {
    background-color: #333;
    transform: translateY(-1px);
}
