﻿:root {
  --bg: #f7f5ef;
  --card: #fffdf7;
  --text: #161515;
  --muted: #6f6a61;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --danger: #b91c1c;
  --ring: rgba(15, 118, 110, 0.25);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 0% 0%, #e6fffa 0%, transparent 35%),
    radial-gradient(circle at 100% 100%, #ffedd5 0%, transparent 45%), var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(45px);
  opacity: 0.5;
  z-index: -1;
}

.bg-shape-a {
  width: 220px;
  height: 220px;
  background: #99f6e4;
  top: -50px;
  left: -70px;
}

.bg-shape-b {
  width: 320px;
  height: 320px;
  background: #fed7aa;
  right: -100px;
  bottom: -120px;
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 16px 60px;
}

.hero {
  animation: floatIn 500ms ease-out both;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mini {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #334155;
}

.nav-link {
  text-decoration: none;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

h1 {
  margin: 12px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(36px, 6vw, 62px);
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 0 0 26px;
  color: var(--muted);
  max-width: 760px;
}

.user-badge {
  display: inline-block;
  margin-left: 8px;
  background: #ecfeff;
  color: #0f766e;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
}

.panel {
  background: var(--card);
  border: 1px solid #ece7dd;
  box-shadow: var(--shadow);
  border-radius: 20px;
  padding: 18px;
  animation: floatIn 600ms ease-out both;
}

.panel + .panel {
  margin-top: 18px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

textarea,
input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #d6d1c7;
  padding: 14px;
  font-size: 15px;
  line-height: 1.6;
  font-family: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea {
  min-height: 210px;
  resize: vertical;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

.actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.feature-actions {
  flex-wrap: nowrap;
}

.paper-page {
  max-width: 1040px;
}

.paper-hero {
  padding: 4px 2px 10px;
}

.paper-hero h1 {
  max-width: 840px;
}

.paper-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.paper-hero-tags span {
  border: 1px solid #d7d2c8;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.paper-input-panel {
  position: relative;
}

.paper-input-head {
  margin-bottom: 8px;
}

.paper-input-head h2 {
  margin: 0;
  font-size: 24px;
}

.paper-input-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  cursor: pointer;
  background: var(--brand);
  color: #ffffff;
  transition: transform 120ms ease, background 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--brand-strong);
}

button.ghost {
  background: #f3f4f6;
  color: #111827;
}

button.secondary {
  background: #0ea5e9;
}

button.secondary:hover {
  background: #0284c7;
}

#countTip,
.quota {
  color: var(--muted);
  font-size: 14px;
}

.quota.limit {
  color: var(--danger);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.score-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.score-card {
  background: #fffcf2;
  border: 1px solid #efe8d9;
  border-radius: 14px;
  padding: 12px;
}

.score-card p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.score-card h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 32px;
}

.detail-grid,
.pricing-grid,
.commercial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-card,
.plan-card,
.sponsor-box,
.lead-box,
.cta-panel {
  border: 1px solid #efe8d9;
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
}

.detail-card h3,
.plan-card h3,
.sponsor-box h3,
.lead-box h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.detail-card ul,
.plan-card ul {
  margin: 0;
  padding-left: 20px;
}

.detail-card li,
.plan-card li {
  margin-bottom: 8px;
  color: #2f2b27;
  line-height: 1.5;
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.rewrite-panel textarea {
  min-height: 180px;
  background: #ffffff;
}

.price {
  margin: 6px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
}

.price span {
  font-size: 14px;
  color: var(--muted);
}

.plan-card-pro {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.commercial-grid {
  margin-top: 12px;
  grid-template-columns: 1fr 2fr;
}

.sponsor-box p {
  color: var(--muted);
  line-height: 1.6;
}

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

.cta-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.cta-panel h2 {
  margin: 0;
  font-size: 22px;
}

.cta-panel p {
  margin: 6px 0 0;
  color: var(--muted);
}

.cta-link {
  display: inline-block;
  text-decoration: none;
  background: #111827;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.disclaimer {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10;
}

.modal-card {
  width: min(560px, 100%);
  background: #ffffff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.modal-card h3 {
  margin: 0 0 6px;
}

.modal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  border: 1px solid #e8e2d5;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.admin-table th {
  background: #f8f4ea;
  font-weight: 700;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0 12px;
}

.tab {
  background: #e5e7eb;
  color: #111827;
}

.tab.active {
  background: #111827;
  color: #ffffff;
}

.wechat-tip {
  margin-top: 10px !important;
}

.sentence-view {
  display: grid;
  gap: 10px;
}

.sentence-item {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e8e2d5;
  background: #ffffff;
  line-height: 1.7;
}

.sentence-item.hit {
  border-color: #fca5a5;
  background: #fff1f2;
}

.sentence-no {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: #334155;
  background: #eef2ff;
}

.doc-modal-card {
  width: min(920px, 100%);
}

.doc-highlight-body {
  max-height: 56vh;
  overflow: auto;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid #e8e2d5;
  border-radius: 12px;
  background: #fffef9;
}

.doc-sentence {
  margin: 0 0 8px;
  padding: 10px;
  border-radius: 10px;
  line-height: 1.75;
  border: 1px solid transparent;
}

.problem-highlight {
  background: #fee2e2;
  border-color: #fca5a5;
}

.problem-highlight.active {
  background: #fecaca;
  border-color: #ef4444;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .score-wrap,
  .detail-grid,
  .pricing-grid,
  .commercial-grid {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .feature-actions {
    flex-wrap: wrap;
  }
}
