* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: gilroy, sans-serif;
}

html,
body {
    height: 100vh;
    width: 100%;
    background-color: rgb(15, 162, 15);
}

.playground {
    min-height: 100vh;
    width: 100%;
    background-image: repeating-linear-gradient(
        90deg,
        #2f8b2f 0,
        #2f8b2f 5vw,
        #3bb43b 5vw,
        #3bb43b 10vw
    );
    position: relative;
    overflow: hidden;
}

.hud {
    position: fixed;
    left: 18px;
    top: 18px;
    z-index: 20;
}

.goal-counter {
    min-width: 112px;
    padding: 10px 14px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    background: rgba(15, 68, 18, 0.72);
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.goal-counter__label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

#score-value {
    display: inline-block;
    transform-origin: center;
    min-width: 2ch;
    text-align: right;
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
}

.goal-wrapper {
    position: fixed;
    right: -72px;
    top: 50%;
    transform: translate(0, -50%);
    width: 296px;
    height: 360px;
    pointer-events: none;
    z-index: 5;
}

#goal-post {
    width: 296px;
    height: 360px;
    display: block;
}

#goal-hitboxes {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#goal-hitboxes.debug-visible {
    background-color: rgba(0, 255, 255, 0.12);
}

#goal-hitboxes.debug-visible .pole,
#goal-hitboxes.debug-visible .crossbar,
#goal-hitboxes.debug-visible .goal-entry {
    opacity: 0.45;
}

.pole,
.crossbar,
.goal-entry {
    position: absolute;
    opacity: 0;
}

#goal-hitboxes.debug-visible #bottom-block {
    background: rgba(192, 75, 184, 0.85);
}

#goal-hitboxes.debug-visible #pole-right {
    background: rgba(255, 226, 231, 0.85);
}

#goal-hitboxes.debug-visible #crossbar {
    background: rgba(17, 66, 3, 0.85);
}

#goal-hitboxes.debug-visible #goal-entry {
    background: rgba(78, 19, 173, 0.55);
}

#goal-flash {
    position: absolute;
    left: 11%;
    top: 16%;
    width: 72%;
    height: 76%;
    border-radius: 6px;
    background: radial-gradient(circle, rgba(255, 255, 180, 0.9) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    pointer-events: none;
}

#goal-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 15;
}

.goal-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 200, 0.9);
}

#ball {
    position: absolute;
    height: 48px;
    cursor: grab;
    z-index: 10;
    transform-origin: center center;
}

#ball:active {
    cursor: grabbing;
}

#sling-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 8;
}
