@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;900&display=swap');

:root {
    --red-team: #ef5350;
    --blue-team: #42a5f5;
    --iron: #bdc3c7;
    --gold: #ffd700;
    --emerald: #2ecc71;
    --bg-dark: #1a1b1e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    background-color: #000;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

canvas {
    display: block;
}

/* CROSSHAIR */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 2rem;
    pointer-events: none;
    z-index: 10;
    font-weight: 300;
    opacity: 0.8;
}

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

.menu-box {
    background: var(--bg-dark);
    padding: 60px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.menu-box h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--red-team), var(--blue-team));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-box p {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 30px;
}

.menu-box button {
    padding: 18px 50px;
    font-size: 1.5rem;
    font-weight: 700;
    background: white;
    color: black;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-box button:hover {
    transform: scale(1.1);
    background: var(--red-team);
    color: white;
}

.controls-info {
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 20px;
    font-size: 1rem;
    line-height: 1.8;
    margin: 20px 0;
    color: #ddd;
}

/* HUD (Minecraft Style Inspired) */
#hud {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 280px;
    background: rgba(20, 20, 25, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 50;
    color: #fff;
    pointer-events: none;
}

.team-badge {
    color: var(--red-team);
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

#hp-bar-container {
    height: 12px;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    margin: 15px 0;
}

#hp-bar-fill {
    width: 100%;
    height: 100%;
    background: var(--red-team);
    transition: width 0.3s;
}

.resource-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.res-item {
    font-size: 0.95rem;
    color: #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.block-status {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bed-status {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.bed-status.active {
    color: #2ecc71;
}

.bed-status.destroyed {
    color: #e74c3c;
}

/* Hotbar (Fixed at bottom) */
.hotbar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slot {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    transition: 0.2s;
}

.slot.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-5px);
}

.hidden {
    display: none !important;
}

#msg {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #888;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}