:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #07090e;
  color: #f4f7fb;
  --panel: rgba(16, 20, 30, .82);
  --panel-solid: #111620;
  --line: #252d3b;
  --muted: #8e9aad;
  --blue: #4f8cff;
  --cyan: #5ee7d7;
  --purple: #886cff;
  --danger: #ff7c86;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: #07090e; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.shell { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }
.ambient { position: fixed; z-index: -1; border-radius: 999px; filter: blur(110px); opacity: .18; pointer-events: none; }
.ambient-one { width: 520px; height: 520px; background: #246dff; top: -230px; right: -100px; }
.ambient-two { width: 420px; height: 420px; background: #7c43ff; top: 720px; left: -260px; }

.nav { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: .11em; }
.brand b { color: #6ea1ff; }
.brand-mark { width: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; transform: rotate(45deg); }
.brand-mark i { aspect-ratio: 1; background: linear-gradient(135deg, var(--blue), var(--purple)); border-radius: 2px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { opacity: .55; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: #aab4c5; text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: #fff; }
.nav-account { border: 1px solid #38445a; background: #121823; color: #eaf0fa; padding: 10px 16px; border-radius: 10px; }

.hero { min-height: 640px; padding: 92px 0 70px; display: grid; grid-template-columns: 1.03fr .97fr; gap: 70px; align-items: center; }
.live-pill { width: fit-content; display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid #2a3a50; border-radius: 999px; background: rgba(15,22,33,.8); color: #a9b8cb; font-size: 12px; }
.live-pill span { width: 7px; height: 7px; border-radius: 50%; background: #5ee7a5; box-shadow: 0 0 13px #5ee7a5; }
.hero h1 { font-size: clamp(46px, 6vw, 72px); line-height: 1.08; letter-spacing: -.055em; margin: 24px 0; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #6b9eff, #8d76ff 55%, #5ee7d7); -webkit-background-clip: text; color: transparent; }
.hero-copy > p { max-width: 590px; margin: 0; color: #9ba7b9; font-size: 17px; line-height: 1.85; }
.hero-actions { display: flex; align-items: center; gap: 25px; margin-top: 34px; }
.primary-button { border: 0; border-radius: 12px; padding: 14px 22px; color: #fff; font-weight: 700; background: linear-gradient(135deg, #3f7ff4, #775bf0); box-shadow: 0 12px 35px rgba(71,119,240,.25); }
.primary-button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.primary-button span { margin-left: 12px; }
.primary-button.full { width: 100%; }
.text-button { color: #c2ccda; text-decoration: none; font-size: 14px; }
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 32px; color: #78869a; font-size: 12px; }

.visual-card { position: relative; border: 1px solid #293448; border-radius: 20px; overflow: hidden; background: rgba(12,16,24,.9); box-shadow: 0 40px 100px rgba(0,0,0,.5), 0 0 80px rgba(70,112,255,.08); transform: perspective(1000px) rotateY(-2deg); }
.visual-card::before { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: #4f8cff; filter: blur(90px); opacity: .13; right: -50px; bottom: -50px; }
.visual-top { height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 18px; border-bottom: 1px solid #232b3a; color: #758196; font-size: 11px; }
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #384254; }
.visual-ok { justify-self: end; color: #60d8a0; font-weight: 700; }
.visual-body { padding: 27px 28px 34px; display: grid; grid-template-columns: 26px 1fr; row-gap: 11px; font-family: Consolas, monospace; font-size: 14px; }
.line-number { color: #3d4758; user-select: none; }
.visual-body code { color: #c4cedd; }
.visual-body b { color: #78a6ff; font-weight: 500; }
.visual-body em { color: #67d8a2; font-style: normal; }
.visual-body mark { background: none; color: #d7c27c; }
.visual-body strong { color: #c08bff; }
.grid-badge { position: absolute; right: 22px; bottom: 19px; width: 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; border-radius: 10px; background: #080b11; border: 1px solid #2e3746; }
.grid-badge span, .grid-badge strong { aspect-ratio: 1; display: grid; place-items: center; border-radius: 5px; background: #171d28; color: #69758a; font-size: 10px; }
.grid-badge strong { background: #4f75d2; color: #fff; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #202735; border-radius: 18px; background: rgba(12,15,22,.68); }
.metrics div { padding: 25px 32px; border-right: 1px solid #202735; }
.metrics div:last-child { border: 0; }
.metrics strong, .metrics span { display: block; }
.metrics strong { font-size: 24px; color: #f1f5fb; }
.metrics span { margin-top: 6px; color: #768297; font-size: 12px; }

.section-space { padding-top: 130px; }
.section-title { max-width: 680px; text-align: center; margin: 0 auto 46px; }
.section-title.left { text-align: left; margin-left: 0; }
.section-title > span, .section-label { color: #6798f8; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.section-title h2, .auth-intro h2, .dashboard-head h2 { margin: 12px 0 14px; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.04em; }
.section-title p, .auth-intro p, .dashboard-head p { color: #8d99ab; line-height: 1.7; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-grid article { padding: 30px; border: 1px solid #222b39; background: linear-gradient(145deg, rgba(18,23,34,.9), rgba(10,13,20,.9)); border-radius: 18px; transition: .2s ease; }
.feature-grid article:hover { border-color: #3b4c67; transform: translateY(-3px); }
.feature-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(78,130,244,.12); border: 1px solid rgba(91,145,244,.25); color: #82abff; font-weight: 800; }
.feature-grid h3 { margin: 22px 0 10px; }
.feature-grid p { margin: 0; color: #8490a3; font-size: 14px; line-height: 1.75; }

.account-section { scroll-margin-top: 20px; }
.auth-layout { display: grid; grid-template-columns: 1fr 460px; gap: 80px; padding: 55px; border: 1px solid #242d3d; border-radius: 26px; background: radial-gradient(circle at 7% 20%, rgba(65,119,240,.13), transparent 34%), rgba(13,17,25,.88); }
.auth-intro { align-self: center; }
.auth-intro p b { color: #78a6ff; }
.auth-intro ul { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 16px; }
.auth-intro li { display: flex; align-items: center; gap: 14px; color: #b4becc; }
.auth-intro li span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: #171e2a; border: 1px solid #2a3547; color: #668fdf; font-size: 10px; }
.auth-card { padding: 28px; border-radius: 20px; background: #0b0e15; border: 1px solid #293243; box-shadow: 0 25px 80px rgba(0,0,0,.3); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; background: #121721; border-radius: 11px; margin-bottom: 24px; }
.auth-tab { border: 0; background: transparent; color: #758195; padding: 10px; border-radius: 8px; }
.auth-tab.active { background: #273246; color: #fff; }
.auth-form { display: grid; gap: 17px; }
.auth-form label { display: grid; gap: 8px; color: #abb6c6; font-size: 13px; }
.auth-form input { width: 100%; padding: 13px 14px; border: 1px solid #2b3546; border-radius: 10px; background: #111620; color: #fff; outline: none; }
.auth-form input:focus { border-color: #568af0; box-shadow: 0 0 0 3px rgba(86,138,240,.11); }
.form-message { min-height: 19px; margin: 12px 0 0; color: #83a8ef; font-size: 13px; text-align: center; }
.form-message.error { color: var(--danger); }

.dashboard { border: 1px solid #242d3b; border-radius: 26px; padding: 42px; background: rgba(12,16,23,.82); }
.dashboard-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; }
.dashboard-actions { display: flex; gap: 10px; align-items: center; }
.dashboard-actions a { text-decoration: none; }
.dashboard-head h2 { font-size: 34px; }
.dashboard-head h2 b { color: #78a6ff; }
.dashboard-head p { margin: 0; }
.outline-button { border: 1px solid #344158; border-radius: 10px; background: #131923; color: #cbd4e0; padding: 11px 15px; }
.outline-button:hover { border-color: #5a73a0; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.balance-card, .key-card { min-height: 210px; padding: 27px; border: 1px solid #283243; border-radius: 18px; background: linear-gradient(145deg, #151b27, #0d1119); }
.balance-card > span, .key-card span { color: #909caf; font-size: 13px; }
.balance-card > div:nth-child(2) { margin: 14px 0 20px; }
.balance-card strong { font-size: 48px; }
.balance-card small { color: #78859a; margin-left: 8px; }
.balance-card p { color: #7e8b9f; font-size: 12px; }
.progress { height: 7px; background: #232c3a; border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .4s ease; }
.key-card { display: flex; flex-direction: column; align-items: flex-start; }
.key-card > div { display: grid; gap: 5px; }
.key-card small { color: #667388; font-size: 11px; }
.key-card code { margin: 25px 0; color: #83aaff; font-size: 20px; letter-spacing: .04em; }
.key-card button { margin-top: auto; }
.key-reveal { margin-top: 18px; padding: 20px; display: grid; grid-template-columns: 1fr minmax(250px, 2fr) auto; align-items: center; gap: 18px; border: 1px solid #45629a; border-radius: 16px; background: rgba(54,92,165,.15); }
.key-reveal > div { display: grid; gap: 5px; }
.key-reveal span { color: #8290a6; font-size: 11px; }
.key-reveal code { padding: 12px; overflow: auto; border-radius: 9px; background: #0a0e15; color: #9bbcff; }
.key-reveal button { border: 0; border-radius: 9px; background: #e9effb; color: #111722; font-weight: 700; padding: 11px 14px; }

.tester { margin-top: 34px; padding: 28px; border: 1px solid #283243; border-radius: 20px; background: #0d1119; }
.tester-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.tester h3 { margin: 8px 0 0; font-size: 24px; }
.model-badge { padding: 8px 11px; border: 1px solid #2e456b; border-radius: 999px; color: #78a6ff; font-size: 11px; }
.drop-zone { min-height: 280px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #3a465a; border-radius: 15px; background: #090c12; cursor: pointer; transition: .2s; }
.drop-zone:hover, .drop-zone.dragging { border-color: #5f8ee9; background: #0d1421; }
.drop-zone input { display: none; }
.drop-zone > div { display: grid; justify-items: center; gap: 8px; color: #b9c4d3; }
.upload-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #192233; color: #76a3fa; font-size: 24px; }
.drop-zone small { color: #69768a; }
#preview { max-width: 100%; max-height: 460px; padding: 14px; object-fit: contain; }
.tester .primary-button { margin-top: 18px; }
.result-card { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.result-primary, .result-card dl { padding: 22px; border: 1px solid #293344; border-radius: 15px; background: #0e131c; }
.result-primary span { display: block; color: #7e8b9f; font-size: 12px; margin-bottom: 8px; }
.result-primary strong { font-size: 27px; }
.result-primary.accent strong { color: #78a6ff; }
.result-card dl { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.result-card dl div { display: grid; gap: 8px; padding: 0 16px; border-right: 1px solid #2a3342; }
.result-card dl div:last-child { border: 0; }
.result-card dt { color: #68758a; font-size: 11px; }
.result-card dd { margin: 0; font-size: 13px; }

.api-section { padding-bottom: 130px; }
.api-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.api-info { display: grid; gap: 12px; }
.api-info article { padding: 19px; display: flex; gap: 17px; border: 1px solid #252e3d; border-radius: 14px; background: #0e121a; }
.api-info article > span { color: #547fcf; font-size: 11px; }
.api-info article div { min-width: 0; display: grid; gap: 9px; }
.api-info b { font-size: 13px; }
.api-info code { color: #8a9ab2; font-size: 12px; overflow-wrap: anywhere; }
.code-card { border: 1px solid #273142; border-radius: 16px; overflow: hidden; background: #090c12; }
.code-head { height: 48px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #222a38; color: #79869a; font-size: 12px; }
.code-head button { border: 0; background: transparent; color: #79a5f8; }
.code-card pre { margin: 0; padding: 26px; overflow: auto; color: #a9b7ca; font: 12px/1.9 Consolas, monospace; }

footer { min-height: 100px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #202634; color: #68758a; font-size: 12px; }
footer p { margin: 0; }

[hidden] { display: none !important; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 65px; }
  .visual-card { transform: none; }
  .auth-layout { grid-template-columns: 1fr; gap: 38px; }
  .api-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .shell { width: min(100% - 28px, 1140px); }
  .nav-links > a { display: none; }
  .nav-links { gap: 10px; }
  .hero { min-height: auto; gap: 45px; padding-bottom: 55px; }
  .hero h1 { font-size: 42px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .text-button { text-align: center; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics div:nth-child(2) { border-right: 0; }
  .metrics div:nth-child(-n+2) { border-bottom: 1px solid #202735; }
  .feature-grid, .account-grid { grid-template-columns: 1fr; }
  .auth-layout, .dashboard { padding: 24px; }
  .dashboard-head { gap: 20px; }
  .dashboard-head p { display: none; }
  .key-reveal { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 1fr; }
  .result-card dl { grid-template-columns: 1fr 1fr; }
  .result-card dl div { padding: 10px; border: 0; }
  .api-section { padding-bottom: 70px; }
  .section-space { padding-top: 90px; }
  footer { flex-direction: column; justify-content: center; gap: 12px; }
}
