:root {
  color-scheme: dark;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 211, 125, 0.18), transparent 34%),
    linear-gradient(180deg, #15233d 0%, #0d1321 46%, #091017 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: #f7f2df;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
}

.scene-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
}

.hud {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
  pointer-events: none;
}

.hud__title {
  width: fit-content;
  padding: 10px 14px;
  border: 1px solid rgba(255, 227, 175, 0.28);
  border-radius: 14px;
  background: rgba(11, 19, 31, 0.54);
  backdrop-filter: blur(16px);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud__panel,
.hud__status,
.hud__health {
  padding: 14px 16px;
  border: 1px solid rgba(255, 227, 175, 0.18);
  border-radius: 16px;
  background: rgba(8, 12, 20, 0.5);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  line-height: 1.6;
  font-size: 14px;
}

.hud__health {
  min-width: 240px;
}

.hud__health-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe6aa;
}

.health-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 231, 183, 0.12);
}

.health-bar__fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d95858 0%, #f0b85c 100%);
  box-shadow: 0 0 20px rgba(240, 184, 92, 0.25);
  transform-origin: left center;
  transition: transform 160ms ease, filter 160ms ease;
}

.hud__status {
  color: #ffd785;
  min-width: 240px;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 3;
  background: rgba(3, 7, 13, 0.45);
  backdrop-filter: blur(14px);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.loading.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading__card {
  width: min(460px, calc(100vw - 32px));
  padding: 26px 28px;
  border: 1px solid rgba(255, 224, 166, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(230, 171, 74, 0.15), transparent 50%),
    rgba(8, 12, 20, 0.82);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.loading__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.loading__desc {
  color: rgba(247, 242, 223, 0.74);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hud {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .hud__panel,
  .hud__status,
  .hud__health {
    font-size: 13px;
  }
}
