* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'Courier New', monospace;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.panorama-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    z-index: 1;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
}

.menu-container {
    text-align: center;
    background: #222;
    border: 4px solid #3c3c3c;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.9);
    min-width: 320px;
}

.game-title {
    font-size: 2.8rem;
    color: #fff;
    text-shadow: 4px 4px #000;
    margin-bottom: 25px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.minecraft-btn {
    background: #737373;
    color: #fff;
    border: 3px solid;
    border-color: #fff #555 #555 #fff;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 2px 2px #000;
}

.minecraft-btn:hover { background: #858585; }
.danger-btn { background: #992222; }

.settings-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.4);
    padding: 10px;
    color: #fff;
    border: 2px solid #555;
    margin-top: 5px;
}

.minecraft-select {
    background: #444;
    color: #fff;
    border: 2px solid #222;
    padding: 5px;
    font-weight: bold;
}

.loading-box { text-align: center; color: #fff; }
.loading-bar { width: 250px; height: 16px; border: 3px solid #fff; margin-top: 15px; background: #222; }
.loading-progress { width: 100%; height: 100%; background: #55ff55; }

#game-hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px #000;
}

#status-bars {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bar-container { display: flex; align-items: center; gap: 6px; }
.bar-label { color: #fff; font-size: 12px; font-weight: bold; text-shadow: 1px 1px #000; width: 35px; }
.bar-bg { width: 140px; height: 12px; background: rgba(0,0,0,0.6); border: 2px solid #333; }
.bar-fill { height: 100%; width: 100%; }
.hp-fill { background: #ff3333; }
.hunger-fill { background: #cc9933; }

#info-hud {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #fff;
    text-align: right;
    font-size: 13px;
    text-shadow: 1px 1px #000;
    background: rgba(0,0,0,0.5);
    padding: 6px 10px;
    border: 2px solid #444;
}

#inv-open-btn {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
    background: #737373;
    color: #fff;
    border: 2px solid;
    border-color: #fff #555 #555 #fff;
    padding: 6px 18px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 1px 1px #000;
}

#hotbar-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
}

#hotbar {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.7);
    padding: 6px;
    border: 3px solid #3a3a3a;
}

.hotbar-slot {
    width: 48px;
    height: 48px;
    background: rgba(130, 130, 130, 0.4);
    border: 2px solid;
    border-color: #222 #888 #888 #222;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.hotbar-slot.active {
    border-color: #fff;
    background: rgba(200, 200, 200, 0.5);
    transform: scale(1.05);
}

.item-count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px #000;
}

#mobile-controls {
    position: absolute;
    bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.dpad {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dpad-middle { display: flex; gap: 60px; }

.dpad-btn, .action-btn {
    width: 55px;
    height: 55px;
    background: rgba(100, 100, 100, 0.6);
    color: #fff;
    border: 3px solid;
    border-color: #ccc #444 #444 #ccc;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-shadow: 1px 1px #000;
}

#action-btns { pointer-events: auto; display: flex; gap: 10px; align-items: flex-end; }
.action-btn { width: 60px; height: 60px; }

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #c6c6c6;
    border: 4px solid #373737;
    width: 90%;
    max-width: 440px;
    padding: 15px;
    color: #222;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #888;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.close-btn {
    background: #992222;
    color: #fff;
    border: 2px solid #550000;
    width: 28px;
    height: 28px;
    font-weight: bold;
    cursor: pointer;
}

.crafting-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #8b8b8b;
    padding: 12px;
    border: 2px inset #555;
}

.craft-grid {
    display: grid;
    grid-template-columns: repeat(3, 36px);
    grid-template-rows: repeat(3, 36px);
    gap: 2px;
}

.craft-slot, .craft-output-slot, .inv-slot {
    background: #8b8b8b;
    border: 2px solid;
    border-color: #373737 #fff #fff #373737;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.craft-output-slot { width: 45px; height: 45px; background: #9e9e9e; }
.craft-arrow { font-size: 20px; font-weight: bold; color: #222; }

.inv-grid {
    display: grid;
    grid-template-columns: repeat(6, 40px);
    gap: 4px;
    max-height: 150px;
    overflow-y: auto;
    margin-top: 10px;
}

.inv-item {
    background: #8b8b8b;
    border: 2px solid;
    border-color: #373737 #fff #fff #373737;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    color: #222;
    cursor: pointer;
}
