.fs-screen-tap {
  --tap-blue: #38bdf8;
  --tap-green: #22c55e;
  --tap-gold: #fbbf24;
  min-height: 0;
  gap: 10px;
}

.fs-tap-dashboard {
  padding: 11px 12px 10px;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 20px;
  background:
    radial-gradient(circle at 95% 0%, rgba(14, 165, 233, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(15, 29, 48, 0.98), rgba(12, 24, 40, 0.98));
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.22);
}

.fs-tap-energy-heading,
.fs-tap-energy-title,
.fs-tap-balance-label {
  display: flex;
  align-items: center;
}

.fs-tap-energy-heading {
  justify-content: space-between;
  gap: 10px;
}

.fs-tap-energy-title {
  gap: 8px;
  min-width: 0;
}

.fs-tap-energy-title > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.fs-tap-energy-title small {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.fs-tap-energy-title strong {
  margin-top: 1px;
  color: #f8fafc;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.fs-tap-energy-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(14, 116, 144, 0.42), rgba(15, 23, 42, 0.85));
  box-shadow: inset 0 0 16px rgba(56, 189, 248, 0.1);
  font-size: 15px;
}

.fs-tap-ready-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(34, 197, 94, 0.55);
  border-radius: 999px;
  background: rgba(22, 101, 52, 0.18);
  color: #86efac;
  font-size: 9px;
  font-weight: 800;
}

.fs-tap-ready-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  content: "";
}

.fs-tap-ready-pill[data-state="active"] {
  border-color: rgba(56, 189, 248, 0.58);
  background: rgba(14, 116, 144, 0.18);
  color: #7dd3fc;
}

.fs-tap-ready-pill[data-state="empty"] {
  border-color: rgba(251, 191, 36, 0.52);
  background: rgba(146, 64, 14, 0.16);
  color: #fde68a;
}

.fs-tap-energy-track {
  display: block;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: inset 0 1px 2px rgba(2, 6, 23, 0.6);
}

.fs-tap-energy-track > span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.42);
  transition: width 180ms ease;
}

.fs-tap-goal-line {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.4;
}

.fs-tap-metrics {
  display: grid;
  grid-template-columns: 0.8fr 0.9fr 1.3fr;
  gap: 7px;
  margin-top: 9px;
}

.fs-tap-next-level-line {
  margin: 6px 0 0;
  color: #86efac;
  font-size: 10px;
  font-weight: 600;
}

.fs-tap-metric {
  display: flex;
  min-width: 0;
  min-height: 48px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 7px 8px;
  border: 1px solid rgba(71, 85, 105, 0.56);
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.56);
  color: #e2e8f0;
  text-align: left;
}

.fs-tap-metric .fs-tap-label {
  overflow: hidden;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-tap-metric strong {
  color: #f8fafc;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.fs-tap-balance-card {
  appearance: none;
  width: 100%;
  cursor: pointer;
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(145deg, rgba(20, 83, 45, 0.3), rgba(15, 23, 42, 0.68));
  box-shadow: inset 0 0 16px rgba(34, 197, 94, 0.05);
}

.fs-tap-balance-label {
  justify-content: space-between;
  gap: 4px;
}

.fs-tap-balance-arrow {
  margin-left: auto;
  color: #4ade80;
  font-size: 15px;
}

.fs-tap-game {
  isolation: isolate;
  min-height: 360px;
  margin-top: 0;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% -10%, rgba(14, 165, 233, 0.18), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(34, 197, 94, 0.09), transparent 34%),
    linear-gradient(180deg, #030817 0%, #050d1d 54%, #081426 100%);
  box-shadow:
    inset 0 0 42px rgba(2, 6, 23, 0.56),
    0 16px 34px rgba(2, 6, 23, 0.25);
  cursor: crosshair;
  touch-action: none;
}

.fs-tap-game::before,
.fs-tap-game::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.fs-tap-game::before {
  z-index: 1;
  background:
    radial-gradient(circle at 18% 24%, rgba(125, 211, 252, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 16%, rgba(134, 239, 172, 0.38) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 48%, rgba(125, 211, 252, 0.32) 0 1px, transparent 2px),
    radial-gradient(circle at 32% 68%, rgba(253, 230, 138, 0.28) 0 1px, transparent 2px);
  background-size: 130px 170px, 170px 150px, 210px 190px, 190px 220px;
  opacity: 0.46;
}

.fs-tap-game::after {
  z-index: 30;
  border-radius: inherit;
  background: radial-gradient(circle at var(--flash-x, 50%) var(--flash-y, 50%), rgba(255, 255, 255, 0.34), rgba(56, 189, 248, 0.12) 9%, transparent 28%);
  opacity: 0;
}

.fs-tap-game.fs-tap-game--flash::after {
  animation: fs-tap-arena-flash 260ms ease-out;
}

.fs-tap-game.fs-tap-game--miss {
  animation: fs-tap-arena-miss 260ms ease-out;
}

.fs-tap-arena-glow {
  position: absolute;
  z-index: 0;
  top: -90px;
  left: 50%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.12);
  filter: blur(50px);
  pointer-events: none;
  transform: translateX(-50%);
}

.fs-tap-arena-grid {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 86%);
  pointer-events: none;
}

.fs-tap-arena-hud {
  position: absolute;
  z-index: 12;
  top: 10px;
  left: 10px;
  display: grid;
  width: calc(100% - 20px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  pointer-events: none;
}

.fs-tap-arena-hud > span {
  display: flex;
  min-width: 0;
  min-height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 5px 7px;
  border: 1px solid rgba(71, 85, 105, 0.52);
  border-radius: 11px;
  background: rgba(7, 15, 31, 0.76);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(8px);
}

.fs-tap-arena-hud small {
  overflow: hidden;
  color: #64748b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.fs-tap-arena-hud strong {
  overflow: hidden;
  color: #e2e8f0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-tap-hint {
  z-index: 10;
  display: flex;
  width: min(280px, calc(100% - 44px));
  max-width: none;
  min-height: 132px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 18px;
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 20px;
  background: rgba(8, 20, 38, 0.86);
  box-shadow:
    0 18px 42px rgba(2, 6, 23, 0.48),
    inset 0 0 26px rgba(14, 165, 233, 0.05);
  opacity: 1;
  pointer-events: none;
  backdrop-filter: blur(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.fs-tap-hint.fs-tap-hint--hidden {
  opacity: 0;
  transform: translate(-50%, -46%) scale(0.94);
}

.fs-tap-hint-kicker {
  color: #7dd3fc;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.fs-tap-hint strong {
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.2;
}

.fs-tap-hint > span:not(.fs-tap-hint-kicker) {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.4;
}

.fs-tap-drop-note {
  position: absolute;
  z-index: 12;
  bottom: 9px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 24px);
  padding: 5px 9px;
  border: 1px solid rgba(71, 85, 105, 0.42);
  border-radius: 999px;
  background: rgba(7, 15, 31, 0.72);
  color: #94a3b8;
  font-size: 8px;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.fs-tap-drop-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
}

.fs-tap-coin {
  --coin-size: 52px;
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  display: grid;
  width: var(--coin-size);
  height: var(--coin-size);
  place-items: center;
  overflow: visible;
  border: 1px solid rgba(186, 230, 253, 0.52);
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 25%, rgba(255, 255, 255, 0.98) 0 5%, rgba(186, 230, 253, 0.74) 12%, transparent 28%),
    radial-gradient(circle at 52% 55%, rgba(14, 165, 233, 0.26), rgba(5, 18, 39, 0.96) 68%),
    linear-gradient(145deg, rgba(56, 189, 248, 0.72), rgba(34, 197, 94, 0.22));
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.07),
    0 10px 28px rgba(2, 6, 23, 0.62),
    0 0 24px rgba(56, 189, 248, 0.2),
    inset 0 -8px 16px rgba(2, 6, 23, 0.54),
    inset 0 6px 12px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  opacity: 1;
  touch-action: none;
  transform-origin: center;
  transition: none !important;
  will-change: transform;
}

.fs-tap-coin::before {
  inset: 5px;
  padding: 0;
  border: 1px solid rgba(125, 211, 252, 0.25);
  background: conic-gradient(from 20deg, transparent, rgba(125, 211, 252, 0.42), transparent 34%, rgba(134, 239, 172, 0.28), transparent 72%);
  -webkit-mask: none;
  mask: none;
  mix-blend-mode: screen;
  opacity: 0.8;
}

.fs-tap-coin::after {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.18);
  content: "";
  pointer-events: none;
}

.fs-tap-coin-rim {
  inset: 4px;
  border: 1px dashed rgba(186, 230, 253, 0.28);
  box-shadow: inset 0 0 0 2px rgba(2, 6, 23, 0.28);
  background: transparent;
  animation: fs-tap-rim-spin 2.6s linear infinite;
}

.fs-tap-coin svg {
  z-index: 2;
  width: 48%;
  height: 48%;
  opacity: 0.92;
  filter: drop-shadow(0 0 7px rgba(125, 211, 252, 0.65));
}

.fs-tap-coin svg path {
  fill: #e0f2fe;
}

.fs-tap-coin--real {
  border-color: rgba(186, 230, 253, 0.52);
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.07),
    0 10px 28px rgba(2, 6, 23, 0.62),
    0 0 24px rgba(56, 189, 248, 0.2),
    inset 0 -8px 16px rgba(2, 6, 23, 0.54),
    inset 0 6px 12px rgba(255, 255, 255, 0.1);
}

.fs-tap-coin--boom {
  pointer-events: none;
  animation: fs-tap-orb-pop 180ms ease-out forwards;
}

.fs-tap-coin-piece,
.fs-tap-spark {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: var(--particle-size, 7px);
  height: var(--particle-size, 7px);
  border-radius: 50%;
  background: var(--particle-color, #7dd3fc);
  box-shadow: 0 0 10px var(--particle-color, #7dd3fc);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: fs-tap-particle-flight var(--particle-time, 620ms) cubic-bezier(0.16, 0.78, 0.3, 1) forwards;
  animation-delay: var(--particle-delay, 0ms);
}

.fs-tap-spark {
  width: 2px;
  height: var(--spark-length, 20px);
  border-radius: 999px;
  transform-origin: 50% 100%;
}

.fs-tap-burst-ring,
.fs-tap-burst-flash {
  position: absolute;
  z-index: 18;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.15);
}

.fs-tap-burst-ring {
  width: 42px;
  height: 42px;
  border: 2px solid var(--burst-color, #7dd3fc);
  box-shadow: 0 0 18px var(--burst-color, #7dd3fc), inset 0 0 12px var(--burst-color, #7dd3fc);
  animation: fs-tap-ring-burst 440ms ease-out forwards;
}

.fs-tap-burst-flash {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), var(--burst-color, #7dd3fc) 18%, transparent 68%);
  filter: blur(1px);
  animation: fs-tap-flash-burst 260ms ease-out forwards;
}

.fs-coin-fly {
  z-index: 24;
  color: #f8fafc;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.9), 0 3px 8px rgba(2, 6, 23, 0.8);
  animation: fs-tap-score-fly 620ms cubic-bezier(0.18, 0.8, 0.25, 1) forwards;
}

.fs-coin-fly--reward {
  color: #fde68a;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.95), 0 3px 8px rgba(2, 6, 23, 0.8);
}

.fs-tap-combo-callout {
  position: absolute;
  z-index: 28;
  top: 28%;
  left: 50%;
  color: #e0f2fe;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0.05em;
  pointer-events: none;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.9), 0 4px 14px rgba(2, 6, 23, 0.9);
  transform: translate(-50%, -50%);
  animation: fs-tap-combo-callout 700ms ease-out forwards;
}

.fs-tap-upgrade-btn {
  min-height: 60px;
  padding: 10px 12px;
  border-color: rgba(71, 85, 105, 0.72);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(15, 29, 48, 0.98), rgba(12, 24, 40, 0.98));
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.24);
}

.fs-tap-upgrade-btn-icon {
  border: 1px solid rgba(74, 222, 128, 0.42);
  background: rgba(22, 101, 52, 0.5);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.18);
}

.fs-tap-upgrade-screen {
  padding: 14px 12px 16px;
  border-color: rgba(71, 85, 105, 0.75);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 0%, rgba(14, 165, 233, 0.1), transparent 35%),
    linear-gradient(180deg, rgba(13, 25, 43, 0.99), rgba(10, 20, 35, 0.995));
}

.fs-tap-upgrade-header > div:first-child {
  min-width: 0;
  flex: 1;
}

.fs-tap-upgrade-title {
  color: #f8fafc;
  font-size: 16px;
  font-weight: 800;
}

.fs-tap-upgrade-current {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.fs-tap-upgrade-current > span {
  display: flex;
  min-width: 0;
  min-height: 43px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 6px 7px;
  border: 1px solid rgba(71, 85, 105, 0.55);
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.58);
  font-size: 8px;
}

.fs-tap-upgrade-current span strong {
  overflow: hidden;
  color: #f8fafc;
  font-size: 12px;
  text-overflow: ellipsis;
}

.fs-tap-upgrade-close {
  border: 1px solid rgba(71, 85, 105, 0.58);
  background: rgba(15, 23, 42, 0.7);
}

.fs-tap-upgrade-tabs {
  position: relative;
  z-index: 2;
  padding: 3px;
  border: 1px solid rgba(71, 85, 105, 0.52);
  border-radius: 14px;
  background: rgba(8, 17, 32, 0.68);
}

.fs-tap-upgrade-tab {
  min-height: 38px;
  padding: 8px 6px;
  border: 0;
  border-radius: 11px;
  background: transparent;
}

.fs-tap-upgrade-tab--active {
  border: 1px solid rgba(34, 197, 94, 0.62);
  background: linear-gradient(145deg, rgba(22, 101, 52, 0.42), rgba(15, 23, 42, 0.74));
  box-shadow: inset 0 0 18px rgba(34, 197, 94, 0.06);
}

.fs-upgrade-row {
  min-height: 62px;
  padding: 9px 10px;
  border-color: rgba(71, 85, 105, 0.62);
  border-radius: 14px;
  background: rgba(13, 25, 43, 0.72);
}

.fs-upgrade-row--available {
  background: linear-gradient(145deg, rgba(20, 83, 45, 0.34), rgba(13, 25, 43, 0.78));
  box-shadow: inset 0 0 22px rgba(34, 197, 94, 0.06);
}

@keyframes fs-tap-rim-spin {
  to { transform: rotate(360deg); }
}

@keyframes fs-tap-orb-pop {
  0% { opacity: 1; filter: brightness(1); scale: 1; }
  45% { opacity: 1; filter: brightness(2.2); scale: 1.28; }
  100% { opacity: 0; filter: brightness(2.6); scale: 0.18; }
}

@keyframes fs-tap-particle-flight {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--particle-rotate, 180deg)) scale(0.12);
  }
}

@keyframes fs-tap-ring-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.15); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.35); }
}

@keyframes fs-tap-flash-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.45); }
}

@keyframes fs-tap-score-fly {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.7); }
  18% { opacity: 1; transform: translate(-50%, -3px) scale(1.14); }
  100% { opacity: 0; transform: translate(-50%, -52px) scale(0.9); }
}

@keyframes fs-tap-combo-callout {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(0.65); }
  22% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -100%) scale(0.92); }
}

@keyframes fs-tap-arena-flash {
  0% { opacity: 0; }
  24% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes fs-tap-arena-miss {
  0%, 100% { border-color: rgba(56, 189, 248, 0.35); }
  50% { border-color: rgba(248, 113, 113, 0.75); box-shadow: inset 0 0 40px rgba(127, 29, 29, 0.2); }
}

@media (max-width: 390px) {
  .fs-tap-dashboard {
    padding-inline: 9px;
  }

  .fs-tap-metrics {
    gap: 5px;
  }

  .fs-tap-metric {
    padding-inline: 6px;
  }

  .fs-tap-metric .fs-tap-label {
    font-size: 8px;
  }

  .fs-tap-coin {
    --coin-size: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fs-tap-coin-rim {
    animation: none;
  }

  .fs-tap-coin,
  .fs-tap-coin-piece,
  .fs-tap-spark,
  .fs-tap-burst-ring,
  .fs-tap-burst-flash,
  .fs-coin-fly,
  .fs-tap-combo-callout {
    animation-duration: 1ms !important;
  }
}
