/* AI看书王官网 — 固定 Noto Sans SC，不跟随系统字体 */

/* Latin */
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/noto-sans-sc/noto-sans-sc-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/noto-sans-sc/noto-sans-sc-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/noto-sans-sc/noto-sans-sc-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 简体中文 */
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/noto-sans-sc/noto-sans-sc-chinese-simplified-400-normal.woff2") format("woff2");
  unicode-range: U+3000-303F, U+3040-309F, U+30A0-30FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/noto-sans-sc/noto-sans-sc-chinese-simplified-500-normal.woff2") format("woff2");
  unicode-range: U+3000-303F, U+3040-309F, U+30A0-30FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/noto-sans-sc/noto-sans-sc-chinese-simplified-600-normal.woff2") format("woff2");
  unicode-range: U+3000-303F, U+3040-309F, U+30A0-30FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

/* English — DM Sans (Google Fonts v17, OFL) */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/dm-sans/dm-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* English slogan — Montserrat (Google Fonts, OFL) */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("./fonts/montserrat/montserrat-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --brand: #4d6bfe;
  --brand-deep: #4d6bfe;
  --brand-soft: rgba(77, 107, 254, 0.12);
  --brand-soft-border: rgba(77, 107, 254, 0.28);
  --text: #262626;
  --text-strong: #1c1c1c;
  --text-blue: #1c1c1c;
  --text-muted: rgba(0, 0, 0, 0.45);
  --text-hint: rgba(0, 0, 0, 0.4);
  --header-link: #4c4c4c;
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-raised: rgba(255, 255, 255, 0.82);
  --input-bg: rgba(255, 255, 255, 0.88);
  --input-hover: rgba(255, 255, 255, 0.96);
  --border: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-focus: rgba(77, 107, 254, 0.22);
  --shadow-input: 0 8px 28px rgba(47, 79, 160, 0.08), 0 1px 2px rgba(0, 0, 0, 0.03);
  --blur: 16px;
  --radius-card: 28px;
  --radius-pill: 100px;
  --font: "Noto Sans SC", "PingFang SC", "Helvetica Neue", sans-serif;
  --font-en: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-en-display: "Montserrat", "DM Sans", system-ui, sans-serif;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ds-header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  width: min(100% - 48px, 1140px);
  margin: 0 auto;
  padding: 8px 0 0;
}

@media (min-width: 768px) {
  .ds-header-wrapper {
    width: min(100% - 144px, 1140px);
  }
}

@media (min-width: 1560px) {
  .ds-header-wrapper {
    width: min(100% - 160px, 1280px);
  }
}

.ds-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 0;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.ds-header-bar.is-scrolled {
  background: var(--surface-raised);
  backdrop-filter: blur(var(--blur));
  border-color: var(--border);
  padding-left: 12px;
  padding-right: 12px;
}

.ds-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ds-brand-wordmark {
  display: block;
  height: 23px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  object-position: left center;
}

.ds-brand-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--brand);
}

.ds-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ds-btn-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding: 6px 4px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--header-link);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.2s;
}

.ds-btn-ghost:hover {
  color: var(--text-strong);
}

.ds-btn-ghost:disabled {
  opacity: 0.55;
  cursor: wait;
}

.ds-locale-toggle {
  display: flex;
  align-items: center;
  height: 30px;
  margin-left: 2px;
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.35);
}

.ds-locale-toggle-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.ds-locale-toggle-item.is-active {
  background: #fff;
  color: var(--text-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ds-hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: min(100svh, 1020px);
  overflow: hidden;
  padding-bottom: 48px;
  background: linear-gradient(180deg, #a8c4ea 0%, #d7e4f5 42%, #f3f5f8 78%, #f5f7fb 100%);
}

.ds-pattern-canvas,
.ds-flow-field-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mask-image: linear-gradient(#000000fc 0%, #000000e8 8.98%, transparent 100%);
}

.ds-pattern-canvas {
  z-index: 1;
}

.ds-flow-field-canvas {
  z-index: 5;
}

.ds-hero-inner {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1080px;
  padding: 88px 24px 0;
  gap: 48px;
}

.ds-hero-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.ds-hero-rise {
  opacity: 0;
  transform: translateY(40px);
  animation: ds-hero-rise 1s cubic-bezier(0.44, 0, 0.56, 1) forwards;
}

.ds-hero-rise-delay {
  animation-delay: 0.1s;
}

@keyframes ds-hero-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ds-hero-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 720px;
  color: var(--text-hint);
  font-size: 14px;
  font-weight: 400;
  line-height: 160%;
  letter-spacing: 0.01em;
  text-align: center;
  text-wrap: pretty;
  transition: color 0.2s;
}

.ds-hero-tip:hover {
  color: var(--text);
}

.ds-hero-tip-icon {
  display: none;
}

.ds-hero-tip-text {
  opacity: 1;
}

.ds-hero-tip-arrow {
  display: inline-flex;
  align-items: center;
  height: 1lh;
  margin-left: 2px;
  opacity: 0.75;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.ds-hero-tip:hover .ds-hero-tip-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.ds-text-slogan {
  margin: 0;
  color: var(--text-strong);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-align: center;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .ds-text-slogan {
    font-size: 48px;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
  }
}

@media (min-width: 1024px) {
  .ds-text-slogan {
    font-size: 52px;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }
}

/* 英文：DeepSeek 同款免费商用字体（DM Sans + Montserrat） */
html[lang="en"] body {
  font-family: var(--font-en);
}

html[lang="en"] .ds-brand-name,
html[lang="en"] .ds-btn-ghost,
html[lang="en"] .ds-locale-toggle-item,
html[lang="en"] .ds-hero-tip,
html[lang="en"] .ds-input-wrapper textarea,
html[lang="en"] .ds-hero-toggle-btn,
html[lang="en"] .ds-site-footer {
  font-family: var(--font-en);
}

/* 英文不套用中文大字距，避免溢出裁切 */
html[lang="en"] .ds-text-slogan {
  font-family: var(--font-en-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: normal;
  text-indent: 0;
  white-space: normal;
  max-width: 16ch;
  line-height: 1.35;
}

@media (min-width: 768px) {
  html[lang="en"] .ds-text-slogan {
    font-size: 44px;
    max-width: none;
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  html[lang="en"] .ds-text-slogan {
    font-size: 50px;
    letter-spacing: normal;
  }
}

.ds-hero-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 768px;
  gap: 24px;
}

.ds-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 6px 12px 12px;
  cursor: text;
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-input);
  backdrop-filter: blur(var(--blur));
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.ds-input-wrapper:hover,
.ds-input-wrapper:focus-within {
  background-color: var(--input-hover);
  border-color: var(--border-focus);
  box-shadow: 0 10px 32px rgba(47, 79, 160, 0.1), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ds-input-wrapper textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  max-height: 300px;
  height: 72px;
  resize: none;
  border: 0;
  outline: none;
  padding: 14px 10px 8px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overflow-y: auto;
}

.ds-input-wrapper textarea::placeholder {
  color: rgba(0, 0, 0, 0.32);
}

.ds-input-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.ds-input-toggles {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ds-hero-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  user-select: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.ds-hero-toggle-btn:hover {
  border-color: var(--brand-soft-border);
  color: var(--brand);
}

.ds-hero-toggle-btn--selected,
.ds-hero-toggle-btn[aria-pressed="true"] {
  background-color: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-soft-border);
}

.ds-input-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ds-hero-icon-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: rgba(0, 0, 0, 0.42);
  cursor: default;
}

.ds-hero-send-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.ds-hero-send-btn:hover {
  background: #3d5cf0;
}

.ds-site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 24px 32px 36px;
  color: rgba(0, 0, 0, 0.35);
  font-size: 12px;
  letter-spacing: 0.01em;
  background: var(--bg);
}

.ds-site-footer a:hover {
  color: rgba(0, 0, 0, 0.62);
}

@media (max-width: 960px) {
  .ds-text-slogan {
    white-space: normal;
  }
}
