
:root{
  --bg0:#f2f3f5;
  --bg1:#e7e9ec;
  --ink:#0b0b0b;
  --muted:#6b6f76;
  --line:rgba(0,0,0,.08);
  --card:#f9fafb;
  --surface:#ffffff;
  --shadow:0 22px 70px rgba(0,0,0,.10);
  --shadow2:0 16px 40px rgba(0,0,0,.08);
  --accent1:#2b6cff;
  --accent2:#00b7a8;
  --accent3:#ffb020;
  --accent4:#ff4d6d;
  --radius:18px;
}
body.theme-dark{
  --bg0:#0f1116;
  --bg1:#0b0c10;
  --ink:#f2f2f2;
  --muted:#9ca0a6;
  --line:rgba(255,255,255,.10);
  --card:#15171c;
  --surface:#15171c;
  --shadow:0 22px 70px rgba(0,0,0,.55);
  --shadow2:0 16px 40px rgba(0,0,0,.40);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial;
  color:var(--ink);
  background: linear-gradient(180deg,var(--bg0),var(--bg1));
  overflow-x:hidden;
}
.page-bg{
  position:fixed; inset:0;
  background: radial-gradient(1200px 800px at 15% 10%, rgba(43,108,255,.10), transparent 60%),
              radial-gradient(900px 700px at 85% 20%, rgba(0,183,168,.10), transparent 55%),
              radial-gradient(900px 700px at 50% 90%, rgba(255,176,32,.10), transparent 55%);
  pointer-events:none;
  opacity:.9;
}
.container{max-width:980px; margin:0 auto; padding:28px 22px 70px}
.topbar{
  position:sticky; top:0; z-index:30;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px;
  background:linear-gradient(180deg, rgba(255,255,255,.60), rgba(255,255,255,0));
  backdrop-filter: blur(14px);
}
body.theme-dark .topbar{
  background:linear-gradient(180deg, rgba(15,17,22,.68), rgba(15,17,22,0));
}
.left-cluster{display:flex; gap:10px; align-items:center}
.icon-btn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.55);
  color:var(--ink);
  border-radius: 999px;
  padding:10px 12px;
  box-shadow: var(--shadow2);
  display:inline-flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  transition:transform .15s ease, background .15s ease;
}
body.theme-dark .icon-btn{background:rgba(21,23,28,.65)}
.icon-btn:hover{transform:translateY(-1px)}
.theme-btn{width:44px; justify-content:center; padding:10px}
#walletAvatar{
  width:22px; height:22px; border-radius:999px;
  background:linear-gradient(135deg,var(--accent1),var(--accent2));
  display:inline-block;
}
.wallet-dot{width:8px; height:8px; border-radius:999px; background:transparent; box-shadow:none}
.connect-btn.connected .wallet-dot{background:var(--accent2); box-shadow:0 0 0 4px rgba(0,183,168,.18)}
.wallet-icon{opacity:.8}
.wallet-text{font-size:13px; letter-spacing:.01em}
.pro-float{
  border:0;
  border-radius:999px;
  padding:11px 14px;
  cursor:pointer;
  color:var(--ink);
  background: linear-gradient(135deg, rgba(43,108,255,.18), rgba(0,183,168,.18));
  box-shadow: var(--shadow2);
  display:flex; align-items:center; gap:8px;
}
body.theme-dark .pro-float{background: linear-gradient(135deg, rgba(43,108,255,.20), rgba(0,183,168,.16))}
.pro-float:hover{transform:translateY(-1px)}
.pro-dot{font-size:14px}
.brand-block{ text-align:center; padding:38px 0 14px}
.brand-mark{
  width:78px; height:78px; margin:0 auto 10px;
  display:flex; align-items:center; justify-content:center;
}
.brand-mark svg{width:74px; height:74px}
.brand-title{margin:0; font-size:44px; letter-spacing:.18em; font-weight:700}
.brand-tagline{margin-top:12px; font-size:18px; color:var(--muted); font-weight:600; line-height:1.25}
.active-zone{margin-top:26px}
.active-head{display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:10px}
.active-title{font-weight:800; letter-spacing:.12em; font-size:15px}
.switch-btn{
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:20px;
  cursor:pointer;
  padding:0 8px;
}
.active-surface{
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:22px;
  position:relative;
  overflow:hidden;
}
.active-surface::before{
  content:"";
  position:absolute; inset:-80px;
  background: radial-gradient(500px 320px at 30% 20%, rgba(43,108,255,.14), transparent 60%),
              radial-gradient(420px 320px at 70% 10%, rgba(0,183,168,.14), transparent 60%),
              radial-gradient(560px 360px at 60% 85%, rgba(255,176,32,.12), transparent 60%);
  opacity:.9;
  animation: drift 18s ease-in-out infinite;
  pointer-events:none;
}
@keyframes drift{
  0%{transform:translate3d(0,0,0)}
  50%{transform:translate3d(22px, -14px, 0)}
  100%{transform:translate3d(0,0,0)}
}
.fields{position:relative; z-index:2; display:flex; flex-direction:column; gap:14px}
.field{
  width:100%;
  min-height:84px;
  border:1px solid var(--line);
  border-radius: 14px;
  padding:16px 16px;
  background: rgba(255,255,255,.75);
  color:var(--ink);
  font-size:16px;
  line-height:1.35;
  resize:none;
  outline:none;
  text-align:center;
  direction:ltr;
}
body.theme-dark .field{background: rgba(21,23,28,.75)}
.field:focus{
  border-color: rgba(43,108,255,.55);
  box-shadow: 0 0 0 4px rgba(43,108,255,.12);
}
.char-row{position:relative; z-index:2; display:flex; gap:10px; justify-content:flex-end; margin-top:8px; color:var(--muted); font-size:12px}
.microcopy{position:relative; z-index:2; margin-top:10px; text-align:center; color:var(--muted); font-weight:600}
.langhint{position:relative; z-index:2; text-align:center; font-size:12px; color:var(--muted); margin-top:6px}
.cta{
  position:relative; z-index:2;
  margin:16px auto 0;
  display:block;
  border:0;
  border-radius: 16px;
  padding:14px 22px;
  min-width:160px;
  font-size:15px;
  font-weight:700;
  color:#fff;
  background: linear-gradient(135deg, rgba(43,108,255,.95), rgba(0,183,168,.95));
  cursor:pointer;
  box-shadow: var(--shadow2);
}
.cta:hover{filter:brightness(1.02)}
.scenario-box{
  margin-top:26px;
  padding:18px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0,0,0,.035), rgba(0,0,0,.015));
  border:1px solid var(--line);
  box-shadow: var(--shadow2);
  min-height:98px;
}
body.theme-dark .scenario-box{
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.scenario-title{font-weight:800; letter-spacing:.06em; font-size:13px; text-align:left}
.scenario-text{margin-top:10px; text-align:center; font-size:16px; color:var(--muted); font-weight:600}
.plans-row{display:flex; justify-content:center; margin-top:18px}
.plans-btn{
  border:1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,176,32,.20), rgba(255,77,109,.18));
  color:var(--ink);
  padding:12px 18px;
  border-radius: 16px;
  cursor:pointer;
  font-weight:800;
  box-shadow: var(--shadow2);
}
.cards-row{
  margin-top:18px;
  display:flex;
  gap:14px;
  align-items:stretch;
}
.card{
  flex:1;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow2);
  padding:18px;
  position:relative;
  overflow:hidden;
}
.card::before{
  content:"";
  position:absolute; inset:0;
  border-radius: var(--radius);
  pointer-events:none;
  opacity:.9;
}
#cardCompare::before{box-shadow: inset 0 0 0 2px rgba(43,108,255,.35)}
#cardRisk::before{box-shadow: inset 0 0 0 2px rgba(0,183,168,.30)}
#cardMedium::before{box-shadow: inset 0 0 0 2px rgba(255,176,32,.28)}
.card.tall{min-height:178px}
.card.medium{min-height:154px; flex:1.15}
.card-title{font-weight:900; letter-spacing:.10em; font-size:13px; text-align:center}
.card-open{
  display:block;
  margin:18px auto 0;
  border:0;
  border-radius: 14px;
  padding:11px 16px;
  background: rgba(0,0,0,.07);
  color:var(--ink);
  cursor:pointer;
  font-weight:800;
}
body.theme-dark .card-open{background: rgba(255,255,255,.09)}
.medium-title{margin-top:14px; font-weight:800; font-size:14px}
.medium-excerpt{margin-top:8px; color:var(--muted); line-height:1.35; min-height:42px}
.read-more{display:inline-block; margin-top:12px; font-weight:800; color:var(--ink); text-decoration:none}
.footer{
  margin-top:30px;
  padding:24px 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.02));
  border-top:1px solid var(--line);
}
body.theme-dark .footer{background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02))}
.footer-inner{
  max-width:980px; margin:0 auto;
  display:flex; justify-content:space-between; align-items:center;
  gap:16px;
}
.footer-legal{display:flex; gap:14px; flex-wrap:wrap; font-weight:800}
.footer-legal a{color:var(--ink); text-decoration:none}
.footer-social{display:flex; gap:12px}
.footer-social a{width:38px; height:38px; border-radius:999px; display:grid; place-items:center; border:1px solid var(--line); background:rgba(255,255,255,.45)}
body.theme-dark .footer-social a{background:rgba(21,23,28,.6)}
.footer-social svg{width:18px; height:18px; fill:var(--ink)}
/* Overlay & modal */
.overlay{position:fixed; inset:0; background:rgba(0,0,0,.35); display:flex; justify-content:center; align-items:center; padding:18px; z-index:50}
body.theme-dark .overlay{background:rgba(0,0,0,.55)}
.hidden{display:none !important}
.modal{
  width:min(560px, 96vw);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
  border:1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  position:relative;
  padding:20px;
}
body.theme-dark .modal{
  background: linear-gradient(180deg, rgba(21,23,28,.92), rgba(21,23,28,.82));
}
.close{
  position:absolute; top:12px; right:14px;
  border:0; background:transparent; color:var(--muted);
  font-size:24px; cursor:pointer;
}
.modal-body{padding:16px 12px 8px; text-align:center}
.modal h3{margin:0; font-size:22px; letter-spacing:.08em}
.modal .price{margin-top:12px; font-size:32px; font-weight:900}
.modal .sub{margin-top:12px; color:var(--muted); font-weight:700; line-height:1.35}
.modal .actions{margin-top:18px; display:flex; justify-content:center; gap:10px; flex-wrap:wrap}
.btn{
  border:0;
  border-radius: 16px;
  padding:13px 18px;
  min-width:180px;
  font-weight:900;
  cursor:pointer;
  box-shadow: var(--shadow2);
}
.btn.primary{color:#fff; background: linear-gradient(135deg, rgba(43,108,255,.92), rgba(0,183,168,.92))}
.btn.soft{color:var(--ink); background: rgba(0,0,0,.06)}
body.theme-dark .btn.soft{background: rgba(255,255,255,.10)}
.run-again{
  border-radius:0;
  padding:10px 14px;
  min-width:auto;
  background: rgba(0,0,0,.06);
  color:var(--ink);
}
body.theme-dark .run-again{background: rgba(255,255,255,.10)}
/* Share menu */
.share-wrap{position:relative; display:inline-block}
.share-menu{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  margin-top:10px;
  min-width:200px;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.90));
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow: var(--shadow2);
  padding:10px;
  text-align:left;
  z-index:60;
}
body.theme-dark .share-menu{background: linear-gradient(180deg, rgba(21,23,28,.95), rgba(21,23,28,.90))}
.share-item{
  width:100%;
  border:0;
  background:transparent;
  padding:10px 10px;
  border-radius:12px;
  cursor:pointer;
  color:var(--ink);
  font-weight:800;
  text-align:left;
}
.share-item:hover{background: rgba(0,0,0,.06)}
body.theme-dark .share-item:hover{background: rgba(255,255,255,.10)}
.toast{
  position:fixed; left:50%; bottom:24px;
  transform:translateX(-50%);
  background: rgba(0,0,0,.78);
  color:#fff;
  padding:10px 14px;
  border-radius: 12px;
  font-weight:800;
  z-index:80;
}
