:root {
  --bg: #0a0a0f;
  --glow: #0d2818;
  --surface: #1a1a2e;
  --surface-2: #111118;
  --glass: rgba(26, 26, 46, 0.62);
  --line: rgba(255, 255, 255, 0.08);
  --line-green: rgba(0, 200, 83, 0.2);
  --text: #ffffff;
  --muted: #888888;
  --accent: #00c853;
  --accent-2: #00a844;
  --gold: #ffd700;
  --gold-2: #ffaa00;
  --danger: #ff5252;
  --warning: #ffb020;
  --radius: 8px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(13, 40, 24, 0.9), transparent 19rem),
    radial-gradient(circle at 12% 38%, rgba(0, 200, 83, 0.11), transparent 16rem),
    linear-gradient(180deg, #0a0a0f 0%, #06070a 100%);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 75%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(0, 200, 83, 0.72);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px 106px;
  position: relative;
  z-index: 1;
}

.screen {
  display: none;
  animation: screenIn 220ms ease both;
}

.screen.active {
  display: block;
}

.section-head,
.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #14141d, #00c853);
  border: 1px solid rgba(0, 200, 83, 0.85);
  box-shadow:
    0 0 0 3px rgba(0, 200, 83, 0.12),
    0 0 18px rgba(0, 200, 83, 0.35);
}

.eyeless-label,
.section-head p,
.balance-panel p,
.form-note,
.passive-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  font-size: 23px;
  line-height: 1.05;
  font-weight: 900;
}

h2 {
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.balance-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  padding: 18px 19px;
  overflow: hidden;
  position: relative;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
    rgba(26, 26, 46, 0.56);
  border: 1px solid rgba(0, 200, 83, 0.2);
  box-shadow:
    0 22px 70px rgba(0, 200, 83, 0.16),
    0 14px 42px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}

.balance-panel::after {
  content: "";
  position: absolute;
  inset: -50% auto auto 38%;
  width: 260px;
  height: 260px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0, 200, 83, 0.2), transparent 63%);
  transform: rotate(18deg);
}

.balance-copy,
.balance-side,
.icon-btn {
  position: relative;
  z-index: 1;
}

.balance-side {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-width: 112px;
}

.balance-profile {
  max-width: 138px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 5px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.balance-profile span {
  min-width: 0;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.coin-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
}

.coin-emblem {
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.08);
  filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.45));
}

.coin-emblem svg {
  width: 39px;
  height: 39px;
  fill: none;
  stroke: none;
}

.coin-emblem circle:first-of-type {
  fill: url("#coinGlow");
}

.coin-emblem circle:nth-of-type(2) {
  stroke: rgba(80, 37, 0, 0.42);
}

.coin-emblem path {
  stroke: #5c2c00;
}

.balance-panel strong {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  font-size: clamp(29px, 7.4vw, 36px);
  line-height: 1;
  font-weight: 900;
  color: var(--gold);
  background: linear-gradient(92deg, var(--gold), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px rgba(255, 215, 0, 0.18);
}

.balance-panel small {
  display: block;
  margin-top: 9px;
  color: #a8a8a8;
  font-size: 13px;
  font-weight: 600;
}

.icon-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(4, 12, 8, 0.54);
  border: 1px solid rgba(0, 200, 83, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.progress-panel,
.home-task-panel,
.refer-card,
.withdraw-card,
.stats-grid > div,
.task-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(26, 26, 46, 0.64);
  backdrop-filter: blur(16px);
}

.progress-panel {
  margin-top: 14px;
  padding: 15px;
}

.progress-panel span,
.progress-panel strong {
  font-size: 13px;
}

.progress-track {
  height: 10px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00c853, #86ff9d);
  box-shadow: 0 0 18px rgba(0, 200, 83, 0.55);
  transition: width 280ms ease;
}

.ad-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.ad-card {
  min-height: 86px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name reward"
    "left reward";
  gap: 5px 12px;
  align-items: center;
  padding: 17px;
  color: var(--text);
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 200, 83, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 200, 83, 0.08)),
    var(--surface);
}

.ad-card span {
  grid-area: name;
  font-weight: 800;
}

.ad-card strong {
  grid-area: reward;
  min-width: 58px;
  text-align: center;
  padding: 12px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(0, 200, 83, 0.16);
}

.ad-card small {
  grid-area: left;
  color: var(--muted);
}

.home-task-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 15px;
  overflow: hidden;
  border-radius: 14px;
}

.home-task-panel .panel-row {
  align-items: flex-start;
  min-width: 0;
}

.home-task-panel .panel-row > div {
  min-width: 0;
}

.home-task-panel span,
.spin-panel .panel-row span,
.daily-challenges .panel-row span {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 900;
}

.home-task-panel p,
.spin-panel p,
.daily-challenges p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.home-task-panel .panel-row > strong {
  flex: 0 0 auto;
  max-width: 112px;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(0, 200, 83, 0.16);
  font-size: 12px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.daily-challenges {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(26, 26, 46, 0.5);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.daily-challenges + .home-task-panel,
#challenge-screen .home-task-panel {
  margin-top: 14px;
}

.challenge-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.challenge-card {
  min-height: 82px;
  padding: 11px 9px;
  border-radius: 12px;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(13, 16, 24, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.challenge-card span,
.challenge-card strong,
.challenge-card small {
  display: block;
}

.challenge-card span {
  color: #d8d8d8;
  font-size: 11px;
  font-weight: 800;
}

.challenge-card strong {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 900;
}

.challenge-card strong i {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff8b0, #ffd700 45%, #ff9f00);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.32);
}

.challenge-card small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.challenge-card.reward-green {
  border-left-color: #00c853;
}

.challenge-card.reward-blue {
  border-left-color: #2979ff;
}

.challenge-card.reward-purple {
  border-left-color: #b35cff;
}

.challenge-card.reward-orange {
  border-left-color: #ff9800;
}

.challenge-card.reward-legendary {
  border-left-color: #ffd700;
}

.challenge-card.completed {
  opacity: 0.58;
  filter: grayscale(0.35);
}

.challenge-card.completed small {
  color: #75ff9a;
}

.challenge-card.locked:not(.completed) {
  opacity: 0.62;
}

.challenge-card.challenge-easy {
  border-left-color: #00c853;
}

.challenge-card.challenge-medium {
  border-left-color: #00bcd4;
}

.challenge-card.challenge-hard {
  border-left-color: #ffb020;
}

.challenge-card.challenge-final {
  grid-column: span 3;
  min-height: 96px;
  border-left-color: #ffd700;
  background:
    linear-gradient(135deg, rgba(255, 82, 82, 0.2), rgba(255, 215, 0, 0.1)),
    rgba(25, 13, 18, 0.88);
  border-color: rgba(255, 215, 0, 0.35);
  box-shadow:
    0 0 24px rgba(255, 82, 82, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.challenge-card:disabled {
  cursor: not-allowed;
}

.daily-complete-banner {
  margin-bottom: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  color: #fff8d4;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(0, 200, 83, 0.12));
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.12);
  font-weight: 900;
}

.spin-panel {
  margin-top: 19px;
  padding: 0 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.spin-counter {
  width: fit-content;
  margin: 18px auto 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #eaffef;
  background: rgba(0, 200, 83, 0.12);
  border: 1px solid rgba(0, 200, 83, 0.22);
  box-shadow: 0 0 18px rgba(0, 200, 83, 0.12);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.spin-result-toast {
  position: relative;
  z-index: 6;
  width: fit-content;
  max-width: min(92%, 330px);
  margin: 0 auto 10px;
  padding: 11px 18px;
  opacity: 0;
  transform: translateY(-18px);
  border-radius: 999px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.18, 0.88, 0.2, 1);
}

.spin-result-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.spin-result-toast.win {
  background: linear-gradient(135deg, #00c853, #00a844);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(0, 200, 83, 0.35);
}

.spin-result-toast.lose {
  background: linear-gradient(135deg, #35363d, #1a1a21);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d8d8d8;
}

.wheel {
  width: min(222px, 68vw);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  margin: 18px auto 22px;
  border-radius: 50%;
}

.wheel::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 12deg, #fff2a3, #a2a2a8, #ffd700, #f4f4f8, #b47d14, #fff2a3);
  box-shadow:
    0 0 32px rgba(255, 215, 0, 0.2),
    0 22px 52px rgba(0, 0, 0, 0.5),
    inset 0 0 15px rgba(255, 215, 0, 0.3);
}

.wheel::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.wheel-rotor {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  background:
    conic-gradient(from -90deg,
      #f1bf27 0 45deg,
      #0f7b42 45deg 90deg,
      #8d48dd 90deg 135deg,
      #2377ea 135deg 180deg,
      #454650 180deg 225deg,
      #ff9b1f 225deg 270deg,
      #00a9a5 270deg 315deg,
      #0f7b42 315deg 360deg);
  border: 6px solid rgba(0, 0, 0, 0.62);
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, 0.58),
    inset 0 0 22px rgba(255, 215, 0, 0.09);
  transition: none;
}

.wheel-rotor::before,
.wheel-rotor::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.wheel-rotor::before {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.54) 0 27%, rgba(255, 255, 255, 0.04) 58%, rgba(255, 255, 255, 0.16) 100%);
  mix-blend-mode: overlay;
}

.wheel-rotor::after {
  background: repeating-conic-gradient(from -90deg, rgba(255, 255, 255, 0.34) 0deg 1deg, transparent 1deg 45deg);
}

.wheel-pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  z-index: 4;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 29px solid var(--gold);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.62)) drop-shadow(0 0 6px gold);
}

.wheel-pointer.bounce {
  animation: pointerBounce 320ms cubic-bezier(0.2, 1.3, 0.35, 1);
}

.wheel-prizes span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  margin: -10px 0 0 -24px;
  transform: rotate(calc(var(--i) * 45deg + 22.5deg)) translateY(-78px) rotate(calc(-1 * (var(--i) * 45deg + 22.5deg)));
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.wheel-prizes span:nth-child(1) {
  color: #fff4bd;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.85), 0 2px 5px rgba(0, 0, 0, 0.8);
}

.wheel-prizes span:nth-child(5) {
  color: #d9d9d9;
}

.wheel-prizes span:nth-child(6) {
  color: #ffe0b0;
  text-shadow: 0 0 9px rgba(255, 138, 0, 0.74), 0 2px 5px rgba(0, 0, 0, 0.8);
}

.wheel-rotor.tension {
  filter: saturate(1.08) drop-shadow(0 0 18px rgba(255, 215, 0, 0.14));
}

.wheel-rotor.slip {
  filter: saturate(1.18) drop-shadow(0 0 22px rgba(255, 82, 82, 0.16));
}

.wheel-rotor.motion-blur .wheel-prizes {
  filter: blur(0.8px);
}

.spin-actions {
  display: grid;
  gap: 11px;
}

.primary-btn,
.reward-toast button,
.copy-row button,
.task-row button {
  border-radius: 999px;
  color: #031209;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
}

.primary-btn {
  min-height: 50px;
  width: 100%;
}

.spin-now-btn {
  min-height: 56px;
  letter-spacing: 0;
  box-shadow:
    0 0 20px rgba(0, 200, 83, 0.5),
    0 14px 35px rgba(0, 200, 83, 0.2);
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.spin-now-btn:active {
  transform: scale(0.975);
  box-shadow:
    0 0 26px rgba(0, 200, 83, 0.68),
    0 10px 26px rgba(0, 200, 83, 0.24);
}

.spin-now-btn:disabled {
  opacity: 0.52;
  box-shadow: none;
}

.secondary-btn {
  min-height: 48px;
  width: 100%;
  border-radius: 999px;
  color: #dcffe7;
  background: rgba(0, 200, 83, 0.14);
  border: 1px solid rgba(0, 200, 83, 0.2);
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.section-head {
  align-items: flex-end;
  margin-bottom: 18px;
}

.section-head p {
  max-width: 190px;
  text-align: right;
}

.task-list,
.history-list {
  display: grid;
  gap: 10px;
}

.task-list {
  overflow: hidden;
  border-radius: 12px;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
  border-radius: 12px;
}

.task-row > div:first-child {
  min-width: 0;
  overflow: hidden;
}

.task-row strong,
.history-title {
  font-size: 15px;
}

.task-row span,
.task-row small,
.history-list small {
  color: var(--muted);
  font-size: 12px;
}

.task-row span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.task-row button {
  min-width: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1.2;
}

.task-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
  justify-content: flex-end;
}

.task-actions button:first-child {
  color: #dcffe7;
  background: rgba(0, 200, 83, 0.14);
  border: 1px solid rgba(0, 200, 83, 0.18);
}

.task-row button.done {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.refer-card,
.withdraw-card {
  padding: 16px;
}

.refer-card > span,
label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.copy-row {
  display: flex;
  gap: 9px;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(7, 8, 13, 0.82);
  outline: none;
  padding: 0 13px;
}

input:focus {
  border-color: rgba(0, 200, 83, 0.65);
  box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.1);
}

.copy-row button {
  flex: 0 0 72px;
}

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

.stats-grid > div {
  padding: 16px;
}

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

.stats-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.passive-note {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: var(--radius);
  color: #cbffd9;
  background: rgba(0, 200, 83, 0.13);
  border: 1px solid rgba(0, 200, 83, 0.16);
}

.withdraw-card {
  display: grid;
  gap: 13px;
}

.bonus-hold-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 15px;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 215, 0, 0.14), rgba(0, 200, 83, 0.08)),
    rgba(26, 26, 46, 0.58);
  border: 1px solid rgba(255, 215, 0, 0.22);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28), 0 0 24px rgba(255, 215, 0, 0.08);
  backdrop-filter: blur(18px);
}

.bonus-copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bonus-copy span {
  color: #fff6cf;
  font-size: 14px;
  font-weight: 900;
}

.bonus-copy strong {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.bonus-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5);
}

.bonus-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00c853, #ffd700);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.35);
  transition: width 220ms ease;
}

.withdraw-options {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 9px;
}

.withdraw-options .secondary-btn,
.withdraw-options .primary-btn {
  min-height: 44px;
  padding: 0 10px;
  font-size: 12px;
}

.bonus-btn {
  color: #231500;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.3);
}

.history-title {
  margin: 18px 0 10px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.leaderboard-head {
  align-items: center;
}

.leaderboard-head p {
  margin-top: 6px;
  text-align: left;
}

.weekly-badge {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  color: #dfffe8;
  background: rgba(0, 200, 83, 0.13);
  border: 1px solid rgba(0, 200, 83, 0.2);
  font-size: 11px;
  font-weight: 900;
}

.leaderboard-list {
  display: grid;
  gap: 9px;
}

.leader-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 12px;
  overflow: hidden;
  border-radius: 14px;
  color: var(--text);
  background: rgba(26, 26, 46, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.leader-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f2f2f2;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 900;
}

.leader-row strong,
.leader-row small {
  display: block;
}

.leader-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
}

.leader-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.leader-row em {
  color: #dfffe8;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.leader-row.current-user {
  border-color: rgba(0, 200, 83, 0.4);
  background:
    linear-gradient(135deg, rgba(0, 200, 83, 0.18), rgba(255, 255, 255, 0.03)),
    rgba(14, 35, 22, 0.76);
  box-shadow: 0 0 22px rgba(0, 200, 83, 0.14);
}

.leader-row.current-user .leader-rank {
  color: #021108;
  background: linear-gradient(135deg, #00c853, #86ff9d);
}

.leader-row.rank-one::after {
  content: "";
  position: absolute;
  inset: -70% auto -70% -35%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.28), transparent);
  transform: rotate(20deg);
  animation: shimmer 2.6s ease-in-out infinite;
}

.your-rank-card {
  margin-top: 14px;
  padding: 14px;
  overflow: hidden;
  border-radius: 16px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(0, 200, 83, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(26, 26, 46, 0.66);
  border: 1px solid rgba(0, 200, 83, 0.18);
  box-shadow: 0 0 24px rgba(0, 200, 83, 0.08);
  backdrop-filter: blur(16px);
}

.your-rank-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 900;
}

.your-rank-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 850;
}

.your-rank-line strong {
  padding: 6px 9px;
  border-radius: 999px;
  color: #04120a;
  background: linear-gradient(135deg, #00c853, #7dff93);
}

.your-rank-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.your-rank-line em {
  color: #dfffe8;
  font-style: normal;
  white-space: nowrap;
}

.your-rank-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.status {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: capitalize;
}

.status.pending {
  color: var(--warning);
  background: rgba(255, 176, 32, 0.14);
}

.status.approved {
  color: var(--accent);
  background: rgba(0, 200, 83, 0.16);
}

.status.rejected {
  color: var(--danger);
  background: rgba(255, 82, 82, 0.14);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 10px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid #222222;
  background: rgba(17, 17, 24, 0.96);
  backdrop-filter: blur(18px);
}

.nav-btn {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 3px;
  color: #7c7c82;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.nav-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: transparent;
  transform: translateX(-50%);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.nav-btn.active {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(0, 200, 83, 0.42);
}

.nav-btn.active::after {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(0, 200, 83, 0.64);
}

.nav-btn svg {
  width: 20px;
  height: 20px;
}

.reward-toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  z-index: 30;
  transform: translate(-50%, 22px);
  width: min(calc(100% - 28px), 440px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(0, 200, 83, 0.32);
  border-radius: 14px;
  background: rgba(14, 35, 22, 0.96);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
  transition: 180ms ease;
  backdrop-filter: blur(18px);
}

.reward-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.reward-toast span {
  color: #eaffef;
  font-weight: 900;
}

.reward-toast button {
  padding: 9px 12px;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(8px);
}

.loader div {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-120%) rotate(22deg);
  }
  55%,
  100% {
    transform: translateX(420%) rotate(22deg);
  }
}

@keyframes pointerBounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  35% {
    transform: translateX(-50%) translateY(5px);
  }

  65% {
    transform: translateX(-50%) translateY(-2px);
  }
}

.confetti-layer {
  position: fixed;
  left: 50%;
  top: 48%;
  z-index: 60;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.confetti-layer span {
  position: absolute;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: var(--c);
  transform: translate(-50%, -50%) rotate(var(--r));
  animation: confettiBurst 1200ms ease-out forwards;
}

@keyframes confettiBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--r)) scale(0.8);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), 165px) rotate(calc(var(--r) + 260deg)) scale(1);
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .balance-panel {
    padding: 18px 15px;
  }

  .coin-emblem,
  .coin-emblem svg {
    width: 34px;
    height: 34px;
  }

  .wheel {
    width: min(214px, 68vw);
  }

  .wheel-prizes span {
    transform: rotate(calc(var(--i) * 45deg + 22.5deg)) translateY(-74px) rotate(calc(-1 * (var(--i) * 45deg + 22.5deg)));
  }

  .challenge-slots {
    grid-template-columns: repeat(2, 1fr);
  }

  .challenge-card.challenge-final {
    grid-column: span 2;
  }

  .withdraw-options {
    grid-template-columns: 1fr;
  }

  .leader-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    padding: 11px 10px;
  }
}

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