:root {
  --bg-deep: #05060f;
  --glass-bg: rgba(10, 14, 30, 0.76);
  --glass-border: rgba(120, 220, 255, 0.22);
  --cyan: #00f2fe;
  --blue: #4facfe;
  --gold: #ffd166;
  --pink: #ff2e93;
  --violet: #b517ff;
  --emerald: #06d6a0;
  --danger: #ff3355;
  --text-main: #f4f8ff;
  --text-dim: #92a4c7;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
}

#canvas-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hidden {
  display: none !important;
}

/* Screen Vignette & Reactive Edge Glow */
#screen-vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(3, 5, 14, 0.58) 100%);
  transition: box-shadow 0.22s ease;
}

#screen-vignette.damage-flash {
  box-shadow: inset 0 0 85px rgba(255, 38, 82, 0.82);
}

#screen-vignette.fever-glow {
  box-shadow: inset 0 0 70px rgba(255, 209, 102, 0.45), inset 0 0 130px rgba(255, 46, 147, 0.28);
}

#screen-vignette.low-shield {
  animation: dangerPulse 1.1s ease-in-out infinite;
}

@keyframes dangerPulse {
  0%, 100% { box-shadow: inset 0 0 38px rgba(255, 40, 75, 0.22); }
  50% { box-shadow: inset 0 0 68px rgba(255, 40, 75, 0.52); }
}

/* Floating Combat FX Popups */
#fx-layer {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.fx-popup {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85), 0 0 18px currentColor;
  will-change: transform, opacity;
  animation: floatPopup 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fx-popup.fx-slice {
  color: var(--cyan);
  font-size: clamp(0.95rem, 2.5vw, 1.3rem);
}

.fx-popup.fx-mega {
  color: var(--gold);
  font-size: clamp(1.25rem, 3.6vw, 1.85rem);
  animation-duration: 1.1s;
}

.fx-popup.fx-god {
  color: #ffffff;
  font-size: clamp(1.45rem, 4.2vw, 2.2rem);
  text-shadow: 0 0 16px var(--pink), 0 0 32px var(--gold), 0 3px 12px #000;
  animation-duration: 1.25s;
}

.fx-popup.fx-graze {
  color: var(--emerald);
  font-size: clamp(0.8rem, 2vw, 1rem);
  animation-duration: 0.68s;
}

.fx-popup.fx-pickup {
  color: #d8b4fe;
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
}

@keyframes floatPopup {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.55);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -65%) scale(1.14);
  }
  40% {
    transform: translate(-50%, -85%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -155%) scale(0.92);
  }
}

/* HUD */
.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  padding: calc(10px + var(--safe-top)) calc(12px + var(--safe-right)) 0 calc(12px + var(--safe-left));
  pointer-events: none;
}

.hud-top {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) auto minmax(128px, 1fr);
  align-items: start;
  gap: 8px;
}

.hud-card {
  background: rgba(8, 12, 26, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(130, 215, 255, 0.18);
  border-radius: 14px;
  padding: 7px 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.hud-time-card {
  justify-self: start;
  min-width: 145px;
}

.hud-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.hud-time-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hud-time {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.15rem, 3.2vw, 1.55rem);
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(0, 242, 254, 0.45);
}

.milestone-track {
  margin-top: 5px;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.milestone-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  border-radius: 99px;
  transition: width 0.15s linear;
}

/* Rank Pills */
.rank-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.rank-0 { background: rgba(140, 160, 190, 0.2); color: #cbd5e1; }
.rank-1 { background: rgba(205, 127, 50, 0.28); color: #f6ad55; border-color: rgba(246, 173, 85, 0.45); }
.rank-2 { background: rgba(180, 205, 235, 0.28); color: #e2e8f0; border-color: rgba(226, 232, 240, 0.5); }
.rank-3 { background: rgba(255, 209, 102, 0.26); color: #ffd166; border-color: rgba(255, 209, 102, 0.6); box-shadow: 0 0 10px rgba(255, 209, 102, 0.3); }
.rank-4 { background: rgba(0, 242, 254, 0.24); color: #00f2fe; border-color: rgba(0, 242, 254, 0.65); box-shadow: 0 0 12px rgba(0, 242, 254, 0.35); }
.rank-5 { background: rgba(181, 23, 255, 0.3); color: #f0abfc; border-color: rgba(240, 171, 252, 0.7); box-shadow: 0 0 14px rgba(181, 23, 255, 0.45); }
.rank-6 { background: linear-gradient(90deg, rgba(255, 46, 147, 0.4), rgba(255, 209, 102, 0.4)); color: #fff; border-color: #ffd166; box-shadow: 0 0 18px rgba(255, 46, 147, 0.6); }

/* Center Fever Bar */
.hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
}

.fever-bar-wrap {
  position: relative;
  width: clamp(118px, 26vw, 220px);
  height: 18px;
  background: rgba(8, 12, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.fever-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--gold));
  border-radius: 99px;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 14px rgba(255, 46, 147, 0.6);
}

.fever-bar-wrap.is-fever {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(255, 209, 102, 0.65);
}

.fever-bar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.fever-banner {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-shadow: 0 0 12px var(--pink), 0 0 24px var(--gold);
  animation: feverPulseText 0.45s ease-in-out infinite alternate;
}

@keyframes feverPulseText {
  from { transform: scale(0.96); opacity: 0.85; }
  to { transform: scale(1.06); opacity: 1; }
}

/* Right Score + Buttons */
.hud-right-group {
  justify-self: end;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.hud-score-card {
  text-align: right;
  min-width: 112px;
}

.hud-score {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 209, 102, 0.4);
}

.combo-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 3px;
}

.combo-value {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}

.combo-bar {
  width: 48px;
  height: 5px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  overflow: hidden;
}

.combo-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
}

.hud-icon-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(130, 215, 255, 0.22);
  background: rgba(8, 12, 26, 0.72);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.icon-btn:hover {
  border-color: var(--cyan);
  background: rgba(16, 28, 56, 0.85);
}

.icon-btn:active {
  transform: scale(0.92);
}

/* Shields & Active Buffs */
.hud-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.shields-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(8, 12, 26, 0.56);
  padding: 5px 10px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.shield-pip {
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
  border-radius: 3px;
  border: 1.5px solid rgba(0, 242, 254, 0.45);
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shield-pip.active {
  background: var(--cyan);
  border-color: #ffffff;
  box-shadow: 0 0 10px var(--cyan);
}

.buffs-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.buff-chip {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 99px;
  background: rgba(181, 23, 255, 0.28);
  border: 1px solid rgba(216, 180, 254, 0.5);
  color: #f3e8ff;
  box-shadow: 0 0 12px rgba(181, 23, 255, 0.3);
}

/* Boss Bar */
.boss-hud {
  margin: 10px auto 0;
  max-width: 360px;
  text-align: center;
}

.boss-title {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #ff6b8b;
  text-shadow: 0 0 10px rgba(255, 51, 85, 0.8);
  margin-bottom: 4px;
}

.boss-bar {
  height: 8px;
  background: rgba(12, 8, 20, 0.82);
  border: 1px solid rgba(255, 75, 110, 0.55);
  border-radius: 99px;
  overflow: hidden;
}

.boss-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff2e63, #ff9f1c);
  box-shadow: 0 0 12px #ff2e63;
  transition: width 0.2s ease-out;
}

/* Toast Notification Banner */
.toast-banner {
  margin: 12px auto 0;
  width: fit-content;
  max-width: 92vw;
  padding: 7px 18px;
  border-radius: 99px;
  background: rgba(10, 16, 36, 0.86);
  border: 1px solid rgba(0, 242, 254, 0.55);
  box-shadow: 0 0 24px rgba(0, 242, 254, 0.35);
  font-size: clamp(0.76rem, 2.2vw, 0.92rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  text-align: center;
  animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateY(-12px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Touch Controls (Floating Virtual Joystick + Dash Button) */
.touch-layer {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.joystick-base {
  position: absolute;
  width: 112px;
  height: 112px;
  margin-left: -56px;
  margin-top: -56px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.08) 0%, rgba(0, 242, 254, 0.02) 70%);
  border: 1.5px solid rgba(0, 242, 254, 0.34);
  box-shadow: 0 0 22px rgba(0, 242, 254, 0.18);
  pointer-events: none;
}

.joystick-stick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, var(--cyan));
  box-shadow: 0 0 18px var(--cyan);
}

.dash-btn {
  position: absolute;
  right: calc(18px + var(--safe-right));
  bottom: calc(22px + var(--safe-bottom));
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 16, 36, 0.72);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 254, 0.25);
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.dash-btn:active {
  transform: scale(0.9);
}

.dash-btn.on-cooldown {
  opacity: 0.55;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.dash-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dash-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 4.5;
}

.dash-ring-fg {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 6px var(--cyan));
}

.dash-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.dash-label {
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-top: 2px;
  color: var(--cyan);
}

@media (hover: hover) and (pointer: fine) {
  .dash-btn {
    width: 68px;
    height: 68px;
    opacity: 0.82;
  }
}

/* Overlay Screens (Start / Pause / Game Over) */
.overlay-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(14px + var(--safe-top)) calc(14px + var(--safe-right)) calc(14px + var(--safe-bottom)) calc(14px + var(--safe-left));
  background: radial-gradient(circle at 50% 45%, rgba(7, 10, 24, 0.42), rgba(4, 6, 15, 0.84));
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  overflow-y: auto;
}

.glass-panel {
  width: min(460px, 100%);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: clamp(18px, 4vw, 28px);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: panelPop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.compact-panel {
  width: min(360px, 100%);
}

@keyframes panelPop {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.badge-eyebrow {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--cyan);
  background: rgba(0, 242, 254, 0.11);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.game-logo {
  font-size: clamp(2.1rem, 7vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: #ffffff;
  text-shadow: 0 0 28px rgba(0, 242, 254, 0.45);
}

.game-logo span {
  background: linear-gradient(135deg, var(--cyan), var(--pink), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 4px;
}

.game-tagline {
  margin: 10px auto 16px;
  font-size: clamp(0.84rem, 2.3vw, 0.95rem);
  line-height: 1.45;
  color: #c5d4f0;
  max-width: 38ch;
}

.game-tagline strong {
  color: #ffffff;
}

.records-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 16px;
}

.record-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 9px 6px;
}

.record-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.record-val {
  font-variant-numeric: tabular-nums;
  font-size: clamp(0.95rem, 2.8vw, 1.18rem);
  font-weight: 900;
}

.accent-cyan { color: var(--cyan); text-shadow: 0 0 12px rgba(0, 242, 254, 0.35); }
.accent-gold { color: var(--gold); text-shadow: 0 0 12px rgba(255, 209, 102, 0.35); }
.accent-pink { color: #ff5ca8; text-shadow: 0 0 12px rgba(255, 46, 147, 0.35); }

/* Skins Selector */
.skins-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.skins-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 9px;
}

.skin-hint {
  color: #dbeafe;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.skin-list {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.skin-swatch {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  display: grid;
  place-items: center;
}

.skin-swatch:hover {
  transform: scale(1.1);
}

.skin-swatch.selected {
  border-color: #ffffff;
  transform: scale(1.14);
  box-shadow: 0 0 16px currentColor;
}

.skin-swatch.locked {
  opacity: 0.42;
  filter: grayscale(0.45);
}

.skin-lock-icon {
  font-size: 0.78rem;
  text-shadow: 0 1px 4px #000;
}

/* Primary & Secondary Buttons */
.cta-btn {
  width: 100%;
  padding: 15px 22px;
  border: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #b517ff 100%);
  color: #040814;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 242, 254, 0.35);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.cta-btn span {
  color: #030712;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 242, 254, 0.5);
}

.cta-btn:active {
  transform: translateY(0) scale(0.98);
}

.pulse-glow {
  animation: ctaPulse 2.2s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 8px 26px rgba(0, 242, 254, 0.34); }
  50% { box-shadow: 0 10px 36px rgba(0, 242, 254, 0.62), 0 0 20px rgba(181, 23, 255, 0.4); }
}

.secondary-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.34);
}

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.controls-hint {
  margin-top: 14px;
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.hint-mobile { display: none; }
.hint-desktop { display: inline; }

@media (pointer: coarse) {
  .hint-mobile { display: inline; }
  .hint-desktop { display: none; }
}

/* Game Over Styling */
.panel-title {
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.panel-subtitle {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.new-record-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.25), rgba(255, 46, 147, 0.28));
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  box-shadow: 0 0 20px rgba(255, 209, 102, 0.35);
}

.near-rank-text {
  font-size: 0.8rem;
  color: #fbbf24;
  margin-top: 4px;
  min-height: 1.1em;
  font-weight: 700;
}

.go-hero-time {
  margin: 12px 0;
  padding: 14px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.09), rgba(181, 23, 255, 0.08));
  border: 1px solid rgba(0, 242, 254, 0.24);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.go-hero-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.go-hero-value {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 7vw, 2.7rem);
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 24px rgba(0, 242, 254, 0.55);
  line-height: 1.05;
}

.go-best-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.go-best-bar strong {
  color: #ffffff;
}

.unlocked-banner {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(6, 214, 160, 0.16);
  border: 1px solid rgba(6, 214, 160, 0.5);
  color: #6ee7b7;
  font-size: 0.78rem;
  font-weight: 800;
}

.quick-retry-hint {
  margin-top: 10px;
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Compact adjustments for short mobile landscape screens */
@media (max-height: 520px) {
  .glass-panel {
    padding: 12px 18px;
    border-radius: 18px;
  }
  .game-logo { font-size: 1.75rem; }
  .game-tagline { margin: 6px auto 10px; font-size: 0.8rem; }
  .records-grid { margin: 8px 0 10px; }
  .skins-section { margin-bottom: 10px; padding: 7px 10px; }
  .cta-btn { padding: 11px 18px; font-size: 0.95rem; }
  .go-hero-time { margin: 6px 0; padding: 8px; }
  .go-hero-value { font-size: 1.7rem; }
}

@media (max-width: 480px) {
  .hud-top {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "time right"
      "center center";
    gap: 6px;
  }
  .hud-time-card { grid-area: time; min-width: 0; }
  .hud-right-group { grid-area: right; }
  .hud-center { grid-area: center; width: 100%; }
  .fever-bar-wrap { width: 100%; height: 15px; }
  .hud-icon-btns { flex-direction: row; }
  .icon-btn { width: 34px; height: 34px; }
}
