
:root {
  font-family: Inter, "SF Pro Display", "PingFang SC", system-ui, sans-serif;
  color: #0f172a;
  background: #f6f8fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { min-width: 320px; background: #f6f8fb; overflow-x: hidden; }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }

.app-ambient {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(16, 185, 129, 0.12), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(79, 70, 229, 0.12), transparent 31%),
    linear-gradient(145deg, #fbfdff 0%, #f4f7fb 52%, #eef3f8 100%);
}
@media (min-width: 768px) { .app-ambient { padding: 16px; } }

.app-ambient::before,
.app-ambient::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
}

.app-ambient::before {
  width: 260px; height: 260px; left: -160px; top: 16%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.13), transparent 68%);
}
.app-ambient::after {
  width: 330px; height: 330px; right: -200px; bottom: 8%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.13), transparent 68%);
}

.device-shell {
  position: relative;
  width: min(390px, 100vw);
  height: min(844px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 42px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.14), 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(24px);
}
.device-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.device-scroll::-webkit-scrollbar { display: none; }

.glass-card {
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.72));
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}
.mesh-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 24px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at 18% 18%, rgba(16, 185, 129, 0.2), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(79, 70, 229, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 252, 0.76));
}
.mesh-card::before {
  content: "";
  position: absolute;
  width: 170px; height: 170px; right: -75px; bottom: -82px;
  border-radius: 50%;
  border: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 0 18px rgba(16, 185, 129, 0.05), 0 0 0 36px rgba(16, 185, 129, 0.035);
}
.mesh-grid {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 78%);
}

.progress-track { background: rgba(226, 232, 240, 0.78); height: 6px; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #10b981 0%, #22c55e 45%, #4f46e5 100%); transition: width .5s ease; }

.option-card {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px;
  border-radius: 18px; border: 1px solid rgba(226, 232, 240, 0.9); background: rgba(255,255,255,.65);
  padding: 0 16px; text-align: left;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background-color .22s ease;
}
.option-card:active { transform: scale(0.985); }
.option-card:hover { transform: translateY(-1px); }
.option-card.selected {
  border-color: rgba(16, 185, 129, 0.72);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.12);
  background: rgba(236, 253, 245, 0.76);
}

.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; border: 0; border-radius: 18px;
  padding: 0 20px; color: #fff; font-size: 14px; font-weight: 800;
  background: linear-gradient(90deg, #10b981, #10b981, #4f46e5);
  box-shadow: 0 14px 26px rgba(16, 185, 129, 0.2);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, opacity .2s ease;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); filter: saturate(1.08); }
.btn-primary:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }

.field-shell {
  display: flex; align-items: center; gap: 12px; min-height: 57px;
  border-radius: 18px; border: 1px solid rgba(226,232,240,.9); background: rgba(255,255,255,.65); padding: 0 16px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field-shell:focus-within {
  border-color: rgba(79, 70, 229, 0.42);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
  background: #fff;
}
.field-shell.error { border-color: #fda4af; background: rgba(255,241,242,.45); }
.field-shell input, .field-shell select {
  width: 100%; border: 0; background: transparent; outline: none;
  color: #1e293b; font-size: 13px; font-weight: 600;
}

.ring-progress { transform: rotate(-90deg); transform-origin: 50% 50%; }

.header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top)) 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(18px);
}

.icon-btn, .lang-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; min-width: 44px; border-radius: 999px;
  border: 1px solid rgba(226,232,240,.85); background: rgba(255,255,255,.7);
  color: #475569; font-size: 11px; font-weight: 700;
}
.lang-btn { padding: 0 12px; }

.reward-stage { position: relative; isolation: isolate; overflow: hidden; }
.reward-burst {
  position: absolute; inset: 8% 10% auto; height: 220px; border-radius: 999px; pointer-events: none;
  background:
    radial-gradient(circle at 30% 40%, rgba(16,185,129,.28), transparent 55%),
    radial-gradient(circle at 70% 35%, rgba(79,70,229,.22), transparent 52%),
    radial-gradient(circle at 50% 70%, rgba(245,158,11,.18), transparent 60%);
  filter: blur(8px);
  animation: rewardPulse 2.4s ease-in-out infinite;
}
.reward-glow { animation: rewardPop .7s cubic-bezier(.22,1,.36,1) both; }
.reward-badge, .reward-title, .reward-amount { animation: rewardRise .7s cubic-bezier(.22,1,.36,1) both; }
.reward-title { animation-delay: 80ms; }
.reward-amount { animation-delay: 160ms; }
.reward-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti-piece {
  position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; opacity: 0;
  animation: confettiFall 1.8s cubic-bezier(.22,1,.36,1) both;
}

@keyframes rewardPulse { 0%,100%{opacity:.7;transform:scale(.96)} 50%{opacity:1;transform:scale(1.04)} }
@keyframes rewardPop { from{opacity:0;transform:scale(.72)} to{opacity:1;transform:scale(1)} }
@keyframes rewardRise { from{opacity:0;transform:translate3d(0,18px,0)} to{opacity:1;transform:translate3d(0,0,0)} }
@keyframes confettiFall {
  0%{opacity:0;transform:translate3d(0,-10px,0) rotate(0)}
  15%{opacity:1}
  100%{opacity:0;transform:translate3d(12px,420px,0) rotate(320deg)}
}
@keyframes questionInForward { from{opacity:0;transform:translate3d(18px,0,0)} to{opacity:1;transform:translate3d(0,0,0)} }
@keyframes questionInBack { from{opacity:0;transform:translate3d(-18px,0,0)} to{opacity:1;transform:translate3d(0,0,0)} }
.question-enter-forward { animation: questionInForward 300ms cubic-bezier(.22,1,.36,1) both; }
.question-enter-back { animation: questionInBack 300ms cubic-bezier(.22,1,.36,1) both; }

.lang-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}
.lang-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 78%;
  max-height: 78%;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: #fff;
  box-shadow: 0 -20px 60px rgba(15, 23, 42, 0.18);
  pointer-events: auto;
  touch-action: manipulation;
}
.lang-sheet-head {
  flex: 0 0 auto;
  padding: 16px 16px 8px;
}
.lang-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: #fff;
  text-align: left;
  pointer-events: auto;
  touch-action: manipulation;
  flex-shrink: 0;
}
.device-shell.lang-open .device-scroll {
  overflow: hidden;
  pointer-events: none;
}
.lang-item:hover, .lang-item.active { background: #ecfdf5; }
.lang-item.active { color: #047857; }
.toast-bar {
  position: absolute; left: 16px; right: 16px; top: calc(12px + env(safe-area-inset-top));
  z-index: 30; border-radius: 14px; padding: 10px 12px;
  background: rgba(15,23,42,.86); color: #fff; font-size: 11px; font-weight: 700; text-align: center;
}

.device-shell.benefit-open .device-scroll {
  pointer-events: none;
  user-select: none;
}
.benefit-gate {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px 20px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
}
.benefit-card {
  width: min(100%, 320px);
  padding: 28px 22px 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  text-align: center;
}
.benefit-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.25;
}
.benefit-card p {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
  font-weight: 500;
}
.benefit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(167, 243, 208, 0.8);
  background: rgba(236, 253, 245, 0.9);
  color: #047857;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.benefit-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: left;
}
.benefit-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.benefit-list strong {
  flex: 0 0 auto;
  min-width: 42px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
}
.benefit-list span {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
}
.benefit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.benefit-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
}
.benefit-btn:active {
  transform: scale(0.98);
}

.boot-splash {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
}
.boot-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, #34d399, #10b981, #4f46e5);
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.22);
  animation: rewardPulse 1.4s ease-in-out infinite;
}
.boot-logo svg { width: 22px; height: 22px; }
.boot-bar {
  width: 72px;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.08);
}
.boot-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #4f46e5);
  animation: bootSlide 1s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes bootSlide { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

@media (max-width: 767px) {
  .device-shell {
    width: 100vw; height: 100dvh; border: 0; border-radius: 0; box-shadow: none;
    background: rgba(255,255,255,.92);
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

  
