/* ============================================================
   LEO DAVIDOV - standalone cursor game styles
   Extracted from leodavidov-site/css/style.css.
   ============================================================ */

:root {
  --bg: #040810;
  --text: #ffffff;
  --text-sec: #cccccc;
  --border-light: #2a2a2a;
  --radius-btn: 50px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-h: 72px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; }

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 40px;
  z-index: 10020;
  background: rgba(18, 18, 18, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.28);
}


.header__logo {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
  margin-right: auto;
}

.header__logo-brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header__logo-name {
  color: var(--text-sec);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header__nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
  margin-left: 20px;
}

.header__nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav-links a {
  color: var(--text-sec);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.header__nav-links a:hover {
  color: #e85000;
}

.header__nav-divider {
  flex-shrink: 0;
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
}

.btn-play-game {
  all: unset;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(.76,-0.25,.51,1.13);
}

.btn-play-game:hover {
  transform: scale(1.05);
}

.btn-play-game:active {
  transform: scale(0.97);
}

.btn-play-game > div {
  display: block;
  position: relative;
  padding: 0.65em 1.2em;
  border-radius: var(--radius-btn);
  background: #e85000;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-play-game > div > span {
  background: linear-gradient(
    to right,
    #fff, #fff,
    hsl(180,100%,50%), hsl(240,100%,50%), hsl(270,100%,50%),
    hsl(330,40%,70%), hsl(0,100%,50%), hsl(60,100%,50%), hsl(90,100%,75%),
    #fff, #fff
  ) no-repeat 100% 0% / 900%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 3s ease;
}

.btn-play-game:hover > div > span {
  background-position: 0% 0%;
}

.btn-play-game > div::before,
.btn-play-game > div::after {
  content: "";
  display: block;
  position: absolute;
  border-radius: var(--radius-btn);
  background: linear-gradient(
    to right,
    #fff, #fff,
    hsl(180,100%,50%), hsl(240,100%,50%), hsl(270,100%,50%),
    hsl(330,40%,70%), hsl(0,100%,50%), hsl(60,100%,50%), hsl(90,100%,75%),
    #fff, #fff
  ) no-repeat 100% 0% / 900%;
  transition: background-position 3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.btn-play-game > div::before {
  inset: -1.5px;
  z-index: -1;
  opacity: 0.25;
}

.btn-play-game > div::after {
  inset: 0;
  z-index: -2;
  filter: blur(0);
  opacity: 0;
}

.btn-play-game:hover > div::before {
  background-position: 0% 0%;
  opacity: 1;
}

.btn-play-game:hover > div::after {
  background-position: 0% 0%;
  filter: blur(28px);
  opacity: 0.5;
}

.btn-play-game:disabled {
  cursor: default;
  opacity: 0.5;
}

.game-shell {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  overflow: hidden;
}

.game-shell__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 70% at 82% 6%, rgba(230, 70, 0, 0.45) 0%, rgba(175, 45, 0, 0.18) 38%, transparent 65%),
    radial-gradient(ellipse 60% 56% at 12% 92%, rgba(232, 80, 0, 0.15) 0%, transparent 72%);
  z-index: 1;
  pointer-events: none;
}

.space-dim {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 18, 0.28);
  pointer-events: none;
  z-index: 1;
}

/* Depth cues: distant food types appear slightly out of focus */
.food-dot--ghost {
  filter: blur(0.6px);
}

.food-dot--cursed {
  filter: blur(0.3px);
}

.game-shell__hero {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--header-h) + 48px) 40px 56px;
  pointer-events: none;
}

.game-shell__eyebrow {
  margin: 0 0 16px;
  color: var(--text-sec);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.game-shell__title {
  margin: 0;
  font-size: clamp(52px, 8vw, 104px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.95;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .header {
    padding: 0 24px;
  }

  .header__nav-links,
  .header__nav-divider {
    display: none;
  }

  .game-shell__hero {
    padding: calc(var(--header-h) + 36px) 24px 44px;
  }

  .game-shell__title {
    font-size: 46px;
  }
}

.fps-monitor {
  position: fixed;
  left: 40px;
  top: calc(var(--header-h) + 134px);
  z-index: 120;
  pointer-events: none;
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 14, 20, 0.52);
  color: rgba(220, 252, 231, 0.95);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 1.2s ease;
}

.fps-monitor[data-fps-state="mid"] {
  color: rgba(254, 240, 138, 0.98);
  border-color: rgba(234, 179, 8, 0.5);
}

.fps-monitor[data-fps-state="low"] {
  color: rgba(254, 205, 211, 0.98);
  border-color: rgba(239, 68, 68, 0.58);
}

/* cursor dot - desktop only */
.cursor-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff6a1a 0%, #e85000 35%, rgba(232, 80, 0, 0.3) 65%, transparent 100%);
  filter: blur(2px);
  box-shadow: 0 0 14px 5px rgba(232, 80, 0, 0.55), 0 0 32px 12px rgba(232, 80, 0, 0.22);
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.3s, width 0.3s ease, height 0.3s ease, box-shadow 0.4s ease;
  will-change: transform;
}

/* Squish при поедании */
.cursor-dot.eat {
  animation: dot-eat 120ms ease forwards;
}
@keyframes dot-eat {
  0%   { transform: translate(-50%, -50%) scale(1); }
  40%  { transform: translate(-50%, -50%) scale(0.7); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Milestone: score >= 10 — золотое свечение */
.cursor-dot.milestone-1 {
  box-shadow: 0 0 14px 5px rgba(255, 200, 0, 0.65), 0 0 32px 12px rgba(255, 180, 0, 0.28);
}

/* Milestone: score >= 20 — белое/холодное свечение */
.cursor-dot.milestone-2 {
  box-shadow: 0 0 14px 5px rgba(200, 220, 255, 0.75), 0 0 32px 14px rgba(180, 210, 255, 0.32);
}

@media (pointer: coarse) { .cursor-dot { display: none !important; } }

/* ── CURSOR GAME ── */

/* Счёт над точкой — отдельный элемент body, позиция задаётся через JS */
.cursor-score {
  position: fixed;
  z-index: 10000;
  transform: translate(-50%, -100%);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  will-change: top, left, opacity;
  user-select: none;
}

/* Soft backdrop blur pulse on dot-eat (separate from contact modal) */
.game-eat-blur-overlay {
  --game-blur: 0px;
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.game-eat-blur-overlay.active {
  opacity: 0;
}

.game-hit-flash-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 60, 90, 0.16) 0%, rgba(255, 30, 70, 0.08) 35%, rgba(0, 0, 0, 0) 70%),
    rgba(120, 0, 20, 0.14);
  mix-blend-mode: screen;
}

@keyframes enemy-hit-flash {
  0% { opacity: 0; }
  18% { opacity: 0.55; }
  100% { opacity: 0; }
}

.game-hit-flash-overlay.active {
  animation: enemy-hit-flash 0.22s ease-out forwards;
}

/* Жёлтая еда */
.food-dot {
  position: fixed;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f5d000;
  box-shadow: 0 0 8px 3px rgba(245, 208, 0, 0.55);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%) scale(0);
  animation: food-appear 0.3s ease forwards;
  will-change: left, top;
}

@keyframes food-appear {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  60%  { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.food-dot.food-disappear {
  animation: food-vanish 0.3s ease forwards;
}

/* Red bonus dot — 2× size, red glow */
.food-dot--red {
  width: 30px !important;
  height: 30px !important;
  background: radial-gradient(circle, #ff6666 0%, #cc0000 40%, rgba(180,0,0,0.3) 70%, transparent 100%);
  box-shadow: 0 0 14px 5px rgba(220,0,0,0.7), 0 0 28px 10px rgba(180,0,0,0.3);
}

/* Ghost dot — translucent white, static, pulsing */
.food-dot--ghost {
  width: 22px !important;
  height: 22px !important;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(180,220,255,0.5) 50%, transparent 100%);
  box-shadow: 0 0 12px 4px rgba(180,220,255,0.6), 0 0 24px 8px rgba(120,180,255,0.3);
  opacity: 0.55;
  animation: ghost-pulse 1.2s ease-in-out infinite;
}
@keyframes ghost-pulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 0.85; transform: translate(-50%, -50%) scale(1.18); }
}

/* Cursed dot — purple, fast, eerie glow */
.food-dot--cursed {
  width: 18px !important;
  height: 18px !important;
  background: radial-gradient(circle, #dd88ff 0%, #7700cc 45%, rgba(100,0,180,0.3) 75%, transparent 100%);
  box-shadow: 0 0 12px 4px rgba(180,0,255,0.7), 0 0 24px 8px rgba(120,0,200,0.4);
  animation: cursed-flicker 0.8s ease-in-out infinite alternate;
}
@keyframes cursed-flicker {
  0%   { box-shadow: 0 0 12px 4px rgba(180,0,255,0.7), 0 0 24px 8px rgba(120,0,200,0.4); }
  100% { box-shadow: 0 0 18px 7px rgba(220,80,255,0.9), 0 0 36px 12px rgba(160,0,255,0.5); }
}

.enemy-dot {
  position: fixed;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 9998;
  border-radius: 3px;
  border: 1px solid rgba(255, 170, 190, 0.6);
  background: linear-gradient(145deg, #8e1538 0%, #540619 50%, #bc2b52 100%);
  box-shadow:
    0 0 10px rgba(214, 38, 88, 0.72),
    0 0 24px rgba(110, 0, 34, 0.46);
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  animation: enemy-appear 0.22s ease forwards;
  will-change: left, top, opacity, transform;
}

.heal-soul-dot {
  position: fixed;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 9998;
  border-radius: 3px;
  border: 1px solid rgba(160, 255, 198, 0.85);
  background: linear-gradient(145deg, #28c76f 0%, #0e7e45 48%, #3af08f 100%);
  box-shadow:
    0 0 10px rgba(58, 240, 143, 0.7),
    0 0 22px rgba(18, 162, 86, 0.45);
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  animation: enemy-appear 0.22s ease forwards;
  will-change: left, top, opacity, transform;
}

@keyframes enemy-appear {
  0%   { transform: translate(-50%, -50%) rotate(45deg) scale(0); opacity: 0; }
  60%  { transform: translate(-50%, -50%) rotate(45deg) scale(1.08); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(45deg) scale(1); opacity: 1; }
}

.enemy-dot.enemy-dot--parried {
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.2, 0.9, 0.25, 1), box-shadow 0.32s ease;
  opacity: 0.2;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.68);
  box-shadow: 0 0 8px rgba(230, 245, 255, 0.55), 0 0 20px rgba(180, 220, 255, 0.38);
}

.heal-soul-dot.enemy-dot--parried {
  opacity: 0.2;
  box-shadow: 0 0 8px rgba(186, 255, 220, 0.6), 0 0 22px rgba(92, 232, 163, 0.42);
}

.enemy-dot.enemy-dot--parry-bounce {
  animation: enemy-parry-bounce 0.26s cubic-bezier(0.25, 0.85, 0.28, 1);
}

@keyframes enemy-parry-bounce {
  0%   { transform: translate(-50%, -50%) rotate(45deg) scale(1); }
  32%  { transform: translate(-50%, -50%) rotate(45deg) scale(1.16); }
  68%  { transform: translate(-50%, -50%) rotate(45deg) scale(0.92); }
  100% { transform: translate(-50%, -50%) rotate(45deg) scale(0.86); }
}

.enemy-dot.enemy-dot--vanish,
.heal-soul-dot.enemy-dot--vanish {
  transition: opacity 0.22s ease, transform 0.22s ease;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.55);
}

.enemy-burst {
  --burst-main: rgba(255, 160, 188, 0.95);
  --burst-soft: rgba(239, 68, 68, 0.35);
  position: fixed;
  width: 2px;
  height: 2px;
  pointer-events: none;
  z-index: 10002;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 8px var(--burst-soft));
}

.enemy-burst--parry {
  --burst-main: rgba(236, 245, 255, 0.95);
  --burst-soft: rgba(181, 224, 255, 0.42);
}

.enemy-burst--heal {
  --burst-main: rgba(188, 255, 220, 0.95);
  --burst-soft: rgba(90, 232, 164, 0.42);
}

.enemy-burst__core,
.enemy-burst__ring,
.enemy-burst__ray {
  position: absolute;
  left: 0;
  top: 0;
}

.enemy-burst__core {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--burst-main) 0%, rgba(255, 255, 255, 0.7) 35%, rgba(255, 255, 255, 0) 72%);
  animation: enemy-burst-core 0.38s ease-out forwards;
}

.enemy-burst__ring {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--burst-main);
  opacity: 0.9;
  animation: enemy-burst-ring 0.44s ease-out forwards;
}

.enemy-burst__ray {
  width: var(--ray-len, 14px);
  height: 2px;
  border-radius: 999px;
  transform-origin: 0 50%;
  transform: translate(0, -50%) rotate(var(--ray-angle, 0deg));
  background: linear-gradient(90deg, var(--burst-main) 0%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  animation: enemy-burst-ray 0.42s ease-out forwards;
  animation-delay: var(--ray-delay, 0s);
}

@keyframes enemy-burst-core {
  0%   { opacity: 0.95; transform: translate(-50%, -50%) scale(0.2); }
  60%  { opacity: 0.65; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
}

@keyframes enemy-burst-ring {
  0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(0.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
}

@keyframes enemy-burst-ray {
  0%   { opacity: 0; transform: translate(0, -50%) rotate(var(--ray-angle, 0deg)) scaleX(0.2); }
  24%  { opacity: 1; transform: translate(0, -50%) rotate(var(--ray-angle, 0deg)) scaleX(1.1); }
  100% { opacity: 0; transform: translate(0, -50%) rotate(var(--ray-angle, 0deg)) scaleX(0.8); }
}

.perfect-parry-star {
  --star-life: 700ms;
  --star-drift-x: 0px;
  --star-drift-y: -20px;
  --star-scale: 1;
  position: fixed;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 240, 170, 0.95) 45%, rgba(255, 222, 120, 0.12) 100%);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 56%, 79% 92%, 50% 69%, 21% 92%, 32% 56%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 6px rgba(255, 234, 150, 0.6));
  opacity: 0;
  animation: perfect-parry-star-life var(--star-life) ease-out forwards;
}

@keyframes perfect-parry-star-life {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(-14deg);
  }
  20% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(calc(var(--star-scale) * 1.05)) rotate(8deg);
  }
  65% {
    opacity: 0.78;
    transform: translate(calc(-50% + var(--star-drift-x)), calc(-50% + var(--star-drift-y))) scale(var(--star-scale)) rotate(20deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--star-drift-x)), calc(-50% + var(--star-drift-y))) scale(calc(var(--star-scale) * 0.85)) rotate(36deg);
  }
}


@keyframes food-vanish {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

/* Hint "catch it" — появляется один раз */
.cursor-hint {
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: rgba(245, 208, 0, 0.7);
  letter-spacing: 0.08em;
  transform: translate(-50%, -50%);
  animation: hint-life 2.5s ease forwards;
  user-select: none;
}

@keyframes hint-life {
  0%   { opacity: 0; margin-top: 0px; }
  20%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; margin-top: -12px; }
}

/* Food word label */
.food-word {
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(245, 208, 0, 0.85);
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
  transform: translate(0, -50%);
  opacity: 0;
  transition: opacity 0.2s ease, top 0.08s ease, left 0.08s ease;
}
.food-word.visible { opacity: 1; }
.food-word.eating  { opacity: 0; transition: opacity 0.15s ease; }

/* XP ring flash on level up */
@keyframes ring-flash-anim {
  0%   { filter: drop-shadow(0 0 6px #fff) brightness(3); }
  100% { filter: none; }
}
.ring-flash {
  animation: ring-flash-anim 0.5s ease forwards;
}

.health-ring {
  will-change: top, left, opacity;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.45));
}

.shield-ring {
  will-change: top, left, opacity;
  filter: drop-shadow(0 0 7px rgba(220, 236, 255, 0.35));
}

/* Float / vibe animation for score + lvl labels */
/* XP % label — centered on dot */
.xp-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

/* LVL label — floats below ring */
.lvl-label {
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  letter-spacing: 0.06em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  will-change: top, left, opacity;
}

.quest-bar {
  position: fixed;
  top: calc(var(--header-h) + 28px);
  left: 40px;
  right: auto;
  width: min(340px, calc(100vw - 24px));
  max-height: min(44vh, 420px);
  overflow: hidden auto;
  pointer-events: none;
  z-index: 9995;
  opacity: 0;
  padding: 10px 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(128, 146, 170, 0.35);
  background: linear-gradient(145deg, rgba(11, 14, 19, 0.86) 0%, rgba(7, 10, 14, 0.92) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 28px rgba(255, 128, 0, 0.28),
    0 10px 28px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  transition: opacity 1.2s ease;
}

.quest-bar__head {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(234, 245, 255, 0.82);
  margin-bottom: 8px;
}

.quest-bar__item {
  margin-bottom: 8px;
}

.quest-bar__item:last-of-type {
  margin-bottom: 4px;
}

.quest-bar__item--done .quest-bar__title {
  color: rgba(198, 232, 208, 0.92);
}

.quest-bar__item--done .quest-bar__track span {
  background: linear-gradient(90deg, #22c55e 0%, #82f0b2 100%);
}

.quest-bar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.quest-bar__title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(238, 245, 255, 0.95);
  text-shadow: 0 0 6px rgba(255, 170, 82, 0.24);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quest-bar__meta {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(168, 190, 212, 0.88);
  flex-shrink: 0;
}

.quest-bar__track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.quest-bar__track span {
  display: block;
  position: relative;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #b9ff8c 0%, #dfff84 58%, #ffe992 100%);
  box-shadow: 0 0 10px rgba(218, 255, 152, 0.62), 0 0 20px rgba(248, 255, 178, 0.48);
}

.quest-bar__track span::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #f8ffbf;
  opacity: var(--tip-opacity, 0);
  box-shadow: 0 0 18px rgba(246, 255, 184, 1), 0 0 36px rgba(238, 255, 168, 0.9);
}

.quest-bar__more {
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(160, 178, 200, 0.86);
  letter-spacing: 0.04em;
}


.combo-bar {
  position: fixed;
  top: calc(var(--header-h) + 28px);
  left: 50%;
  transform: translateX(-50%);
  width: min(260px, calc(100vw - 80px));
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  z-index: 9995;
  opacity: 0;
  padding: 8px 14px;
  border-radius: 16px;
  border: 1px solid rgba(128, 200, 128, 0.28);
  background: linear-gradient(145deg, rgba(11, 14, 19, 0.86) 0%, rgba(7, 10, 14, 0.92) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 24px rgba(185, 255, 140, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  transition: opacity 1.2s ease;
}

.combo-bar__counter {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 900;
  color: rgba(185, 255, 140, 1);
  letter-spacing: 0.06em;
  text-shadow: 0 0 10px rgba(185, 255, 140, 0.8);
  transition: font-size 0.2s ease;
  flex-shrink: 0;
  min-width: 32px;
  text-align: right;
}

.combo-bar__label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(185, 255, 140, 0.85);
  flex-shrink: 0;
}

.combo-bar__track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.combo-bar__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b9ff8c 0%, #dfff84 60%, #ffe992 100%);
  box-shadow: 0 0 10px rgba(185, 255, 140, 0.7);
  transition: width 0.15s ease;
}


@media (max-width: 680px) {
  .combo-bar {
    width: min(220px, calc(100vw - 60px));
  }
}

@media (max-width: 680px) {
  .quest-bar {
    top: calc(var(--header-h) + 28px);
    left: 24px;
    right: auto;
    width: min(320px, calc(100vw - 40px));
    border-radius: 14px;
    padding: 8px 10px 8px;
  }
}

/* Pulse animation on dot */
@keyframes dot-pulse {
  0%   { transform: translate(-50%, -50%) scale(1); }
  40%  { transform: translate(-50%, -50%) scale(1.15); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
.cursor-dot.pulse {
  animation: dot-pulse 0.35s ease forwards;
}

/* Squash/stretch on food dot catch */
@keyframes dot-squash {
  0%   { transform: translate(-50%, -50%) scaleX(1.3) scaleY(0.7); }
  100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}
.food-dot.food-squash {
  animation: dot-squash 80ms ease forwards;
  pointer-events: none;
}

/* Cursor shake on game-over */
@keyframes cursor-shake {
  0%   { transform: translate(-50%, -50%) translateX(0); }
  20%  { transform: translate(-50%, -50%) translateX(-4px); }
  40%  { transform: translate(-50%, -50%) translateX(4px); }
  60%  { transform: translate(-50%, -50%) translateX(-4px); }
  80%  { transform: translate(-50%, -50%) translateX(4px); }
  100% { transform: translate(-50%, -50%) translateX(0); }
}
.cursor-dot.shake {
  animation: cursor-shake 400ms ease forwards;
}

/* Ghost blink countdown in last 1000ms */
@keyframes ghost-blink {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 0.15; transform: translate(-50%, -50%) scale(1); }
}
.food-dot--ghost.ghost-blink {
  animation: ghost-blink 250ms ease infinite;
}

/* Session exit summary */
.session-summary {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  font-size: 18px;
  padding: 22px 36px;
  border-radius: 14px;
  z-index: 99999;
  pointer-events: none;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.18);
  letter-spacing: 0.02em;
}

/* Expanding pulse rings */
@keyframes pulse-ring-anim {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}
.pulse-ring {
  position: fixed;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.8);
  pointer-events: none;
  z-index: 9997;
  animation: pulse-ring-anim 0.6s ease-out forwards;
}

/* ── WANT TO PLAY PROMPT ── */

.menu-panel {
  position: fixed;
  top: calc(var(--header-h) + 8px);
  right: 40px;
  width: 170px;
  transform: translateY(-6px);
  z-index: 10010;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.menu-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.menu-panel-btn,
.menu-panel-close {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-btn);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}
.menu-panel-btn:hover,
.menu-panel-close:hover {
  border-color: var(--text);
  background: rgba(255,255,255,0.06);
}
.menu-panel-btn:active,
.menu-panel-close:active {
  transform: scale(0.97);
}

/* ── CONTACT MODAL ── */
.game-over-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(8, 8, 12, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.25s ease;
}

.game-over-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.game-over-panel {
  width: min(520px, calc(100vw - 32px));
  border-radius: 18px;
  padding: 26px 20px 18px;
  background: rgba(12, 12, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.game-over-title {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 16px;
}

.game-over-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.game-over-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: none;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font: 600 13px/1 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.12s;
}

.game-over-btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.game-over-btn:active {
  transform: scale(0.98);
}

.game-over-btn--danger {
  border-color: rgba(255, 120, 120, 0.72);
}

.game-over-saves {
  margin-top: 6px;
  max-height: min(66vh, 560px);
  overflow-y: auto;
  padding-right: 4px;
}

.game-over-saves-title {
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
  font: 600 12px/1.2 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.game-over-saves-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.game-over-save-btn {
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  font: 600 12px/1 'Inter', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.game-over-save-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.07);
}

.game-over-save-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.music-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(8, 10, 14, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.22s ease;
}

.music-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.music-menu-panel {
  width: min(940px, calc(100vw - 28px));
  max-height: min(86vh, 920px);
  overflow: hidden;
  border-radius: 18px;
  padding: 18px;
  background: rgba(10, 12, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.52);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.music-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.music-menu-title {
  color: #fff;
  font: 800 24px/1 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.music-menu-close {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font: 600 11px/1 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.music-menu-close:hover {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}

.music-menu-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font: 500 12px/1.35 'Inter', sans-serif;
  letter-spacing: 0.03em;
}

.music-menu-list {
  overflow-y: auto;
  padding-right: 4px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.music-effect-item {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  align-items: center;
  gap: 10px;
}

.music-effect-fn {
  color: rgba(255, 255, 255, 0.96);
  font: 700 13px/1.2 'Inter', sans-serif;
  letter-spacing: 0.05em;
}

.music-effect-desc {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.66);
  font: 500 11px/1.3 'Inter', sans-serif;
  letter-spacing: 0.02em;
}

.music-effect-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.music-variant-btn {
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.9);
  font: 600 11px/1 'Inter', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.music-variant-btn:hover {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.09);
}

.music-variant-btn.active {
  border-color: rgba(104, 239, 171, 0.9);
  background: rgba(62, 188, 128, 0.2);
  color: #e8fff3;
}

@media (max-width: 720px) {
  .game-over-saves-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .music-menu-panel {
    width: calc(100vw - 18px);
    padding: 12px;
  }

  .music-effect-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .fps-monitor {
    left: 24px;
    top: calc(var(--header-h) + 134px);
  }
}
