:root {
  --primary-500: 270 80% 56%;
  --primary-600: 270 75% 48%;
  --accent-500: 260 88% 56%;
  --accent-600: 260 85% 48%;
  --background-50: 270 5% 99%;
  --background-200: 270 20% 95%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #f8f6fb;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 360px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 100% at 15% 0%, rgba(161, 92, 242, .18), transparent 70%),
    radial-gradient(45% 90% at 95% 0%, rgba(124, 58, 237, .13), transparent 70%);
}

button, a { -webkit-tap-highlight-color: transparent; }

.no-zoom { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.no-zoom body { touch-action: pan-x pan-y; }
.no-zoom input, .no-zoom textarea, .no-zoom select { font-size: 16px; }

.surface {
  background: #fff;
  border: 1px solid rgba(139, 69, 214, .08);
  box-shadow: 0 1px 2px rgba(17, 12, 34, .03), 0 6px 20px -10px rgba(76, 29, 149, .14);
}

.hero-card {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #a15cf2 0%, #8b45d6 45%, #5b21b6 100%);
  box-shadow: 0 14px 34px -14px rgba(91, 33, 182, .6);
}
.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.hero-card::before {
  width: 11rem;
  height: 11rem;
  right: -3.5rem;
  top: -4.5rem;
  background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 70%);
}
.hero-card::after {
  width: 8rem;
  height: 8rem;
  left: -2.5rem;
  bottom: -4rem;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%);
}
.hero-card > * { position: relative; z-index: 1; }
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25);
  font-size: 10px;
  font-weight: 600;
}
.hero-stat {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: .9rem;
  background: linear-gradient(135deg, #f5eefd, #ebe0fb);
  color: #8b45d6;
}
.icon-chip.is-solid {
  color: #fff;
  background: linear-gradient(135deg, #a15cf2, #6d28d9);
  box-shadow: 0 6px 14px -6px rgba(109, 40, 217, .6);
}

.section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 700;
  color: #171717;
}
.section-title::before {
  content: "";
  width: .25rem;
  height: .9rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #a15cf2, #6d28d9);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid transparent;
}
.status-pill.is-pending { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.status-pill.is-claimed { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.status-pill.is-none { color: #737373; background: #f5f5f5; border-color: #e5e5e5; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #737373;
  font-size: .8rem;
}
.empty-state .icon-chip {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.5rem;
  margin: 0 auto .75rem;
}

.search-input {
  transition: border-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 1px 2px rgba(17, 12, 34, .03), 0 6px 18px -12px rgba(76, 29, 149, .18);
}
.search-input:focus {
  outline: none;
  border-color: rgba(139, 69, 214, .45);
  box-shadow: 0 0 0 4px rgba(139, 69, 214, .12);
}

.fade-x {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.hot-badge {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 1px 5px 1px 3px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #ef4444);
  box-shadow: 0 3px 8px -3px rgba(239, 68, 68, .7);
}
.hot-badge.hidden { display: none; }

.fav-btn {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: #a3a3a3;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(139, 69, 214, .1);
  box-shadow: 0 2px 6px rgba(17, 12, 34, .08);
  cursor: pointer;
  transition: transform .18s cubic-bezier(.3, .7, .4, 1), color .2s ease, background .2s ease;
}
.fav-btn:active { transform: scale(.85); }
.fav-btn.is-on {
  color: #f59e0b;
  background: #fffbeb;
  border-color: #fde68a;
}
.fav-btn.pop { animation: fav-pop .4s cubic-bezier(.3, .7, .4, 1.4); }
@keyframes fav-pop {
  0% { transform: scale(.7); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.app-card .fav-btn {
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 10;
}

.rank-no {
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
  border-radius: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  color: #a3a3a3;
  background: #f5f5f5;
}
.rank-no[data-rank="1"] { color: #fff; background: linear-gradient(135deg, #fcd34d, #f59e0b); box-shadow: 0 4px 10px -4px rgba(245, 158, 11, .8); }
.rank-no[data-rank="2"] { color: #fff; background: linear-gradient(135deg, #e5e7eb, #9ca3af); box-shadow: 0 4px 10px -4px rgba(107, 114, 128, .7); }
.rank-no[data-rank="3"] { color: #fff; background: linear-gradient(135deg, #fdba74, #c2410c); box-shadow: 0 4px 10px -4px rgba(194, 65, 12, .7); }
.rank-bar {
  display: block;
  height: .25rem;
  border-radius: 999px;
  background: #f3eefb;
  overflow: hidden;
}
.rank-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c4a6ea, #8b45d6);
  transition: width .4s ease;
}

.banner-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(20, 8, 40, .35));
}

.lottery-board {
  position: relative;
  padding: .75rem;
  border-radius: 1.75rem;
  background: linear-gradient(135deg, #a15cf2, #6d28d9);
  box-shadow: 0 16px 36px -16px rgba(91, 33, 182, .7), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.lottery-board::before {
  content: "";
  position: absolute;
  inset: .3rem;
  border-radius: 1.5rem;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .9) 1.4px, transparent 1.9px);
  background-size: 16px 16px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  padding: .25rem;
  opacity: .8;
  animation: board-lights 1.2s steps(2) infinite;
}
@keyframes board-lights { 50% { opacity: .35; } }
.lottery-board > .grid { position: relative; z-index: 1; }

.btn-purple-gradient {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #a15cf2 0%, hsl(var(--primary-500)) 45%, hsl(var(--accent-600)) 100%);
  color: #fff;
  letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -2px 0 rgba(60, 10, 120, .18), 0 6px 16px -6px hsl(var(--primary-500) / .6);
  transition: transform .18s cubic-bezier(.3, .7, .4, 1), box-shadow .2s ease, filter .2s ease;
}
.btn-purple-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s ease;
  pointer-events: none;
}
.btn-purple-gradient:active {
  transform: scale(.96);
  filter: brightness(.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 2px 8px -4px hsl(var(--primary-500) / .6);
}
.btn-purple-gradient:disabled { opacity: .55; filter: saturate(.6); }
.btn-purple-gradient.is-copied {
  background: linear-gradient(135deg, #34d399, #059669);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px -6px rgba(5, 150, 105, .6);
}

.btn-soft {
  background: #f5eefd;
  color: #6d28d9;
  border: 1px solid rgba(139, 69, 214, .16);
  transition: transform .18s cubic-bezier(.3, .7, .4, 1), background .2s ease, border-color .2s ease;
}
.btn-soft:active { transform: scale(.96); background: #ecdffb; }
.btn-soft.is-copied { background: #ecfdf5; color: #047857; border-color: rgba(5, 150, 105, .25); }

.btn-text {
  color: #9ca3af;
  transition: color .2s ease, transform .18s ease;
}
.btn-text:active { transform: scale(.96); color: #6b7280; }

.btn-purple-gradient > i,
.btn-soft > i { margin-right: .35em; vertical-align: -.125em; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #6b7280;
  border: 1px solid hsl(var(--background-200));
  box-shadow: 0 2px 6px rgba(17, 12, 34, .05);
  transition: transform .18s cubic-bezier(.3, .7, .4, 1), color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.icon-btn:active { transform: scale(.9); color: #8b45d6; }

.chip { transition: transform .18s cubic-bezier(.3, .7, .4, 1), box-shadow .2s ease, color .2s ease; }
.chip:active { transform: scale(.94); }
.chip:not(.btn-purple-gradient) { box-shadow: 0 1px 3px rgba(17, 12, 34, .04); }

.quick-tile { transition: transform .18s cubic-bezier(.3, .7, .4, 1), border-color .2s ease, box-shadow .2s ease; }
.quick-tile:active { transform: scale(.95); }
.quick-tile .quick-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5eefd, #ede4fc);
  color: #8b45d6;
  font-size: 1.05rem;
}

.btn-spin.btn-purple-gradient { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 22px -8px hsl(var(--primary-500) / .8); }
.btn-spin.is-ready { animation: spin-glow 2.2s ease-in-out infinite; }
.btn-spin.is-ready i { animation: spin-bob 2.2s ease-in-out infinite; }
@keyframes spin-glow {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 0 hsl(var(--primary-500) / .45); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 8px hsl(var(--primary-500) / 0); }
}
@keyframes spin-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-3px) rotate(-8deg); }
}
.btn-spin:disabled { opacity: 1; filter: none; }

@media (hover: hover) {
  .btn-purple-gradient:hover {
    filter: brightness(1.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 24px -8px hsl(var(--primary-500) / .7);
  }
  .btn-purple-gradient:hover::after { transform: translateX(120%); }
  .btn-soft:hover { background: #efe4fc; border-color: rgba(139, 69, 214, .3); }
  .btn-text:hover { color: #6b7280; }
  .icon-btn:hover { color: #8b45d6; border-color: hsl(var(--primary-500) / .35); box-shadow: 0 4px 12px hsl(var(--primary-500) / .15); }
  .chip:not(.btn-purple-gradient):hover { color: #8b45d6; box-shadow: 0 4px 10px hsl(var(--primary-500) / .12); }
  .quick-tile:hover { border-color: hsl(var(--primary-500) / .3); box-shadow: 0 6px 18px hsl(var(--primary-500) / .1); }
}

.text-purple-gradient {
  background: linear-gradient(135deg, hsl(var(--primary-500)), hsl(var(--accent-500)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass {
  background: rgba(252, 251, 254, .78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.premium-card {
  border-color: rgba(139, 69, 214, .08) !important;
  box-shadow: 0 1px 2px rgba(17, 12, 34, .03), 0 6px 16px -10px rgba(76, 29, 149, .16);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.premium-card:active { transform: scale(.96); }
.card-in {
  animation: card-in .35s ease backwards;
  animation-delay: var(--d, 0s);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.card-go {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: .375rem;
  background: #f6f0fc;
  color: #8b45d6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.card-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #8b45d6, #7c3aed);
  opacity: 0;
  transition: opacity .2s ease;
}
@media (hover: hover) {
  .premium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px hsl(var(--primary-500) / .1);
    border-color: hsl(var(--primary-500) / .3);
  }
  .premium-card:hover .card-go { background: #8b45d6; color: #fff; }
  .premium-card:hover .card-line { opacity: 1; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.animate-marquee { animation: marquee 18s linear infinite; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fade-up .35s ease-out; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-nav {
  bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
  border: 1px solid rgba(139, 69, 214, .1);
  box-shadow: 0 12px 32px -12px rgba(76, 29, 149, .28), 0 2px 6px rgba(17, 12, 34, .04);
}
.nav-item { transition: color .3s ease; }
.nav-icon { transition: background .3s ease, color .3s ease, transform .2s ease, box-shadow .3s ease; }
nav a:active .nav-icon { transform: scale(.9); }
.site-nav .nav-icon.bg-primary-50 {
  color: #fff;
  background: linear-gradient(135deg, #a15cf2, #6d28d9);
  box-shadow: 0 8px 16px -8px rgba(109, 40, 217, .8);
  transform: translateY(-2px);
}
.nav-mark { display: none; }

.banner-slide {
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity .7s ease;
}
.banner-slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}
.banner-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: .75rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.banner-dot {
  width: .5rem;
  height: .5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  transition: width .3s ease, background .3s ease;
}
.banner-dot.is-active {
  width: 1.5rem;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(10, 10, 10, .4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity .28s ease, visibility .28s ease;
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.modal-panel {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transition: transform .34s cubic-bezier(.22, .8, .24, 1), opacity .28s ease;
}
.modal.is-open .modal-panel {
  opacity: 1;
  transform: none;
}
.modal.sheet {
  align-items: flex-end;
  padding: 0;
}
.modal.sheet .modal-panel {
  opacity: 1;
  transform: translateY(100%);
}
.modal.sheet.is-open .modal-panel {
  transform: translateY(0);
}
@media (min-width: 640px) {
  .modal.sheet {
    align-items: center;
    padding: 1rem;
  }
  .modal.sheet .modal-panel {
    opacity: 0;
    transform: translateY(14px) scale(.98);
  }
  .modal.sheet.is-open .modal-panel {
    opacity: 1;
    transform: none;
  }
}

.prize-cell {
  background: #fff;
  box-shadow: inset 0 -3px 0 rgba(17, 12, 34, .05);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.prize-cell .prize-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: .25rem;
}
.prize-cell.is-on {
  transform: scale(1.06);
  background: #fffbeb;
  box-shadow: 0 0 0 3px #fbbf24, 0 10px 22px rgba(251, 191, 36, .45);
  z-index: 1;
}

.nav-quiet *, .nav-quiet *::before, .nav-quiet *::after { animation: none !important; transition: none !important; }
.nav-in { animation: nav-in .2s ease; }
@keyframes nav-in { from { opacity: 0; } }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .16s ease both; }
::view-transition-new(root) { animation: vt-in .22s ease both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
::view-transition-group(site-nav) { animation: none; z-index: 80; }
.site-nav { view-transition-name: site-nav; }

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