:root {
  --bg: #071014;
  --surface: #0d191e;
  --surface-2: #122128;
  --line: #23363e;
  --line-soft: #172a31;
  --text: #f2f7f7;
  --muted: #96a9ae;
  --cyan: #35d6cb;
  --cyan-deep: #0f8f8a;
  --orange: #ff9e45;
  --green: #49d17d;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(73, 109, 117, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 109, 117, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; letter-spacing: 0; }
img { display: block; max-width: 100%; }

.site-shell { min-height: 100vh; background: rgba(7, 16, 20, .92); }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(4, 9, 12, .94);
  backdrop-filter: blur(16px);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #2f5c60;
  border-radius: 6px;
  color: #051011;
  background: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}
.brand-copy strong { display: block; font-size: 14px; }
.brand-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }

.nav { display: flex; align-items: center; justify-content: center; gap: 26px; color: #b7c5c8; font-size: 13px; }
.nav a:hover { color: var(--text); }

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b7c5c8;
  font-size: 12px;
  white-space: nowrap;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(73, 209, 125, .11); }

.hero {
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(340px, .84fr);
  align-items: center;
  gap: 68px;
  padding: 64px 0 54px;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 690px;
  margin: 0;
  font-size: 52px;
  line-height: 1.08;
  font-weight: 850;
}
.hero-copy h1 em { color: var(--cyan); font-style: normal; }
.hero-copy > p {
  max-width: 620px;
  margin: 22px 0 0;
  color: #aebdc0;
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #061113;
  background: var(--cyan);
  font-size: 14px;
  font-weight: 800;
}
.button.secondary { color: var(--text); background: transparent; border-color: #34505a; }

.proof-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 640px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.proof strong { display: block; font-size: 20px; }
.proof span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.auth-panel {
  overflow: hidden;
  border: 1px solid #2a4149;
  border-radius: 8px;
  background: #0b171c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
}
.auth-head { padding: 22px 24px 17px; border-bottom: 1px solid var(--line-soft); }
.auth-head strong { display: block; font-size: 18px; }
.auth-head span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line-soft); }
.auth-tab { padding: 13px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.auth-tab.active { color: var(--cyan); background: #102126; box-shadow: inset 0 -2px var(--cyan); }
.auth-form { padding: 22px 24px 24px; }
.auth-form label { display: block; margin: 0 0 7px; color: #bdc9cb; font-size: 12px; font-weight: 700; }
.auth-form input {
  width: 100%;
  height: 44px;
  margin-bottom: 17px;
  padding: 0 13px;
  border: 1px solid #294049;
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: #071217;
}
.auth-form input:focus { border-color: var(--cyan-deep); }
.auth-form .button { width: 100%; border: 0; cursor: pointer; }
.auth-note { margin: 14px 0 0; color: #7f9398; font-size: 11px; line-height: 1.6; text-align: center; }

.section { padding: 76px 0; border-top: 1px solid var(--line-soft); }
.product-first { padding-top: 66px; border-top: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.section-heading h1,
.section-heading h2 { margin: 0; font-size: 30px; line-height: 1.2; }
.product-first .section-heading { display: block; }
.product-first .section-heading h1 { max-width: 650px; font-size: 46px; line-height: 1.12; }
.product-first .section-heading p { max-width: 760px; margin-top: 16px; }
.section-heading p { max-width: 540px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.featured-product {
  overflow: hidden;
  border: 1px solid #2b4148;
  border-radius: 8px;
  background: var(--surface);
  transition: transform .2s ease, border-color .2s ease;
}
.featured-product:hover { transform: translateY(-3px); border-color: #41616b; }
.product-media { position: relative; aspect-ratio: 16 / 8.5; overflow: hidden; background: #101b20; }
.product-media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.free-flag {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 9px 13px;
  border-radius: 5px;
  color: #14100b;
  background: var(--orange);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
  font-size: 14px;
  font-weight: 900;
}
.free-flag.green { color: #07150d; background: var(--green); }
.product-body { padding: 23px 24px 24px; }
.product-name-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product-name-row h3 { margin: 0; font-size: 22px; }
.product-type { color: var(--muted); font-size: 11px; }
.product-body p { min-height: 52px; margin: 13px 0 19px; color: #aab9bc; font-size: 14px; line-height: 1.75; }
.product-link { display: inline-flex; align-items: center; gap: 7px; color: var(--cyan); font-size: 13px; font-weight: 800; }

.service-grid { display: grid; grid-template-columns: 1.15fr .85fr .85fr; gap: 16px; }
.service-card {
  min-height: 238px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #273d45;
  border-radius: 8px;
  background: var(--surface);
}
.service-card.api-card { grid-row: span 2; min-height: 492px; background: #102027; }
.service-card.media-card { position: relative; min-height: 238px; }
.service-card-image { width: 100%; height: 130px; object-fit: cover; object-position: center; background: #071318; }
.service-card-image.contain-media { object-fit: contain; padding: 8px; box-sizing: border-box; }
.api-card .service-card-image { height: 240px; }
.service-card-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.service-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 46px;
  border: 1px solid #3a5961;
  border-radius: 7px;
  color: var(--cyan);
  background: #0a171c;
  font-size: 17px;
  font-weight: 900;
}
.api-card .service-icon { margin-bottom: auto; }
.service-card h3 { margin: 0; font-size: 19px; }
.service-card p { margin: 10px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.service-card .product-link { margin-top: auto; }
.api-models { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
.api-models span { padding: 7px 9px; border: 1px solid #314b54; border-radius: 4px; color: #bed0d3; background: #0a171c; font-size: 10px; }
.account-logos { display: flex; align-items: center; margin: 2px 0 34px; }
.account-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-right: -7px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  color: white;
  font-size: 12px;
  font-weight: 900;
}
.account-logo.gpt { background: #1e665b; }
.account-logo.claude { background: #b96845; }
.account-logo.gemini { background: #5268c5; }

.contact-band {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 50px;
  padding: 38px 40px;
  border: 1px solid #2c454d;
  border-radius: 8px;
  background: #0d1b20;
}
.contact-band h2 { margin: 0; font-size: 28px; }
.contact-band p { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.contact-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-item { padding: 17px; border-left: 3px solid var(--cyan); background: #081418; }
.contact-item span { display: block; color: var(--muted); font-size: 11px; }
.contact-item strong { display: block; margin-top: 6px; font-size: 16px; }

.site-footer { padding: 28px 0 110px; border-top: 1px solid var(--line-soft); color: #71868b; font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }

.page-stack { padding-top: 36px; padding-bottom: 64px; }
.page-stack > h1 { margin: 0 0 8px; font-size: 32px; }
.page-stack p { line-height: 1.65; }
.page-stack label { display: block; margin: 12px 0 6px; color: #bdc9cb; font-size: 14px; font-weight: 700; }
.page-stack input,
.page-stack textarea {
  width: 100%;
  border: 1px solid #294049;
  border-radius: 6px;
  padding: 11px 12px;
  outline: none;
  color: var(--text);
  background: #071217;
}
.page-stack input:focus,
.page-stack textarea:focus { border-color: var(--cyan-deep); }
.page-stack button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 16px;
  color: #061113;
  background: var(--cyan);
  cursor: pointer;
  font-weight: 800;
}
.page-stack button:hover,
.button:hover { background: #51e4da; }
.page-stack button.secondary,
.page-stack .button.secondary { color: var(--text); background: transparent; border-color: #34505a; }
.button.secondary:hover,
.page-stack button.secondary:hover,
.page-stack .button.secondary:hover { color: var(--text); background: #182b32; border-color: #54747d; }
.page-stack .full { width: 100%; margin-top: 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
}
.card h2 { margin: 0 0 16px; font-size: 18px; }
.page-stack > .card + .card { margin-top: 16px; }
.notice { margin-bottom: 16px; border: 1px solid #6b4b23; border-radius: 6px; padding: 12px 14px; color: #ffd49d; background: #241a0e; }
.notice.ok { border-color: #285d3c; color: #a7f3c0; background: #0b2014; }
.stat-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stat-row:last-child { border-bottom: 0; }
.sub-panel,
.invite-card { margin-top: 16px; }
.invite-card { border-color: #285d3c; background: #0b2014; }
.sub-actions,
.invite-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-top: 12px; }
.invite-row { grid-template-columns: 1fr auto; }
.sub-actions > *,
.invite-row > * { min-width: 0; }
.connection-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.mini-stat { min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: var(--surface-2); }
.mini-stat strong { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.mini-stat span { display: block; }
.hint { margin: 12px 0 14px; border: 1px solid #285d3c; border-radius: 6px; padding: 12px 14px; color: #a7f3c0; background: #0b2014; line-height: 1.6; }
.mono { font-family: Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; }
.download-list { display: grid; gap: 12px; margin-top: 14px; }
.download-item { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--surface); }
.download-item > * { min-width: 0; }
.download-item strong { display: block; margin-bottom: 5px; }
.download-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.download-meta { margin-top: 6px; font-size: 12px; }
.download-meta,
.muted { color: var(--muted); }
.upload-form textarea { width: 100%; min-height: 82px; resize: vertical; font: inherit; letter-spacing: 0; }
.upload-progress-panel { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--surface-2); }
.upload-progress-panel[hidden] { display: none; }
.upload-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.upload-progress-meta span { min-width: 0; overflow-wrap: anywhere; }
.upload-progress-panel progress { display: block; width: 100%; height: 14px; accent-color: var(--cyan); }
.upload-progress-panel #upload-status { margin: 10px 0 0; }
.upload-form button:disabled { cursor: wait; opacity: .65; }
.admin-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.admin-choice-grid .button { width: 100%; }
.flclash-tutorial { margin-top: 16px; }
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.tutorial-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}
.tutorial-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #061113;
  background: var(--cyan);
  font-weight: 900;
}
.tutorial-step h3 { margin: 4px 0 6px; font-size: 16px; }
.tutorial-step p { margin: 0; color: var(--muted); line-height: 1.6; }
.tutorial-step img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.auth-tab { border: 0; background: transparent; cursor: pointer; }
.auth-form-panel[hidden] { display: none; }
.auth-form input:focus-visible,
.page-stack input:focus-visible,
.page-stack textarea:focus-visible {
  border-color: var(--cyan);
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}
.nav a:focus-visible,
.button:focus-visible,
.page-stack button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
.auth-tab:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: -4px;
}

@media (max-width: 980px) {
  .site-header { height: auto; }
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding-top: 10px;
  }
  .nav {
    order: 3;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    gap: 22px;
    overflow-x: auto;
    padding: 10px 2px 12px;
    border-top: 1px solid var(--line-soft);
    scrollbar-color: #34505a transparent;
    scrollbar-width: thin;
  }
  .nav a { flex: 0 0 auto; white-space: nowrap; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 52px 0; }
  .hero-copy h1, .hero-copy h2 { font-size: 44px; }
  .auth-panel { max-width: 580px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .service-card.api-card { grid-row: auto; grid-column: span 2; min-height: 310px; }
  .api-card .service-card-image { height: 180px; }
  .contact-band { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, var(--max)); }
  .site-header { height: auto; }
  .header-inner { min-height: 60px; padding-top: 8px; }
  .brand-copy span, .header-status span { display: none; }
  .hero { min-height: auto; padding: 40px 0 46px; }
  .hero-copy h1, .hero-copy h2 { font-size: 38px; line-height: 1.12; }
  .hero-copy > p { font-size: 15px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .proof-row { grid-template-columns: 1fr; }
  .proof { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
  .proof span { text-align: right; }
  .section { padding: 54px 0; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .section-heading h1, .section-heading h2 { font-size: 26px; }
  .product-first .section-heading h1 { font-size: 32px; }
  .featured-grid, .service-grid { grid-template-columns: 1fr; }
  .service-card.api-card { grid-column: auto; min-height: 320px; }
  .api-card .service-card-image { height: 160px; }
  .product-name-row { align-items: start; flex-direction: column; gap: 5px; }
  .product-body p { min-height: auto; }
  .contact-band { padding: 28px 22px; }
  .contact-list { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .site-footer { padding-bottom: 28px; }
  .grid,
  .admin-choice-grid,
  .connection-box,
  .download-item,
  .stat-row,
  .tutorial-grid,
  .tutorial-step,
  .sub-actions,
  .invite-row { grid-template-columns: 1fr; }
  .sub-actions .button,
  .sub-actions button,
  .invite-row button { width: 100%; }
}
