/* ========================================
   PixelClean - 主样式表
   主色: #2563EB (蓝) / #EFF6FF (浅蓝背景)
   ======================================== */

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

:root {
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-light: #EFF6FF;
  --blue-mid: #DBEAFE;
  --cyan: #0EA5E9;
  --purple: #7C3AED;
  --green: #10B981;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(37,99,235,0.10);
  --shadow-lg: 0 12px 40px rgba(37,99,235,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', 'Nunito', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── 容器 ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ═══════════════ NAVBAR ═══════════════ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; gap: 32px;
}

.logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1.2rem; font-weight: 800;
  flex-shrink: 0;
}
.logo svg { border-radius: 8px; }

.nav-links {
  display: flex; gap: 4px;
  flex: 1;
}
.nav-links a {
  text-decoration: none; color: var(--text-muted);
  font-size: 0.92rem; font-weight: 500;
  padding: 6px 14px; border-radius: 8px;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--blue); background: var(--blue-light);
}

.nav-actions {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}

.language-switch {
  display: flex; gap: 4px;
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  border-radius: 20px;
  padding: 2px;
}

.lang-btn {
  background: transparent; border: none;
  border-radius: 18px;
  padding: 4px 12px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}

.lang-btn.active {
  background: white;
  color: var(--blue);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lang-btn:hover:not(.active) {
  color: var(--blue);
}

.user-badge {
  display: flex; align-items: center; gap: 10px;
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  border-radius: 24px;
  padding: 5px 5px 5px 14px;
}
.quota-text { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }
.quota-text strong { color: var(--blue); font-weight: 700; }

/* ── 按钮通用 ── */
.btn-primary {
  background: var(--blue); color: white;
  border: none; border-radius: 10px;
  padding: 10px 22px; font-size: 0.92rem; font-weight: 700;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit;
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:active { transform: none; }

.btn-outline {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--blue); border-radius: 10px;
  padding: 10px 22px; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.btn-outline:hover { background: var(--blue-light); }

.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 7px 14px; font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

.btn-vip {
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: white; border: none; border-radius: 20px;
  padding: 6px 16px; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.btn-vip:hover { transform: scale(1.04); }

.btn-vip-cta {
  background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  color: white; border: none; border-radius: 10px;
  padding: 10px 22px; font-size: 0.92rem; font-weight: 700;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit;
}
.btn-vip-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(239,68,68,0.3); }

/* ── 移动导航 ── */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border);
  gap: 4px;
}
.mobile-nav a {
  text-decoration: none; color: var(--text-muted);
  font-size: 0.95rem; font-weight: 500;
  padding: 10px 14px; border-radius: 8px;
}
.mobile-nav a:hover { background: var(--blue-light); color: var(--blue); }
.mobile-nav.open { display: flex; }

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 24px 56px;
  text-align: center;
  background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);
}

.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, #DBEAFE 0%, transparent 70%);
}

.hero-content { position: relative; max-width: 680px; margin: 0 auto; }

.badge-pill {
  display: inline-block;
  background: var(--blue-mid); color: var(--blue);
  border: 1px solid #BFDBFE;
  border-radius: 24px; padding: 5px 16px;
  font-size: 0.82rem; font-weight: 600;
  margin-bottom: 20px;
  animation: fadeDown .5s ease both;
}

.hero h1 {
  font-family: 'Nunito', 'Noto Sans SC', sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800; line-height: 1.25;
  margin-bottom: 16px;
  animation: fadeDown .55s .05s ease both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted); font-size: 1.05rem;
  margin-bottom: 32px;
  animation: fadeDown .6s .1s ease both;
}

/* ── Mode Tabs ── */
.mode-tabs {
  display: inline-flex;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 4px; gap: 4px;
  animation: fadeDown .65s .15s ease both;
  box-shadow: var(--shadow);
}

.tab-btn {
  background: transparent; color: var(--text-muted);
  border: none; border-radius: 9px;
  padding: 10px 24px; font-size: 0.93rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit;
}
.tab-btn.active {
  background: var(--blue); color: white;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.tab-btn:not(.active):hover { background: var(--blue-light); color: var(--blue); }

/* ═══════════════ UPLOAD SECTION ═══════════════ */
.upload-section { padding: 48px 0 64px; }

/* ── Upload Card ── */
.upload-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  max-width: 720px; margin: 0 auto;
}

.upload-zone {
  border: 2.5px dashed #BFDBFE;
  border-radius: var(--radius);
  margin: 24px;
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  background: var(--blue-light);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--blue);
  background: #DBEAFE;
  transform: scale(1.005);
}

.upload-icon { margin-bottom: 16px; }
.upload-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.upload-hint { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 20px; }
.upload-btn { margin: 0 auto; }

/* ── Loading ── */
.loading-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  max-width: 720px; margin: 0 auto;
  padding: 64px 24px; text-align: center;
}

.loader-ring {
  width: 56px; height: 56px;
  border: 4px solid var(--blue-mid);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 20px;
}

.loading-text { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.loading-sub { color: var(--text-muted); font-size: 0.88rem; }

/* ── Result ── */
.result-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  max-width: 820px; margin: 0 auto;
  padding: 28px;
}

.result-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}

.result-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #D1FAE5; color: #065F46;
  border-radius: 20px; padding: 5px 14px;
  font-size: 0.85rem; font-weight: 600;
}

.result-compare {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
}

.result-img-wrap {
  flex: 1; position: relative;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border);
  background: repeating-conic-gradient(#F1F5F9 0% 25%, white 0% 50%) 0 0 / 16px 16px;
}

.img-label {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,0.5); color: white;
  border-radius: 6px; padding: 3px 10px;
  font-size: 0.78rem; font-weight: 600; z-index: 1;
}

.result-img-wrap img {
  width: 100%; display: block;
  max-height: 360px; object-fit: contain;
}

.result-img-output { position: relative; }

.watermark-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800;
  color: rgba(255,255,255,0.55);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  pointer-events: none;
  transform: rotate(-20deg);
  letter-spacing: 2px;
  z-index: 2;
}

.result-arrow { flex-shrink: 0; }

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

/* ── Error Toast ── */
.error-toast {
  max-width: 720px; margin: 16px auto 0;
  background: #FEF2F2; border: 1px solid #FECACA;
  border-radius: 10px; padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  color: #991B1B; font-size: 0.9rem; font-weight: 500;
}
.error-toast button {
  margin-left: auto; background: none; border: none;
  cursor: pointer; color: #991B1B; font-size: 1rem;
}

/* ═══════════════ FEATURES ═══════════════ */
.features-section {
  padding: 72px 0;
  background: #F8FAFC;
}

.section-title {
  text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800; margin-bottom: 12px;
}
.section-sub {
  text-align: center; color: var(--text-muted);
  font-size: 1rem; margin-bottom: 40px;
}

.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-top: 40px;
}

.feature-card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px 24px;
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.feature-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon.blue { background: var(--blue); }
.feature-icon.cyan { background: var(--cyan); }
.feature-icon.purple { background: var(--purple); }
.feature-icon.green { background: var(--green); }

.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }

/* ═══════════════ VIP PLANS ═══════════════ */
.vip-section { padding: 72px 0; background: white; }

.plan-grid {
  display: flex; gap: 24px; justify-content: center;
  flex-wrap: wrap; margin-top: 40px;
}

.plan-card {
  width: 300px; border-radius: var(--radius);
  border: 2px solid var(--border);
  padding: 32px 28px; position: relative;
  transition: transform .2s, box-shadow .2s;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.plan-card.vip {
  border-color: var(--blue);
  background: linear-gradient(160deg, var(--blue-light) 0%, white 60%);
}

.plan-badge {
  position: absolute; top: -13px; right: 24px;
  background: var(--blue); color: white;
  border-radius: 20px; padding: 4px 16px;
  font-size: 0.78rem; font-weight: 700;
}

.plan-header { margin-bottom: 24px; }
.plan-name { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.plan-price { font-size: 2.2rem; font-weight: 800; margin-top: 4px; }
.plan-price span { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }

.plan-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.plan-features li {
  font-size: 0.9rem; display: flex; align-items: center; gap: 8px;
}
.plan-features li::before { content: ''; display: block; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }
.plan-features li.yes { color: var(--text); }
.plan-features li.yes::before { background: #D1FAE5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23065F46'%3E%3Cpath d='M13 4L6.5 11.5 3 8'/%3E%3C/svg%3E") center/14px no-repeat; }
.plan-features li.no { color: #9CA3AF; text-decoration: line-through; }
.plan-features li.no::before { background: #F3F4F6; }

.plan-btn { width: 100%; justify-content: center; }

/* ═══════════════ TUTORIAL ═══════════════ */
.tutorial-section { padding: 72px 0; background: var(--blue-light); }

.steps-grid {
  display: flex; align-items: flex-start; gap: 0;
  justify-content: center; flex-wrap: wrap;
  margin-top: 40px;
}

.step-item {
  flex: 1; min-width: 180px; max-width: 260px;
  text-align: center; padding: 0 16px;
}

.step-num {
  font-family: 'Nunito', sans-serif;
  font-size: 2.5rem; font-weight: 800;
  color: var(--blue); opacity: 0.25;
  line-height: 1; margin-bottom: 8px;
}

.step-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.step-item p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; }

.step-arrow {
  font-size: 1.8rem; color: var(--blue); opacity: 0.4;
  padding: 0 4px; flex-shrink: 0;
  align-self: center; margin-top: -8px;
}

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  background: #1E293B; color: #94A3B8;
  padding: 40px 0 24px;
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 24px;
}

.footer .logo { color: white; }
.footer .logo span { color: white; }

.footer-brand p { font-size: 0.82rem; color: #64748B; margin-top: 4px; }

.footer-links {
  display: flex; gap: 20px; flex-wrap: wrap;
}
.footer-links span {
  font-size: 0.88rem; cursor: pointer;
  transition: color .2s;
}
.footer-links span:hover { color: white; }

.footer-copy {
  border-top: 1px solid #334155;
  padding-top: 20px;
  font-size: 0.8rem; text-align: center;
}

/* ═══════════════ MODAL ═══════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}

.modal-box {
  background: white; border-radius: 20px;
  padding: 40px 36px; width: 100%; max-width: 400px;
  position: relative; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
  animation: scaleIn .25s ease;
}

.modal-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none; font-size: 1.1rem;
  color: var(--text-muted); cursor: pointer;
  transition: color .2s;
}
.modal-close:hover { color: var(--text); }

.modal-icon { font-size: 2.5rem; margin-bottom: 12px; }
.modal-box h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.modal-box > p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }

.modal-price {
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
  margin-bottom: 20px;
}
.price-main { font-size: 2.8rem; font-weight: 800; color: var(--blue); }
.price-unit { color: var(--text-muted); }
.price-badge {
  background: #FEF3C7; color: #92400E;
  border-radius: 6px; padding: 2px 8px;
  font-size: 0.75rem; font-weight: 700;
}

.modal-plans {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 24px;
}
.plan-option {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  border: 1.5px solid var(--border); cursor: pointer;
  font-size: 0.92rem; font-weight: 500;
  transition: border-color .2s;
}
.plan-option.selected { border-color: var(--blue); background: var(--blue-light); }
.plan-option em { margin-left: auto; font-style: normal; color: var(--green); font-size: 0.82rem; }

.modal-pay-btn { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; }

.modal-note {
  margin-top: 12px; font-size: 0.75rem; color: var(--text-muted);
}

/* ═══════════════ ANIMATIONS ═══════════════ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.93); } to { opacity: 1; transform: none; } }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .user-badge .quota-text { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 48px 20px 40px; }

  .result-compare { flex-direction: column; }
  .result-arrow { transform: rotate(90deg); }
  .result-actions { flex-direction: column; }
  .result-actions > * { width: 100%; justify-content: center; }

  .steps-grid { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); }

  .plan-grid { flex-direction: column; align-items: center; }
  .plan-card { width: 100%; max-width: 360px; }

  .footer-inner { flex-direction: column; }
  .footer-links { gap: 12px; }
}

@media (max-width: 480px) {
  .mode-tabs { flex-direction: column; width: 100%; }
  .tab-btn { justify-content: center; }
  .features-grid { grid-template-columns: 1fr; }
}
