/* ======================================
   PavCraft - Minecraft Tarzinda CSS
   ====================================== */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* { margin:0; padding:0; box-sizing:border-box; }
body { overflow:hidden; background:#000; font-family:'Press Start 2P','Courier New',monospace; cursor:crosshair; color:#fff; }
#game-canvas { display:block; position:fixed; top:0; left:0; z-index:0; }

/* ===== MC BUTON ===== */
.mc-btn {
  display:block; width:280px; padding:12px 20px; margin:8px auto;
  background:linear-gradient(180deg, #6b6b6b 0%, #4a4a4a 40%, #3a3a3a 60%, #2a2a2a 100%);
  border:3px solid; border-color:#888 #444 #333 #666;
  color:#fff; font-family:'Press Start 2P',monospace; font-size:12px;
  text-align:center; cursor:pointer; text-shadow:2px 2px 0 #222;
  transition:background 0.1s;
}
.mc-btn:hover {
  background:linear-gradient(180deg, #8b8bff 0%, #6a6aee 40%, #5555cc 60%, #4444aa 100%);
  border-color:#aaf #66c #55a #88e;
}
.mc-btn:active { transform:scale(0.97); }

/* ===== OVERLAY ===== */
.overlay {
  position:fixed; top:0; left:0; width:100%; height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  z-index:100; background:rgba(0,0,0,0.75);
}
.overlay h1 { font-size:36px; color:#fff; text-shadow:3px 3px 0 #222; margin-bottom:20px; }
.overlay h2 { font-size:22px; color:#fff; text-shadow:2px 2px 0 #222; margin-bottom:15px; }
.overlay p { font-size:11px; color:#aaa; margin-bottom:15px; }

/* ===== ANA MENU OVERLAY ===== */
.mc-main-menu {
  position:fixed; top:0; left:0; width:100%; height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  z-index:200;
}
.mc-title {
  font-size:48px; color:#fff; text-shadow:4px 4px 0 #3a3a3a, 2px 2px 0 #555;
  margin-bottom:40px; letter-spacing:4px;
}
.mc-subtitle { font-size:10px; color:#ff0; margin-top:-30px; margin-bottom:30px; }
.mc-name-input {
  width:260px; padding:10px 15px; margin-bottom:15px;
  background:#222; border:2px solid #555; color:#fff;
  font-family:'Press Start 2P',monospace; font-size:11px;
  text-align:center;
}
.mc-name-input:focus { outline:none; border-color:#88f; }

/* ===== PAUSE MENU ===== */
.mc-pause-overlay {
  position:fixed; top:0; left:0; width:100%; height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  z-index:150; background:rgba(0,0,0,0.65);
}

/* ===== LOBI ===== */
.mc-lobby {
  position:fixed; top:0; left:0; width:100%; height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  padding-top:40px; z-index:200; background:rgba(0,0,0,0.85);
}
.mc-lobby h2 { font-size:20px; margin-bottom:20px; }
.mc-lobby table { border-collapse:collapse; margin:10px 0; width:80%; max-width:700px; }
.mc-lobby th, .mc-lobby td {
  padding:8px 12px; border:1px solid #555; text-align:center; font-size:10px;
}
.mc-lobby th { background:#333; color:#aaa; }
.mc-lobby td { background:#222; }
.mc-lobby .mc-room-form {
  background:#1a1a1a; border:2px solid #444; padding:20px; margin:15px;
  width:80%; max-width:500px;
}
.mc-lobby input, .mc-lobby select {
  width:100%; padding:8px; margin:5px 0; background:#222; border:1px solid #555;
  color:#fff; font-family:'Press Start 2P',monospace; font-size:10px;
}
.mc-lobby label { font-size:9px; color:#aaa; display:block; margin-top:8px; }

/* ===== AUTH ===== */
.mc-auth {
  position:fixed; top:0; left:0; width:100%; height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  z-index:210; background:rgba(0,0,0,0.9);
}
.mc-auth-form {
  background:#1a1a1a; border:2px solid #555; padding:30px; width:350px;
}
.mc-auth-form input {
  width:100%; padding:8px; margin:6px 0; background:#222; border:1px solid #555;
  color:#fff; font-family:'Press Start 2P',monospace; font-size:10px;
}

/* ===== HUD ===== */
#hud { position:fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:10; }
#hud * { pointer-events:none; }

#top-bar {
  position:absolute; top:8px; left:8px; right:8px;
  display:flex; justify-content:space-between; align-items:center;
  font-size:10px; color:#fff; text-shadow:1px 1px 0 #000;
}
#mode-indicator { font-size:9px; }
#dimension-indicator { font-size:9px; color:#88ff88; }
#coordinates { position:absolute; top:28px; left:8px; font-size:9px; color:#ccc; text-shadow:1px 1px 0 #000; }

/* Saglik ikonlari */
#vitals {
  position:absolute; bottom:60px; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:2px;
}
.icon-row { display:flex; gap:1px; }

/* Stamina */
#stamina-container {
  position:absolute; bottom:52px; left:50%; transform:translateX(-50%);
  width:182px; height:3px; background:rgba(0,0,0,0.5); border-radius:1px;
}
#stamina-bar {
  height:100%; background:linear-gradient(90deg, #FFD700, #FFA500);
  border-radius:1px; transition:width 0.2s;
}

/* XP Bar */
#xp-container {
  position:absolute; bottom:46px; left:50%; transform:translateX(-50%);
  width:182px; height:3px; background:rgba(0,0,0,0.5); border-radius:1px;
}
#xp-bar {
  height:100%; width:0%; background:#44ff44; border-radius:1px;
}

/* Hotbar */
#hotbar {
  position:absolute; bottom:4px; left:50%; transform:translateX(-50%);
  display:flex; gap:2px; padding:2px; background:rgba(0,0,0,0.5); border-radius:3px;
}
.hotbar-slot {
  width:40px; height:40px; background:rgba(50,50,50,0.8);
  border:2px solid #555; border-radius:2px; position:relative;
  display:flex; align-items:center; justify-content:center;
}
.hotbar-slot.selected { border-color:#fff; background:rgba(100,100,100,0.8); }
.slot-icon { width:28px; height:28px; image-rendering:pixelated; }
.slot-count {
  position:absolute; bottom:1px; right:2px; font-size:8px; color:#fff;
  text-shadow:1px 1px 0 #000;
}
.slot-number {
  position:absolute; top:1px; left:2px; font-size:7px; color:#888;
}

/* Esya ismi */
#item-name {
  position:absolute; bottom:50px; left:50%; transform:translateX(-50%);
  font-size:10px; color:#fff; text-shadow:1px 1px 0 #000;
  transition:opacity 0.3s; white-space:nowrap;
}

/* Kirma ilerlemesi */
#break-progress {
  position:absolute; bottom:90px; left:50%; transform:translateX(-50%);
  width:120px; height:6px; background:rgba(0,0,0,0.6); border-radius:3px;
  display:none;
}
#break-progress > div { height:100%; background:#4caf50; border-radius:3px; transition:width 0.1s; }

/* Nisangah */
#crosshair {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  font-size:24px; color:rgba(255,255,255,0.7); font-weight:bold;
  text-shadow:none; line-height:1;
}

/* Hasar overlay */
#damage-overlay {
  position:fixed; top:0; left:0; width:100%; height:100%;
  pointer-events:none; z-index:9; transition:background 0.3s;
}

/* ===== SOHBET ===== */
#chat-container {
  position:fixed; bottom:50px; left:10px; width:350px; z-index:20;
}
#chat-messages {
  max-height:200px; overflow-y:auto; padding:5px;
  scrollbar-width:none;
}
#chat-messages::-webkit-scrollbar { display:none; }
.chat-msg {
  font-size:9px; padding:2px 5px; color:#fff; text-shadow:1px 1px 0 #000;
  background:rgba(0,0,0,0.3); margin:1px 0; border-radius:2px;
}
.chat-msg.system { color:#ff0; }
#chat-input {
  width:100%; padding:6px 10px; background:rgba(0,0,0,0.6);
  border:1px solid #555; color:#fff; font-family:'Press Start 2P',monospace;
  font-size:10px;
}

/* ===== ENVANTER ===== */
#inventory-overlay {
  position:fixed; top:0; left:0; width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,0.6); z-index:50;
}
#inventory-container {
  background:#8b8b8b; border:3px solid; border-color:#c6c6c6 #555 #555 #c6c6c6;
  padding:12px;
}
#crafting-area { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
#crafting-grid { display:grid; grid-template-columns:repeat(3,36px); gap:2px; }
#crafting-arrow { font-size:20px; color:#444; }
#crafting-result { width:40px; height:40px; }
#inventory-grid { display:grid; grid-template-columns:repeat(9,36px); gap:2px; margin-bottom:6px; }
#inventory-hotbar { display:grid; grid-template-columns:repeat(9,36px); gap:2px; }

.inv-slot {
  width:36px; height:36px; background:#555; border:2px solid;
  border-color:#373737 #fff #fff #373737; position:relative;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.inv-slot:hover { background:#666; }
.inv-slot canvas { width:28px; height:28px; image-rendering:pixelated; }
.inv-slot .inv-count {
  position:absolute; bottom:0; right:1px; font-size:8px; color:#fff;
  text-shadow:1px 1px 0 #000;
}

/* ===== FIRIN ===== */
#furnace-overlay {
  position:fixed; top:0; left:0; width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,0.6); z-index:50;
}
#furnace-container {
  background:#8b8b8b; border:3px solid; border-color:#c6c6c6 #555 #555 #c6c6c6;
  padding:20px; display:flex; flex-direction:column; align-items:center; gap:8px;
}
#furnace-input, #furnace-fuel, #furnace-output {
  width:40px; height:40px; background:#555;
  border:2px solid; border-color:#373737 #fff #fff #373737;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
#furnace-progress-bar {
  width:40px; height:6px; background:#333; border-radius:3px;
}
#furnace-progress-bar > div { height:100%; background:#f90; border-radius:3px; }

/* ===== HIDDEN ===== */
.hidden { display:none !important; }
