:root{
  --bg0:#070A10;
  --bg1:#0B1020;
  --card:rgba(255,255,255,.04);
  --line:rgba(255,255,255,.10);
  --muted:rgba(255,255,255,.62);
  --primary:#0C59FF;
  --glow: 0 0 20px rgba(12,89,255,.25), 0 0 40px rgba(12,89,255,.15);
  --glow-strong: 0 0 18px rgba(12,89,255,.45), 0 0 55px rgba(12,89,255,.25);
  --r:18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:#fff;
  background: radial-gradient(circle at 30% 10%, rgba(12,89,255,.18), transparent 45%),
              radial-gradient(circle at 70% 25%, rgba(12,89,255,.10), transparent 52%),
              linear-gradient(180deg, var(--bg1), var(--bg0) 60%, #05070c);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.app-shell{
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 92px;
}

.screen{ display:none; }
.screen.active{ display:block; }

.splash{
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 35% 30%, rgba(12,89,255,.22), transparent 55%),
              linear-gradient(180deg, #0B1326, #05070c);
  z-index: 50;
  animation: splashIn .6s ease both;
}
.splash-inner{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 22px;
}
.splash-logo{
  opacity:0;
  transform: translateY(10px);
  animation: fadeInUp .8s ease .2s forwards;
}
@keyframes fadeInUp{
  to{ opacity:1; transform: translateY(0); }
}
@keyframes splashIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 14px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background: linear-gradient(180deg, rgba(0,0,0,.40), rgba(0,0,0,0));
  backdrop-filter: blur(10px);
}
.topbar-left{ display:flex; align-items:center; gap:10px; }
.top-logo{ display:flex; align-items:center; }
.top-logo svg{
  width: 140px;
  height: auto;
  display: block;
}


.topbar-right{ display:flex; gap:10px; align-items:center; }
.topchip{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color:#fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  display:flex;
  align-items:center;
  gap:6px;
}
.topchip.icon{ width:44px; justify-content:center; padding:8px 0; }

.main{
  padding: 10px 14px 0;
}

.page-head{ margin-top: 8px; }
.page-title{
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .01em;
  margin: 0;
}
.page-sub{
  margin: 8px 0 0;
  color: rgba(255,255,255,.55);
  font-size: 12.5px;
  line-height: 1.35;
}

.btn-glow{
  border-radius: 14px;
  border: 1px solid rgba(12,89,255,.45);
  background: linear-gradient(180deg, rgba(12,89,255,.38), rgba(12,89,255,.18));
  color:#fff;
  font-weight: 900;
  letter-spacing:.12em;
  text-transform: uppercase;
  padding: 12px 14px;
  box-shadow: var(--glow-strong);
}
.btn-glow:disabled{
  opacity:.55;
  filter: saturate(.7);
  box-shadow: none;
}

.card-soft{
  border-radius: var(--r);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  padding: 14px;
}
.card-soft-title{
  font-weight: 900;
  font-size: 13px;
  color: rgba(255,255,255,.88);
  margin-bottom: 10px;
}
.history{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.hist-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: rgba(255,255,255,.75);
}

.wheel-wrap{
  position: relative;
  width: 320px;
  height: 320px;
  margin: 18px auto 0;
}
#wheelCanvas{
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 2px solid rgba(12,89,255,.45);
  box-shadow: var(--glow);
  background: rgba(255,255,255,.02);
}
.wheel-pointer{
  position:absolute;
  top: -6px;
  left:50%;
  transform: translateX(-50%)rotate(180deg);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 22px solid var(--primary);
  filter: drop-shadow(0 0 12px rgba(12,89,255,.75));
  z-index: 5;
}
.wheel-center{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}
.wheel-star{
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(12,89,255,.22);
  border: 1px solid rgba(12,89,255,.45);
  box-shadow: var(--glow-strong);
  font-size: 18px;
  
}

.wheel-container{
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto;
}

.wheel-container::before{
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(12,89,255,.9);
  box-shadow:
    0 0 20px rgba(12,89,255,.6),
    inset 0 0 18px rgba(12,89,255,.35);
  z-index: 1;
  pointer-events: none;
}

.wheel{
  position: relative;
  z-index: 2;
  border-radius: 50%;
  overflow: hidden;
}

.wheel-pointer{ z-index: 5; }
.wheel-center{ z-index: 4; }





.seg-tabs{
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  display: flex;
  gap: 6px;
}
.seg-btn{
  flex: 1;
  border: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,.75);
  font-weight: 900;
  font-size: 13px;
  transition: all .2s ease;
}
.seg-btn.active{
  background: rgba(12,89,255,.85);
  color: #fff;
  box-shadow: 0 0 18px rgba(12,89,255,.35);
}
.tab-panel{ display:none; }
.tab-panel.active{ display:block; }

.task-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
}
.task-left{
  display:flex;
  gap: 12px;
  align-items:center;
  min-width: 0;
}
.task-ico{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(12,89,255,.16);
  border: 1px solid rgba(12,89,255,.35);
  box-shadow: 0 0 14px rgba(12,89,255,.20);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  flex: 0 0 auto;
}
.task-meta{ min-width:0; }
.task-title{
  font-weight: 900;
  font-size: 14px;
  margin:0;
  color:#fff;
  line-height: 1.1;
}
.task-reward{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,.60);
}
.task-btn{
  border-radius: 12px !important;
  font-weight: 900;
  padding: 10px 12px;
  white-space: nowrap;
}

.invite-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
}
.invite-left{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}
.invite-logo{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(12,89,255,.16);
  border: 1px solid rgba(12,89,255,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 0 14px rgba(12,89,255,.20);
  flex: 0 0 auto;
}
.mini-mark{
  font-weight: 1000;
  font-size: 12px;
  letter-spacing: .08em;
  color: #fff;
  opacity: .9;
}
.invite-title{
  font-weight: 900;
  color: #fff;
  font-size: 14px;
  line-height: 1.1;
}
.invite-reward{
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255,255,255,.60);
}
.invite-copy{
  border-radius: 12px !important;
  font-weight: 900;
  padding: 9px 12px;
}
.invite-linkbox{
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
}
.invite-linklabel{
  font-size: 12px;
  color: rgba(255,255,255,.60);
  margin-bottom: 8px;
}
.invite-linkrow{
  display:flex;
  gap: 10px;
}
.invite-input{
  background: rgba(0,0,0,.25) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  color: #fff !important;
  border-radius: 12px !important;
}
.invite-copy2{
  white-space: nowrap;
  border-radius: 12px;
  padding: 10px 14px;
}
.invite-hint{
  font-size: 12px;
  color: rgba(255,255,255,.70);
}

.lb-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
}
.lb-left{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}
.lb-rank{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(12,89,255,.14);
  border: 1px solid rgba(12,89,255,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 1000;
  color:#fff;
  box-shadow: 0 0 14px rgba(12,89,255,.18);
}
.lb-user{
  font-weight: 900;
  font-size: 13px;
  color:#fff;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.lb-points{
  color: rgba(255,255,255,.60);
  font-size: 12px;
  font-weight: 800;
}
.lb-pill{
  background: rgba(12,89,255,.18);
  border: 1px solid rgba(12,89,255,.45);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  color:#fff;
}

.support-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
}
.support-icon{
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(12,89,255,.18);
  border: 1px solid rgba(12,89,255,.45);
  box-shadow: var(--glow);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 20px;
}
.support-meta{ min-width:0; }
.support-title{ font-weight: 1000; font-size: 14px; }
.support-sub{ color: rgba(255,255,255,.60); font-size: 12px; margin-top: 3px; }

.bottom-nav{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(460px, 100%);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 10px 10px 12px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 8px;
  z-index: 30;
}
.nav-item{
  flex: 1;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.55);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 4px;
  padding: 6px 0;
}
.nav-ico{
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.nav-item svg{ display:block; }
.nav-label{ font-size: 10px; font-weight: 800; letter-spacing: .02em; }

.nav-item.active{ color:#fff; }
.nav-item.active .nav-ico{
  background: rgba(12,89,255,.16);
  border: 1px solid rgba(12,89,255,.35);
  box-shadow: 0 0 12px rgba(12,89,255,.18);
}
.nav-item.active svg{
  filter: drop-shadow(0 0 8px rgba(12,89,255,.55));
}

.nav-center{
  flex: 1.2;
  margin-top: -22px;
}
.nav-ico-center{
  width: 58px;
  height: 58px;
  border-radius: 22px;
  background: radial-gradient(circle at 30% 30%, rgba(12,89,255,.55), rgba(12,89,255,.25));
  border: 1px solid rgba(12,89,255,.55);
  box-shadow: var(--glow-strong);
}
.nav-center svg{ width: 44px; height: 44px; }
.nav-center.active{ color:#fff; }

.win-overlay{
  position: fixed;
  inset: 0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.60);
  backdrop-filter: blur(8px);
  z-index: 60;
}
.win-overlay.show{ display:flex; }
.win-card{
  width: min(360px, 92vw);
  border-radius: 22px;
  padding: 18px;
  background: rgba(12,16,28,.92);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 0 40px rgba(0,0,0,.45);
  text-align:center;
  position:relative;
  overflow:hidden;
}
.win-title{
  font-weight: 1000;
  letter-spacing:.12em;
  font-size: 14px;
  opacity:.95;
}
.win-prize{
  margin-top: 12px;
  font-size: 18px;
  font-weight: 1000;
}
.win-sub{
  margin-top: 10px;
  color: rgba(255,255,255,.65);
  font-size: 12px;
  line-height: 1.35;
}
.confetti{
  position:absolute;
  inset:0;
  pointer-events:none;
  overflow:hidden;
}
.conf{
  position:absolute;
  top: -10px;
  width: 8px;
  height: 14px;
  opacity: .95;
  border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall{
  to{
    transform: translateY(110vh) rotate(520deg);
    opacity: .9;
  }
}

.toast-mini{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 104px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  color:#fff;
  font-weight: 900;
  font-size: 12px;
  opacity: 0;
  pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 70;
}
.toast-mini.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

@media (max-width: 390px){
  .wheel-wrap, #wheelCanvas{ width: 300px; height: 300px; }
}
