* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Serif SC', 'STSong', 'SimSun', serif;
  background: #f5f0e8;
  color: #2c1810;
  min-height: 100vh;
  overflow-x: hidden;
}

#particles-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== Navigation ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 16px 0;
  transition: all 0.3s;
}
#navbar.scrolled {
  background: rgba(255, 252, 245, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139, 115, 85, 0.12);
  padding: 10px 0;
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 20px;
  color: #2c1810;
  text-decoration: none;
  letter-spacing: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-links a {
  text-decoration: none;
  font-size: 14px;
  color: #8b7355;
  letter-spacing: 1px;
  transition: color 0.2s;
}
.nav-links a:hover { color: #2c1810; }
.nav-cta {
  padding: 6px 18px;
  border: 1px solid #8b2500;
  border-radius: 20px;
  color: #8b2500 !important;
  transition: all 0.25s !important;
}
.nav-cta:hover {
  background: #8b2500;
  color: #fff !important;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #5a4638;
}

/* ===== Hero ===== */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px 60px;
}
.hero-title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 56px;
  font-weight: 400;
  letter-spacing: 10px;
  color: #2c1810;
  margin-bottom: 16px;
}
.hero-typed-wrap {
  height: 40px;
  margin-bottom: 20px;
  font-size: 20px;
  color: #8b7355;
  letter-spacing: 6px;
}
.hero-typed-wrap .typed-cursor {
  font-size: 20px;
  color: #8b7355;
  animation: blink 0.9s infinite;
}
.hero-desc {
  font-size: 16px;
  color: #8b7355;
  letter-spacing: 3px;
  line-height: 2;
  margin-bottom: 36px;
}
.hero-desc-sub {
  font-size: 14px;
  color: #b8a88a;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.scroll-hint {
  position: absolute;
  bottom: 30px;
  font-size: 18px;
  color: #b8a88a;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ===== Shared Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 30px;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}
.btn-primary {
  border: 1px solid #8b2500;
  background: #8b2500;
  color: #fff;
}
.btn-primary:hover {
  background: #a82e00;
  border-color: #a82e00;
}
.btn-outline {
  border: 1px solid rgba(139, 115, 85, 0.35);
  background: transparent;
  color: #8b7355;
}
.btn-outline:hover {
  border-color: #8b7355;
  background: #8b7355;
  color: #fff;
}
.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Sections ===== */
.section-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}
section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}
.section-title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 6px;
  text-align: center;
  color: #2c1810;
  margin-bottom: 12px;
}
.section-divider {
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #8b7355, transparent);
  margin: 0 auto 48px;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  text-align: center;
  padding: 36px 24px;
  border: 1px solid rgba(139, 115, 85, 0.15);
  border-radius: 12px;
  background: rgba(255, 252, 245, 0.6);
  transition: all 0.3s;
}
.feature-card:hover {
  background: rgba(255, 252, 245, 0.9);
  border-color: rgba(139, 115, 85, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(44, 24, 16, 0.04);
}
.feature-icon {
  font-size: 32px;
  color: #8b7355;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 10px;
  color: #2c1810;
}
.feature-card p {
  font-size: 14px;
  line-height: 1.8;
  color: #8b7355;
  letter-spacing: 1px;
}

/* ===== Pricing ===== */
#pricing { background: rgba(139, 115, 85, 0.04); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
}
.pricing-card {
  text-align: center;
  padding: 36px 20px;
  border: 1px solid rgba(139, 115, 85, 0.2);
  border-radius: 12px;
  background: rgba(255, 252, 245, 0.7);
  position: relative;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.pricing-card:hover {
  background: rgba(255, 252, 245, 0.92);
  border-color: rgba(139, 115, 85, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(44, 24, 16, 0.06);
}
.pricing-featured {
  border-color: #8b2500;
  background: rgba(139, 37, 0, 0.04);
  transform: scale(1.04);
}
.pricing-featured:hover {
  background: rgba(139, 37, 0, 0.06);
  border-color: #8b2500;
  transform: scale(1.04) translateY(-4px);
}
.pricing-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 16px;
  background: #8b2500;
  color: #fff;
  font-size: 12px;
  letter-spacing: 2px;
  border-radius: 12px;
}
.pricing-card h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #5a4638;
  margin-bottom: 12px;
}
.pricing-card .price {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 40px;
  color: #2c1810;
  margin-bottom: 20px;
}
.pricing-card .price-unit {
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  color: #8b7355;
  letter-spacing: 1px;
}
.pricing-card ul {
  list-style: none;
  margin-bottom: 24px;
  flex: 1;
}
.pricing-card li {
  font-size: 13px;
  color: #8b7355;
  letter-spacing: 1px;
  line-height: 2.2;
}
.pricing-card li::before {
  content: '· ';
  color: #5a4638;
}
.pricing-cost-note {
  font-size: 11px;
  color: #b8a88a;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.pricing-disclaimer {
  text-align: center;
  font-size: 12px;
  color: #b8a88a;
  letter-spacing: 1px;
  margin-top: 32px;
}

/* ===== Usage Bar (tool only) ===== */
.usage-bar {
  position: relative;
  z-index: 2;
  margin-top: 72px;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}
.usage-inner {
  max-width: 720px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(255, 252, 245, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(139, 115, 85, 0.15);
  border-radius: 10px;
  flex-wrap: wrap;
}
.usage-label {
  font-size: 13px;
  color: #8b7355;
  letter-spacing: 1px;
  white-space: nowrap;
}
.usage-track {
  flex: 1;
  min-width: 80px;
  height: 4px;
  background: rgba(139, 115, 85, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
.usage-fill {
  height: 100%;
  background: #8b7355;
  border-radius: 2px;
  transition: width 0.4s;
}
.usage-premium-badge {
  display: none;
  font-size: 12px;
  color: #8b2500;
  letter-spacing: 2px;
  border: 1px solid #8b2500;
  padding: 2px 12px;
  border-radius: 12px;
}
.usage-premium-badge.show { display: inline; }

/* ===== Premium Section (tool only) ===== */
.premium-section {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: 0 20px 40px;
}
.premium-card {
  max-width: 720px;
  text-align: center;
  padding: 36px !important;
}
.premium-title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 4px;
  color: #2c1810;
  margin-bottom: 8px;
}
.premium-desc {
  font-size: 14px;
  color: #8b7355;
  letter-spacing: 2px;
  margin-bottom: 24px;
}
.premium-plans {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.premium-plan {
  padding: 24px 28px;
  border: 1px solid rgba(139, 115, 85, 0.2);
  border-radius: 12px;
  background: rgba(255,252,245,0.6);
  min-width: 180px;
  flex: 1;
  max-width: 260px;
  position: relative;
}
.premium-plan-featured {
  border-color: #8b2500;
  background: rgba(139,37,0,0.03);
}
.premium-plan .premium-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 14px;
  background: #8b2500;
  color: #fff;
  font-size: 11px;
  letter-spacing: 2px;
  border-radius: 10px;
}
.plan-name {
  font-size: 15px;
  color: #5a4638;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.plan-desc {
  font-size: 12px;
  color: #b8a88a;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.plan-price {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 34px;
  color: #2c1810;
  margin-bottom: 14px;
}
.plan-price span {
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  color: #8b7355;
}
.premium-activate {
  border-top: 1px solid rgba(139,115,85,0.12);
  padding-top: 20px;
}
.premium-activate-hint {
  font-size: 13px;
  color: #8b7355;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.premium-activate-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.premium-activate-row input {
  padding: 8px 14px;
  border: 1px solid rgba(139,115,85,0.3);
  border-radius: 6px;
  background: rgba(255,255,255,0.6);
  font-family: inherit;
  font-size: 13px;
  color: #2c1810;
  outline: none;
  width: 200px;
}
.premium-activate-row input:focus {
  border-color: #8b7355;
}
.premium-activate-row button {
  padding: 8px 18px;
  border: 1px solid #8b2500;
  border-radius: 6px;
  background: #8b2500;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s;
}
.premium-activate-row button:hover {
  background: #a82e00;
}
.premium-activate-status {
  display: block;
  font-size: 12px;
  margin-top: 8px;
  color: #8b7355;
  opacity: 0;
  transition: opacity 0.3s;
}
.premium-activate-status.show { opacity: 1; }
.premium-activate-status.success { color: #2d7d46; }
.premium-activate-status.error { color: #8b2500; }

/* ===== Footer ===== */
footer {
  position: relative;
  z-index: 1;
  padding: 40px 20px;
  text-align: center;
}
.page-tool footer { margin-top: 0; }
.footer-main {
  font-size: 13px;
  color: #b8a88a;
  letter-spacing: 3px;
  margin-bottom: 4px;
}
.footer-sub {
  font-size: 12px;
  color: #c4b8a4;
  letter-spacing: 2px;
}
.footer-sub span { margin: 0 4px; }

/* ===== Tool page scroll-wrapper ===== */
.scroll-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 40px;
}

/* ===== Card ===== */
.main-card {
  width: 100%;
  max-width: 720px;
  background: rgba(255, 252, 245, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 115, 85, 0.25);
  border-radius: 12px;
  padding: 48px 44px 40px;
  box-shadow:
    0 2px 40px rgba(44, 24, 16, 0.06),
    0 8px 24px rgba(44, 24, 16, 0.04);
  position: relative;
}
.main-card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(139, 115, 85, 0.12);
  border-radius: 8px;
  pointer-events: none;
}

.corner { position: absolute; font-size: 22px; color: rgba(139, 115, 85, 0.2); pointer-events: none; }
.corner-tl { top: 14px; left: 18px; }
.corner-tr { top: 14px; right: 18px; }
.corner-bl { bottom: 14px; left: 18px; }
.corner-br { bottom: 14px; right: 18px; }

header { text-align: center; margin-bottom: 36px; }
header h1 {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 48px;
  font-weight: 400;
  letter-spacing: 8px;
  color: #2c1810;
  margin-bottom: 6px;
}
header .subtitle {
  font-size: 15px;
  color: #8b7355;
  letter-spacing: 6px;
}
header .subtitle span { margin: 0 4px; }
.header-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #8b7355, transparent);
  margin: 14px auto 0;
}

.api-section {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.api-section label {
  font-size: 13px;
  color: #8b7355;
  letter-spacing: 2px;
  white-space: nowrap;
}
.api-input-wrap {
  flex: 1;
  display: flex;
  gap: 6px;
  min-width: 200px;
}
.api-input-wrap input {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid rgba(139, 115, 85, 0.3);
  border-radius: 6px;
  background: rgba(255,255,255,0.6);
  font-family: inherit;
  font-size: 13px;
  color: #2c1810;
  outline: none;
  transition: border-color 0.2s;
}
.api-input-wrap input:focus { border-color: #8b7355; }
.api-input-wrap input::placeholder { color: #b8a88a; }
.api-save-btn {
  padding: 7px 14px;
  border: 1px solid rgba(139, 115, 85, 0.3);
  border-radius: 6px;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: #8b7355;
  transition: all 0.2s;
  white-space: nowrap;
}
.api-save-btn:hover { background: #8b7355; color: #fff; border-color: #8b7355; }
.api-status { font-size: 12px; color: #8b7355; opacity: 0; transition: opacity 0.3s; }
.api-status.show { opacity: 1; }

.translation-panel { position: relative; }

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #5a4638;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.field-label .label-dot {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #8b7355;
}

textarea {
  width: 100%;
  height: 120px;
  padding: 14px 16px;
  border: 1px solid rgba(139, 115, 85, 0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.8;
  color: #2c1810;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
textarea:focus { border-color: #8b7355; }
textarea::placeholder { color: #c4b8a4; }

.btn-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.translate-btn {
  position: relative;
  width: 68px;
  height: 68px;
  border: 2px solid #8b2500;
  border-radius: 50%;
  background: transparent;
  color: #8b2500;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 28px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.35s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.translate-btn::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(139, 37, 0, 0.2);
  border-radius: 50%;
  pointer-events: none;
  transition: all 0.35s;
}
.translate-btn:hover {
  background: #8b2500;
  color: #fff;
  transform: scale(1.03);
}
.translate-btn:hover::after { border-color: rgba(255,255,255,0.3); }
.translate-btn:active { transform: scale(0.96); }
.translate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.translate-btn .btn-text { line-height: 1; }
.translate-btn.loading .btn-text { display: none; }
.translate-btn.loading .btn-loader { display: block; }
.btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid #8b2500;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.translate-btn:hover .btn-loader { border-color: #fff; border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.output-area {
  min-height: 120px;
  padding: 16px;
  border: 1px solid rgba(139, 115, 85, 0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  font-size: 16px;
  line-height: 2;
  color: #2c1810;
  white-space: pre-wrap;
  word-break: break-word;
}
.output-area .placeholder {
  color: #c4b8a4;
  font-size: 14px;
}
.output-area .typed-cursor {
  font-size: 16px;
  color: #8b2500;
  animation: blink 0.9s infinite;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.examples-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(139, 115, 85, 0.12);
}
.examples-section .ex-hint {
  font-size: 13px;
  color: #8b7355;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.example-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.example-tag {
  padding: 5px 16px;
  border: 1px solid rgba(139, 115, 85, 0.25);
  border-radius: 20px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #8b7355;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 1px;
}
.example-tag:hover {
  background: #8b7355;
  color: #fff;
  border-color: #8b7355;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 24px;
  background: rgba(44, 24, 16, 0.85);
  color: #f5f0e8;
  font-family: inherit;
  font-size: 14px;
  border-radius: 8px;
  opacity: 0;
  transition: all 0.35s;
  pointer-events: none;
  z-index: 100;
  letter-spacing: 1px;
  backdrop-filter: blur(8px);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Auth Modal ===== */
.nav-login-btn {
  padding: 5px 18px;
  border: 1px solid #8b2500;
  border-radius: 20px;
  background: transparent;
  color: #8b2500;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.nav-login-btn:hover {
  background: #8b2500;
  color: #fff;
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-username {
  font-size: 13px;
  color: #5a4638;
  letter-spacing: 1px;
}
.nav-logout-btn {
  padding: 3px 12px;
  border: 1px solid rgba(139,115,85,0.3);
  border-radius: 14px;
  background: transparent;
  color: #8b7355;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-logout-btn:hover {
  background: #8b7355;
  color: #fff;
}

.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(44, 24, 16, 0.4);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-overlay.show { display: flex; }
.auth-modal {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 252, 245, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 115, 85, 0.2);
  border-radius: 14px;
  padding: 36px 32px 28px;
  position: relative;
  box-shadow: 0 16px 48px rgba(44, 24, 16, 0.12);
}
.auth-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: #b8a88a;
  cursor: pointer;
  transition: color 0.2s;
}
.auth-close:hover { color: #2c1810; }
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(139,115,85,0.12);
}
.auth-tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 2px;
  color: #b8a88a;
  cursor: pointer;
  transition: all 0.25s;
}
.auth-tab.active {
  color: #2c1810;
  border-bottom-color: #8b2500;
}
.auth-form {
  display: none;
  flex-direction: column;
  gap: 14px;
}
.auth-form.active { display: flex; }
.auth-form input {
  padding: 10px 14px;
  border: 1px solid rgba(139,115,85,0.25);
  border-radius: 8px;
  background: rgba(255,255,255,0.6);
  font-family: inherit;
  font-size: 14px;
  color: #2c1810;
  outline: none;
  transition: border-color 0.2s;
}
.auth-form input:focus { border-color: #8b7355; }
.auth-form button[type="submit"] {
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  background: #8b2500;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 3px;
  cursor: pointer;
  transition: background 0.25s;
}
.auth-form button[type="submit"]:hover { background: #a82e00; }
.auth-error {
  font-size: 13px;
  color: #8b2500;
  text-align: center;
  min-height: 20px;
}

/* ===== Payment Modal ===== */
.payment-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(44, 24, 16, 0.4);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.payment-overlay.show { display: flex; }
.payment-modal {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 252, 245, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 115, 85, 0.2);
  border-radius: 14px;
  padding: 32px 28px 24px;
  position: relative;
  box-shadow: 0 16px 48px rgba(44, 24, 16, 0.12);
  text-align: center;
}
.payment-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none;
  font-size: 18px; color: #b8a88a;
  cursor: pointer;
}
.payment-close:hover { color: #2c1810; }
.payment-title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 24px; font-weight: 400;
  letter-spacing: 4px; color: #2c1810;
  margin-bottom: 8px;
}
.payment-plan {
  font-size: 15px; color: #8b7355;
  letter-spacing: 2px; margin-bottom: 4px;
}
.payment-amount {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 36px; color: #2c1810;
  margin-bottom: 20px;
}
.payment-qr-wrap {
  display: none;
  margin: 0 auto 16px;
  width: 200px; height: 200px;
  border: 1px solid rgba(139,115,85,0.15);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.payment-qr-wrap img { width: 100%; height: 100%; object-fit: contain; }
.payment-hint {
  font-size: 13px; color: #b8a88a;
  letter-spacing: 1px; margin-bottom: 8px;
}
.payment-status {
  font-size: 14px; color: #8b7355;
  letter-spacing: 1px; margin-bottom: 12px;
  min-height: 20px;
}
.payment-link-wrap { margin-bottom: 12px; }
.payment-link-wrap a {
  font-size: 12px; color: #8b2500;
  letter-spacing: 1px;
}
.payment-cancel {
  padding: 8px 24px;
  border: 1px solid rgba(139,115,85,0.25);
  border-radius: 20px;
  background: transparent;
  color: #8b7355;
  font-family: inherit; font-size: 13px;
  cursor: pointer; transition: all 0.2s;
}
.payment-cancel:hover {
  background: #8b7355; color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-title { font-size: 38px; letter-spacing: 6px; }
  .hero-typed-wrap { font-size: 17px; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 360px; }
  .pricing-featured { transform: none; }
  .pricing-featured:hover { transform: translateY(-4px); }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(255,252,245,0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(139,115,85,0.12);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  #navbar.scrolled .nav-links { border-top: 1px solid rgba(139,115,85,0.12); }
}

@media (max-width: 640px) {
  .scroll-wrapper { padding: 12px 12px 30px; }
  .main-card { padding: 24px 16px 28px; }
  header h1 { font-size: 30px; letter-spacing: 4px; }
  textarea { font-size: 14px; }
  .output-area { font-size: 15px; }
  .translate-btn { width: 60px; height: 60px; font-size: 24px; }
  .corner { display: none; }
  .section-title { font-size: 26px; }
  .premium-plans { flex-direction: column; align-items: center; }
  .page-tool footer { padding: 24px 20px; }
}
