/* ===================== 🧱 Τουβλόκοσμος ===================== */
.cr-wrap { position: absolute; inset: 0; background: #87c1fa; overflow: hidden; }
.cr-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.cr-wrap.playing, .cr-wrap.playing .cr-canvas { cursor: none; }
.cr-water { position: absolute; inset: 0; background: rgba(20, 70, 170, .35); pointer-events: none; }
.cr-hurt { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; background: radial-gradient(ellipse at center, rgba(229,57,53,0) 40%, rgba(229,57,53,.55) 100%); }
.cr-hurt.show { opacity: 1; transition: none; }
.cr-sleep { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s; background: #05061a; z-index: 3; }
.cr-sleep.show { opacity: 1; }
.cr-sleep.red { background: #3a0a0a; transition: opacity .5s; }

/* ---- HUD (δεν πιάνει το ποντίκι) ---- */
.cr-hud { position: absolute; inset: 0; pointer-events: none; font-weight: 700; transition: opacity .2s; }
.cr-wrap:not(.playing) .cr-hud > :not(.cr-toast) { opacity: .45; }
.cr-cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); mix-blend-mode: difference; }
.cr-cross::before, .cr-cross::after { content: ''; position: absolute; background: #fff; }
.cr-cross::before { left: 50%; top: 0; width: 3px; height: 100%; transform: translateX(-50%); }
.cr-cross::after { top: 50%; left: 0; height: 3px; width: 100%; transform: translateY(-50%); }
.cr-target {
  position: absolute; left: 50%; top: calc(50% + 22px); transform: translateX(-50%);
  color: #fff; font-size: 17px; text-shadow: 0 1px 0 #000, 0 0 8px rgba(0,0,0,.6); white-space: nowrap;
}
.cr-target:empty { display: none; }
.cr-break { position: absolute; left: 50%; top: calc(50% + 48px); transform: translateX(-50%); width: 120px; height: 10px; border-radius: 6px; background: rgba(0,0,0,.5); box-shadow: 0 0 0 2px rgba(255,255,255,.6); overflow: hidden; }
.cr-break i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd54f, #ff8f00); }
.cr-info {
  position: absolute; left: 14px; top: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  font-family: 'Consolas', 'Courier New', monospace; font-size: 17px; color: #fff; text-shadow: 0 1px 0 #000, 0 0 6px rgba(0,0,0,.5);
}
.cr-info span { background: rgba(0,0,0,.42); padding: 3px 10px; border-radius: 10px; }
.cr-fly { color: #ffe082; }
.cr-mission {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); max-width: min(46%, 460px); display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.5); color: #fff; border-radius: 16px; padding: 7px 12px; font-size: 16px; line-height: 1.2;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.cr-mission .e { font-size: 24px; flex: none; }
.cr-mission .t { flex: 1; }
.cr-mission .p { flex: none; background: #ffb300; color: #3e2723; border-radius: 10px; padding: 2px 8px; font-size: 14px; }
.cr-mission .k { flex: none; border: 2px solid rgba(255,255,255,.6); border-radius: 6px; padding: 0 6px; font-size: 13px; opacity: .8; }
.cr-mapbox { position: absolute; right: 14px; top: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cr-map { width: 150px; height: 150px; border-radius: 14px; box-shadow: 0 0 0 3px rgba(255,255,255,.75), 0 6px 16px rgba(0,0,0,.35); image-rendering: pixelated; background: #0d1145; }
.cr-mapbox.big .cr-map { width: 260px; height: 260px; }
.cr-clock { background: rgba(0,0,0,.5); color: #fff; border-radius: 12px; padding: 3px 12px; font-size: 15px; text-shadow: 0 1px 0 #000; white-space: nowrap; }
.cr-hearts { position: absolute; left: 50%; bottom: 82px; transform: translateX(-50%); display: flex; gap: 1px; font-size: 20px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.cr-hotbar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 4px; background: rgba(0,0,0,.45); padding: 5px; border-radius: 14px; }
.cr-slot {
  position: relative; width: 54px; height: 54px; border-radius: 8px; background: rgba(255,255,255,.14);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); display: flex; align-items: center; justify-content: center;
}
.cr-slot i { width: 40px; height: 40px; background-size: cover; image-rendering: pixelated; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.cr-slot span { position: absolute; left: 4px; top: 1px; font-size: 11px; color: #fff; text-shadow: 0 1px 0 #000; }
.cr-slot b { position: absolute; right: 3px; bottom: 1px; font-size: 13px; color: #fff; text-shadow: 0 1px 0 #000, 0 0 4px #000; }
.cr-slot.empty i { opacity: .35; filter: grayscale(1); }
.cr-slot.sel { background: rgba(255,255,255,.35); box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px #ffb300; transform: scale(1.1); }
.cr-toast {
  position: absolute; left: 50%; bottom: 84px; transform: translate(-50%, 10px); opacity: 0; transition: opacity .2s, transform .2s;
  background: rgba(0,0,0,.6); color: #fff; border-radius: 14px; padding: 6px 16px; font-size: 19px; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis;
}
.cr-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Παύση / οδηγίες ---- */
.cr-pause { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(20, 30, 60, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); overflow: auto; padding: 12px; }
.cr-pause-box {
  background: linear-gradient(180deg, #fff, #f3f6ff); border-radius: 30px; padding: 18px 26px 22px; text-align: center; max-width: 720px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.35), inset 0 0 0 3px #fff;
}
.cr-pause-box h2 { margin: 0 0 6px; font-size: 32px; color: #6d4c41; }
.cr-modes { display: flex; gap: 10px; justify-content: center; margin: 4px 0 8px; }
.cr-mode { flex: 1; max-width: 300px; font-family: inherit; border: 3px solid #cfd8dc; background: #fff; border-radius: 16px; padding: 8px 12px; cursor: pointer; text-align: left; transition: transform .1s; }
.cr-mode b { display: block; font-size: 18px; color: #37474f; }
.cr-mode small { display: block; font-size: 13px; color: #607d8b; font-weight: 600; line-height: 1.2; }
.cr-mode:hover { transform: scale(1.03); }
.cr-mode.sel { border-color: #ffb300; background: #fff8e1; box-shadow: 0 3px 0 #ffb300; }
.cr-loading { font-size: 20px; color: #607d8b; font-weight: 600; }
.cr-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; margin: 8px 0 14px; text-align: left; }
.cr-keys div { background: #fff8e1; border-radius: 12px; padding: 7px 10px; font-size: 14px; color: #5d4037; line-height: 1.25; }
.cr-keys b { display: block; color: #37474f; font-size: 15px; }
.cr-pause-btns { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cr-play { font-size: 28px; padding: 12px 40px; }
.cr-pause-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cr-pause-tools .tool-btn { font-size: 16px; }

/* ---- Πάνελ: σακίδιο (θέσεις, πλέγμα κατασκευών, βιβλίο συνταγών) & αποστολές ---- */
.cr-panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(94%, 860px); max-height: 94%;
  background: linear-gradient(180deg, #fff, #f3f6ff); border-radius: 26px; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4), inset 0 0 0 3px #fff; user-select: none;
}
.cr-panel-head { display: flex; align-items: center; gap: 12px; }
.cr-panel-head h3 { margin: 0; font-size: 22px; color: #6d4c41; white-space: nowrap; }
.cr-panel-head span { flex: 1; font-size: 14px; font-weight: 600; color: #607d8b; line-height: 1.2; }
.cr-panel-head .tool-btn { font-size: 15px; }
.cr-inv-body { display: flex; gap: 14px; min-height: 0; flex: 1; }
.cr-inv-left { display: flex; flex-direction: column; gap: 10px; align-items: center; flex: 1; min-width: 0; min-height: 0; }
.cr-creative-grid { display: grid; grid-template-columns: repeat(auto-fill, 46px); justify-content: center; gap: 5px; overflow-y: auto; padding: 4px; max-height: 340px; width: 100%; }
.cr-item {
  position: relative; width: 46px; height: 46px; border-radius: 8px; border: 3px solid #fff; background-size: cover; image-rendering: pixelated;
  box-shadow: 0 0 0 2px #cfd8dc, 0 3px 6px rgba(0,0,0,.2); cursor: pointer; padding: 0; transition: transform .1s;
}
.cr-item:hover { transform: scale(1.15); box-shadow: 0 0 0 3px #ffb300, 0 6px 12px rgba(0,0,0,.25); z-index: 1; }
/* Θέσεις (slots) όπως στο Minecraft */
.cr-s { position: relative; width: 48px; height: 48px; border-radius: 6px; background: #8d8d8d; box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cr-s:hover { background: #a8a8a8; }
.cr-s.sel { box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff, 0 0 0 3px #ffb300; }
.cr-s i { width: 36px; height: 36px; background-size: cover; image-rendering: pixelated; border-radius: 3px; pointer-events: none; }
.cr-s b { position: absolute; right: 3px; bottom: 1px; font-size: 14px; color: #fff; text-shadow: 0 1px 0 #000, 0 0 4px #000; pointer-events: none; }
.cr-craftarea { display: flex; align-items: center; gap: 14px; background: #c6c6c6; border-radius: 12px; padding: 12px 18px; box-shadow: inset 0 0 0 3px #fff, 0 4px 0 #8d8d8d; }
.cr-grid { display: grid; gap: 4px; }
.cr-arrow { font-size: 30px; color: #37474f; }
.cr-out { width: 56px; height: 56px; }
.cr-out.ready { box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff, 0 0 0 3px #66bb6a; animation: cr-glow 1s infinite alternate; }
@keyframes cr-glow { to { box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff, 0 0 0 5px #ffd54f; } }
.cr-slots { display: grid; grid-template-columns: repeat(9, 48px); gap: 4px; background: #c6c6c6; padding: 8px; border-radius: 10px; box-shadow: inset 0 0 0 3px #fff; }
.cr-hotslots { display: grid; grid-template-columns: repeat(9, 48px); gap: 4px; background: #c6c6c6; padding: 8px; border-radius: 10px; box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px #ffb300; }
.cr-cursor { position: absolute; z-index: 30; pointer-events: none; transform: translate(-50%, -50%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.cr-cursor i { width: 40px; height: 40px; background-size: cover; image-rendering: pixelated; border-radius: 4px; }
.cr-cursor b { position: absolute; right: 0; bottom: -2px; font-size: 15px; color: #fff; text-shadow: 0 1px 0 #000, 0 0 4px #000; }
/* Βιβλίο συνταγών */
.cr-book { width: 300px; flex: none; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.cr-book-head { font-weight: 700; color: #6d4c41; font-size: 16px; }
.cr-book-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; max-height: 420px; padding: 2px; }
.cr-rb { display: flex; align-items: center; gap: 6px; font-family: inherit; text-align: left; border: 2px solid #e0e0e0; background: #fff8e1; border-radius: 10px; padding: 4px 8px; cursor: pointer; transition: transform .1s; }
.cr-rb:hover { transform: scale(1.03); border-color: #ffb300; }
.cr-rb.no { background: #f5f5f5; opacity: .6; }
.cr-pat { display: grid; grid-template-columns: repeat(3, 14px); gap: 1px; background: #b0bec5; padding: 2px; border-radius: 4px; flex: none; }
.cr-pat i { width: 14px; height: 14px; background: #eceff1; background-size: cover; image-rendering: pixelated; display: block; }
.cr-rb-arrow { color: #8d6e63; font-size: 16px; }
.cr-rb-out { width: 28px; height: 28px; background-size: cover; image-rendering: pixelated; border-radius: 4px; flex: none; box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(0,0,0,.2); }
.cr-rb-name { font-size: 13px; font-weight: 700; color: #37474f; line-height: 1.15; }
.cr-missions-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding: 2px; }
.cr-m { display: flex; align-items: center; gap: 12px; background: #fff8e1; border-radius: 14px; padding: 8px 12px; }
.cr-m.done { background: #e8f5e9; }
.cr-m .e { font-size: 30px; flex: none; }
.cr-m .b { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cr-m b { font-size: 17px; color: #37474f; }
.cr-m.done b { text-decoration: line-through; color: #78909c; }
.cr-m small { font-size: 13px; color: #607d8b; font-weight: 600; line-height: 1.25; }
.cr-m .bar { display: block; height: 8px; border-radius: 4px; background: #eceff1; overflow: hidden; margin-top: 2px; }
.cr-m .bar i { display: block; height: 100%; background: linear-gradient(90deg, #66bb6a, #9ccc65); }
.cr-m .s { flex: none; font-size: 20px; font-weight: 700; color: #6d4c41; min-width: 40px; text-align: center; }

/* ---- Κάρτα στο μενού ---- */
.craft-card .big { background: radial-gradient(circle at 35% 30%, #fff, #d7ccc8); }

@media (max-width: 900px) {
  .cr-keys { grid-template-columns: repeat(2, 1fr); }
  .cr-slot { width: 44px; height: 44px; } .cr-slot i { width: 32px; height: 32px; }
  .cr-mission { font-size: 14px; max-width: 40%; }
  .cr-map { width: 100px; height: 100px; }
  .cr-inv-body { flex-direction: column; }
  .cr-book { width: 100%; } .cr-book-list { max-height: 160px; }
  .cr-s { width: 36px; height: 36px; } .cr-s i { width: 28px; height: 28px; } .cr-slots, .cr-hotslots { grid-template-columns: repeat(9, 36px); }
  .cr-modes { flex-direction: column; align-items: center; }
}
