* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 194, 255, 0.18), transparent 22%),
    radial-gradient(circle at 80% 15%, rgba(34, 197, 94, 0.16), transparent 20%),
    radial-gradient(circle at 50% 80%, rgba(168, 85, 247, 0.18), transparent 24%),
    linear-gradient(180deg, #04111f 0%, #020617 100%);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: floatOrb 10s ease-in-out infinite;
}

.orb-1 {
  width: 220px;
  height: 220px;
  background: rgba(59, 130, 246, 0.35);
  left: -40px;
  top: 120px;
}

.orb-2 {
  width: 240px;
  height: 240px;
  background: rgba(34, 197, 94, 0.25);
  right: -60px;
  top: 260px;
  animation-delay: 1.5s;
}

.orb-3 {
  width: 260px;
  height: 260px;
  background: rgba(168, 85, 247, 0.25);
  left: 30%;
  bottom: -80px;
  animation-delay: 3s;
}

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

.page {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #7CFFB2;
  font-size: 13px;
  border: 1px solid rgba(124, 255, 178, 0.25);
  margin-bottom: 14px;
  box-shadow: 0 0 20px rgba(124, 255, 178, 0.12);
}

.hero h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.1;
  text-shadow: 0 0 22px rgba(255,255,255,0.12);
}

.subtitle {
  margin: 12px 0 0;
  color: #b8c4d6;
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.card {
  border-radius: 24px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.glass-card {
  background: rgba(10, 20, 40, 0.78);
  border: 1px solid rgba(120, 160, 220, 0.15);
  box-shadow:
    0 12px 30px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
}

.glass-inner {
  background: rgba(7, 14, 28, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.main-card {
  grid-row: span 2;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-box {
  background: rgba(2, 6, 23, 0.74);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.stat-title {
  font-size: 13px;
  color: #9fb0c8;
}

.stat-value {
  font-size: 22px;
  margin-top: 10px;
  font-weight: bold;
  color: #fff;
}

.slot-wrap {
  margin-top: 22px;
  padding: 22px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}

.neon-panel {
  background: linear-gradient(180deg, rgba(16,185,129,0.12), rgba(59,130,246,0.08));
  border: 1px solid rgba(45, 212, 191, 0.18);
  box-shadow:
    inset 0 0 30px rgba(34,197,94,0.05),
    0 0 30px rgba(45,212,191,0.08);
}

.slot-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 18px;
  text-align: center;
}

.slot-machine {
  display: flex;
  justify-content: center;
  gap: 14px;
  perspective: 1000px;
}

.slot-reel {
  width: 110px;
  height: 110px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(20,60,120,0.35), transparent 55%),
    linear-gradient(180deg, #05101d 0%, #020817 100%);
  border: 2px solid rgba(99, 210, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  box-shadow:
    inset 0 0 18px rgba(0,0,0,0.35),
    0 0 18px rgba(0,194,255,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.glow-box {
  position: relative;
}

.glow-box::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(34,197,94,0.22), rgba(56,189,248,0.18), rgba(168,85,247,0.22));
  filter: blur(16px);
  z-index: -1;
  opacity: 0.55;
}

.slot-machine.spinning .slot-reel {
  animation: pulseReel 0.4s ease-in-out infinite alternate;
}

@keyframes pulseReel {
  from {
    transform: translateY(0px) scale(1);
    box-shadow:
      inset 0 0 18px rgba(0,0,0,0.35),
      0 0 18px rgba(0,194,255,0.08);
  }
  to {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
      inset 0 0 18px rgba(0,0,0,0.35),
      0 0 30px rgba(34,197,94,0.22),
      0 0 44px rgba(56,189,248,0.18);
  }
}

.slot-light-bar {
  margin: 18px auto 0;
  width: 160px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #38bdf8, #a855f7, #22c55e);
  background-size: 200% 100%;
  animation: glowRun 2s linear infinite;
  box-shadow: 0 0 16px rgba(56,189,248,0.25);
}

@keyframes glowRun {
  0% { background-position: 0 0; }
  100% { background-position: 200% 0; }
}

.action-area {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  min-width: 180px;
  padding: 15px 24px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-size: 17px;
  font-weight: bold;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn:active {
  transform: translateY(0px) scale(0.99);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-connect {
  background: linear-gradient(90deg, #0ea5e9, #0284c7);
  color: #fff;
  box-shadow: 0 10px 22px rgba(14,165,233,0.22);
}

.btn-draw {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 10px 22px rgba(34,197,94,0.22);
}

.wallet-box,
.result-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(7, 14, 28, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
  text-align: center;
  word-break: break-all;
  transition: box-shadow 0.2s ease;
}

.result-box {
  font-size: 18px;
  font-weight: bold;
  color: #7CFFB2;
  box-shadow: inset 0 0 10px rgba(124,255,178,0.03);
}

.rules-box {
  margin-top: 22px;
  padding: 18px;
  border-radius: 18px;
}

.rules-box h3 {
  margin: 0 0 12px;
}

.rules-subtitle {
  margin-top: 18px !important;
}

.rule-item,
.prize-item,
.list-item {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.16);
  color: #dbe4f0;
  line-height: 1.6;
}

.rule-item:last-child,
.prize-item:last-child,
.list-item:last-child {
  border-bottom: 0;
}

.side-card h3 {
  margin-top: 0;
}

.list-box {
  min-height: 180px;
}

.muted {
  color: #8ea0bb;
}

.rank {
  display: inline-block;
  width: 30px;
  color: #7CFFB2;
  font-weight: bold;
}

.amount {
  color: #7CFFB2;
  font-weight: bold;
}

.popup-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.66);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.popup-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background:
    radial-gradient(circle at top, rgba(56,189,248,0.12), transparent 40%),
    linear-gradient(180deg, #0f172a 0%, #091120 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  box-shadow:
    0 12px 40px rgba(0,0,0,0.42),
    0 0 30px rgba(56,189,248,0.12);
  overflow: hidden;
  transform: scale(0.92);
  opacity: 0;
}

.popup-mask.show .popup-card {
  animation: popupIn 0.28s ease forwards;
}

@keyframes popupIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.popup-shine {
  position: absolute;
  top: -40%;
  left: -30%;
  width: 60%;
  height: 180%;
  background: linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,0.16), rgba(255,255,255,0.0));
  transform: rotate(25deg);
  animation: shineMove 2.4s linear infinite;
  pointer-events: none;
}

@keyframes shineMove {
  0% { transform: translateX(-120%) rotate(25deg); }
  100% { transform: translateX(260%) rotate(25deg); }
}

.popup-icon {
  font-size: 56px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(56,189,248,0.2));
}

.popup-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #fff;
}

.popup-text {
  font-size: 18px;
  line-height: 1.7;
  color: #dbe4f0;
  margin-bottom: 22px;
  word-break: break-word;
}

.popup-btn {
  min-width: 150px;
  padding: 12px 20px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(34,197,94,0.22);
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .main-card {
    grid-row: auto;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .slot-reel {
    width: 90px;
    height: 90px;
    font-size: 38px;
  }

  .hero h1 {
    font-size: 30px;
  }
}