:root {
  color-scheme: dark;
  --bg: #071118;
  --panel: #0d1c28;
  --panel-2: #122433;
  --text: #f2f7fb;
  --muted: #8ca1b4;
  --line: rgba(129, 226, 215, 0.18);
  --teal: #1fd3bf;
  --cyan: #5bc8ff;
  --lime: #a6f071;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
button, input {
  font: inherit;
}
button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(7, 17, 24, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #03131a;
  box-shadow: 0 12px 30px rgba(31, 211, 191, 0.32);
}

.nav-links {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 15px;
}

.nav-links a:hover { color: var(--text); }

.nav-action,
.primary-button,
.secondary-button,
.price-grid button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  font-weight: 700;
  border: 0;
}

.nav-action {
  padding: 0 18px;
  background: rgba(31, 211, 191, 0.13);
  color: var(--teal);
  border: 1px solid rgba(31, 211, 191, 0.28);
}

.menu-button { display: none; }

.mobile-panel {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 72px);
  padding: clamp(52px, 8vw, 104px) clamp(18px, 5vw, 72px) 72px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 24, 0.98) 0%, rgba(7, 17, 24, 0.86) 44%, rgba(7, 17, 24, 0.35) 100%),
    url("./assets/hero-ai-gateway.png") right center / cover no-repeat;
  opacity: 0.9;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(31, 211, 191, 0.24);
  border-radius: 999px;
  color: var(--teal);
  background: rgba(31, 211, 191, 0.08);
  font-size: 14px;
}

h1, h2, h3, p { margin: 0; }

h1 {
  max-width: 760px;
  margin-top: 26px;
  font-size: clamp(44px, 8vw, 82px);
  line-height: 1.02;
}

h1::first-line { color: var(--text); }

.hero-copy p {
  max-width: 680px;
  margin-top: 24px;
  color: #afbdc9;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.primary-button {
  gap: 10px;
  min-width: 178px;
  padding: 0 28px;
  background: linear-gradient(135deg, var(--teal), #19b89d);
  color: #041116;
  box-shadow: 0 18px 44px rgba(31, 211, 191, 0.32);
  border: 0;
}

.secondary-button {
  min-width: 168px;
  padding: 0 24px;
  border: 1px solid rgba(91, 200, 255, 0.32);
  color: #a9e5ff;
  background: rgba(91, 200, 255, 0.05);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 620px;
  gap: 14px;
  margin-top: 40px;
}

.metrics div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 28, 40, 0.72);
}

.metrics strong {
  display: block;
  font-size: 24px;
  color: var(--lime);
}

.metrics span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.terminal-card {
  overflow: hidden;
  border: 1px solid rgba(129, 226, 215, 0.22);
  border-radius: 8px;
  background: rgba(9, 21, 31, 0.86);
  box-shadow: var(--shadow);
}

.terminal-top {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.terminal-top span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}
.terminal-top span:nth-child(2) { background: #ffbd2e; }
.terminal-top span:nth-child(3) { background: #28c840; }
.terminal-top em {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #8da0b2;
  font-style: normal;
}

pre {
  margin: 0;
  padding: 26px;
  overflow: auto;
  color: #96ffe8;
  font: 14px/1.8 "Cascadia Mono", Consolas, monospace;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 82px clamp(18px, 5vw, 32px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin-top: 18px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.section-heading p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
}

.feature-grid,
.channel-grid,
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-grid article,
.channel-card,
.price-grid article,
.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 36, 51, 0.9), rgba(10, 23, 33, 0.9));
}

.feature-grid article { padding: 28px; }
.feature-grid span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: rgba(31, 211, 191, 0.12);
  color: var(--teal);
  font-weight: 800;
}
.feature-grid h3, .channel-card h3, .price-grid h3 { font-size: 21px; }
.feature-grid p, .channel-card p, .price-grid p, .faq p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.75;
}

.band {
  max-width: none;
  padding-left: max(18px, calc((100vw - 1180px) / 2 + 18px));
  padding-right: max(18px, calc((100vw - 1180px) / 2 + 18px));
  background: linear-gradient(180deg, rgba(31, 211, 191, 0.04), rgba(91, 200, 255, 0.035));
  border-block: 1px solid var(--line);
}

.channel-card { padding: 26px; }
.highlighted {
  border-color: rgba(31, 211, 191, 0.55);
  box-shadow: 0 20px 60px rgba(31, 211, 191, 0.13);
}
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.tag {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(91, 200, 255, 0.11);
  color: #9bdfff;
  font-size: 13px;
  font-weight: 700;
}
.card-row strong { color: var(--lime); }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.chips span {
  padding: 7px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7eef5;
  font-size: 12px;
}
ul {
  margin: 0;
  padding-left: 18px;
  color: #a4b9c9;
  line-height: 1.9;
}

.price-grid article { padding: 30px; }
.price {
  margin-top: 16px;
  color: var(--text) !important;
  font-size: 42px;
  font-weight: 900;
}
.plan-details {
  min-height: 104px;
  margin-top: 18px;
  padding-left: 18px;
  color: #b6c8d5;
  line-height: 1.85;
  font-size: 14px;
}
.price-grid button {
  margin-top: 24px;
  width: 100%;
  background: rgba(31, 211, 191, 0.12);
  border: 1px solid rgba(31, 211, 191, 0.28);
  color: var(--teal);
}
.featured-price {
  transform: translateY(-10px);
  border-color: rgba(91, 200, 255, 0.5) !important;
}

.faq { max-width: 920px; }
.faq details {
  padding: 22px 24px;
  margin-top: 14px;
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 18px;
}
.faq summary::marker { color: var(--teal); }

.panel,
.code-panel,
.status-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 36, 51, 0.9), rgba(10, 23, 33, 0.9));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.panel {
  padding: 28px;
}

.panel label,
.checkout-card label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #c9dce6;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(129, 226, 215, 0.22);
  border-radius: 8px;
  background: rgba(2, 10, 15, 0.62);
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: rgba(31, 211, 191, 0.72);
  box-shadow: 0 0 0 3px rgba(31, 211, 191, 0.12);
}

.console-grid .primary-button {
  width: 100%;
  margin-top: 22px;
}

.panel-copy {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.75;
}

.panel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.panel-actions .primary-button,
.panel-actions .secondary-button {
  width: 100%;
  min-width: 0;
}

.action-list {
  margin: 18px 0 0;
  padding-left: 20px;
  color: #b6c8d5;
  line-height: 1.95;
}

.action-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.action-card {
  display: grid;
  gap: 6px;
  min-height: 94px;
  padding: 16px;
  border: 1px solid rgba(129, 226, 215, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.action-card:hover {
  border-color: rgba(31, 211, 191, 0.56);
  background: rgba(31, 211, 191, 0.08);
}

.action-card strong {
  color: #eef8fb;
}

.action-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.backend-status {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(129, 226, 215, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.backend-status .status-dot {
  flex: 0 0 auto;
  margin: 5px 0 0;
}

.backend-status p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.dashboard-metrics div {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.dashboard-metrics strong {
  display: block;
  color: var(--lime);
  font-size: 22px;
}

.dashboard-metrics span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.key-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  margin-top: 22px;
  padding: 12px 12px 12px 16px;
  border: 1px dashed rgba(31, 211, 191, 0.35);
  border-radius: 8px;
  background: rgba(31, 211, 191, 0.06);
  color: #c8fff4;
  overflow: hidden;
}

.key-box span {
  overflow-wrap: anywhere;
}

.key-box button,
.code-head button,
.activation-result button,
.footer button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(31, 211, 191, 0.28);
  border-radius: 8px;
  background: rgba(31, 211, 191, 0.1);
  color: var(--teal);
  font-weight: 700;
}

.bill-table-wrap {
  overflow-x: auto;
  margin-top: 22px;
  border: 1px solid rgba(129, 226, 215, 0.14);
  border-radius: 8px;
}

.bill-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.bill-table th,
.bill-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #c7d9e4;
  text-align: left;
  white-space: nowrap;
}

.bill-table th {
  color: #eef8fb;
  background: rgba(255, 255, 255, 0.04);
}

.bill-table tr:last-child td {
  border-bottom: 0;
}

.docs-grid,
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.code-panel {
  overflow: hidden;
  margin-top: 18px;
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-grid article {
  padding: 24px;
}

.status-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 7px rgba(166, 240, 113, 0.1);
}

.status-dot.warn {
  background: #ffd166;
  box-shadow: 0 0 0 7px rgba(255, 209, 102, 0.1);
}

.checkout-modal {
  width: min(620px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid rgba(129, 226, 215, 0.24);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
}

.checkout-modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(5px);
}

.checkout-card {
  position: relative;
  padding: 30px;
  background: linear-gradient(180deg, #102333, #071118);
}

.checkout-card h2 {
  margin-top: 18px;
  font-size: 32px;
}

.checkout-card p {
  margin-top: 10px;
  color: var(--muted);
}

.close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 22px;
}

.order-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.order-summary span {
  color: var(--muted);
}

.checkout-plan-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.checkout-plan-option {
  display: grid;
  gap: 5px;
  min-height: 94px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
}

.checkout-plan-option.active {
  border-color: rgba(31, 211, 191, 0.72);
  background: rgba(31, 211, 191, 0.12);
  box-shadow: inset 0 0 0 1px rgba(31, 211, 191, 0.24);
}

.checkout-plan-option strong {
  font-size: 15px;
}

.checkout-plan-option span {
  color: var(--lime);
  font-weight: 900;
  font-size: 22px;
}

.checkout-plan-option small {
  color: var(--muted);
  font-size: 12px;
}

fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 8px;
  color: #c9dce6;
  font-weight: 800;
}

fieldset label {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  color: var(--muted);
}

fieldset input {
  width: auto;
  min-height: auto;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-methods .payment-option {
  position: relative;
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
}

.payment-methods .payment-option:has(input:checked) {
  border-color: rgba(31, 211, 191, 0.72);
  background: rgba(31, 211, 191, 0.11);
  box-shadow: inset 0 0 0 1px rgba(31, 211, 191, 0.25);
}

.payment-methods .payment-option span {
  display: grid;
  gap: 4px;
}

.payment-methods .payment-option strong {
  font-size: 16px;
}

.payment-methods .payment-option small {
  color: var(--muted);
  line-height: 1.45;
}

.checkout-steps {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(129, 226, 215, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.payment-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(31, 211, 191, 0.28);
  border-radius: 8px;
  background: rgba(31, 211, 191, 0.07);
}

.payment-panel[hidden] {
  display: none;
}

.payment-panel h3 {
  margin: 8px 0 0;
  font-size: 20px;
}

.payment-panel p {
  margin-top: 8px;
}

.payment-box {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: center;
}

.payment-box > div:last-child {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
}

.payment-box span {
  color: var(--muted);
}

.payment-box strong {
  overflow-wrap: anywhere;
}

.qr-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 132px;
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(5, 12, 18, 0.84) 9px, transparent 9px) 0 0 / 18px 18px,
    linear-gradient(rgba(5, 12, 18, 0.84) 9px, transparent 9px) 0 0 / 18px 18px,
    #e8fff9;
}

.qr-card span {
  border: 8px solid #06131a;
  border-radius: 4px;
  background: #e8fff9;
}

.activation-result {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  border: 1px dashed rgba(31, 211, 191, 0.4);
  border-radius: 8px;
  background: rgba(31, 211, 191, 0.07);
}

.activation-result[hidden] {
  display: none;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.modal-actions .primary-button,
.modal-actions .secondary-button {
  width: 100%;
}

.activation-result code {
  color: #c8fff4;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid rgba(31, 211, 191, 0.28);
  border-radius: 8px;
  background: rgba(5, 13, 19, 0.95);
  color: #dffcf7;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.footer {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 30px;
  padding: 54px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #050d13;
}
.footer p {
  max-width: 420px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.75;
}
.footer h3 {
  margin-bottom: 14px;
  font-size: 15px;
  color: #cfe2ea;
}
.footer a:not(.brand) {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.footer button {
  display: block;
  margin-top: 10px;
}

@media (max-width: 860px) {
  .nav-links, .nav-action { display: none; }
  .menu-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 22px;
  }
  .hero {
    min-height: auto;
    padding-top: 44px;
  }
  .hero-grid,
  .feature-grid,
  .channel-grid,
  .price-grid,
  .console-grid,
  .docs-grid,
  .status-grid,
  .footer {
    grid-template-columns: 1fr;
  }
  .mobile-panel.open {
    position: fixed;
    top: 79px;
    left: 12px;
    right: 12px;
    z-index: 20;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(7, 17, 24, 0.98);
    box-shadow: var(--shadow);
  }
  .mobile-panel a,
  .mobile-panel button {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    text-align: left;
  }
  .hero-actions a { width: 100%; }
  .hero-actions button { width: 100%; }
  .metrics { grid-template-columns: 1fr; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .panel-actions,
  .action-card-grid { grid-template-columns: 1fr; }
  .key-box { align-items: stretch; flex-direction: column; }
  .terminal-card { margin-top: 8px; }
  pre { font-size: 12px; }
  .featured-price { transform: none; }
  .checkout-plan-picker { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: 1fr; }
  .payment-box { grid-template-columns: 1fr; }
  .qr-card { width: min(180px, 100%); }
  .modal-actions { grid-template-columns: 1fr; }
}
