:root {
  color-scheme: dark;
  --bg: #090b0f;
  --panel: #10131a;
  --panel-soft: #141821;
  --line: rgba(255, 255, 255, .11);
  --line-strong: rgba(255, 255, 255, .20);
  --ink: #f7f8fb;
  --text: #c8ceda;
  --muted: #7d8798;
  --accent: #ffffff;
  --ok: #7dd3fc;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, #0d1017 0%, #090b0f 42%, #0b0e13 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
  height: 72px;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 15, .82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  font-size: 15px;
  font-weight: 900;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

nav a:hover { color: var(--ink); }

.header-action,
.primary-action,
.ghost-action,
.client-actions a,
.client-actions button,
.login-form button,
.copy-row button,
.panel-title button {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
  font-size: 14px;
  font-weight: 850;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.primary-action,
.login-form button,
.copy-row button:first-of-type {
  color: #090b0f;
  border-color: #fff;
  background: #fff;
}

.header-action:hover,
.primary-action:hover,
.ghost-action:hover,
.client-actions a:hover,
.client-actions button:hover,
.copy-row button:hover,
.panel-title button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .42);
}

main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  align-items: center;
  gap: clamp(38px, 7vw, 92px);
  min-height: calc(100vh - 72px);
  padding: 78px 0 54px;
}

.eyebrow,
.section-head span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 18px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
  font-size: 12px;
  font-weight: 850;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  color: #fff;
  font-size: clamp(46px, 6vw, 76px);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.72;
}

.hero-actions,
.release-strip,
.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions { margin: 34px 0 18px; }

.primary-action,
.ghost-action {
  min-height: 52px;
  padding: 0 24px;
}

.release-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
  font-size: 12px;
  font-weight: 800;
}

.release-strip b { color: var(--ink); }

.account-card,
.client-card,
.command-card,
.usage-table,
.model-grid article {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(16, 19, 26, .88);
  box-shadow: var(--shadow);
}

.account-card {
  padding: 22px;
}

.account-top,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.account-top span,
.key-box label,
.client-card span,
.client-card em,
.usage-row span,
.usage-row em,
.model-grid span {
  color: var(--muted);
  font-size: 13px;
}

.account-top b {
  color: var(--ok);
  font-size: 14px;
}

.login-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

input,
pre {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, .045);
}

input {
  height: 46px;
  padding: 0 14px;
}

pre {
  min-height: 66px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

input:focus {
  border-color: rgba(255, 255, 255, .38);
}

.account-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.account-metrics article {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
}

.account-metrics span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.account-metrics strong {
  display: block;
  color: #fff;
  font-size: 21px;
}

.key-box {
  display: grid;
  gap: 10px;
}

.key-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: -18px 0 30px;
}

.client-card {
  min-height: 190px;
  padding: 22px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.client-card.active,
.client-card:hover {
  border-color: rgba(255, 255, 255, .32);
  background: var(--panel-soft);
  transform: translateY(-2px);
}

.client-card b {
  display: block;
  margin: 12px 0 8px;
  color: #fff;
  font-size: 28px;
}

.client-card em {
  display: block;
  min-height: 22px;
  margin-bottom: 18px;
  font-style: normal;
}

.setup-panel,
.usage-section,
.section {
  padding: 66px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.command-card {
  min-height: 150px;
  padding: 20px;
}

.command-card.wide {
  grid-column: 1 / -1;
}

.mode-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.panel-title b {
  color: #fff;
  font-size: 16px;
}

.panel-title button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.usage-table {
  overflow: hidden;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.note-grid article {
  min-height: 130px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .045);
}

.note-grid b {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 16px;
}

.note-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.usage-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 90px;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
}

.usage-row:first-child { border-top: 0; }
.usage-row.head { background: rgba(255, 255, 255, .04); }
.usage-row b { color: #fff; font-size: 15px; }
.usage-row em { text-align: right; font-style: normal; }

.model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.model-grid article {
  min-height: 160px;
  padding: 20px;
}

.model-grid img {
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
}

.model-grid b {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 18px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 34px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
    height: auto;
    gap: 10px;
    padding: 12px 14px;
  }

  nav {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 12px;
    overflow-x: auto;
    font-size: 13px;
  }

  .header-action {
    height: 36px;
    padding: 0 13px;
  }

  main,
  footer {
    width: min(100% - 28px, 680px);
  }

  .hero,
  .client-grid,
  .setup-grid,
  .note-grid,
  .model-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 26px;
    padding: 42px 0 32px;
  }

  h1 {
    font-size: clamp(40px, 11vw, 58px);
  }

  .hero-copy p {
    font-size: 16px;
  }

  .account-card,
  .client-card,
  .command-card {
    border-radius: 22px;
  }

  .account-metrics {
    grid-template-columns: 1fr;
  }

  .copy-row {
    grid-template-columns: 1fr;
  }

  .client-grid {
    margin: 4px 0 16px;
  }

  .client-card {
    min-height: auto;
    padding: 18px;
  }

  .setup-panel,
  .usage-section,
  .section {
    padding: 42px 0;
  }

  .usage-row {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 14px 16px;
  }

  .usage-row em {
    text-align: left;
  }

  footer {
    gap: 16px;
    flex-direction: column;
  }
}
