
body { margin:0; overflow:hidden; font-family: Arial;}
#menu {position: fixed; inset:0; background:#111; display:flex; justify-content:center; align-items:center; gap:40px; z-index:10;}
#menu-title { position:absolute; top:24px; left:50%; transform:translateX(-50%); color:#fff; font-size:64px; font-weight:bold; letter-spacing:2px; text-shadow:0 6px 18px rgba(0,0,0,0.6); }
#menu-character { width:240px; height:360px; background:#1a1a1a; border:2px solid #333; border-radius:16px; box-shadow:0 10px 30px rgba(0,0,0,0.5); display:flex; flex-direction:column; align-items:center; justify-content:space-between; padding:4px; box-sizing:border-box; }
#preview-container { width:100%; height:300px; display:flex; align-items:center; justify-content:center; }
#menu-actions { display:flex; align-items:center; gap:12px; flex-direction:column; }
#saved-world-list { display:flex; flex-direction:column; gap:8px; width:240px; }
.saved-world-card { background:#0f0f0f; border:1px solid #333; border-radius:10px; padding:8px; color:#ddd; font-size:13px; display:flex; flex-direction:column; gap:6px; }
.saved-world-title { font-weight:bold; }
.saved-world-actions { display:flex; gap:8px; }
.saved-world-actions button { font-size:12px; padding:6px 8px; }
#skinBtn { font-size:16px; padding:8px 14px; }
#skin-modal { position: fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,0.8); z-index:40; }
#skin-modal-content { width:560px; height:560px; background:#121212; border:1px solid #333; border-radius:14px; padding:16px; box-sizing:border-box; display:flex; flex-direction:column; gap:12px; }
#skin-preview-wrap { flex:1; background:#0f0f0f; border:1px solid #333; border-radius:10px; display:flex; align-items:center; justify-content:center; }
#skin-controls { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
#color-label { color:#ddd; font-size:14px; }
#colorSelect { background:#222; color:#fff; border:1px solid #444; border-radius:6px; padding:6px 8px; }
#cape-label { color:#ddd; font-size:14px; }
#capeSelect { background:#222; color:#fff; border:1px solid #444; border-radius:6px; padding:6px 8px; }
#hat-label { color:#ddd; font-size:14px; }
#hatSelect { background:#222; color:#fff; border:1px solid #444; border-radius:6px; padding:6px 8px; }
#skinCloseBtn { font-size:12px; padding:6px 10px; }
#world-modal { position: fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,0.8); z-index:45; }
#world-modal-content { width:360px; background:#121212; border:1px solid #333; border-radius:12px; padding:18px; box-sizing:border-box; display:flex; flex-direction:column; gap:10px; }
#world-title { color:#fff; font-size:20px; font-weight:bold; }
#world-label { color:#ddd; font-size:14px; }
#worldNameInput { background:#1a1a1a; color:#fff; border:1px solid #444; border-radius:6px; padding:8px 10px; font-size:14px; }
#world-actions { display:flex; gap:10px; justify-content:flex-end; }
#world-error { color:#ff6b6b; font-size:12px; min-height:16px; }
#worldGenerateBtn, #worldCancelBtn { font-size:14px; padding:6px 10px; }
#keybindBtn { font-size:14px; padding:10px 14px; }
#keybind-modal { position: fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,0.8); z-index:50; }
#keybind-modal-content { width:520px; max-height:80vh; overflow:auto; background:#121212; border:1px solid #333; border-radius:12px; padding:18px; box-sizing:border-box; display:flex; flex-direction:column; gap:10px; color:#ddd; }
#keybind-title { color:#fff; font-size:20px; font-weight:bold; }
#keybind-help { font-size:12px; color:#bbb; }
#keybind-list { display:flex; flex-direction:column; gap:8px; }
.keybind-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 10px; background:#0f0f0f; border:1px solid #333; border-radius:10px; }
.keybind-action { font-size:14px; color:#ddd; }
.keybind-key { font-size:13px; color:#fff; background:#222; border:1px solid #444; border-radius:8px; padding:6px 10px; cursor:pointer; min-width:90px; text-align:center; }
.keybind-key.waiting { background:#3a2a00; border-color:#8a6a00; }
#keybind-status { min-height:16px; font-size:12px; color:#ffcc66; }
#keybind-actions { display:flex; justify-content:flex-end; gap:10px; }
#keybind-reset, #keybind-close { font-size:12px; padding:6px 10px; }
#pause-menu {position: fixed; inset:0; background:rgba(0,0,0,0.85); display:none; flex-direction:column; justify-content:center; align-items:center; gap:16px; z-index:15;}
.pause-title { color:white; font-size:36px; font-weight:bold; }
#death-screen { position: fixed; inset:0; background:rgba(0,0,0,0.9); display:none; flex-direction:column; justify-content:center; align-items:center; gap:20px; z-index:18; }
.death-title { color:#fff; font-size:40px; font-weight:bold; text-align:center; }
.death-hint { color:#cfcfcf; font-size:12px; opacity:0.9; text-align:center; }
.death-actions { display:flex; gap:16px; }
button { font-size:24px; padding:15px 30px; cursor:pointer; }
#money-counter { position: fixed; top:10px; left:10px; color:white; font-size:20px;}
#health-text { position: fixed; bottom:44px; left:50%; transform:translateX(-50%); color:white; font-size:14px; text-align:center; }
#health-bar { position: fixed; bottom:20px; left:50%; transform:translateX(-50%); width:240px; height:20px; background:#555; }
#health-fill { width:100%; height:100%; background:red; }
#tree-progress { position: fixed; top:130px; left:10px; }
#rock-progress { position: fixed; top:190px; left:10px; }
#fish-progress { position: fixed; top:250px; left:10px; }
#eat-progress { position: fixed; top:310px; left:10px; }
.progress-wrap { display:none; color:white; font-size:16px; }
.progress-label { margin-bottom:6px; }
.progress-bar { width:200px; height:12px; background:#333; border:1px solid #555; }
.progress-fill { height:100%; width:0%; background:#00ff7f; }
#inventory { position: fixed; top:50%; left:50%; transform:translate(-50%, -50%); width:700px; height:520px; background:rgba(0,0,0,0.8); color:white; padding:32px; display:none; z-index:30; border-radius:14px; }
#inventory .panel-close { position:absolute; top:12px; right:12px; font-size:12px; padding:6px 10px; }
#info-panel .panel-close { position:absolute; top:12px; right:12px; font-size:12px; padding:6px 10px; }
#campfire-panel .panel-close { position:absolute; top:12px; right:12px; font-size:12px; padding:6px 10px; }
#inventory-divider { position:absolute; left:50%; top:16px; bottom:16px; width:2px; background:#333; transform:translateX(-1px); }
#inventory-right { position:absolute; right:32px; top:32px; width:45%; }
#inventory-right h4 { margin:0 0 10px 0; font-size:16px; }
#inventory-right #craft-campfire, #inventory-right #craft-wall, #inventory-right #craft-floor, #inventory-right #craft-stair, #inventory-right #craft-foundation { font-size:14px; padding:6px 10px; width:200px; box-sizing:border-box; text-align:left; }
#inventory .place-btn { margin-left:8px; font-size:12px; padding:2px 6px; }
#inventory .inv-item, #inventory .craft-btn { position:relative; display:inline-block; }
.icon-fish { width:24px; height:24px; vertical-align:middle; object-fit:contain; }
#inventory .inv-item::after, #inventory .craft-btn::after {
  content: attr(data-label);
  position:absolute;
  left:0;
  top:-28px;
  background:rgba(0,0,0,0.85);
  color:#fff;
  font-size:12px;
  padding:2px 6px;
  border-radius:6px;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:opacity 0.05s linear;
}
#inventory .inv-item:hover::after, #inventory .craft-btn:hover::after { opacity:1; }
#inv-stone-icon { color:#9aa0a6; }
.enemy-health { position:absolute; width:40px; height:5px; background:red; }
#message { position: fixed; top:50%; left:50%; transform: translate(-50%, -50%); color:white; font-size:28px; background:rgba(0,0,0,0.7); padding:10px 20px; border-radius:10px; display:none; z-index:20;}
#hud-hints { position:fixed; top:10px; right:10px; display:flex; flex-direction:column; gap:6px; align-items:flex-end; z-index:40; }
#hud-hints .hud-hint {
  color:#fff;
  font-size:14px;
  background:rgba(0,0,0,0.6);
  border:1px solid #555;
  padding:6px 10px;
  border-radius:8px;
  display:none;
}
#info-panel { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:520px; max-width:90vw; background:rgba(0,0,0,0.85); border:1px solid #555; border-radius:14px; padding:18px; color:#fff; z-index:42; display:none; }
#info-title { font-size:22px; font-weight:bold; margin-bottom:10px; }
#info-text { color:#ddd; font-size:14px; line-height:1.4; }
.info-line { margin-bottom:6px; }
#info-next { margin-top:10px; display:flex; flex-direction:column; gap:6px; }
.info-next-title { color:#fff; font-weight:bold; margin-bottom:2px; }
.info-next-item { background:#0f0f0f; border:1px solid #333; border-radius:10px; padding:8px 10px; color:#ddd; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.info-next-text { flex:1; min-width:0; }
.info-reward { color:#ffcc66; font-weight:bold; white-space:nowrap; }
#hotbar { position: fixed; left:20px; bottom:20px; display:none; gap:8px; z-index:40; }
.hotbar-slot { width:48px; height:48px; border:2px solid #888; border-radius:6px; background:rgba(0,0,0,0.55); display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; }
.hotbar-text { font-size:11px; color:#ddd; text-align:center; }
.hotbar-icon { width:32px; height:32px; stroke:#ddd; fill:none; stroke-width:3; }
.hotbar-icon-img { width:34px; height:34px; object-fit:contain; }
.hotbar-key-hint { position:absolute; top:-16px; left:50%; transform:translateX(-50%); font-size:12px; color:#ddd; letter-spacing:0.04em; text-shadow:0 2px 6px rgba(0,0,0,0.7); pointer-events:none; user-select:none; }
.hotbar-slot-status { position:absolute; bottom:-22px; left:50%; transform:translateX(-50%); font-size:11px; color:#fff; background:rgba(0,0,0,0.7); border-radius:6px; padding:2px 6px; white-space:nowrap; box-shadow:0 2px 6px rgba(0,0,0,0.5); pointer-events:none; user-select:none; transition:background 0.2s,color 0.2s; }
.hotbar-slot-status-active { background:rgba(56,43,10,0.9); color:#ffe082; }
.hotbar-slot-active { border-color:#ffd54f; box-shadow:0 0 10px rgba(255,213,79,0.6); }
.hotbar-food-bg { width:48px; height:48px; object-fit:cover; }
.hotbar-food-icon { position:absolute; width:28px; height:28px; }
.hotbar-food-count { position:absolute; right:2px; bottom:0; font-size:11px; color:#fff; background:rgba(0,0,0,0.7); padding:0 4px; border-radius:6px; line-height:16px; min-width:16px; text-align:center; }
#food-select { position: fixed; left:20px; bottom:90px; width:220px; background:rgba(0,0,0,0.9); border:1px solid #555; border-radius:10px; padding:10px; color:#fff; display:none; z-index:45; }
.food-select-title { font-size:14px; font-weight:bold; margin-bottom:8px; }
.food-select-list { display:flex; flex-direction:column; gap:6px; }
.food-item { display:flex; align-items:center; gap:8px; padding:6px; border:1px solid #444; border-radius:8px; cursor:pointer; background:#111; }
.food-item img { width:24px; height:24px; object-fit:contain; }
.food-item .food-count { margin-left:auto; color:#ddd; }
.food-item.disabled { opacity:0.5; cursor:default; }
#campfire-panel { position: fixed; left:50%; top:50%; transform:translate(-50%,-50%); width:520px; background:rgba(0,0,0,0.85); color:#fff; border:1px solid #555; border-radius:14px; padding:24px; display:none; z-index:22; text-align:center; }
.campfire-title { font-weight:bold; font-size:26px; margin-bottom:10px; }
.campfire-status { font-size:16px; margin-bottom:12px; background:#222; border:1px solid #444; border-radius:8px; padding:8px; }
.campfire-image { font-size:72px; line-height:1; margin:12px auto; padding:12px; background:#111; border:1px solid #333; border-radius:10px; }
.campfire-wood { font-size:15px; background:#222; border:1px solid #444; border-radius:8px; padding:10px; display:flex; align-items:center; justify-content:center; gap:10px; cursor:pointer; }
.campfire-wood-icon { font-size:18px; }
#campfire-wood-select { background:#111; color:#fff; border:1px solid #444; border-radius:6px; padding:4px 6px; }
.campfire-image-wrap { position:relative; display:inline-block; }
.campfire-cook-slot { position:absolute; left:50%; top:-18px; transform:translateX(-50%); width:90px; height:36px; border:2px dashed #555; border-radius:8px; background:#111; }
.campfire-cook-field { font-size:14px; background:#222; border:1px solid #444; border-radius:8px; padding:6px; width:110px; margin:0; }
.campfire-cook-field-right { width:110px; text-align:center; position:absolute; left:100%; margin-left:12px; top:50%; transform:translateY(-50%); }
.campfire-cook-hint { font-size:12px; color:#bbb; margin-top:8px; }
.campfire-cook-menu { display:none; position:absolute; right:24px; top:24px; background:#111; border:1px solid #444; border-radius:8px; padding:8px; z-index:30; min-width:140px; text-align:left; }
.campfire-cook-title { font-size:12px; color:#bbb; margin-bottom:6px; }
.campfire-cook-item { padding:6px 10px; cursor:pointer; border-radius:6px; }
.campfire-cook-item:hover { background:#222; }
.campfire-cook-progress { width:240px; height:10px; margin:8px auto 0; background:#222; border:1px solid #444; border-radius:8px; overflow:hidden; }
.campfire-cook-progress-fill { height:100%; width:0%; background:#ff8c00; }
#stamina-ui { position: fixed; right:10px; bottom:10px; display:none; gap:10px; align-items:flex-end; z-index:40; }
#dash-ui, #sprint-ui { color:white; font-size:14px; background:rgba(0,0,0,0.6); padding:8px 10px; border-radius:8px; width:180px; box-sizing:border-box; }
.stamina-label { font-weight:bold; margin-bottom:6px; }
.stamina-bar { width:100%; height:10px; background:#333; border:1px solid #555; margin-bottom:6px; }
#dash-cooldown-fill { height:100%; width:0%; background:#00d5ff; }
#sprint-fill { height:100%; width:100%; background:#ffd700; }
#sprint-text { font-size:13px; }




