:root {
    --buddy-body: #d2b48c;
    /* Tan/Wood */
    --buddy-eyes: #4b2c20;
    --primary-red: #e74c3c;
    --primary-blue: #0984e3;
    --accent-gold: #fcc419;
    --bg-room: #f3f4f6;
    --glass-bg: rgba(255, 255, 255, 0.4);
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-room);
    font-family: 'Fredoka', sans-serif;
    user-select: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, #f9fafb 0%, #d1d5db 100%);
}

canvas {
    display: block;
    cursor: crosshair;
}

/* TOP HUD */
#hud-top {
    position: absolute;
    top: 30px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

#coin-box {
    background: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    border: 4px solid var(--accent-gold);
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    color: var(--buddy-eyes);
}

#weapon-display {
    background: var(--buddy-eyes);
    color: #fff;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 700;
}

/* BOTTOM WEAPON BAR */
#weapon-bar {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 15px 30px;
    display: flex;
    gap: 20px;
    z-index: 10;
    border: 3px solid #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.tool-btn {
    background: #fff;
    border: 3px solid #eee;
    padding: 15px 25px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-btn:hover {
    transform: translateY(-10px);
    border-color: var(--primary-red);
}

.tool-btn.active {
    background: var(--buddy-eyes);
    color: #fff;
    border-color: var(--primary-red);
}

.tool-btn.danger:hover {
    background: var(--primary-red);
    color: #fff;
}

/* OVERLAYS */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.menu-box {
    text-align: center;
    padding: 60px;
    background: #fff;
    border-radius: 40px;
    border: 6px solid #4b2c20;
    max-width: 500px;
    width: 90%;
}

.logo {
    font-size: 7rem;
    margin-bottom: 20px;
    animation: wobble 1s infinite alternate;
}

@keyframes wobble {
    from {
        transform: rotate(-5deg);
    }

    to {
        transform: rotate(5deg);
    }
}

.logo-text {
    font-family: 'Oswald', sans-serif;
    font-size: 4rem;
    color: #4b2c20;
    font-weight: 900;
    margin-bottom: 10px;
}

.logo-text span {
    color: #8d6e63;
}

.controls-guide {
    background: #f1f2f6;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    color: #666;
    font-weight: bold;
}

#start-btn {
    background: #4b2c20;
    color: white;
    font-size: 2.5rem;
    padding: 25px 60px;
    border-radius: 30px;
    box-shadow: 0 10px 0 #2d1a10;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Fredoka', sans-serif;
    font-weight: 900;
}

#start-btn:hover {
    background: #5d3a2d;
    transform: translateY(-5px);
    box-shadow: 0 15px 0 #2d1a10;
}

.hidden {
    display: none !important;
}

/* HIT FX */
.impact-text {
    position: absolute;
    pointer-events: none;
    color: var(--primary-red);
    font-weight: 900;
    font-size: 2rem;
    z-index: 50;
    animation: float-out 0.8s ease-out forwards;
}

@keyframes float-out {
    0% {
        transform: translateY(0) scale(1.5);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    #weapon-bar {
        width: 90%;
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 20px;
    }

    .tool-btn {
        padding: 10px 15px;
        font-size: 1rem;
    }
}