/* ==========================================================================
   MU Online Solo Classic - Stylesheet (Modern Strict Theme)
   ========================================================================== */

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

/* === Base Layout & Resets === */
body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #08090d;
  color: #f1f5f9;
}

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

#status, #log {
  display: none;
}

pre {
  white-space: pre-wrap;
}

/* === Game Canvas === */
canvas#canvas {
  background: #000;
  position: fixed;
  left: 0;
  top: 0 !important;
  width: 100%;
  height: 100% !important;
  z-index: 2;
  outline: none;
  border: 0;
  cursor: none;
}

canvas#canvas:focus,
canvas#canvas:focus-visible {
  outline: none !important;
}

/* ==========================================================================
   40px Top Control Bar & Game Header
   ========================================================================== */

header.mu-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: rgba(10, 12, 18, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 99;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

.mu-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mu-brand-box {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mu-brand-title {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.1px;
  background: linear-gradient(135deg, #ffffff 20%, #e2e8f0 60%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.mu-brand-sep {
  color: rgba(255, 255, 255, 0.2);
  font-weight: 400;
  font-size: 12px;
}

.mu-brand-desc {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.8px;
  color: #717d96;
}

/* Server Realm Mode Badge */
.mu-realm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  cursor: default;
}

.mu-realm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: relative;
}

.realm-easy {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}
.realm-easy .mu-realm-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.realm-medium {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.realm-medium .mu-realm-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.realm-hard {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.realm-hard .mu-realm-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.realm-fun-easy {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
}
.realm-fun-easy .mu-realm-dot {
  background: #a855f7;
  box-shadow: 0 0 8px #a855f7;
}

.realm-fun-medium {
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.45);
  color: #f472b6;
}
.realm-fun-medium .mu-realm-dot {
  background: #ec4899;
  box-shadow: 0 0 8px #ec4899;
}

.realm-fun-hard {
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fb7185;
}
.realm-fun-hard .mu-realm-dot {
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

/* Right Controls */
.mu-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mu-top-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 3px;
}

.mu-top-btn {
  height: 28px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-family: 'Outfit', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  outline: none;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  text-decoration: none;
}

.mu-top-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}

.mu-top-btn:active {
  transform: translateY(0);
}

.mu-btn-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Auto Attack Toggle Button */
.mu-btn-auto {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
}

.mu-btn-auto:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fef08a;
}

.mu-btn-auto.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.85), rgba(220, 38, 38, 0.95));
  border-color: #f87171;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.55);
  animation: mu-pulse-glow 1.6s infinite ease-in-out;
}

@keyframes mu-pulse-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
    border-color: #f87171;
  }
  50% {
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.85);
    border-color: #fca5a5;
  }
}

/* Real Server External Link Button */
.mu-btn-real-server {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.32);
  color: #38bdf8;
  text-decoration: none;
}

.mu-btn-real-server:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.65);
  color: #f0f9ff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.mu-btn-real-server:active {
  transform: translateY(0);
}

.mu-btn-icon-ext {
  width: 11px;
  height: 11px;
  opacity: 0.65;
  flex-shrink: 0;
  margin-left: 1px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.mu-btn-real-server:hover .mu-btn-icon-ext {
  opacity: 1;
  transform: translate(1px, -1px);
}

/* Support Donatello Button */
.mu-btn-support {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fb7185;
  text-decoration: none;
}

.mu-btn-support:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(244, 63, 94, 0.7);
  color: #fff1f2;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.4);
  transform: translateY(-1px);
}

.mu-btn-support:active {
  transform: translateY(0);
}

.mu-btn-support .mu-icon-heart {
  color: #f43f5e;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mu-btn-support:hover .mu-icon-heart {
  color: #fb7185;
  transform: scale(1.2);
}

.mu-btn-support:hover .mu-btn-icon-ext {
  opacity: 1;
  transform: translate(1px, -1px);
}

/* Floating Toast Notification */
.mu-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  padding: 10px 20px;
  color: #f8fafc;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  white-space: nowrap;
}

.mu-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive adjustments for top bar */
@media (max-width: 1080px) {
  .mu-brand-desc,
  .mu-brand-sep {
    display: none;
  }
  .mu-topbar-left {
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .mu-brand-desc {
    display: none;
  }
  .mu-brand-sep {
    display: none;
  }
  .mu-btn-text {
    display: none;
  }
  .mu-btn-icon-ext {
    display: none;
  }
  .mu-top-btn {
    padding: 0 8px;
  }
}

@media (max-width: 480px) {
  .mu-realm-badge,
  .mu-topbar-left .mu-top-sep {
    display: none;
  }
}

/* === Mobile / Touch Virtual Controls === */
#muKeyBtn, #muKeys, #muStick, #muRBtn {
  display: none;
}

@media (pointer: coarse), (max-width: 900px) {
  #muKeyBtn { display: flex; }
  #muStick { display: block; }
  #muRBtn { display: flex; }
}

#muKeyBtn {
  position: fixed;
  right: 10px;
  top: 42%;
  z-index: 8;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(18, 20, 28, 0.85);
  color: #eee;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#muKeyBtn.on {
  background: rgba(60, 64, 80, 0.95);
}

#muKeys {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: rgba(10, 12, 18, 0.94);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

#muKeys.on {
  display: block;
}

#muKeys .row {
  display: flex;
  gap: 3px;
  margin: 3px 0;
}

#muKeys button {
  flex: 1;
  min-height: 40px;
  border-radius: 6px;
  border: 0;
  background: #2a2d37;
  color: #f1f5f9;
  font: 15px/1 sans-serif;
  touch-action: none;
  padding: 0;
}

#muKeys button.wide { flex: 1.6; }
#muKeys button.space { flex: 4; }
#muKeys button.lit { background: #4f566b; color: #fff; }

#muStick {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  top: auto;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 6;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(18, 20, 28, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#muStickKnob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: rgba(220, 225, 235, 0.85);
  pointer-events: none;
}

#muRBtn {
  position: fixed;
  right: 10px;
  top: calc(42% + 58px);
  z-index: 8;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(18, 20, 28, 0.85);
  color: #eee;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#muRBtn.on {
  background: rgba(185, 28, 28, 0.9);
}

/* ==========================================================================
   Modern Strict Preloader (Clean Dark Theme - Zero Gaudy Yellow)
   ========================================================================== */

.mu-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #08090d;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.mu-preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Subtle Deep Dark Vignette with Screen Background */
.mu-preloader-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(8, 10, 16, 0.55) 0%, rgba(5, 6, 9, 0.92) 80%, #030406 100%),
    url('preloader_screen_bg.jpg') center/cover no-repeat;
}

/* High-Density Atmospheric Particle Canvas */
.mu-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Strict Modern Glass Card with Custom Generated Dark Plate Texture */
.mu-preloader-card {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(90vw, 440px);
  padding: 38px 30px 30px;
  background:
    linear-gradient(170deg, rgba(14, 17, 26, 0.88) 0%, rgba(8, 10, 16, 0.95) 100%),
    url('preloader_panel_bg.jpg') center/cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.95),
    0 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  overflow: hidden;
}

.mu-preloader-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  pointer-events: none;
}


/* Clean Modern Typography */
.mu-title-section {
  width: 100%;
  margin-bottom: 22px;
}

.mu-preloader-title {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.1;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 60%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

@media (max-width: 480px) {
  .mu-preloader-title {
    font-size: 26px;
    letter-spacing: 0.12em;
  }
}

.mu-preloader-sub {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #94a3b8;
}

/* Sleek HUD-Style Progress Bar */
.mu-progress-box {
  width: 100%;
  margin-bottom: 18px;
}

.mu-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 8px;
  padding: 0 1px;
}

.mu-status-label-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 72%;
}

.mu-status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  flex-shrink: 0;
  animation: muDotBlink 1.8s infinite ease-in-out;
}

@keyframes muDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

#muStatusMsg {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

#muStatusDetail {
  color: #f1f5f9;
  font-family: 'Space Grotesk', monospace;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  margin-left: 8px;
}

.mu-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 1.5px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

.mu-bar-fill {
  height: 100%;
  width: 2%;
  border-radius: 2px;
  background: linear-gradient(90deg, #991b1b 0%, #dc2626 50%, #f87171 100%);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
  position: relative;
  transition: width 0.22s ease-out;
}

.mu-bar-plasma {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
  animation: muShimmer 1.8s infinite linear;
}

@keyframes muShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Minimalist Clean Tips Box */
.mu-tips-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  text-align: left;
}

.mu-tip-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #94a3b8;
  flex-shrink: 0;
}

.mu-tip-msg {
  flex: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  color: #94a3b8;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   Game Guide & Info Modal Popup Dialog
   ========================================================================== */

.mu-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: text;
  -webkit-user-select: text;
}

.mu-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.mu-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 8, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mu-modal-dialog {
  position: relative;
  z-index: 2;
  width: 92%;
  max-width: 840px;
  max-height: 86vh;
  background: #0b0d13;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.mu-modal.open .mu-modal-dialog {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.mu-modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.mu-modal-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mu-modal-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  flex-shrink: 0;
}

.mu-modal-icon-badge svg {
  width: 20px;
  height: 20px;
  display: block;
}

.mu-modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  line-height: 1.25;
}

.mu-modal-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 11.5px;
  color: #94a3b8;
  margin: 2px 0 0;
}

.mu-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.mu-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.mu-modal-close svg {
  width: 16px;
  height: 16px;
}

/* Modal Tabs */
.mu-modal-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(14, 17, 24, 0.7);
  overflow-x: auto;
  scrollbar-width: thin;
}

.mu-tab-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mu-tab-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.mu-tab-btn.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

/* Modal Body */
.mu-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 260px;
  max-height: 54vh;
}

.mu-tab-pane {
  display: none;
  animation: muModalFadeIn 0.2s ease;
}

.mu-tab-pane.active {
  display: block;
}

@keyframes muModalFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.mu-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mu-section-sub {
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 14px 0;
  line-height: 1.45;
}

/* Grid & Cards */
.mu-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.mu-guide-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
}

.mu-guide-card-head {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #cbd5e1;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Hotkey list */
.mu-hotkey-list, .mu-tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mu-hotkey-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #cbd5e1;
}

.mu-key-combo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: #f8fafc;
  background: #171a24;
  border: 1px solid #2d3345;
  border-radius: 4px;
  box-shadow: 0 2px 0 #0c0e14;
}

/* Table styling */
.mu-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.mu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.mu-table th {
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mu-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.mu-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.mu-table code {
  font-family: monospace;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11.5px;
}

/* Realms Cards */
.mu-realms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.mu-realm-card {
  border-radius: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
}

.mu-realm-card.realm-easy {
  border-color: rgba(34, 197, 94, 0.35);
  background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.08) 0%, rgba(10, 12, 18, 0.6) 80%);
}

.mu-realm-card.realm-medium {
  border-color: rgba(245, 158, 11, 0.35);
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.08) 0%, rgba(10, 12, 18, 0.6) 80%);
}

.mu-realm-card.realm-hard {
  border-color: rgba(239, 68, 68, 0.35);
  background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.08) 0%, rgba(10, 12, 18, 0.6) 80%);
}

.mu-realm-card.realm-fun-easy {
  border-color: rgba(168, 85, 247, 0.45);
  background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.12) 0%, rgba(10, 12, 18, 0.6) 80%);
}

.mu-realm-card.realm-fun-medium {
  border-color: rgba(236, 72, 153, 0.45);
  background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.12) 0%, rgba(10, 12, 18, 0.6) 80%);
}

.mu-realm-card.realm-fun-hard {
  border-color: rgba(244, 63, 94, 0.45);
  background: radial-gradient(circle at top right, rgba(244, 63, 94, 0.12) 0%, rgba(10, 12, 18, 0.6) 80%);
}

.mu-realm-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.mu-realm-rate {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 12px;
}

.mu-card-perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  color: #cbd5e1;
}

.mu-card-perks strong {
  color: #f1f5f9;
}

/* Saves Info Box */
.mu-saves-info-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mu-info-item {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

.mu-info-item strong {
  color: #f8fafc;
  display: block;
  margin-bottom: 3px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
}

.mu-info-item p {
  margin: 0;
}

.mu-info-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

/* Tips list */
.mu-tips-list li {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

/* Modal Footer */
.mu-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 17, 24, 0.7);
  gap: 12px;
}

.mu-modal-foot-tip {
  font-size: 11.5px;
  color: #94a3b8;
}

/* Modal Footer Left Box */
.mu-modal-foot-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mu-modal-foot-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}

.mu-modal-author-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #38bdf8;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mu-modal-author-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* About Tab & Author Card Styles */
.mu-about-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mu-author-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.mu-author-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.mu-author-avatar-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
  flex-shrink: 0;
  background: #0f172a;
}

.mu-author-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mu-author-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

.mu-author-details {
  flex: 1;
}

.mu-author-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  line-height: 1.25;
}

.mu-author-handle {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: #38bdf8;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 6px;
}

.mu-author-bio {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.mu-about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mu-about-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.15s ease;
}

.mu-about-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.mu-about-btn.mu-btn-primary {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.mu-about-btn.mu-btn-primary:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.6);
  color: #7dd3fc;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.mu-about-btn.mu-btn-donatello {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

.mu-about-btn.mu-btn-donatello:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.6);
  color: #fff1f2;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}


/* Keep the world visible; function and navigation rows remain in compact mode. */
#muKeys { max-height: 46vh; overflow-y: auto; touch-action: pan-y; padding-bottom: env(safe-area-inset-bottom, 4px); }
#muKeys button { min-width: 0; min-height: 30px; font-size: clamp(10px, 1.8vw, 15px); }
#muKeys .functions { position: sticky; top: 0; z-index: 1; background: #15151b; }
#muKeys.compact .typing { display: none; }
@media (max-height: 500px) { #muKeys button { min-height: 27px; } #muKeys { max-height: 45vh; } }

/* Classic MU: stone, bronze and ember light; project-owned CSS artwork. */
.mu-preloader { background: #0c0a08; font-family: Georgia, 'Times New Roman', serif; }
.mu-preloader-bg { background: radial-gradient(ellipse at 50% 20%, #72533866, transparent 60%), repeating-linear-gradient(0deg, transparent 0 78px, #0008 79px 82px), repeating-linear-gradient(90deg, #211d18 0 158px, #100f0d 159px 162px); opacity: 1; }
.mu-preloader-card { width: min(620px, 92vw); padding: clamp(18px,4vw,40px); border: 2px ridge #9b7950; border-radius: 3px; background: linear-gradient(135deg,#241d16f5,#100d0bf5); box-shadow: 0 0 0 5px #080706,0 18px 80px #000; }
.mu-loading-logo { display: block; margin: 0 auto 8px; width: min(320px,65vw); height: auto; object-fit: contain; }
.mu-preloader-title { color: #e8ca88; font-family: Georgia,serif; font-size: clamp(30px,5vw,48px); letter-spacing: .15em; text-shadow: 0 2px #000,0 0 20px #a87437; background: none; -webkit-text-fill-color: #e8ca88; }
.mu-preloader-sub,.mu-status-label-wrap { color: #d2b88a; }
.mu-progress-box,.mu-tips-box { border-color: #695134; background: #080605aa; }
.mu-bar-track { height: 16px; border: 1px solid #a27a3d; background: #080604; border-radius: 2px; }
.mu-bar-fill { background: linear-gradient(#f5d17b,#a65c23 55%,#df9f48); border-radius: 0; box-shadow: 0 0 12px #c9803455; transition: width .15s; }
.mu-bar-plasma,.mu-status-pulse-dot,.mu-particle-canvas { display:none; }
#muStatusDetail { color: #e9d6b3; font: 13px/1.4 sans-serif; white-space: normal; }
.mu-progress-meta { gap: 10px; flex-wrap: wrap; }
.mu-tip-tag { color: #d7b878; }
.mu-tip-msg { color: #b8afa1; }
@media (max-height:500px) { .mu-loading-logo { max-height:100px; width:auto; } .mu-preloader-card { padding:14px; } .mu-tips-box { margin-top:10px; } }

.mu-preloader-card { backdrop-filter: none; -webkit-backdrop-filter: none; }

@keyframes mu-loading-sweep { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.mu-indeterminate { width: 30% !important; animation: mu-loading-sweep 1.3s linear infinite; }


/* =============================================================
   MU 0.97D CLASSIC LOADING — isolated overrides, no game changes
   ============================================================= */
#muPreloader.mu-preloader { box-sizing:border-box; background:#080706; font-family:Georgia,'Times New Roman',serif; isolation:isolate; }
#muPreloader .mu-preloader-bg { position:absolute;inset:0; background:linear-gradient(90deg,rgba(4,3,3,.88),rgba(7,5,4,.45) 50%,rgba(4,3,3,.88)),linear-gradient(0deg,#080605 0%,transparent 40%,rgba(10,7,5,.25)),url('preloader_screen_bg.jpg') center/cover no-repeat,radial-gradient(ellipse at 50% 35%,#493324,#090707 75%); opacity:1; }
#muPreloader .mu-classic-vignette { position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 42%,transparent 12%,rgba(0,0,0,.6) 85%),repeating-linear-gradient(0deg,rgba(0,0,0,.07) 0 1px,transparent 1px 4px); }
#muPreloader .mu-classic-rune { position:absolute;top:50%;font-size:clamp(90px,18vw,240px);line-height:1;color:rgba(159,106,48,.09);text-shadow:0 0 70px rgba(199,111,37,.16);transform:translateY(-50%);pointer-events:none; }
#muPreloader .mu-rune-left {left:2%;} #muPreloader .mu-rune-right {right:2%;}
#muPreloader .mu-preloader-card {box-sizing:border-box;width:min(570px,calc(100vw - 32px));padding:28px clamp(22px,5vw,48px) 27px;max-height:calc(100dvh - 22px);overflow:auto;border:1px solid #967041;border-radius:2px;background:linear-gradient(160deg,rgba(39,27,18,.95),rgba(13,10,9,.97) 53%,rgba(26,18,13,.96)),url('preloader_panel_bg.jpg') center/cover;box-shadow:0 0 0 3px #130e0a,0 0 0 4px #4e3823,0 0 0 7px rgba(0,0,0,.85),0 28px 90px #000,inset 0 0 0 1px rgba(244,200,113,.14),inset 0 0 55px rgba(0,0,0,.55);backdrop-filter:none;-webkit-backdrop-filter:none;}
#muPreloader .mu-preloader-card::before {content:'';top:7px;left:8px;right:8px;height:15px;background:linear-gradient(90deg,transparent,#a47c46 12%,#e2bf79 50%,#a47c46 88%,transparent);opacity:.65;clip-path:polygon(0 50%,44% 50%,50% 0,56% 50%,100% 50%,100% 57%,56% 57%,50% 100%,44% 57%,0 57%);}
#muPreloader .mu-preloader-card::after {content:'';position:absolute;inset:11px;pointer-events:none;border:1px solid rgba(174,123,63,.2);}
#muPreloader .mu-classic-topline {color:#b99a69;font:700 10px/1.4 Georgia,serif;letter-spacing:.3em;margin:9px 0 15px;text-shadow:0 1px 2px #000;}
#muPreloader .mu-title-section {margin-bottom:18px;}
#muPreloader .mu-loading-logo {display:block;max-width:min(250px,58vw);max-height:140px;width:auto;height:auto;margin:0 auto 8px;object-fit:contain;filter:drop-shadow(0 7px 12px #000);}
#muPreloader .mu-preloader-title {margin:0 auto;color:#e8c889;-webkit-text-fill-color:#e8c889;background:none;font:700 clamp(29px,6.5vw,48px)/1.12 Georgia,'Times New Roman',serif;letter-spacing:.11em;text-shadow:0 2px 1px #000,0 0 17px rgba(184,115,42,.35);overflow-wrap:anywhere;}
#muPreloader .mu-classic-edition {margin-top:9px;color:#c59b5c;font:700 clamp(10px,2.6vw,13px)/1.4 Georgia,serif;letter-spacing:.23em;}
#muPreloader .mu-classic-edition span {padding:0 8px;color:#865c36;}
#muPreloader .mu-preloader-sub {margin-top:14px;padding:0;background:none;border:0;border-radius:0;color:#9e896c;font:11px/1.5 Georgia,serif;letter-spacing:.16em;}
#muPreloader .mu-classic-divider {position:relative;width:100%;height:22px;margin:0 0 18px;color:#bc9253;display:flex;align-items:center;justify-content:center;font-size:17px;}
#muPreloader .mu-classic-divider::before,#muPreloader .mu-classic-divider::after {content:'';height:1px;flex:1;background:linear-gradient(90deg,transparent,#886139);}
#muPreloader .mu-classic-divider::after {transform:rotate(180deg);}#muPreloader .mu-classic-divider span {padding:0 16px;}
#muPreloader .mu-progress-box {box-sizing:border-box;width:100%;padding:0;margin:0 0 8px;background:none;border:0;}
#muPreloader .mu-classic-progress-caption {color:#b9a27c;font:700 10px/1.4 Georgia,serif;letter-spacing:.17em;margin:0 0 12px;}
#muPreloader .mu-progress-meta {margin-bottom:11px;align-items:flex-start;gap:10px;font-family:Georgia,serif;}
#muPreloader .mu-status-label-wrap {max-width:66%;align-items:flex-start;}
#muPreloader .mu-status-pulse-dot {display:block;width:6px;height:6px;margin-top:5px;border-radius:0;transform:rotate(45deg);background:#d5a05c;box-shadow:0 0 9px #a66a32;}
#muPreloader #muStatusMsg {color:#e0ceb0;font:12px/1.5 Georgia,serif;white-space:normal;text-align:left;overflow:visible;}
#muPreloader #muStatusDetail {color:#dfba7e;font:12px/1.5 Georgia,serif;text-align:right;max-width:48%;overflow-wrap:anywhere;}
#muPreloader .mu-bar-track {box-sizing:border-box;height:22px;padding:3px;background:#080604;border:1px solid #9b7341;border-radius:1px;box-shadow:inset 0 2px 6px #000,0 0 0 2px #1c140d,0 0 0 3px rgba(157,110,57,.3);overflow:hidden;}
#muPreloader .mu-bar-fill {height:100%;border-radius:0;background:repeating-linear-gradient(90deg,transparent 0 13px,rgba(42,24,11,.38) 13px 15px),linear-gradient(180deg,#f7d78b 0%,#c88b3b 38%,#855021 75%,#c18b48 100%);box-shadow:inset 0 1px rgba(255,239,179,.6),0 0 13px rgba(225,143,48,.5);transition:width .16s ease-out;}
#muPreloader .mu-bar-plasma {display:block;background:linear-gradient(90deg,transparent 0%,rgba(255,241,179,.25) 48%,transparent 100%);}
#muPreloader .mu-classic-bottom-ornament {margin:15px 0 14px;color:#82623b;font-size:11px;letter-spacing:.2em;}
#muPreloader .mu-tips-box {box-sizing:border-box;width:100%;min-height:47px;margin:0;padding:10px 13px;display:flex;align-items:center;gap:12px;background:rgba(4,3,3,.5);border:1px solid rgba(135,95,54,.42);border-radius:0;}
#muPreloader .mu-tip-tag {padding:0;border:0;background:none;color:#d4aa68;font:700 10px/1.5 Georgia,serif;letter-spacing:.12em;}
#muPreloader .mu-tip-msg {color:#bba88c;font:11px/1.5 Georgia,serif;}
#muPreloader .mu-progress-box button {margin-top:12px;padding:8px 20px;background:#342317;border:1px solid #a17b4a;color:#f0d29c;font:700 13px Georgia,serif;cursor:pointer;}
#muPreloader .mu-indeterminate {width:30%!important;animation:mu-loading-sweep 1.3s linear infinite;}
@media(max-width:600px){#muPreloader .mu-classic-rune{display:none;}#muPreloader .mu-preloader-card{padding:22px 22px 20px;}#muPreloader .mu-classic-topline{letter-spacing:.18em;}#muPreloader .mu-preloader-title{letter-spacing:.07em;}#muPreloader .mu-status-label-wrap{max-width:58%;}#muPreloader #muStatusDetail{max-width:45%;font-size:11px;}}
@media(max-height:540px){#muPreloader .mu-preloader-card{padding-top:13px;padding-bottom:13px;}#muPreloader .mu-loading-logo{max-height:65px;}#muPreloader .mu-classic-topline{margin:2px 0 5px;}#muPreloader .mu-title-section{margin-bottom:6px;}#muPreloader .mu-classic-divider{margin-bottom:6px;}#muPreloader .mu-classic-bottom-ornament{margin:6px 0;}#muPreloader .mu-tips-box{min-height:35px;}}
@media(prefers-reduced-motion:reduce){#muPreloader .mu-bar-plasma,#muPreloader .mu-status-pulse-dot{animation:none;}}
