* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #111827;
  background: #f4f7fb;
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

.hero {
  text-align: center;
  padding: 36px 12px;
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 14px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: 38px;
  margin: 10px 0;
}

.hero p {
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.card,
.price-card {
  background: white;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
}

.status-box {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: #f8fafc;
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 22px;
}

.status-box p {
  margin: 6px 0 0;
  color: #64748b;
}

.upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 18px;
  padding: 22px;
  background: #f8fafc;
}

.upload-box h2 {
  margin-top: 0;
}

.upload-box p {
  color: #64748b;
}

input[type="file"] {
  margin-top: 10px;
}

.preview-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.preview-item {
  border-radius: 14px;
  overflow: hidden;
  background: white;
  border: 1px solid #e5e7eb;
}

.preview-item img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #f8fafc;
  display: block;
}

.preview-item p {
  margin: 0;
  padding: 8px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary-btn,
.small-btn {
  border: none;
  cursor: pointer;
  border-radius: 14px;
  font-weight: 700;
}

.primary-btn {
  width: 100%;
  margin-top: 18px;
  padding: 15px 18px;
  color: white;
  background: #2563eb;
  font-size: 17px;
}

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

.small-btn {
  padding: 10px 14px;
  background: #e5e7eb;
  color: #111827;
}

.small-btn.full {
  width: 100%;
  margin-top: 10px;
}

.section-title-row {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-list.empty {
  padding: 24px;
  text-align: center;
  color: #64748b;
  background: #f8fafc;
  border-radius: 16px;
}

.result-item {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.result-head strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.latex-box {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 15px;
  resize: vertical;
}

.formula-preview {
  margin-top: 12px;
  padding: 18px;
  border-radius: 14px;
  background: #f8fafc;
  overflow-x: auto;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn-row button {
  flex: 1;
  padding: 11px;
  border: none;
  border-radius: 12px;
  background: #111827;
  color: white;
  cursor: pointer;
}

.tip-box {
  margin-top: 28px;
  padding: 18px;
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
}

.price {
  font-size: 30px;
  font-weight: 800;
  color: #2563eb;
  margin: 12px 0;
}

.muted {
  color: #64748b;
}

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

.hidden {
  display: none;
}

.modal-content {
  width: 100%;
  max-width: 430px;
  background: white;
  border-radius: 20px;
  padding: 24px;
}

.modal-content input {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font-size: 16px;
}
.vip-list {
  margin: 12px 0 18px;
  padding-left: 22px;
  color: #374151;
  line-height: 1.9;
}

.pay-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
  color: #334155;
}

.pay-box p {
  margin: 8px 0;
}
