:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Source Han Sans SC",
    "Noto Sans CJK SC", sans-serif;
  background: #07100d;
  color: #f6f8f5;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 30% 20%, rgba(62, 182, 182, 0.18), transparent 32%),
    linear-gradient(145deg, #07100d 0%, #111914 42%, #090b10 100%);
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
}



.start-screen,
.game-over {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(5, 9, 8, 0.86), rgba(5, 9, 8, 0.34)),
    radial-gradient(circle at 75% 35%, rgba(239, 93, 55, 0.25), transparent 38%);
  z-index: 20;
}

.game-over {
  background:
    linear-gradient(90deg, rgba(5, 9, 8, 0.9), rgba(5, 9, 8, 0.58)),
    radial-gradient(circle at 72% 30%, rgba(112, 205, 171, 0.2), transparent 34%);
}

.is-hidden {
  display: none;
}

.start-panel {
  position: relative;
  width: min(560px, 92vw);
  padding: 40px 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(20, 26, 28, 0.88) 0%, rgba(6, 11, 13, 0.88) 100%);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.start-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(125, 240, 185, 0.45), transparent 40%, transparent 60%, rgba(255, 113, 63, 0.4));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: #8fdaca;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-size: 4.2rem;
  line-height: 0.95;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #ffffff 0%, #c8e0d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 30px rgba(125, 240, 185, 0.18);
}

.lede {
  margin: 18px 0 32px;
  color: rgba(246, 248, 245, 0.78);
  font-size: 1.04rem;
  line-height: 1.6;
}

#start-button,
#restart-button {
  position: relative;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff713f, #e9b44c);
  color: #130c07;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 10px 30px -8px rgba(255, 113, 63, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition:
    transform 160ms ease,
    filter 160ms ease,
    box-shadow 160ms ease;
}

#start-button::after,
#restart-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-22deg);
  animation: shimmer 2.6s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  60% {
    left: -50%;
  }
  100% {
    left: 130%;
  }
}

#start-button:hover,
#restart-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    0 14px 36px -8px rgba(255, 113, 63, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.top-row {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.stat-group {
  display: grid;
  grid-template-columns: 46px 1fr 48px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(8, 12, 13, 0.58);
  backdrop-filter: blur(10px);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.stat-group.is-low {
  border-color: rgba(255, 92, 76, 0.7);
  animation: stat-low 1.1s ease-in-out infinite;
}

.stat-group.is-flash {
  animation: stat-flash 360ms ease-out;
}

@keyframes stat-low {
  50% {
    box-shadow: 0 0 0 1px rgba(255, 92, 76, 0.55);
  }
}

@keyframes stat-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 180, 90, 0);
    border-color: rgba(255, 180, 90, 0.95);
  }
  50% {
    box-shadow: 0 0 14px 2px rgba(255, 180, 90, 0.55);
    border-color: rgba(255, 200, 130, 1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 180, 90, 0);
    border-color: rgba(255, 255, 255, 0.12);
  }
}

.stat-label {
  color: rgba(246, 248, 245, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 1px;
}

.stat-group strong {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 800;
}

.meter {
  position: relative;
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.meter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3a2a 0%, #ff6444 35%, #ffb14b 100%);
  box-shadow:
    0 0 8px rgba(255, 80, 60, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: width 120ms linear;
}

.meter.mana span {
  background: linear-gradient(90deg, #1f9eff 0%, #4cd6ff 45%, #7df0b9 100%);
  box-shadow:
    0 0 8px rgba(80, 200, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.meter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 24px,
    rgba(0, 0, 0, 0.18) 24px,
    rgba(0, 0, 0, 0.18) 25px
  );
  pointer-events: none;
}

.score-strip {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fps-meter {
  position: absolute;
  top: 60px;
  right: 18px;
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: rgba(180, 220, 200, 0.78);
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  background: rgba(8, 12, 13, 0.55);
  backdrop-filter: blur(8px);
  font-variant-numeric: tabular-nums;
}

.fps-meter.is-warn {
  color: #ffd055;
  border-color: rgba(255, 200, 90, 0.35);
}

.fps-meter.is-bad {
  color: #ff7a5c;
  border-color: rgba(255, 100, 70, 0.45);
}

.fps-meter.is-hidden {
  display: none;
}

.bloom-panel {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 18px;
  background: rgba(8, 12, 13, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  pointer-events: auto;
  z-index: 30;
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", Consolas, monospace;
  font-size: 0.72rem;
  color: rgba(246, 248, 245, 0.92);
  display: grid;
  gap: 10px;
  min-width: 320px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.bloom-panel.is-hidden {
  display: none;
}

.bloom-title {
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(180, 220, 200, 0.85);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.bloom-row {
  display: grid;
  grid-template-columns: 78px 1fr 54px;
  align-items: center;
  gap: 10px;
}

.bloom-row input[type="range"] {
  width: 100%;
  accent-color: #7df0b9;
}

.bloom-row span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #b8f7d8;
}

#bloom-copy,
#cheat-refill,
#admin-spawn-btn,
#admin-next-wave,
#admin-clear-enemies {
  padding: 6px 12px;
  background: rgba(125, 240, 185, 0.15);
  border: 1px solid rgba(125, 240, 185, 0.45);
  border-radius: 5px;
  color: #b8f7d8;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: background 140ms ease;
}

#bloom-copy:hover,
#cheat-refill:hover,
#admin-spawn-btn:hover,
#admin-next-wave:hover,
#admin-clear-enemies:hover {
  background: rgba(125, 240, 185, 0.28);
}

.admin-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 800;
  letter-spacing: 0.5px;
  color: rgba(180, 220, 200, 0.7);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.admin-toggle {
  cursor: pointer;
}

.admin-toggle input[type="checkbox"] {
  accent-color: #7df0b9;
  justify-self: start;
}

.admin-spawn {
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.admin-spawn select {
  background: rgba(8, 12, 13, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #d8eee0;
  border-radius: 4px;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 0.7rem;
}

#bloom-copy.is-copied {
  background: rgba(125, 240, 185, 0.4);
  color: #082014;
}

.score-strip span,
.skill-panel div,
.feed div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(8, 12, 13, 0.58);
  backdrop-filter: blur(10px);
}

.score-strip span {
  padding: 10px 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
}

.reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.crosshair {
  position: absolute;
  inset: 16px;
  transform-origin: 50% 50%;
}

.crosshair.is-switching {
  animation: crosshair-pulse 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes crosshair-pulse {
  0% {
    transform: scale(0.7);
    filter: brightness(1.6);
  }
  60% {
    transform: scale(1.2);
    filter: brightness(1.3);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.crosshair::before,
.crosshair::after,
.crosshair span:first-child,
.crosshair span:last-child {
  position: absolute;
  content: "";
  background: var(--crosshair-color, rgba(255, 255, 255, 0.92));
  box-shadow: 0 0 10px var(--crosshair-glow, rgba(125, 240, 185, 0.7));
  border-radius: 1px;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.crosshair::before,
.crosshair::after {
  left: 15px;
  width: 2px;
  height: 10px;
}

.crosshair::before {
  top: 0;
}

.crosshair::after {
  bottom: 0;
}

.crosshair span:first-child,
.crosshair span:last-child {
  top: 15px;
  width: 10px;
  height: 2px;
}

.crosshair span:first-child {
  left: 0;
}

.crosshair span:last-child {
  right: 0;
}

.charge-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--charge-color, #ffd870) calc(var(--charge-pct, 0) * 1%),
    rgba(255, 255, 255, 0.08) 0
  );
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 60%, #000 70%, transparent 74%);
  mask: radial-gradient(circle, transparent 56%, #000 60%, #000 70%, transparent 74%);
  opacity: 0;
  transition: opacity 120ms ease;
  filter: drop-shadow(0 0 6px transparent);
}

.charge-ring.is-active {
  opacity: 0.95;
}

.charge-ring.is-ready {
  filter: drop-shadow(0 0 10px var(--charge-color, #ffd870));
  animation: charge-ready 0.55s ease-in-out infinite;
}

@keyframes charge-ready {
  50% {
    transform: scale(1.06);
  }
}

.hit-marker {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.7);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
  pointer-events: none;
}

.hit-marker span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  border-radius: 1px;
  transform-origin: 0 50%;
}

.hit-marker span:nth-child(1) {
  transform: rotate(45deg) translate(10px, -1px);
}
.hit-marker span:nth-child(2) {
  transform: rotate(135deg) translate(10px, -1px);
}
.hit-marker span:nth-child(3) {
  transform: rotate(225deg) translate(10px, -1px);
}
.hit-marker span:nth-child(4) {
  transform: rotate(315deg) translate(10px, -1px);
}

.hit-marker.is-hit {
  opacity: 1;
  transform: scale(1);
}

.hit-marker.is-kill span {
  background: #ff5a4a;
  box-shadow: 0 0 12px rgba(255, 90, 74, 0.95);
}

.hit-marker.is-crit span {
  background: #fff4a6;
  box-shadow: 0 0 12px rgba(255, 244, 166, 0.95);
}

.spellbar {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: grid;
  grid-template-columns: repeat(10, minmax(52px, 68px));
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: auto;
}

.spell-slot {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 76px;
  padding: 11px 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 22, 24, 0.78) 0%, rgba(6, 10, 11, 0.78) 100%);
  color: rgba(246, 248, 245, 0.82);
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.key-hint {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  color: rgba(246, 248, 245, 0.5);
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1;
}

.spell-slot.is-active .key-hint {
  color: rgba(255, 255, 255, 0.88);
  background: var(--slot-accent, rgba(125, 240, 185, 0.22));
  border-color: var(--slot-accent, rgba(125, 240, 185, 0.45));
}

.spell-slot:hover,
.spell-slot.is-active {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(22, 31, 31, 0.78);
  transform: translateY(-2px);
}

.spell-slot.is-active {
  border-color: var(--slot-accent, rgba(125, 240, 185, 0.85));
  box-shadow:
    inset 0 -1px 0 var(--slot-accent, rgba(125, 240, 185, 0.7)),
    0 8px 24px -10px var(--slot-accent, rgba(125, 240, 185, 0.6));
}

.spell-slot.just-selected {
  animation: slot-pop 320ms ease-out;
}

@keyframes slot-pop {
  0% {
    transform: translateY(-2px) scale(1);
  }
  40% {
    transform: translateY(-5px) scale(1.09);
  }
  100% {
    transform: translateY(-2px) scale(1);
  }
}

.spell-slot strong {
  font-size: 0.75rem;
}

.glyph {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: 0 0 18px currentColor;
}

.spell-slot.just-selected .glyph {
  animation: glyph-flip 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes glyph-flip {
  0% {
    transform: scale(0.4);
    filter: brightness(2.6);
    box-shadow: 0 0 30px currentColor;
  }
  55% {
    transform: scale(1.28);
    filter: brightness(1.7);
    box-shadow: 0 0 26px currentColor;
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
    box-shadow: 0 0 18px currentColor;
  }
}

.glyph.fire {
  color: #ff6a3d;
  background: radial-gradient(circle, #ffe17c 0%, #ff6a3d 58%, #7b1f16 100%);
}

.glyph.ice {
  color: #7ee9ff;
  background: radial-gradient(circle, #eefcff 0%, #68dcff 55%, #285da8 100%);
}

.glyph.storm {
  color: #f2e45e;
  background: radial-gradient(circle, #fffcc3 0%, #f2e45e 46%, #7d4ac7 100%);
}

.glyph.stone {
  color: #c9b178;
  background: radial-gradient(circle, #f2dca3 0%, #9a8b72 50%, #3f3a32 100%);
}

.glyph.poison {
  color: #76ed78;
  background: radial-gradient(circle, #d8ff8b 0%, #76ed78 48%, #1f6b37 100%);
}

.glyph.wood {
  color: #9df06f;
  background: radial-gradient(circle, #f1ffc0 0%, #9df06f 46%, #2f8a42 100%);
}

.glyph.lightning {
  color: #7cf7ff;
  background: radial-gradient(circle, #ffffff 0%, #7cf7ff 42%, #2954e8 100%);
}

.glyph.arcane {
  color: #c8a3ff;
  background: radial-gradient(circle, #ffffff 0%, #c8a3ff 38%, #4d1ec0 100%);
}

.glyph.missile {
  color: #ff9cea;
  background: radial-gradient(circle, #ffffff 0%, #ff9cea 38%, #8f1ec0 100%);
}

.glyph.void {
  color: #8a55b8;
  background: radial-gradient(circle, #2a0030 0%, #4a0a72 38%, #0a0010 100%);
  box-shadow: 0 0 12px #4a0a72, inset 0 0 8px rgba(0, 0, 0, 0.7);
}

.skill-panel {
  position: absolute;
  right: 18px;
  bottom: 24px;
  display: grid;
  gap: 7px;
  width: 188px;
}

.skill-row {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 9px;
  overflow: hidden;
}

.skill-name {
  color: rgba(246, 248, 245, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
}

.skill-key {
  font-style: normal;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(246, 248, 245, 0.7);
  line-height: 1;
}

.skill-row strong {
  justify-self: end;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.skill-row::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: var(--cd-pct, 0%);
  background: linear-gradient(90deg, #ff9d4a 0%, #ffd870 100%);
  box-shadow: 0 0 6px rgba(255, 180, 90, 0.45);
  opacity: var(--cd-opacity, 0);
  transition: width 110ms linear, opacity 200ms ease;
}

.skill-row.is-ready strong {
  color: #b9ffe3;
  text-shadow: 0 0 6px rgba(125, 240, 185, 0.4);
}

.skill-row.is-active strong {
  color: #ffd870;
}

.skill-row[data-cd="defend"].is-active::after {
  background: linear-gradient(90deg, #6b88ff 0%, #b8c8ff 100%);
  box-shadow: 0 0 6px rgba(108, 152, 255, 0.5);
}

.feed {
  position: absolute;
  left: 18px;
  bottom: 24px;
  display: grid;
  gap: 6px;
  width: min(300px, calc(100vw - 36px));
}

.feed div {
  padding: 8px 12px;
  color: rgba(246, 248, 245, 0.88);
  font-size: 0.82rem;
  letter-spacing: 0.2px;
  border-left: 2px solid rgba(125, 240, 185, 0.5);
  animation: feed-in 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes feed-in {
  0% {
    opacity: 0;
    transform: translateX(-12px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.damage-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 38%, rgba(220, 30, 30, 0.18) 70%, rgba(255, 60, 30, 0.55) 100%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
  mix-blend-mode: screen;
}

.damage-vignette.is-hit {
  opacity: 1;
}

.parry-flash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 248, 220, 0.85) 0%, rgba(255, 220, 120, 0.4) 30%, transparent 65%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.parry-flash.is-active {
  animation: parry-flash 360ms ease-out;
}

@keyframes parry-flash {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  18% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

.kill-flash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 65%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.kill-flash.is-active {
  animation: kill-flash 180ms ease-out;
}

@keyframes kill-flash {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.perfect-flash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0%, rgba(190, 220, 255, 0.55) 35%, transparent 75%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.perfect-flash.is-active {
  animation: perfect-flash 560ms ease-out;
}

@keyframes perfect-flash {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  12% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(1.25);
  }
}

.combo-meter {
  position: absolute;
  right: 32px;
  bottom: 224px;
  font-family: ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 3rem;
  letter-spacing: -2px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 0 18px currentColor, 0 4px 16px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.combo-meter.is-show {
  opacity: 1;
  transform: scale(1);
}

.combo-meter.tier-1 {
  color: #ffffff;
}

.combo-meter.tier-2 {
  color: #ffe066;
  text-shadow: 0 0 22px currentColor, 0 4px 16px rgba(0, 0, 0, 0.55);
}

.combo-meter.tier-3 {
  color: #ff9d4a;
  text-shadow: 0 0 26px currentColor, 0 0 50px rgba(255, 100, 40, 0.45);
}

.combo-meter.tier-4 {
  color: #ff5530;
  text-shadow: 0 0 30px currentColor, 0 0 60px rgba(255, 80, 40, 0.6);
  font-size: 3.6rem;
}

.combo-meter.is-punch {
  animation: combo-punch 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes combo-punch {
  0% {
    transform: scale(0.6);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.combo-x {
  font-size: 0.55em;
  margin-right: 0.08em;
  opacity: 0.7;
  font-weight: 800;
}

.low-hp {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(255, 30, 30, 0.32) 100%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.low-hp.is-low {
  opacity: 1;
  animation: heartbeat 1.05s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    opacity: 0.55;
  }
  20% {
    opacity: 1;
  }
  35% {
    opacity: 0.7;
  }
  55% {
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .start-panel {
    padding: 28px;
  }

  h1,
  h2 {
    font-size: 2.65rem;
  }

  .lede {
    font-size: 1rem;
  }

  .spellbar {
    right: 12px;
    bottom: 16px;
    left: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    transform: none;
  }

  .spell-slot {
    min-height: 64px;
    padding: 8px 4px;
  }

  .spell-slot strong {
    font-size: 0.66rem;
  }

  .skill-panel {
    right: 12px;
    bottom: 162px;
    width: 150px;
  }

  .feed {
    display: none;
  }
}
