@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

@theme inline {
  --color-background: hsl(var(--background));
  --color-foreground: hsl(var(--foreground));
  --color-border: hsl(var(--border));
  --color-input: hsl(var(--input));
  --color-ring: hsl(var(--ring));
  --color-card: hsl(var(--card));
  --color-card-foreground: hsl(var(--card-foreground));
  --color-popover: hsl(var(--popover));
  --color-popover-foreground: hsl(var(--popover-foreground));
  --color-primary: hsl(var(--primary));
  --color-primary-foreground: hsl(var(--primary-foreground));
  --color-secondary: hsl(var(--secondary));
  --color-secondary-foreground: hsl(var(--secondary-foreground));
  --color-muted: hsl(var(--muted));
  --color-muted-foreground: hsl(var(--muted-foreground));
  --color-accent: hsl(var(--accent));
  --color-accent-foreground: hsl(var(--accent-foreground));
  --color-destructive: hsl(var(--destructive));
  --color-destructive-foreground: hsl(var(--destructive-foreground));
  --font-sans: var(--app-font-sans);
  --font-mono: var(--app-font-mono);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
}

:root {
  --background: 156 40% 5%;
  --foreground: 141 35% 88%;
  --border: 151 32% 19%;
  --input: 151 30% 18%;
  --ring: 148 100% 66%;
  --card: 156 36% 8%;
  --card-foreground: 141 35% 88%;
  --popover: 156 35% 9%;
  --popover-foreground: 141 35% 88%;
  --primary: 147 87% 58%;
  --primary-foreground: 155 47% 7%;
  --secondary: 156 27% 15%;
  --secondary-foreground: 141 35% 88%;
  --muted: 157 27% 12%;
  --muted-foreground: 150 18% 58%;
  --accent: 41 92% 64%;
  --accent-foreground: 39 40% 8%;
  --destructive: 4 76% 62%;
  --destructive-foreground: 0 0% 98%;
  --app-font-sans: "Manrope", sans-serif;
  --app-font-mono: "DM Mono", monospace;
  --radius: 0.85rem;
}

@layer base {
  * {
    @apply border-border;
  }
  html {
    background: hsl(var(--background));
  }
  body {
    @apply font-sans antialiased bg-background text-foreground;
    min-width: 320px;
  }
  button,
  input {
    font: inherit;
  }
  button {
    -webkit-tap-highlight-color: transparent;
  }
}

@keyframes drift-near {
  0%,
  100% {
    transform: scale(1.07) translate3d(0, 0, 0) rotate(0.2deg);
  }
  50% {
    transform: scale(1.13) translate3d(-2.5%, 1.5%, 0) rotate(-0.5deg);
  }
}
@keyframes drift-mid {
  0%,
  100% {
    transform: scale(1.17) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.22) translate3d(2.5%, -1.5%, 0);
  }
}
@keyframes drift-far {
  0%,
  100% {
    transform: scale(1.28) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.34) translate3d(-1.7%, -2%, 0);
  }
}
@keyframes scan-line {
  0% {
    transform: translateY(-8%);
    opacity: 0;
  }
  12%,
  72% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(108%);
    opacity: 0;
  }
}
@keyframes radar-sweep {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes signal-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(78, 237, 142, 0.28);
  }
  50% {
    box-shadow: 0 0 0 13px rgba(78, 237, 142, 0);
  }
}
@keyframes blink-dot {
  50% {
    opacity: 0.3;
  }
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes note-float {
  0% {
    transform: translate3d(0, 112vh, 0) rotate(-18deg) scale(0.78);
    opacity: 0;
  }
  12% {
    opacity: 0.58;
  }
  50% {
    transform: translate3d(7vw, 38vh, 0) rotate(16deg) scale(1);
    opacity: 0.42;
  }
  88% {
    opacity: 0.58;
  }
  100% {
    transform: translate3d(-8vw, -22vh, 0) rotate(42deg) scale(1.14);
    opacity: 0;
  }
}
@keyframes note-shimmer {
  0%,
  100% {
    filter: brightness(0.75) saturate(0.75);
  }
  50% {
    filter: brightness(1.45) saturate(1.15);
  }
}
@keyframes intro-spark {
  0%,
  100% {
    opacity: 0.2;
    transform: scaleY(0.65) rotate(-25deg);
  }
  50% {
    opacity: 1;
    transform: scaleY(1) rotate(-25deg);
  }
}
@keyframes impact-flash {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  8% {
    opacity: 1;
  }
  32% {
    opacity: 0.38;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}
@keyframes impact-ring {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.15);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.3);
  }
}
@keyframes impact-bolt {
  0%,
  100% {
    opacity: 0;
    transform: scaleY(0.4) rotate(0deg);
  }
  12% {
    opacity: 1;
  }
  28% {
    opacity: 0.2;
    transform: scaleY(1.16) rotate(4deg);
  }
  44% {
    opacity: 0.95;
  }
  68% {
    opacity: 0;
    transform: scaleY(0.82) rotate(-3deg);
  }
}
@keyframes cash-explosion {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.25);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--tx), var(--ty), 0) rotate(var(--rot)) scale(1.1);
  }
}
@keyframes button-charge {
  0%,
  100% {
    box-shadow:
      0 10px 26px rgba(41, 209, 117, 0.2),
      0 0 0 rgba(70, 240, 143, 0);
  }
  50% {
    box-shadow:
      0 12px 34px rgba(41, 209, 117, 0.38),
      0 0 20px rgba(70, 240, 143, 0.18);
  }
}
@keyframes btn-jolt {
  0%,
  100% {
    box-shadow: 0 10px 26px rgba(41, 209, 117, 0.2);
  }
  28% {
    box-shadow:
      0 0 0 3px rgba(200, 255, 220, 0.55),
      0 0 34px 7px rgba(83, 240, 150, 0.6);
  }
  60% {
    box-shadow:
      0 0 0 7px rgba(83, 240, 150, 0),
      0 0 46px 11px rgba(83, 240, 150, 0.26);
  }
}
@keyframes storm-strobe {
  0% {
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  9% {
    opacity: 0.14;
  }
  14% {
    opacity: 0.95;
  }
  21% {
    opacity: 0.28;
  }
  28% {
    opacity: 0.82;
  }
  42% {
    opacity: 0.12;
  }
  58% {
    opacity: 0.36;
  }
  100% {
    opacity: 0;
  }
}
@keyframes bolt-strike {
  0% {
    stroke-dashoffset: 1;
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  17% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  27% {
    opacity: 0.22;
  }
  36% {
    opacity: 1;
  }
  48% {
    opacity: 0.18;
  }
  62% {
    opacity: 0.92;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
@keyframes ring-blast {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.08);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.7);
  }
}
@keyframes spark-core {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
}
@keyframes spark-ring {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2);
  }
}
@keyframes spark-bolt {
  0% {
    opacity: 0;
    transform: rotate(var(--r)) translateY(0) scaleY(0.3);
  }
  22% {
    opacity: 1;
  }
  55% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--r)) translateY(-30px) scaleY(1);
  }
}

.room-shell {
  position: relative;
  min-height: 100dvh;
  isolation: isolate;
  background: #03110b;
}
.room-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 20%, rgba(29, 126, 76, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(1, 12, 8, 0.58), rgba(1, 10, 7, 0.88));
}
.money-layer {
  position: fixed;
  z-index: -3;
  inset: -12%;
  pointer-events: none;
  background: center / cover no-repeat url("/money-background.png");
  will-change: transform;
}
.money-layer.near {
  opacity: 0.42;
  filter: contrast(1.15) saturate(1.1) blur(0.1px);
  animation: drift-near 18s ease-in-out infinite;
}
.money-layer.mid {
  opacity: 0.22;
  filter: blur(2px) saturate(0.82);
  animation: drift-mid 25s ease-in-out infinite reverse;
}
.money-layer.far {
  opacity: 0.14;
  filter: blur(7px) saturate(0.7);
  animation: drift-far 34s ease-in-out infinite;
}
.cash-field {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 700px;
}
.cash-note {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 58px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(143, 255, 184, 0.36);
  border-radius: 4px;
  color: rgba(165, 255, 194, 0.62);
  background:
    radial-gradient(circle at 50% 50%, rgba(117, 255, 158, 0.28), transparent 35%),
    linear-gradient(125deg, rgba(28, 101, 61, 0.32), rgba(9, 42, 27, 0.12));
  box-shadow:
    inset 0 0 12px rgba(120, 255, 164, 0.1),
    0 0 18px rgba(61, 245, 135, 0.08);
  font: 500 12px var(--app-font-mono);
  opacity: 0;
  animation:
    note-float 15s linear infinite,
    note-shimmer 4s ease-in-out infinite;
}
.cash-note::before,
.cash-note::after {
  content: "";
  position: absolute;
  inset: 5px 8px;
  border-top: 1px solid rgba(145, 255, 185, 0.26);
  border-bottom: 1px solid rgba(145, 255, 185, 0.18);
}
.cash-note::after {
  inset: 10px 23px;
  border: 1px solid rgba(145, 255, 185, 0.28);
  border-radius: 50%;
}
.note-1 {
  left: 6%;
  animation-delay:
    -11s,
    -2s;
  transform: scale(0.7);
}
.note-2 {
  left: 21%;
  animation-delay:
    -4s,
    -1s;
  animation-duration: 18s, 4.5s;
  transform: scale(1.2);
}
.note-3 {
  left: 34%;
  animation-delay:
    -9s,
    -3s;
  animation-duration: 13s, 3.5s;
  transform: scale(0.58);
}
.note-4 {
  left: 48%;
  animation-delay:
    -2s,
    -0.5s;
  animation-duration: 20s, 5s;
  transform: scale(1.35);
}
.note-5 {
  left: 65%;
  animation-delay:
    -13s,
    -2.6s;
  animation-duration: 16s, 4s;
  transform: scale(0.78);
}
.note-6 {
  left: 82%;
  animation-delay:
    -6s,
    -1.4s;
  animation-duration: 19s, 4.8s;
  transform: scale(1.05);
}
.note-7 {
  left: 12%;
  animation-delay:
    -15s,
    -0.7s;
  animation-duration: 22s, 3.8s;
  transform: scale(0.52);
}
.note-8 {
  left: 29%;
  animation-delay:
    -7s,
    -1.9s;
  animation-duration: 17s, 4.2s;
  transform: scale(1.05);
}
.note-9 {
  left: 43%;
  animation-delay:
    -12s,
    -3.2s;
  animation-duration: 14s, 5.4s;
  transform: scale(0.7);
}
.note-10 {
  left: 57%;
  animation-delay:
    -1s,
    -1.2s;
  animation-duration: 21s, 4.6s;
  transform: scale(0.58);
}
.note-11 {
  left: 73%;
  animation-delay:
    -10s,
    -2.2s;
  animation-duration: 15s, 3.3s;
  transform: scale(1.28);
}
.note-12 {
  left: 91%;
  animation-delay:
    -3s,
    -0.1s;
  animation-duration: 18s, 4.4s;
  transform: scale(0.66);
}
.note-13 {
  left: 38%;
  animation-delay:
    -17s,
    -3.8s;
  animation-duration: 24s, 5.6s;
  transform: scale(0.44);
}
.note-14 {
  left: 77%;
  animation-delay:
    -8s,
    -1.5s;
  animation-duration: 12s, 3.9s;
  transform: scale(0.48);
}
.grain {
  position: fixed;
  z-index: 10;
  inset: 0;
  pointer-events: none;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}
.intro-grid {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(113, 255, 168, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 255, 168, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 68%);
}
.intro-bolt {
  position: absolute;
  width: 2px;
  height: 42vh;
  background: linear-gradient(180deg, transparent, #a5ffc2 45%, transparent);
  opacity: 0.4;
  filter: blur(0.4px) drop-shadow(0 0 9px #55f192);
  animation: intro-spark 1.2s ease-in-out infinite;
}
.bolt-left {
  left: 20%;
  top: 30%;
  transform: rotate(-25deg);
}
.bolt-right {
  right: 20%;
  bottom: 29%;
  transform: rotate(25deg);
  animation-delay: -0.55s;
}
.scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.17;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 3px,
    rgba(129, 255, 181, 0.07) 4px,
    transparent 5px
  );
}
.scan-overlay::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 28vh;
  background: linear-gradient(180deg, transparent, rgba(110, 255, 165, 0.08), transparent);
  animation: scan-line 8s linear infinite;
}
.glass-panel {
  background: linear-gradient(135deg, rgba(7, 31, 21, 0.78), rgba(2, 19, 13, 0.63));
  border: 1px solid rgba(122, 255, 175, 0.17);
  box-shadow:
    inset 0 1px 0 rgba(195, 255, 216, 0.07),
    0 18px 60px rgba(0, 4, 2, 0.35);
  backdrop-filter: blur(15px);
}
.mono {
  font-family: var(--app-font-mono);
}
.display {
  font-family: "Space Grotesk", sans-serif;
}
.text-glow {
  text-shadow: 0 0 24px rgba(80, 240, 142, 0.35);
}
.signal-button {
  position: relative;
  overflow: hidden;
  transition:
    transform 160ms ease,
    filter 160ms ease,
    background-color 160ms ease;
  animation: button-charge 3.2s ease-in-out infinite;
}
.signal-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.signal-button:active {
  transform: translateY(2px) scale(0.985);
  animation: btn-jolt 0.5s ease-out;
}
.signal-button::after {
  content: "";
  position: absolute;
  inset: -80% 35%;
  transform: rotate(22deg) translateX(-180%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: transform 600ms ease;
  pointer-events: none;
}
.signal-button:hover::after {
  transform: rotate(22deg) translateX(300%);
}
.icon-button,
.time-button {
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}
.icon-button:active,
.time-button:active {
  transform: scale(0.9);
  box-shadow: 0 0 16px rgba(76, 241, 149, 0.24);
}
.signal-button:focus-visible,
.time-button:focus-visible,
.icon-button:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 3px;
}
.radar {
  position: relative;
  overflow: hidden;
}
.radar::after {
  content: "";
  position: absolute;
  width: 125%;
  aspect-ratio: 1;
  left: -12%;
  top: -12%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(101, 255, 164, 0.18) 30deg,
    transparent 56deg
  );
  animation: radar-sweep 5s linear infinite;
  pointer-events: none;
}
.signal-pulse {
  animation: signal-pulse 2.2s ease-out infinite;
}
.blink {
  animation: blink-dot 1.5s ease-in-out infinite;
}
.rise-in {
  animation: rise-in 650ms ease-out both;
}
.impact-overlay {
  position: fixed;
  z-index: 60;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 46%,
    rgba(79, 255, 150, 0.2),
    rgba(1, 16, 9, 0.3) 25%,
    transparent 58%
  );
}
.impact-flash {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 48vmax;
  height: 48vmax;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(220, 255, 231, 0.96) 0 2%,
    rgba(89, 255, 151, 0.64) 10%,
    rgba(44, 224, 124, 0.16) 32%,
    transparent 68%
  );
  transform: translate(-50%, -50%);
  animation: impact-flash 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.impact-ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 18rem;
  height: 18rem;
  border: 2px solid rgba(127, 255, 181, 0.8);
  border-radius: 50%;
  box-shadow:
    0 0 40px rgba(78, 242, 143, 0.26),
    inset 0 0 26px rgba(78, 242, 143, 0.15);
  animation: impact-ring 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ring-two {
  animation-delay: 120ms;
  border-color: rgba(249, 212, 121, 0.6);
}
.impact-bolt {
  position: absolute;
  left: 50%;
  top: 21%;
  width: 7px;
  height: 58%;
  background: linear-gradient(180deg, transparent, #eafff0 42%, #70fda4 58%, transparent);
  clip-path: polygon(55% 0, 100% 0, 63% 44%, 100% 44%, 24% 100%, 42% 52%, 0 52%);
  filter: drop-shadow(0 0 11px #77ffa8);
  transform-origin: 50% 50%;
  animation: impact-bolt 1.1s ease-in-out both;
}
.impact-bolt-one {
  transform: translateX(-8rem) rotate(-17deg);
}
.impact-bolt-two {
  transform: translateX(6rem) rotate(15deg);
  animation-delay: 140ms;
}
.impact-bolt-three {
  transform: translateX(1rem) rotate(2deg);
  animation-delay: 75ms;
}
.impact-cash {
  position: absolute;
  inset: 0;
}
.impact-note {
  --tx: 0vw;
  --ty: 0vh;
  --rot: 0deg;
  position: absolute;
  left: 50%;
  top: 46%;
  display: grid;
  width: 54px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(154, 255, 189, 0.7);
  border-radius: 4px;
  color: #baffcf;
  background: linear-gradient(135deg, rgba(71, 218, 126, 0.76), rgba(5, 63, 34, 0.82));
  box-shadow: 0 0 20px rgba(69, 236, 137, 0.24);
  font: 500 12px var(--app-font-mono);
  animation: cash-explosion 1.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.impact-note-1 {
  --tx: -48vw;
  --ty: -42vh;
  --rot: -46deg;
}
.impact-note-2 {
  --tx: -28vw;
  --ty: -52vh;
  --rot: 22deg;
  animation-delay: 40ms;
}
.impact-note-3 {
  --tx: -8vw;
  --ty: -45vh;
  --rot: -18deg;
  animation-delay: 80ms;
}
.impact-note-4 {
  --tx: 18vw;
  --ty: -49vh;
  --rot: 34deg;
  animation-delay: 20ms;
}
.impact-note-5 {
  --tx: 44vw;
  --ty: -38vh;
  --rot: 62deg;
  animation-delay: 65ms;
}
.impact-note-6 {
  --tx: -46vw;
  --ty: -10vh;
  --rot: -72deg;
  animation-delay: 100ms;
}
.impact-note-7 {
  --tx: 48vw;
  --ty: -8vh;
  --rot: 76deg;
  animation-delay: 140ms;
}
.impact-note-8 {
  --tx: -52vw;
  --ty: 24vh;
  --rot: 30deg;
  animation-delay: 15ms;
}
.impact-note-9 {
  --tx: -32vw;
  --ty: 40vh;
  --rot: -60deg;
  animation-delay: 75ms;
}
.impact-note-10 {
  --tx: -9vw;
  --ty: 42vh;
  --rot: 12deg;
  animation-delay: 130ms;
}
.impact-note-11 {
  --tx: 16vw;
  --ty: 44vh;
  --rot: -26deg;
  animation-delay: 50ms;
}
.impact-note-12 {
  --tx: 42vw;
  --ty: 28vh;
  --rot: 56deg;
  animation-delay: 110ms;
}
.impact-note-13 {
  --tx: 50vw;
  --ty: 8vh;
  --rot: -31deg;
  animation-delay: 30ms;
}
.impact-note-14 {
  --tx: -18vw;
  --ty: -34vh;
  --rot: 86deg;
  animation-delay: 180ms;
}
.impact-note-15 {
  --tx: 24vw;
  --ty: -31vh;
  --rot: -84deg;
  animation-delay: 90ms;
}
.impact-note-16 {
  --tx: -40vw;
  --ty: 8vh;
  --rot: 44deg;
  animation-delay: 160ms;
}
.impact-note-17 {
  --tx: 38vw;
  --ty: 17vh;
  --rot: -48deg;
  animation-delay: 220ms;
}
.impact-note-18 {
  --tx: -24vw;
  --ty: 18vh;
  --rot: 18deg;
  animation-delay: 260ms;
}
.impact-note-19 {
  --tx: 3vw;
  --ty: -39vh;
  --rot: -14deg;
  animation-delay: 200ms;
}
.impact-note-20 {
  --tx: 5vw;
  --ty: 38vh;
  --rot: 68deg;
  animation-delay: 240ms;
}

/* Lightning storm overlay (entering the signal room) */
.storm-overlay {
  position: fixed;
  z-index: 60;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.storm-flash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(220, 255, 232, 0.95),
      rgba(84, 255, 152, 0.34) 26%,
      transparent 62%
    ),
    rgba(198, 255, 220, 0.16);
  animation: storm-strobe 1.5s ease-out both;
}
.storm-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 46%, transparent 42%, rgba(1, 12, 8, 0.72));
}
.storm-bolts {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.storm-bolt {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: bolt-strike 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.storm-bolt-glow {
  stroke: rgba(72, 240, 145, 0.55);
  stroke-width: 1.6;
  filter: blur(1.2px) drop-shadow(0 0 6px #46ed8c);
}
.storm-bolt-core {
  stroke: #eafff0;
  stroke-width: 0.42;
  filter: drop-shadow(0 0 3px #b9ffd2) drop-shadow(0 0 7px #77ffa8);
}
.ring-three {
  animation-delay: 220ms;
  border-color: rgba(200, 255, 224, 0.5);
}

/* Click spark burst (every button press) */
.click-spark {
  position: absolute;
  width: 0;
  height: 0;
}
.click-core {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle, #f2fff6 0 30%, rgba(120, 255, 170, 0.7) 55%, transparent 72%);
  filter: drop-shadow(0 0 8px #77ffa8);
  animation: spark-core 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.click-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(126, 255, 181, 0.85);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(78, 242, 143, 0.4);
  animation: spark-ring 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.click-bolt {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 22px;
  transform-origin: 50% 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #f0fff5, #55f19200);
  filter: drop-shadow(0 0 5px #77ffa8);
  animation: spark-bolt 0.58s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Jackpot burst (Get Jackpot press) */
.jackpot-overlay {
  position: fixed;
  z-index: 65;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.jackpot-word {
  position: absolute;
  left: 50%;
  top: 45%;
  font:
    600 clamp(2.6rem, 15vw, 7rem)/0.9 "Space Grotesk",
    sans-serif;
  letter-spacing: -0.1em;
  color: #eafff0;
  text-shadow:
    0 0 26px rgba(93, 245, 152, 0.8),
    0 0 90px rgba(58, 219, 128, 0.45);
  animation: jackpot-pop 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.jackpot-rule {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 62vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 255, 178, 0.85), transparent);
  transform: translate(-50%, -50%) scaleX(0);
  animation: jackpot-rule 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes jackpot-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4) rotate(-7deg);
    filter: blur(9px);
  }
  10% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.14) rotate(2deg);
    filter: blur(0);
  }
  28% {
    transform: translate(-50%, -50%) scale(0.95) rotate(-1deg);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.28);
    filter: blur(4px);
  }
}
@keyframes jackpot-rule {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(1);
  }
}
.signal-button.jackpot-fire {
  animation: jackpot-fire 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes jackpot-fire {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  18% {
    transform: translateY(3px) scale(0.965);
    filter: brightness(1.5);
  }
  44% {
    transform: translateY(-4px) scale(1.02);
    filter: brightness(1.24);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@media (max-height: 740px) {
  .login-screen {
    padding-top: 1.1rem;
    padding-bottom: 1rem;
  }
  .login-screen > div {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .dashboard-screen {
    padding-top: 0.65rem;
  }
  .dashboard-screen .pt-8 {
    padding-top: 0.9rem;
  }
  .dashboard-screen .glass-panel {
    padding: 0.6rem;
  }
  .dashboard-screen .mt-3 {
    margin-top: 0.45rem;
  }
  .dashboard-screen .min-h-\[136px\] {
    min-height: 108px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
