.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

.logo__mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #818cf8);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--bg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
}

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

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.25rem;
  padding-left: 0.5rem;
  border-left: 1px solid var(--border);
}

.language-switch a {
  min-width: 2rem;
  padding: 0.3rem 0.4rem;
  color: var(--text-muted);
  text-align: center;
}

.language-switch a[aria-current="page"] {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
}

.language-switch__divider {
  color: var(--border);
  font-size: 0.75rem;
}

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.tool-card {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

a.tool-card:hover,
a.tool-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: inherit;
  outline: none;
}

.tool-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

/* 首页工具图标：避免 emoji 在部分环境下乱码 */
.tool-card__glyph {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.tool-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.tool-card p {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.tool-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

.page-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
}

.page-desc {
  margin: 0 0 2rem;
  color: var(--text-muted);
  max-width: 42rem;
}

.upload-zone {
  display: block;
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-elevated);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.is-dragover {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.06);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-zone__title {
  position: relative;
  z-index: 1;
  pointer-events: none;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.upload-zone__hint {
  position: relative;
  z-index: 1;
  pointer-events: none;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.file-meta {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  display: none;
}

.file-meta.is-visible {
  display: block;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: var(--bg);
}

.btn--primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover:not(:disabled) {
  border-color: var(--accent);
}

.progress {
  margin-top: 1.25rem;
  display: none;
}

.progress.is-visible {
  display: block;
}

.progress__bar {
  height: 8px;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.progress__text {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.convert-result {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.convert-result__text {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--text);
}

.convert-result__text--error {
  margin: 0;
  color: #f87171;
}

.convert-result__error {
  margin: 0;
  color: #f87171;
  font-size: 0.9rem;
}

.convert-result__ok {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
}

.convert-result__meta {
  margin: 0.5rem 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.convert-result__action {
  margin: 0.85rem 0 0;
}

.notice {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-size: 0.875rem;
  color: var(--warning);
}

.site-footer {
  margin-top: auto;
  padding: 2rem 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  pointer-events: none;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

/* 翻译页：语种与选项表单 */
.tool-form {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tool-form__title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.field select,
.field input[type="checkbox"] {
  font-family: inherit;
  font-size: 0.9rem;
}

.field select {
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.field--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.4rem;
}

.field--checkbox label {
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
}

/* 账号：登录 / 注册 / 用户中心 */
.nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.25rem;
  padding-left: 0.5rem;
  border-left: 1px solid var(--border);
}

.nav-auth a {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
}

.nav-auth a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-auth__btn {
  font: inherit;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}

.nav-auth__btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.auth-card {
  max-width: 420px;
  margin: 2rem auto 0;
  padding: 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.auth-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.auth-card__desc {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-card__foot {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* 注册入口靠左、忘记密码靠右，窄屏时自动换行 */
.auth-card__foot--split {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.auth-card__foot--split > :last-child {
  margin-left: auto;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form .field input[type="email"],
.auth-form .field input[type="password"],
.auth-form .field input[type="text"],
.auth-form .field input[type="number"] {
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.auth-form .field input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #818cf8);
  color: var(--bg);
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.auth-message {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.auth-message--error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.auth-message--success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.profile-summary {
  margin: 1.25rem 0 2rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.profile-summary__row {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5rem;
  align-items: center;
  gap: 1rem;
}

.profile-summary__row + .profile-summary__row {
  margin-top: 0.85rem;
}

.profile-summary__action {
  width: 5rem;
  padding: 0.25rem 0.6rem;
  justify-self: end;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.profile-summary__action:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.profile-modal,
.download-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 1.25rem;
  display: grid;
  place-items: center;
}

.profile-modal[hidden],
.download-modal[hidden] {
  display: none;
}

.profile-modal__backdrop,
.download-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(3, 7, 12, 0.72);
  cursor: default;
  backdrop-filter: blur(3px);
}

.profile-modal__dialog,
.download-modal__dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.profile-modal__head,
.download-modal__head {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.profile-modal__head h2,
.download-modal__head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.profile-modal__head p,
.download-modal__head p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.825rem;
}

.profile-modal__close,
.download-modal__close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.profile-modal__close:hover,
.download-modal__close:hover {
  color: var(--text);
  border-color: var(--accent);
}

.profile-modal__form .field + .field {
  margin-top: 0.85rem;
}

.profile-modal__form input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.profile-modal__form input:focus {
  border-color: var(--accent);
}

.profile-modal__actions,
.download-modal__actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.download-modal__filename {
  margin: 0;
  padding: 0.75rem 0.85rem;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
}

.download-modal__filename span {
  color: var(--text-muted);
  font-weight: 400;
}

.profile-records__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.profile-records__empty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
}

.data-table td.amount {
  font-variant-numeric: tabular-nums;
}

.pager {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.pager button {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.site-footer__brand {
  margin: 0 0 0.75rem;
}

.site-footer__links {
  margin: 0;
  font-size: 0.75rem;
}

.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.nav__pricing {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--accent, #6366f1);
  border-radius: 999px;
  color: var(--accent, #6366f1) !important;
  font-weight: 600;
}

.nav__pricing:hover {
  background: var(--accent, #6366f1);
  color: #fff !important;
}

.pricing-intro {
  max-width: 44rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.pricing-intro__title {
  margin: 0 0 0.75rem;
  font-size: 2rem;
}

.pricing-intro__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.pricing-intro__status {
  margin: 1rem 0 0;
  padding: 0.6rem 1rem;
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--text);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.pricing-card--featured {
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 1px var(--accent, #6366f1);
}

.pricing-card__badge {
  position: absolute;
  top: -0.7rem;
  left: 1.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--accent, #6366f1);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}

.pricing-card__name {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.pricing-card__price {
  margin: 0 0 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.pricing-card__amount {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text);
}

.pricing-card__unit {
  font-size: 0.85rem;
  color: var(--muted);
}

.pricing-card__list {
  margin: 0 0 1.5rem;
  padding-left: 1.1rem;
  flex: 1;
  font-size: 0.87rem;
  line-height: 1.9;
  color: var(--muted);
}

.pricing-card .btn {
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.paypal-button-host {
  width: 100%;
  min-height: 40px;
  margin-top: auto;
}

.paypal-button-host .btn {
  width: 100%;
}

.pricing-note {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.pricing-note__title {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
}

.pricing-note__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.87rem;
  line-height: 1.9;
  color: var(--muted);
}

.pricing-note__contact {
  margin: 1rem 0 0;
  font-size: 0.83rem;
  color: var(--muted);
}

.profile-plan {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #ffd140;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 600;
}

.profile-plan--none {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.legal-page {
  max-width: 52rem;
  margin: 0 auto;
}

.legal-page__header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-page__header h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.legal-page__header p,
.legal-page section p,
.legal-page section li {
  color: var(--text-muted);
  line-height: 1.8;
}

.legal-page section {
  margin: 0 0 2rem;
}

.legal-page section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--text);
}

.legal-page section p {
  margin: 0.5rem 0;
}

.legal-page section ul {
  margin: 0.5rem 0;
  padding-left: 1.35rem;
}
