:root {
    --vh: 1vh;
}

body {
    margin: 0;
    overflow: hidden;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
    background: #111;
    color: #eee
}

#game-world {
    position: relative;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
    background-color: #222;
    overflow: hidden
}

.avatar {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    transition: box-shadow .3s ease, transform .06s linear;
    user-select: none;
    z-index: 10
}

.avatar.glowing {
    box-shadow: 0 0 15px 5px #00ffff;
    animation: glowPulse 2.4s ease-in-out infinite
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 10px 3px rgba(0, 255, 255, .7)
    }

    50% {
        box-shadow: 0 0 22px 9px rgba(0, 255, 255, .95)
    }

    100% {
        box-shadow: 0 0 10px 3px rgba(0, 255, 255, .7)
    }
}

.avatar.already-booped {
    opacity: .5;
    cursor: not-allowed;
    filter: saturate(.6)
}

.avatar.deny-flash {
    animation: denyFlash .3s ease
}

@keyframes denyFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, .0)
    }

    50% {
        box-shadow: 0 0 12px 6px rgba(255, 0, 0, .6)
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, .0)
    }
}

.background-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    opacity: .20;
    font-weight: 700;
    letter-spacing: .05em;
    z-index: 0
}

.background-title h1 {
    margin: 0;
    font-size: 12vw;
    line-height: .9;
    background: linear-gradient(90deg, #0ff, #06f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: blur(.5px);
}

.background-title p {
    margin: .5rem 0 0;
    font-size: 2.4vw;
    font-weight: 500;
    color: #0ff;
    opacity: .5
}

#stats-box {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, .55);
    border: 1px solid #0ff;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    backdrop-filter: blur(6px);
    min-width: 180px;
    box-shadow: 0 0 12px rgba(0, 255, 255, .25);
    z-index: 1
}

#stats-box .stat {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
}

#stats-box .label {
    opacity: .75;
    font-weight: 500;
}

#stats-box .value {
    font-weight: 600;
    color: #0ff;
}

/* Profile section inside stats box */
#stats-box #profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(0, 255, 255, .35)
}

#stats-box #profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 255, 255, .25);
    background: #000;
    object-fit: cover
}

#stats-box .profile-meta {
    display: flex;
    flex-direction: column;
}

#stats-box .profile-name {
    font-weight: 700;
    letter-spacing: .02em
}

.avatar.already-booped {
    opacity: .5;
    cursor: not-allowed;
    filter: saturate(.6)
}

.avatar.deny-flash {
    animation: denyFlash .3s ease
}

@keyframes denyFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, .0)
    }

    50% {
        box-shadow: 0 0 12px 6px rgba(255, 0, 0, .6)
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, .0)
    }
}

/* Boop log */
#boop-log {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
    pointer-events: none;
    z-index: 1
}

.boop-entry {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, .4);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.2;
    border: 1px solid rgba(0, 255, 255, .25);
    backdrop-filter: blur(4px);
    animation: fadeIn .25s ease;
}

.boop-entry img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 6px rgba(0, 255, 255, .35);
    background: #000;
}

.boop-arrow {
    font-size: 16px;
    filter: drop-shadow(0 0 4px rgba(0, 255, 255, .5));
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.boop-entry.fade-out {
    opacity: 0;
    transition: opacity .4s ease;
}

/* Mobile: make the large background title constrained so it doesn't overflow */
@media (max-width: 864px) {
    .background-title {
        width: 80%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    /* Slightly reduce the oversized heading on smaller screens to keep it readable */
    .background-title h1 {
        font-size: 24vw
    }
    .background-title p {
        font-size: 5.5vw
    }
}