:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #16181d; color: #e6e8ee; font: 15px/1.6 "Microsoft YaHei UI", "Segoe UI", sans-serif;
}
a { color: #60a5fa; text-decoration: none; }
.card { width: min(440px, 92vw); padding: 32px; border-radius: 12px; background: #1f2229; border: 1px solid #2c3039; }
h1 { margin: 0 0 6px; font-size: 22px; }
.muted { color: #9aa1ad; margin: 0 0 20px; }
.plans { display: grid; gap: 10px; margin-bottom: 20px; }
.plan {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 8px;
  border: 1px solid #2c3039; cursor: pointer;
}
.plan:has(input:checked) { border-color: #3b82f6; background: #1b2a44; }
.plan .name { flex: 1; }
.plan .price { font-weight: 600; color: #f5c451; }
button.primary, a.primary {
  display: inline-block; width: 100%; padding: 11px; border: 0; border-radius: 8px; background: #1677ff; color: #fff;
  font-size: 15px; cursor: pointer; text-align: center;
}
button.primary:disabled { opacity: .5; cursor: default; }
.error { color: #f87171; margin: 12px 0 0; }
.status { font-size: 18px; margin: 8px 0 4px; }
.status.ok { color: #4ade80; }
.status.bad { color: #f87171; }

body.site { display: block; background: #0f1218; color: #e8ebf2; }
.site-header { position: sticky; top: 0; z-index: 2; background: rgba(15, 18, 24, .92); border-bottom: 1px solid #262b36; backdrop-filter: blur(8px); }
.site-header .bar, .site-footer .bar, .wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.site-header .bar { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.logo span { color: #60a5fa; }
.site-header nav { display: flex; gap: 18px; }
.site-header nav a { color: #c5cad6; }
.site-header nav a.active, .site-header nav a:hover { color: #fff; }
.site-header .buy { margin-left: auto; width: auto; padding: 8px 16px; }

.hero { padding: 72px 0 36px; }
.hero h1 { font-size: 40px; line-height: 1.25; margin: 0 0 12px; }
.hero p { max-width: 640px; color: #a7afbd; font-size: 17px; margin: 0 0 24px; }
.actions { display: flex; gap: 12px; }
.actions a, .actions button { width: auto; padding: 11px 18px; }
a.ghost { background: transparent; color: #d5dbe6; border: 1px solid #3a4150; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-bottom: 64px; }
.tile { background: #171b24; border: 1px solid #262b36; border-radius: 12px; padding: 18px; }
.tile h2 { margin: 0 0 6px; font-size: 16px; }
.tile p { margin: 0; color: #9aa3b2; }

.section-title { margin: 8px 0 18px; font-size: 28px; }
.product-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 48px; }
.product { background: #171b24; border: 1px solid #262b36; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.product h2 { margin: 0; font-size: 20px; }
.product .amount { font-size: 32px; font-weight: 700; color: #f5c451; margin: 4px 0; }
.product .amount small { font-size: 14px; color: #9aa3b2; font-weight: 400; }
.product ul { margin: 8px 0 16px; padding-left: 18px; color: #c5cad6; }
.product a.primary { margin-top: auto; }

.checkout { width: min(720px, 100%); margin: 36px auto 64px; display: grid; gap: 16px; }
.panel { background: #171b24; border: 1px solid #262b36; border-radius: 14px; padding: 22px; }
.panel h2 { margin: 0 0 14px; font-size: 18px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #262b36; }
.row:last-child { border-bottom: 0; }
.pay-method {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px;
  border: 1px solid #1677ff; background: #13233f;
}
.pay-badge { width: 36px; height: 36px; border-radius: 8px; background: #1677ff; color: #fff; display: grid; place-items: center; font-weight: 700; }
.pay-method strong { display: block; }
.pay-method span { color: #9aa3b2; font-size: 13px; }
.wait { color: #f5c451; margin: 12px 0 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-bottom: 28px; }
.step { background: #171b24; border: 1px solid #262b36; border-radius: 12px; padding: 18px; }
.step b { display: block; color: #60a5fa; margin-bottom: 6px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field input { width: 100%; padding: 11px 12px; border-radius: 8px; border: 1px solid #3a4150; background: #10141c; color: #e8ebf2; font: inherit; }
.key { font-family: Consolas, monospace; font-size: 18px; color: #f5c451; letter-spacing: .4px; }
.device { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #262b36; }
button.ghost { width: auto; background: transparent; color: #d5dbe6; border: 1px solid #3a4150; }
.site-footer { border-top: 1px solid #262b36; color: #8b93a3; padding: 22px 0 32px; }
@media (max-width: 800px) {
  .grid, .product-list, .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .site-header .bar { height: auto; flex-wrap: wrap; padding: 12px 0; gap: 10px 16px; }
  .site-header nav { width: 100%; }
  .site-header .buy { margin-left: 0; }
}
