/* Platform Block Overlay */
.platform-block {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #150f1b, #2a1f39);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.platform-block.hidden {
  display: none;
}

.platform-block__content {
  text-align: center;
  max-width: 320px;
}

.platform-block__icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.platform-block__title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
}

.platform-block__text {
  font-size: 15px;
  color: #dbcfae;
  margin: 0 0 24px;
  line-height: 1.5;
}

.platform-block__btn {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(145deg, #ffca4a, #ff9f2f);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(255, 202, 74, 0.3);
}

.platform-block__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 202, 74, 0.4);
}

.platform-block__qr {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.platform-block__qr img {
  border-radius: 12px;
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.platform-block__qr span {
  font-size: 13px;
  color: #8a8a8a;
}

:root {
  --bg-a: #150f1b;
  --bg-b: #2a1f39;
  --panel: rgba(25, 20, 38, 0.74);
  --panel-line: rgba(255, 255, 255, 0.12);
  --text: #fff6e9;
  --muted: #dbcfae;
  --gold: #ffca4a;
  --gold-strong: #ff9f2f;
  --mint: #60f0bb;
  --danger: #ff7676;
  --radius: 18px;
  --shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at 15% 0%, #3f2d61, transparent 58%),
    radial-gradient(circle at 90% 20%, #224f57, transparent 50%),
    linear-gradient(160deg, var(--bg-a), var(--bg-b));
  color: var(--text);
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  padding: calc(14px + env(safe-area-inset-top)) 10px calc(14px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: radial-gradient(rgba(255, 255, 255, 0.23) 0.5px, transparent 0.5px);
  background-size: 2.2px 2.2px;
}

.app {
  width: min(460px, 100%);
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
}

.stat {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px;
  text-align: center;
}

.stat__label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
}

.stat__value {
  font-size: 14px;
}

.stat__value.is-online {
  color: var(--mint);
}

.stat__value.is-offline {
  color: #ffc9ab;
}

.arena {
  position: relative;
  padding: 14px 12px 16px;
  overflow: hidden;
}

.arena__glow {
  position: absolute;
  inset: -25% 10% auto;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 212, 122, 0.22), transparent 70%);
  pointer-events: none;
}

.sound-toggle {
  position: absolute;
  left: 12px;
  top: 10px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.4), rgba(20, 10, 5, 0.5));
  border: 1px solid rgba(255, 200, 100, 0.2);
  color: #ffecb9;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.2s;
  z-index: 10;
}

.sound-toggle:active {
  transform: scale(0.9);
}

.sound-icon {
  width: 20px;
  height: 20px;
}

.sound-icon--off {
  display: none;
  color: var(--danger);
}

.sound-toggle.is-muted .sound-icon--on {
  display: none;
}

.sound-toggle.is-muted .sound-icon--off {
  display: block;
}

.combo {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #ffecb9;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.35), rgba(20, 10, 5, 0.45));
  border: 1px solid rgba(255, 200, 100, 0.25);
  border-radius: 999px;
  padding: 7px 12px;
  transform-origin: center;
  animation: pulse-soft 1.8s infinite;
  transition: all 0.3s ease;
}

.combo.is-high {
  color: #ffb347;
  background: linear-gradient(145deg, rgba(255, 120, 50, 0.3), rgba(255, 80, 30, 0.4));
  border-color: rgba(255, 150, 80, 0.5);
  box-shadow: 0 0 15px rgba(255, 120, 50, 0.4);
}

.hamster-btn {
  border: 0;
  width: 100%;
  min-height: 280px;
  background: transparent;
  display: grid;
  place-items: center;
  position: relative;
  padding: 0;
}

.hamster-btn:active {
  cursor: grabbing;
}

.hamster {
  width: 254px;
  height: 236px;
  position: relative;
  transform-origin: center bottom;
  animation: man-idle 3s ease-in-out infinite;
  filter: drop-shadow(0 18px 18px rgba(16, 9, 5, 0.45));
}

.hamster.tap {
  animation: man-tap 0.22s ease-out;
}

.hamster::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 170px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 6, 4, 0.45), rgba(8, 6, 4, 0));
}

.man__torso {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 214px;
  height: 116px;
  border-radius: 42% 42% 30% 30% / 52% 52% 48% 48%;
  border: 2px solid rgba(16, 11, 8, 0.35);
  background: radial-gradient(130px 70px at 50% 18%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 72%),
    linear-gradient(165deg, #2d4265 0%, #243554 40%, #1a2740 100%);
  overflow: hidden;
  animation: torso-breathe 3.2s ease-in-out infinite;
}

.man__torso::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    95deg,
    rgba(255, 255, 255, 0.12) 0px,
    rgba(255, 255, 255, 0.12) 2px,
    rgba(8, 13, 24, 0.12) 6px,
    rgba(8, 13, 24, 0) 10px
  );
  opacity: 0.4;
}

.man__torso::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 25px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.15) 100%);
  border-radius: 0 0 30% 30%;
}

.man__collar {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 18px;
  z-index: 3;
}

.man__collar::before,
.man__collar::after {
  content: "";
  position: absolute;
  top: 0;
  width: 30px;
  height: 16px;
  background: linear-gradient(180deg, #364a6d 0%, #2a3d5a 100%);
  border: 1px solid rgba(20, 15, 10, 0.3);
}

.man__collar::before {
  left: 0;
  border-radius: 0 0 60% 20%;
  transform: rotate(-15deg);
  transform-origin: top right;
}

.man__collar::after {
  right: 0;
  border-radius: 0 0 20% 60%;
  transform: rotate(15deg);
  transform-origin: top left;
}

.man__chest-tattoo {
  position: absolute;
  left: 50%;
  bottom: 84px;
  width: 94px;
  height: 36px;
  transform: translateX(-50%);
  border-radius: 14px;
  border: 1px solid rgba(19, 22, 29, 0.55);
  background: radial-gradient(circle at 32% 50%, rgba(13, 22, 36, 0.7) 0%, rgba(13, 22, 36, 0) 38%),
    radial-gradient(circle at 68% 50%, rgba(13, 22, 36, 0.7) 0%, rgba(13, 22, 36, 0) 38%),
    linear-gradient(180deg, rgba(22, 34, 54, 0.5), rgba(14, 18, 28, 0.25));
  z-index: 2;
}

.man__neck {
  position: absolute;
  left: 50%;
  top: 72px;
  width: 44px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 42%;
  background: linear-gradient(180deg, #c6885f, #ad6f49);
  border: 1px solid rgba(48, 24, 13, 0.35);
  z-index: 2;
}

.man__head {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 130px;
  height: 126px;
  transform: translateX(-50%);
  border-radius: 42% 42% 46% 46% / 48% 48% 52% 52%;
  background: radial-gradient(72px 48px at 40% 24%, rgba(255, 225, 195, 0.85), rgba(255, 225, 195, 0) 78%),
    linear-gradient(175deg, #d39a72 0%, #bf835a 54%, #a96c47 100%);
  border: 2px solid rgba(43, 23, 13, 0.36);
  z-index: 4;
  animation: head-life 3.6s ease-in-out infinite;
}

.man__ear {
  position: absolute;
  top: 50px;
  width: 14px;
  height: 22px;
  border-radius: 45% 55% 50% 50% / 50% 50% 50% 50%;
  background: linear-gradient(90deg, #c98a62 0%, #b87854 50%, #a86a48 100%);
  border: 1px solid rgba(60, 30, 15, 0.3);
  z-index: 1;
}

.man__ear--left {
  left: -4px;
  transform: rotate(-8deg);
}

.man__ear--right {
  right: -4px;
  transform: rotate(8deg);
  background: linear-gradient(270deg, #c98a62 0%, #b87854 50%, #a86a48 100%);
}

.man__ear::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 3px;
  width: 7px;
  height: 12px;
  border-radius: 50%;
  background: rgba(90, 45, 25, 0.25);
}

.man__cheek {
  position: absolute;
  top: 62px;
  width: 18px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 140, 130, 0.5) 0%, rgba(230, 140, 130, 0) 70%);
  z-index: 3;
  animation: cheek-pulse 4s ease-in-out infinite;
}

.man__cheek--left {
  left: 18px;
}

.man__cheek--right {
  right: 18px;
}

/* Cap */
.man__cap {
  position: absolute;
  left: 50%;
  top: -8px;
  width: 110px;
  height: 38px;
  transform: translateX(-50%);
  border-radius: 50% 50% 10% 10% / 70% 70% 30% 30%;
  background: linear-gradient(180deg, #c41e3a 0%, #a01830 40%, #8b1528 100%);
  border: 2px solid rgba(60, 10, 20, 0.4);
  box-shadow: inset 0 8px 15px rgba(255, 255, 255, 0.15);
  z-index: 5;
}

.man__cap::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 115px;
  height: 10px;
  background: linear-gradient(180deg, #8b1528 0%, #6b1020 100%);
  border-radius: 0 0 5px 5px;
  border: 1px solid rgba(40, 5, 10, 0.3);
  border-top: none;
}

.man__cap-visor {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 75px;
  height: 18px;
  background: linear-gradient(180deg, #8b1528 0%, #6b1020 50%, #4a0a15 100%);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  border: 2px solid rgba(40, 5, 10, 0.4);
  border-top: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


.man__eyebrow {
  position: absolute;
  top: 41px;
  width: 26px;
  height: 5px;
  border-radius: 999px;
  background: #2e1c16;
}

.man__eyebrow--left {
  left: 30px;
  transform: rotate(-6deg);
  animation: brow-left 4.2s ease-in-out infinite;
}

.man__eyebrow--right {
  right: 30px;
  transform: rotate(6deg);
  animation: brow-right 4.2s ease-in-out infinite;
}

.eye {
  position: absolute;
  top: 46px;
  width: 18px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff9f5 0%, #f5ede8 100%);
  border: 1.5px solid rgba(60, 35, 20, 0.4);
  overflow: hidden;
  transform-origin: center center;
  animation: eye-life 4.8s infinite;
  z-index: 2;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.eye__iris {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #6b4423 0%, #3d2415 60%, #1f1208 100%);
  transform: translate(-50%, -50%);
  animation: iris-look 6s ease-in-out infinite;
}

.eye__pupil {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0a0806;
  transform: translate(-50%, -50%);
}

.eye__shine {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}

.eye__shine::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 3px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}

.eye--left {
  left: 34px;
}

.eye--right {
  right: 34px;
  animation-delay: 0.08s;
}

.eye--right .eye__shine {
  left: auto;
  right: 4px;
}

.eye--right .eye__shine::after {
  left: auto;
  right: 3px;
}

.man__nose {
  position: absolute;
  left: 50%;
  top: 58px;
  transform: translateX(-50%);
  width: 17px;
  height: 13px;
  border-radius: 48% 48% 52% 52%;
  background: linear-gradient(180deg, #b0734e, #9d613f);
  border: 1px solid rgba(55, 29, 17, 0.35);
  z-index: 5;
}

.man__beard {
  position: absolute;
  left: 50%;
  top: 68px;
  width: 74px;
  height: 46px;
  transform: translateX(-50%);
  border-radius: 40% 40% 52% 52% / 40% 40% 60% 60%;
  background: linear-gradient(180deg, #3a2822 0%, #2d1f18 50%, #1f1510 100%);
  z-index: 4;
  animation: beard-life 3s ease-in-out infinite;
  overflow: hidden;
}

.man__beard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 3px
  );
  opacity: 0.6;
}

.man__beard-detail {
  position: absolute;
  width: 4px;
  height: 8px;
  background: linear-gradient(180deg, rgba(30, 20, 15, 0.6), transparent);
  border-radius: 0 0 50% 50%;
}

.man__beard-detail--1 {
  left: 18px;
  bottom: 2px;
  height: 10px;
}

.man__beard-detail--2 {
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  height: 12px;
}

.man__beard-detail--3 {
  right: 18px;
  bottom: 2px;
  height: 10px;
}

.mouth {
  position: absolute;
  left: 50%;
  top: 80px;
  width: 32px;
  height: 12px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(80, 40, 30, 0.6) 0%, rgba(50, 25, 18, 0.8) 100%);
  border: 2px solid rgba(250, 206, 183, 0.92);
  border-top: none;
  border-radius: 0 0 50% 50%;
  z-index: 6;
  transition: transform 0.12s ease, border-color 0.12s ease;
  animation: mouth-life 3.4s ease-in-out infinite;
  overflow: hidden;
}

.mouth__teeth {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 4px;
  background: linear-gradient(180deg, #fff9f5 0%, #f0e8e0 100%);
  border-radius: 0 0 3px 3px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.man__arm {
  position: absolute;
  top: 114px;
  width: 66px;
  height: 96px;
  border-radius: 38px;
  background: radial-gradient(40px 24px at 45% 12%, rgba(255, 215, 180, 0.4), rgba(255, 215, 180, 0) 76%),
    linear-gradient(180deg, #ca8b63 0%, #b57550 58%, #9f643f 100%);
  border: 2px solid rgba(44, 22, 13, 0.35);
  transform-origin: 50% 8%;
  transition: transform 0.15s ease;
  z-index: 2;
}

.man__arm--left {
  left: 40px;
  transform: rotate(12deg);
  animation: left-arm-idle 2.4s ease-in-out infinite;
}

.man__arm--right {
  right: 40px;
  transform: rotate(-15deg);
}

.man__hand {
  position: absolute;
  bottom: -8px;
  width: 32px;
  height: 18px;
  background: linear-gradient(180deg, #c98a63 0%, #b57550 100%);
  border-radius: 8px 8px 12px 12px;
  border: 1px solid rgba(44, 22, 13, 0.3);
  display: flex;
  justify-content: center;
  gap: 2px;
  padding-top: 4px;
}

.man__hand--left {
  left: 50%;
  transform: translateX(-50%) rotate(-12deg);
}

.man__finger {
  width: 5px;
  height: 10px;
  background: linear-gradient(180deg, #c98a63 0%, #a86545 100%);
  border-radius: 3px;
  border: 1px solid rgba(44, 22, 13, 0.25);
}


.beer {
  position: absolute;
  top: 12px;
  right: -7px;
  width: 38px;
  height: 58px;
  border-radius: 8px 8px 12px 12px;
  border: 2.5px solid rgba(90, 60, 25, 0.8);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 10%,
    transparent 20%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.2),
    inset 0 -20px 30px rgba(180, 100, 20, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.2);
  transform-origin: 80% 88%;
  transition: transform 0.15s ease;
  overflow: hidden;
}

.beer::after {
  content: "";
  position: absolute;
  right: -11px;
  top: 14px;
  width: 12px;
  height: 24px;
  border: 3px solid rgba(130, 95, 35, 0.8);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: transparent;
}

.beer__liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 85%;
  background: linear-gradient(180deg,
    #fad86a 0%,
    #f0c445 25%,
    #e5a82e 50%,
    #d49520 75%,
    #b87818 100%);
  animation: liquid-wave 2s ease-in-out infinite;
}

.beer__liquid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent);
}

.beer__foam {
  position: absolute;
  left: 1px;
  top: -10px;
  width: 34px;
  height: 16px;
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(ellipse at 30% 30%, #fffef8 0%, #fff8e8 40%, #f5e8c8 70%, #e8d8b8 100%);
  transition: transform 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.beer__foam::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.3));
}

.beer__foam::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));
}

.beer__bubble {
  position: absolute;
  bottom: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 249, 230, 0.85), rgba(255, 231, 168, 0.1));
  opacity: 0;
  animation: bubble-rise 2.3s linear infinite;
}

.beer__bubble--one {
  left: 8px;
}

.beer__bubble--two {
  left: 16px;
  animation-delay: 0.72s;
}

.beer__bubble--three {
  left: 24px;
  width: 5px;
  height: 5px;
  animation-delay: 1.3s;
}

.beer__steam {
  position: absolute;
  top: 2px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 229, 0.55), rgba(255, 248, 229, 0));
  filter: blur(1px);
  opacity: 0;
  animation: steam-rise 2.6s linear infinite;
  pointer-events: none;
}

.beer__steam--one {
  animation-delay: 0s;
}

.beer__steam--two {
  right: 18px;
  animation-delay: 0.85s;
}

.beer__steam--three {
  right: 0px;
  animation-delay: 1.55s;
}

.sip-drop {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe6ac, #ffbf57);
  opacity: 0;
  pointer-events: none;
  z-index: 7;
}

.sip-drop--one {
  right: 88px;
  top: 110px;
}

.sip-drop--two {
  right: 102px;
  top: 116px;
  width: 6px;
  height: 6px;
}

.hamster.tap .man__arm--right {
  transform: translate(-6px, -48px) rotate(-42deg);
}

.hamster.tap .beer {
  transform: translate(8px, -7px) rotate(-40deg);
}

.hamster.tap .beer__foam {
  transform: translateY(-5px) scale(1.08);
  opacity: 0.95;
}

.hamster.tap .beer__steam {
  animation-duration: 0.85s;
}

.hamster.tap .beer__bubble {
  animation-duration: 0.8s;
}

.hamster.tap .man__head {
  animation: none;
  transform: translateX(-50%) translateY(-2px) rotate(-3deg);
}

.hamster.tap .eye {
  animation: none;
  transform: scaleY(0.5);
  border-radius: 40%;
}

.hamster.tap .eye__shine {
  top: 2px;
}

.hamster.tap .mouth {
  animation: none;
  transform: translateX(-50%) scaleX(0.8);
  border-bottom-color: rgba(255, 245, 235, 1);
}

.hamster.tap .sip-drop--one {
  opacity: 1;
  animation: sip-drop 0.4s ease-out forwards;
}

.hamster.tap .sip-drop--two {
  opacity: 1;
  animation: sip-drop 0.48s ease-out 0.04s forwards;
}

.hamster.tap .sip-drop--three {
  opacity: 1;
  animation: sip-drop 0.52s ease-out 0.08s forwards;
}

.hamster.tap .mouth__teeth {
  opacity: 1;
}

.hamster.tap .beer__liquid {
  animation: liquid-wave 0.3s ease-in-out;
}

.sip-drop--three {
  right: 95px;
  top: 118px;
  width: 5px;
  height: 5px;
}

/* Frenzy mode aura */
.man__frenzy-aura {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 120, 50, 0.3) 0%,
    rgba(255, 80, 30, 0.15) 40%,
    transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.hamster.frenzy {
  animation: man-idle 1.5s ease-in-out infinite, shake-intense 0.15s ease-in-out infinite;
}

.hamster.frenzy .man__frenzy-aura {
  animation: frenzy-pulse 0.8s ease-in-out infinite;
}

.hamster.frenzy .man__head {
  animation: head-life 1.8s ease-in-out infinite;
}

.hamster.frenzy .eye {
  animation: eye-life 2.4s infinite;
}

.hamster.frenzy .eye__iris {
  background: radial-gradient(circle at 40% 40%, #ff6b35 0%, #cc4422 60%, #991100 100%);
}

.hamster.frenzy .beer__bubble {
  animation-duration: 1.2s;
}

.hamster.frenzy .beer__steam {
  animation-duration: 1.4s;
}

.tap-hint {
  text-align: center;
  margin-top: 2px;
  font-size: 13px;
  color: #ffe7b8;
  opacity: 0.88;
}

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

.gain {
  position: absolute;
  font-size: 16px;
  font-weight: 700;
  color: #ffecaf;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  animation: fly-up 0.92s ease-out forwards;
}

.gain.is-crit {
  color: #ff6b5a;
  font-size: 20px;
  text-shadow:
    0 0 10px rgba(255, 100, 80, 0.6),
    0 3px 8px rgba(0, 0, 0, 0.4);
  animation: fly-up-crit 1s ease-out forwards;
}

@keyframes fly-up-crit {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6) rotate(-5deg);
  }
  20% {
    transform: translate(-50%, -80%) scale(1.3) rotate(3deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -160%) scale(1) rotate(0deg);
  }
}

.coin {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 25% 25%, #fffef0 0%, #ffd54f 35%, #f5a623 65%, #d4820f 100%);
  box-shadow:
    inset -2px -2px 3px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  animation: explode 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.coin::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

.meter-wrap {
  margin-top: 10px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.meter {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ffb536, #ff7b3d);
  transition: width 0.2s ease;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffe6b4;
  padding: 10px 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.tab.is-active {
  background: linear-gradient(145deg, rgba(255, 189, 93, 0.4), rgba(255, 116, 70, 0.32));
}

.panel {
  display: none;
  padding: 12px;
}

.panel.is-active {
  display: grid;
  gap: 10px;
}

.panel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.panel-row > div,
.frenzy,
.viral-block,
.list-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 5px;
}

.muted {
  font-size: 12px;
  color: var(--muted);
}

.section-title {
  display: grid;
  gap: 2px;
}

.boost-list {
  display: grid;
  gap: 8px;
}

.boost {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01));
}

.boost strong {
  display: block;
  margin-bottom: 4px;
}

.boost small {
  color: var(--muted);
  font-size: 12px;
}

.buy-btn,
.action-btn,
.pill {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 700;
  color: #311f12;
  background: linear-gradient(145deg, #ffda75, #ff8f3f);
}

.buy-btn:disabled {
  opacity: 0.35;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.actions--single {
  grid-template-columns: 1fr;
}

.action-btn,
.pill {
  color: #fff5e8;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.action-btn--primary {
  color: #2d1208;
  background: linear-gradient(145deg, #ffcb52, #ff6f4f);
  border: 0;
}

.filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pill {
  white-space: nowrap;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
}

.pill.is-active {
  background: linear-gradient(145deg, #ffc85e, #ff8c4f);
  color: #2a1809;
}

.list {
  display: grid;
  gap: 8px;
}

.list-item {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.list-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-item__info strong {
  font-size: 14px;
}

.list-item__info small {
  font-size: 12px;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

.ref-friends {
  margin-top: 12px;
}

.rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffeac3;
}

.rank--top {
  background: linear-gradient(145deg, #ffca68, #ff8848);
  color: #221306;
}

.mainline {
  font-size: 14px;
  font-weight: 700;
}

.subline {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.right-col {
  text-align: right;
}

.join-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffe3b0;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.clan-create {
  display: grid;
  grid-template-columns: 1fr 90px auto;
  gap: 8px;
}

.clan-create input {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff3df;
  padding: 10px;
  min-width: 0;
}

.clan-create input::placeholder {
  color: #dcbf95;
}

code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #ffd99c;
}

.toast-host {
  position: fixed;
  inset: auto 0 calc(20px + env(safe-area-inset-bottom));
  display: grid;
  justify-items: center;
  pointer-events: none;
  z-index: 9;
}

.toast {
  background: rgba(8, 8, 13, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffeec5;
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  animation: toast-in 2.2s ease forwards;
}

@keyframes man-idle {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.01);
  }
}

@keyframes man-tap {
  0% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(0.92, 1.06) rotate(-1deg);
  }
  50% {
    transform: scale(1.02, 0.98) rotate(0.5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes head-life {
  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }
  35% {
    transform: translateX(-50%) rotate(1deg);
  }
  70% {
    transform: translateX(-50%) rotate(-1deg);
  }
}

@keyframes eye-life {
  0%,
  10%,
  100% {
    transform: scaleY(1);
  }
  4%,
  6% {
    transform: scaleY(0.1);
  }
  45% {
    transform: scaleY(1);
  }
  48%,
  50% {
    transform: scaleY(0.1);
  }
}

@keyframes brow-left {
  0%,
  100% {
    transform: rotate(-6deg) translateY(0);
  }
  50% {
    transform: rotate(-9deg) translateY(-1px);
  }
}

@keyframes brow-right {
  0%,
  100% {
    transform: rotate(6deg) translateY(0);
  }
  50% {
    transform: rotate(9deg) translateY(-1px);
  }
}

@keyframes beard-life {
  0%,
  100% {
    transform: translateX(-50%) scaleY(1);
  }
  50% {
    transform: translateX(-50%) scaleY(1.04);
  }
}

@keyframes mouth-life {
  0%,
  100% {
    transform: translateX(-50%) scaleX(1);
  }
  40% {
    transform: translateX(-50%) scaleX(0.94);
  }
  70% {
    transform: translateX(-50%) scaleX(1.06);
  }
}

@keyframes left-arm-idle {
  0%,
  100% {
    transform: rotate(12deg);
  }
  50% {
    transform: rotate(8deg);
  }
}

@keyframes sip-drop {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.9);
  }
  100% {
    opacity: 0;
    transform: translate(-14px, 18px) scale(0.3);
  }
}

@keyframes bubble-rise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.7);
  }
  14% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(-52px) scale(1.05);
  }
}

@keyframes steam-rise {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.65);
  }
  12% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translate(-10px, -34px) scale(1.5);
  }
}

@keyframes fly-up {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.84);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -145%) scale(1.18);
  }
}

@keyframes explode {
  to {
    opacity: 0;
    transform: translate(
      calc(-50% + var(--dx, 0px)),
      calc(-50% + var(--dy, 0px))
    ) scale(0.4) rotate(120deg);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes toast-in {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  12%,
  82% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes torso-breathe {
  0%, 100% {
    transform: translateX(-50%) scaleY(1);
  }
  50% {
    transform: translateX(-50%) scaleY(1.015);
  }
}

@keyframes cheek-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}


@keyframes iris-look {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  20% {
    transform: translate(-40%, -50%);
  }
  40% {
    transform: translate(-60%, -45%);
  }
  60% {
    transform: translate(-45%, -55%);
  }
  80% {
    transform: translate(-55%, -50%);
  }
}

@keyframes liquid-wave {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes frenzy-pulse {
  0%, 100% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

@keyframes frenzy-glow {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(255, 100, 50, 0.4),
      0 0 40px rgba(255, 150, 50, 0.2);
  }
  50% {
    box-shadow:
      0 0 35px rgba(255, 100, 50, 0.6),
      0 0 60px rgba(255, 150, 50, 0.4);
  }
}

@keyframes shake-intense {
  0%, 100% { transform: translateX(0) rotate(0); }
  10% { transform: translateX(-2px) rotate(-1deg); }
  20% { transform: translateX(2px) rotate(1deg); }
  30% { transform: translateX(-2px) rotate(0); }
  40% { transform: translateX(2px) rotate(1deg); }
  50% { transform: translateX(-2px) rotate(-1deg); }
  60% { transform: translateX(2px) rotate(0); }
  70% { transform: translateX(-2px) rotate(1deg); }
  80% { transform: translateX(2px) rotate(-1deg); }
  90% { transform: translateX(-2px) rotate(0); }
}

/* Shop styles */
.shop-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.shop-item.is-popular {
  border-color: rgba(255, 180, 50, 0.4);
  background: linear-gradient(145deg, rgba(255, 180, 50, 0.15), rgba(255, 120, 30, 0.08));
}

.shop-item__info strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}

.shop-item__info small {
  color: var(--muted);
  font-size: 12px;
}

.shop-item__bonus {
  display: inline-block;
  background: linear-gradient(145deg, #ffca52, #ff8c3f);
  color: #2a1508;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
}

.stars-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 14px;
  color: #1a1a2e;
  background: linear-gradient(145deg, #ffda75, #ff8f3f);
  white-space: nowrap;
}

.stars-btn::before {
  content: "";
  width: 16px;
  height: 16px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%231a1a2e"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>') center/contain no-repeat;
}

.stars-btn:disabled {
  opacity: 0.5;
}

/* Milestone styles */
.milestone-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.milestone {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.milestone.is-claimed {
  opacity: 0.5;
  background: rgba(100, 200, 100, 0.1);
  border-color: rgba(100, 200, 100, 0.3);
}

.milestone.is-available {
  border-color: rgba(255, 200, 50, 0.5);
  background: linear-gradient(145deg, rgba(255, 200, 50, 0.15), rgba(255, 150, 30, 0.08));
}

.milestone__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 16px;
}

.milestone.is-claimed .milestone__icon {
  background: rgba(100, 200, 100, 0.3);
}

.milestone__info strong {
  display: block;
  font-size: 13px;
}

.milestone__info small {
  color: var(--muted);
  font-size: 11px;
}

.milestone__reward {
  font-weight: 700;
  color: var(--gold);
  font-size: 13px;
}

.claim-btn {
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 12px;
  color: #1a1a2e;
  background: linear-gradient(145deg, #60f0bb, #40c090);
}

.claim-btn:disabled {
  opacity: 0.4;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

/* VIP badge */
.vip-badge {
  display: inline-block;
  background: linear-gradient(145deg, #ffd700, #ff8c00);
  color: #1a0a00;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* Ref rewards section */
.ref-rewards {
  margin: 12px 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Player name in topbar */
.topbar--with-name {
  grid-template-columns: 1.2fr repeat(3, 1fr);
}

.stat--name {
  text-align: left;
}

.stat__value--clickable {
  cursor: pointer;
  transition: color 0.2s;
}

.stat__value--clickable:hover {
  color: var(--gold);
}

.stat__value--clickable::after {
  content: " ✎";
  font-size: 10px;
  opacity: 0.5;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 320px;
  box-shadow: var(--shadow);
}

.modal-header {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--gold);
}

.modal-input {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 16px;
  outline: none;
}

.modal-input:focus {
  border-color: var(--gold);
}

.modal-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .action-btn {
  flex: 1;
}

.modal-box--wide {
  max-width: 360px;
}

.exchange-balance {
  text-align: center;
  padding: 16px;
  background: rgba(255, 202, 74, 0.1);
  border-radius: 12px;
  margin-bottom: 16px;
}

.exchange-balance__label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.exchange-balance__value {
  font-size: 24px;
  color: var(--gold);
}

.exchange-info {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 16px;
}

.exchange-info strong {
  color: var(--gold);
}

.exchange-list {
  display: grid;
  gap: 10px;
}

.exchange-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.exchange-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 202, 74, 0.3);
}

.exchange-item.is-locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.exchange-item__icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 202, 74, 0.15);
  border-radius: 10px;
}

.exchange-item__info {
  flex: 1;
}

.exchange-item__title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.exchange-item__desc {
  font-size: 12px;
  color: var(--muted);
}

.exchange-item__cost {
  text-align: right;
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
}

.stat--coins {
  cursor: pointer;
}

.stat--coins:hover .stat__value {
  color: var(--gold);
}

@media (max-width: 420px) {
  .topbar {
    grid-template-columns: repeat(2, 1fr);
  }

  .hamster {
    transform: scale(0.9);
  }

  .hamster-btn {
    min-height: 248px;
  }

  .clan-create {
    grid-template-columns: 1fr;
  }
}
