:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  display: flex;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, #1e2a45, #0a101d 62%);
  color: #e8ecff;
  font-family: "Inter", "Segoe UI", sans-serif;
}

.clicker {
  position: relative;
  overflow: hidden;
  width: min(720px, 100%);
  background: rgba(9, 14, 30, 0.84);
  border: 1px solid rgba(133, 157, 255, 0.35);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 18px 42px rgba(1, 3, 10, 0.55);
}

.clicker__header h1 {
  margin: 0;
  font-size: clamp(1.3rem, 3.4vw, 1.85rem);
}

.clicker__header p {
  margin: 8px 0 0;
  color: #b6c4ff;
}

.clicker__stats {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.clicker__stats p {
  margin: 0;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(38, 58, 120, 0.28);
  border: 1px solid rgba(133, 157, 255, 0.34);
  color: #dce4ff;
}

.clicker__main {
  position: relative;
  isolation: isolate;
  margin-top: 16px;
  width: 100%;
  min-height: 74px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 700;
  color: #041329;
  background: linear-gradient(135deg, #7fd7ff, #73a8ff);
  transition: transform 0.12s ease, filter 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 10px 20px rgba(48, 94, 150, 0.28);
}

.clicker__main:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.clicker__main:active,
.clicker__main.is-pressed {
  transform: translateY(1px) scale(0.992);
  filter: brightness(1.02);
}

.clicker__main.is-combo {
  background: linear-gradient(135deg, #9dffcf, #73f6ff);
  box-shadow: 0 0 0 1px rgba(157, 255, 207, 0.5), 0 14px 32px rgba(66, 210, 175, 0.45);
}

.clicker__main::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0));
}

.clicker__main.is-pressed::after {
  animation: clickerTapFlash 240ms ease-out;
}

.clicker__effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.clicker__floating {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.clicker__floating--click {
  color: #ecf7ff;
  animation: clickerFloat 680ms ease-out forwards;
}

.clicker__floating--auto {
  color: #89f7d2;
  animation: clickerFloatAuto 900ms ease-out forwards;
}

.clicker__floating--combo {
  color: #b4ffd0;
  letter-spacing: 0.03em;
  font-size: 1.02rem;
  animation: clickerFloatCombo 1000ms cubic-bezier(0.19, 0.85, 0.29, 1) forwards;
}

.clicker__stats p.is-pulsing {
  animation: clickerChipPulse 340ms ease-out;
}

.clicker__shop {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.clicker__shop button {
  min-height: 54px;
  border: 1px solid rgba(133, 157, 255, 0.35);
  border-radius: 12px;
  background: rgba(27, 41, 86, 0.48);
  color: #e8ecff;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.clicker__shop button:hover {
  transform: translateY(-1px);
  border-color: rgba(172, 190, 255, 0.62);
}

.clicker__status {
  margin: 12px 0 0;
  min-height: 1.6em;
  color: #dce4ff;
}

@keyframes clickerTapFlash {
  0% {
    opacity: 0.75;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes clickerFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -34%);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -230%);
  }
}

@keyframes clickerFloatAuto {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150%);
  }
}

@keyframes clickerChipPulse {
  0% {
    transform: scale(1);
    border-color: rgba(133, 157, 255, 0.34);
  }
  50% {
    transform: scale(1.04);
    border-color: rgba(124, 248, 214, 0.7);
  }
  100% {
    transform: scale(1);
    border-color: rgba(133, 157, 255, 0.34);
  }
}

@keyframes clickerFloatCombo {
  0% {
    opacity: 0;
    transform: translate(-50%, -25%) scale(0.82);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -42%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -210%) scale(1.06);
  }
}

@media (max-width: 560px) {
  body {
    padding: 12px;
  }

  .clicker {
    border-radius: 16px;
    padding: 16px;
  }

  .clicker__shop {
    grid-template-columns: 1fr;
  }
}
