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

:root {
  --primary: #5B4CDB;
  --primary-light: #8B7FFF;
  --primary-dark: #4338CA;
  --accent: #F97316;
  --accent-light: #FB923C;
  --bg: #F0EEFF;
  --card: #FFFFFF;
  --text: #1A1A2E;
  --text-light: #4A4A6A;
  --border: #D4D0F0;
  --success: #10B981;
  --danger: #EF4444;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(91, 76, 219, 0.12);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
  z-index: 50;
  box-shadow: 0 2px 8px rgba(91,76,219,0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo { font-size: 18px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 2px; }
.logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 16px; font-weight: 800;
}
.logo-text { color: var(--text); font-weight: 800; }
.logo-icon-sm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 13px; font-weight: 800;
  margin-right: 2px;
}
.brand-highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px; color: var(--text-light); text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.btn-nav-cta {
  padding: 8px 20px; background: var(--accent); color: #fff;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(249,115,22,0.25);
}
.btn-nav-cta:hover { background: var(--accent-light); transform: translateY(-1px); }
.nav-mobile-btn {
  display: none; background: none; border: none; font-size: 24px;
  cursor: pointer; color: var(--text);
}
.nav-mobile {
  display: none; flex-direction: column; gap: 12px;
  padding: 16px 20px; background: #fff; border-top: 1px solid var(--border);
}
.nav-mobile a { color: var(--text-light); text-decoration: none; font-size: 15px; }

/* ===== Hero ===== */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, #4338CA 0%, #6D5BD0 30%, #8B7FFF 60%, #A78BFA 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(249,115,22,0.12) 0%, transparent 40%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block; padding: 8px 20px;
  background: rgba(255,255,255,0.2); color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 24px; font-size: 14px; font-weight: 600;
  margin-bottom: 24px; position: relative;
}
.hero-title {
  font-size: 48px; font-weight: 800; line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.hero-desc {
  font-size: 18px; color: rgba(255,255,255,0.85); max-width: 560px;
  margin: 20px auto 0; line-height: 1.7;
}
.hero-actions { margin-top: 36px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  padding: 14px 32px; background: var(--accent);
  color: #fff; border: none; border-radius: 10px; font-size: 15px;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(249,115,22,0.3);
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(249,115,22,0.4); }
.btn-outline {
  padding: 14px 32px; background: rgba(255,255,255,0.15); color: #fff;
  border: 2px solid rgba(255,255,255,0.5); border-radius: 10px; font-size: 15px;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
  backdrop-filter: blur(4px);
}
.btn-outline:hover { background: #fff; color: var(--primary-dark); border-color: #fff; }
.btn-lg { padding: 16px 36px; font-size: 16px; }

.hero-stats {
  display: flex; justify-content: center; gap: 48px;
  margin-top: 60px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 28px; color: #fff; font-weight: 800; }
.stat span { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 4px; }

/* ===== Section Titles ===== */
.section-title {
  font-size: 32px; font-weight: 700; text-align: center;
}
.section-subtitle {
  font-size: 15px; color: var(--text-light); text-align: center;
  margin-top: 12px; margin-bottom: 48px;
}

/* ===== Features ===== */
.features { padding: 80px 0; background: #fff; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 32px 24px; border-radius: 16px;
  background: var(--bg); border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(91,76,219,0.15); border-color: var(--primary-light); }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; color: var(--primary-dark); }
.feature-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ===== How it works ===== */
.how-it-works { padding: 80px 0; }
.steps-flow {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; flex-wrap: wrap;
}
.step-item {
  display: flex; align-items: center; gap: 16px;
  background: #fff; padding: 24px; border-radius: 16px;
  box-shadow: var(--shadow); flex: 1; min-width: 220px; max-width: 300px;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}
.step-item:hover { transform: translateY(-4px); }
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(91,76,219,0.25);
}
.step-content h3 { font-size: 16px; margin-bottom: 4px; }
.step-content p { font-size: 13px; color: var(--text-light); line-height: 1.5; }
.step-arrow { font-size: 24px; color: var(--primary-light); font-weight: 300; }

/* ===== Templates Showcase ===== */
.templates-sec { padding: 80px 0; background: #fff; }
.template-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.showcase-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.showcase-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(91,76,219,0.12); }
.showcase-banner {
  height: 160px; background-size: cover; background-position: center;
  position: relative; display: flex; align-items: flex-end;
}
.showcase-banner-overlay {
  width: 100%; padding: 12px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff;
}
.showcase-banner-overlay h3 { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.showcase-banner-cat {
  display: inline-block; font-size: 10px; padding: 2px 8px;
  background: rgba(255,255,255,0.25); border-radius: 10px;
  margin-bottom: 4px; backdrop-filter: blur(4px);
}
.showcase-info { padding: 16px; }
.showcase-info h3 { font-size: 15px; margin-bottom: 4px; }
.showcase-info p { font-size: 12px; color: var(--text-light); }
.templates-cta { text-align: center; margin-top: 40px; }

/* ===== Pricing ===== */
.pricing { padding: 80px 0; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px; max-width: 900px; margin: 0 auto;
}
.pricing-card {
  background: #fff; border-radius: 16px; padding: 32px 24px;
  box-shadow: var(--shadow); text-align: center; position: relative;
  border: 2px solid var(--border); transition: transform 0.2s;
}
.pricing-card:hover { transform: translateY(-4px); border-color: var(--primary-light); }
.pricing-card.featured {
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(249,115,22,0.15);
}
.pricing-card.featured:hover { transform: scale(1.05) translateY(-4px); }
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 4px 16px;
  border-radius: 12px; font-size: 12px; font-weight: 600;
}
.pricing-name { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.pricing-price {
  font-size: 42px; font-weight: 800; color: var(--accent); margin-bottom: 24px;
}
.pricing-price span { font-size: 14px; color: var(--text-light); font-weight: 400; }
.pricing-features {
  list-style: none; text-align: left; margin-bottom: 24px;
}
.pricing-features li {
  padding: 8px 0; font-size: 14px; color: var(--text-light);
  border-bottom: 1px solid var(--border);
}
.btn-block { width: 100%; }

/* ===== CTA ===== */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #4338CA 0%, #6D5BD0 50%, #8B7FFF 100%);
  color: #fff; text-align: center;
  position: relative;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(249,115,22,0.2) 0%, transparent 50%);
  pointer-events: none;
}
.cta-inner h2 { font-size: 32px; margin-bottom: 12px; }
.cta-inner p { font-size: 16px; opacity: 0.85; margin-bottom: 32px; }
.cta-section .btn-primary {
  background: #fff; color: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.cta-section .btn-primary:hover { background: #f0f0f0; transform: translateY(-1px); }

/* ===== Footer ===== */
.footer { padding: 60px 0 0; background: #1a1a2e; color: #ccc; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-logo { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; display: flex; align-items: center; gap: 2px; }
.footer-logo .logo-icon {
  width: 28px; height: 28px; border-radius: 6px; font-size: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.footer-brand p { font-size: 13px; color: #888; }
.footer-links { display: flex; gap: 60px; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-col a {
  display: block; font-size: 13px; color: #888; text-decoration: none;
  margin-bottom: 8px; transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 40px; padding: 20px 0;
  border-top: 1px solid #2a2a3e; text-align: center;
  font-size: 13px; color: #666;
}

/* ===== App Section ===== */
.app-nav {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.app-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 50px;
}
.app-nav-title { font-size: 15px; font-weight: 600; color: var(--primary); }
.btn-back-home {
  background: none; border: none; color: var(--text-light);
  font-size: 13px; cursor: pointer;
}
.btn-back-home:hover { color: var(--primary); }

/* Steps */
.steps { background: #fff; border-bottom: 1px solid var(--border); padding: 14px 0; }
.step-bar { display: flex; justify-content: center; gap: 40px; }
.step {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-light); font-weight: 500;
}
.step span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--border); color: var(--text-light); font-size: 13px;
}
.step.active { color: var(--primary); }
.step.active span { background: var(--primary); color: #fff; }

/* Main */
.main { padding: 30px 0 60px; }
.section { display: none; }
.section.active { display: block; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.section-header h2 { font-size: 22px; }

/* Category Filter */
.category-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-btn {
  padding: 6px 16px; border: 1px solid var(--border); border-radius: 20px;
  background: #fff; color: var(--text-light); font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.cat-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.cat-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Template Grid */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.template-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}
.template-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(108,92,231,0.15); }
.template-card.selected { border-color: var(--primary); }
.template-preview {
  height: 160px;
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.template-info { padding: 16px; }
.template-info h3 { font-size: 16px; margin-bottom: 4px; }
.template-info .cat-tag {
  display: inline-block; font-size: 11px; color: var(--primary);
  background: rgba(108,92,231,0.08); padding: 2px 8px; border-radius: 4px;
}
.template-info p { font-size: 13px; color: var(--text-light); margin-top: 8px; line-height: 1.5; }
.template-info .components { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.template-info .comp-tag {
  font-size: 11px; padding: 2px 8px; background: var(--bg); border-radius: 4px; color: var(--text-light);
}

/* Step 2 */
.selected-template-info {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  margin-bottom: 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
}
.selected-template-info .st-icon { font-size: 36px; }
.selected-template-info .st-detail h3 { font-size: 16px; }
.selected-template-info .st-detail p { font-size: 13px; color: var(--text-light); margin-top: 4px; }

.input-area { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
#user-input {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 14px; font-size: 15px; line-height: 1.6; resize: vertical;
  font-family: inherit; transition: border-color 0.2s;
}
#user-input:focus { outline: none; border-color: var(--primary); }
.btn-generate {
  margin-top: 16px; width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--primary), #8B78FF);
  color: #fff; border: none; border-radius: 8px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: opacity 0.2s;
}
.btn-generate:hover { opacity: 0.9; }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }

/* Back Button */
.btn-back {
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--text-light); font-size: 13px; cursor: pointer;
}
.btn-back:hover { border-color: var(--primary); color: var(--primary); }

/* Step 3 */
.preview-actions { display: flex; gap: 8px; }
.btn-phone {
  padding: 8px 16px; border: 1px solid var(--primary); border-radius: 8px;
  background: var(--primary); color: #fff; font-size: 13px; cursor: pointer;
}

/* Phone Frame */
.preview-container { display: flex; justify-content: center; margin-bottom: 30px; }
.phone-frame {
  width: 375px; height: 667px; background: #fff;
  border-radius: 36px; box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  overflow: hidden; position: relative; border: 8px solid #1a1a1a;
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 24px; background: #1a1a1a; border-radius: 0 0 14px 14px; z-index: 10;
}
#preview-iframe { width: 100%; height: 100%; border: none; }

/* Code Section */
.code-section {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.code-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #f5f5f5; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
}
.btn-copy {
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; font-size: 12px; cursor: pointer;
}
#code-output {
  padding: 16px; max-height: 400px; overflow: auto;
  font-size: 12px; line-height: 1.6; font-family: "Fira Code", monospace;
  background: #1e1e2e; color: #cdd6f4; white-space: pre-wrap; word-break: break-all;
}

/* Modal */
.modal {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 100; align-items: center; justify-content: center;
}
.modal.show { display: flex; }
.modal-content {
  background: #fff; border-radius: 16px; padding: 32px; text-align: center;
  position: relative; min-width: 280px;
}
.modal-close {
  position: absolute; top: 12px; right: 16px; font-size: 24px;
  background: none; border: none; cursor: pointer; color: var(--text-light);
}
#qr-code { margin: 20px 0; }
.qr-tip { font-size: 13px; color: var(--text-light); }

/* Loading */
.loading-overlay {
  display: none; position: fixed; inset: 0; background: rgba(255,255,255,0.9);
  z-index: 200; align-items: center; justify-content: center;
}
.loading-overlay.show { display: flex; }
.loading-spinner { text-align: center; }
.spinner {
  width: 48px; height: 48px; border: 4px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-tip { font-size: 13px; color: var(--text-light); margin-top: 8px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-btn { display: block; }
  .nav-mobile.open { display: flex; }
  .hero-title { font-size: 32px; }
  .hero { padding: 110px 0 60px; }
  .hero-stats { gap: 24px; }
  .stat strong { font-size: 22px; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps-flow { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  .pricing-card.featured:hover { transform: translateY(-4px); }
  .template-grid { grid-template-columns: 1fr; }
  .phone-frame { width: 100%; height: 500px; border-radius: 0; border: none; }
  .footer-inner { flex-direction: column; }
  .footer-links { gap: 30px; }
}

/* ===== Login Modal ===== */
.modal-login {
  max-width: 400px; width: 90%;
}
.login-tabs {
  display: flex; gap: 0; margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.login-tab {
  flex: 1; padding: 12px 0; background: none; border: none;
  font-size: 16px; font-weight: 600; color: var(--text-light);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.2s;
}
.login-tab.active {
  color: var(--primary); border-bottom-color: var(--primary);
}
.login-input-group {
  display: flex; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; margin-bottom: 16px;
}
.login-prefix {
  padding: 12px 14px; background: #f5f5f5; font-size: 14px;
  color: var(--text-light); border-right: 1px solid var(--border);
}
.login-input-group input {
  flex: 1; border: none; padding: 12px; font-size: 15px;
  outline: none; font-family: inherit;
}
.login-tip { font-size: 11px; color: #aaa; margin-top: 16px; text-align: center; }

/* ===== User Menu ===== */
.user-menu { position: relative; }
.btn-user {
  background: none; border: 1px solid var(--border); border-radius: 20px;
  padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--text);
  display: flex; align-items: center; gap: 4px;
}
.btn-user:hover { border-color: var(--primary); color: var(--primary); }
.user-dropdown {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 6px;
  background: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  min-width: 120px; overflow: hidden; z-index: 30;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
  display: block; padding: 10px 16px; font-size: 13px; color: var(--text);
  text-decoration: none; transition: background 0.15s;
}
.user-dropdown a:hover { background: var(--bg); color: var(--primary); }

/* ===== Profile Page ===== */
.profile-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 16px; padding: 24px; box-shadow: var(--shadow);
  margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.profile-info { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8B78FF);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff;
}
.profile-detail h2 { font-size: 18px; }
.profile-detail p { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.profile-credits { text-align: center; }
.credits-label { display: block; font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.credits-num {
  font-size: 36px; font-weight: 800; color: var(--primary);
}

.profile-tabs {
  display: flex; gap: 8px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.tab-btn {
  padding: 10px 20px; background: none; border: none;
  font-size: 14px; color: var(--text-light); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.2s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Generate Action */
.generate-action { margin-bottom: 20px; }
.generate-action .btn-primary { font-size: 16px; padding: 14px; }

/* History List */
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
  background: #fff; border-radius: 12px; padding: 16px 20px;
  box-shadow: var(--shadow); display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.history-main { flex: 1; min-width: 0; }
.history-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.history-desc {
  font-size: 13px; color: var(--text-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-time { font-size: 12px; color: #aaa; margin-top: 4px; }
.history-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.history-status {
  font-size: 12px; padding: 3px 10px; border-radius: 10px;
}
.status-generating { background: #FFF3E0; color: #E65100; }
.status-done { background: #E8F5E9; color: #2E7D32; }
.status-failed { background: #FFEBEE; color: #C62828; }
.btn-link {
  background: none; border: none; color: var(--primary);
  font-size: 12px; cursor: pointer; text-decoration: none;
  padding: 0;
}
.btn-link:hover { text-decoration: underline; }

.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-light); font-size: 14px;
}

/* Settings */
.settings-form {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: var(--shadow); max-width: 400px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit;
}
.form-group input:focus { outline: none; border-color: var(--primary); }

/* ===== Template Detail Modal ===== */
.modal-detail {
  max-width: 520px; width: 92%; max-height: 85vh; overflow-y: auto;
  padding: 0;
}
.detail-header {
  padding: 24px 24px 16px;
}
.detail-cat-tag {
  display: inline-block; font-size: 11px; color: var(--primary);
  background: rgba(91,76,219,0.08); padding: 3px 10px; border-radius: 10px;
  margin-bottom: 8px;
}
.detail-header h2 { font-size: 22px; margin-bottom: 8px; }
.detail-header p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

.detail-previews {
  padding: 0 24px; display: flex; gap: 10px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; padding-bottom: 4px;
}
.detail-previews::-webkit-scrollbar { height: 4px; }
.detail-previews::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.detail-preview-img {
  width: 140px; height: 248px; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--border);
  flex-shrink: 0;
}

.detail-components {
  padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 6px;
}
.detail-comp-tag {
  font-size: 12px; padding: 4px 12px; background: var(--bg);
  border-radius: 6px; color: var(--text-light); border: 1px solid var(--border);
}

.detail-footer {
  padding: 16px 24px 24px; display: flex; gap: 12px;
}
.detail-footer .btn-primary { flex: 1; }
.detail-footer .btn-outline { flex: 0; padding: 14px 24px; }

/* ===== Mock Phone Previews ===== */
.detail-previews-frames {
  padding: 0 24px; display: flex; gap: 14px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; padding-bottom: 8px;
}
.detail-previews-frames::-webkit-scrollbar { height: 4px; }
.detail-previews-frames::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.mock-phone-frame {
  width: 180px; height: 320px; border-radius: 20px;
  border: 3px solid #1a1a1a; background: #fff;
  overflow: hidden; flex-shrink: 0; position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
/* Mock phone inner styles */
.mock-phone { width: 100%; height: 100%; position: relative; overflow: hidden; font-family: -apple-system, sans-serif; background: #fff; }
.mock-statusbar { height: 22px; padding: 4px 12px; font-size: 10px; font-weight: 600; color: #333; display: flex; align-items: center; }
.mock-search { margin: 6px 8px; padding: 6px 10px; background: #f5f5f5; border-radius: 6px; font-size: 10px; color: #aaa; }
.mock-banner { height: 80px; margin: 6px 8px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 700; text-align: center; line-height: 1.3; }
.mock-nav-row { display: flex; justify-content: space-around; padding: 8px; }
.mock-nav-item { text-align: center; font-size: 9px; color: #666; }
.mock-icon { width: 32px; height: 32px; background: #f5f5f5; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; margin: 0 auto 3px; }
.mock-section-title { padding: 6px 10px; font-size: 12px; font-weight: 700; color: #333; }
.mock-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 8px; }
.mock-product { border: 1px solid #f0f0f0; border-radius: 6px; overflow: hidden; }
.mock-img { height: 60px; background: #f0f0f0; }
.mock-text { font-size: 11px; color: #333; }
.mock-text-sm { font-size: 10px; color: #333; padding: 4px 6px; }
.mock-price { font-size: 11px; color: #E74C3C; font-weight: 700; padding: 0 6px 4px; }
.mock-tag { font-size: 8px; padding: 1px 4px; background: #FFF0E0; color: #FF6B35; border-radius: 3px; }
.mock-tabbar { position: absolute; bottom: 0; left: 0; right: 0; display: flex; background: #fff; border-top: 1px solid #eee; padding: 6px 0 4px; }
.mock-tab { flex: 1; text-align: center; font-size: 14px; color: #aaa; }
.mock-tab.active { color: #FF6B35; }

/* ===== 用户作品展示墙 ===== */
.showcase-sec {
  padding: 80px 0;
  background: linear-gradient(180deg, #fff 0%, #f9f9ff 100%);
}
.showcase-sec .section-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.showcase-sec .section-title {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}
.showcase-sec .section-more-link {
  color: #6C5CE7;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.showcase-sec .section-more-link:hover { text-decoration: underline; }
.showcase-sec .section-subtitle {
  color: #666;
  font-size: 15px;
  margin: 0 0 32px;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

/* 静态展示卡片：手机壳 + mock 页面 */
.user-showcase-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid #f0f0f5;
}
.user-showcase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(108, 92, 231, 0.18);
  border-color: rgba(108, 92, 231, 0.3);
}
.user-showcase-phone {
  background: linear-gradient(180deg, #f8f8fc 0%, #eeeef8 100%);
  padding: 16px 12px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.user-showcase-screen {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 9 / 16;
  background: #fff;
  border-radius: 18px;
  border: 4px solid #1a1a1a;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transform: scale(0.78);
  transform-origin: center center;
  margin: -34px 0;
}
/* 让 mock-phone 占满屏幕 */
.user-showcase-screen .mock-phone {
  position: absolute;
  inset: 0;
  font-size: 0.78em;
}
.user-showcase-meta {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f0f0f5;
  background: #fff;
}
.user-showcase-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-showcase-date {
  font-size: 11px;
  color: #999;
  margin-left: 8px;
  flex-shrink: 0;
}
.showcase-more {
  text-align: center;
  margin-top: 16px;
}

.showcase-skeleton {
  background: #f0f0f0;
  border-radius: 8px;
}

@media (max-width: 600px) {
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .user-showcase-phone { min-height: 220px; padding: 10px 8px 8px; }
  .user-showcase-screen { max-width: 130px; }
}

/* ===================================================
   留言咨询（线索收集）  2026-08-10
   =================================================== */
.gb-sec { padding: 72px 0; background: linear-gradient(180deg,#FFFFFF 0%,#F0EEFF 100%); }
.gb-head { text-align: center; margin-bottom: 38px; }
.gb-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(249,115,22,.12); color: #C2410C;
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; margin-bottom: 14px;
}
.gb-grid { display: grid; grid-template-columns: 340px 1fr; gap: 26px; align-items: stretch; }

.gb-why {
  background: linear-gradient(160deg, var(--primary) 0%, #4338CA 100%);
  border-radius: 16px; padding: 30px 26px; color: #fff;
  display: flex; flex-direction: column;
}
.gb-why h3 { font-size: 18px; font-weight: 800; margin-bottom: 7px; }
.gb-why .sub { font-size: 13px; opacity: .8; margin-bottom: 22px; line-height: 1.7; }
.gb-why ul { list-style: none; }
.gb-why li {
  font-size: 14px; padding: 11px 0; display: flex; gap: 10px;
  align-items: flex-start; border-bottom: 1px solid rgba(255,255,255,.13);
}
.gb-why li:last-child { border-bottom: none; }
.gb-why li .ic { flex-shrink: 0; font-size: 15px; }
.gb-why li b { font-weight: 700; }
.gb-why li span.d { display: block; font-size: 12px; opacity: .72; margin-top: 2px; }
.gb-privacy {
  margin-top: auto; padding: 13px 14px; background: rgba(255,255,255,.13);
  border-radius: 10px; font-size: 12.5px; line-height: 1.75;
}
.gb-privacy b.t { display: block; margin-bottom: 3px; }

.gb-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; box-shadow: var(--shadow);
}
.gb-card-title { font-size: 17px; font-weight: 800; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.gb-card-sub { font-size: 12.5px; color: var(--text-light); margin-bottom: 22px; }

.gb-field { margin-bottom: 17px; }
.gb-label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 8px; }
.gb-label .opt { color: var(--text-light); font-weight: 400; font-size: 12px; }
.gb-label .req { color: var(--accent); margin-left: 2px; }

.gb-quick { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.gb-chip {
  padding: 6px 12px; border: 1.5px solid var(--border); background: #FCFCFF;
  border-radius: 18px; font-size: 12.5px; color: var(--text-light);
  cursor: pointer; font-family: inherit; transition: all .16s;
}
.gb-chip:hover { border-color: var(--primary-light); color: var(--primary); }
.gb-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

.gb-input, .gb-textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid var(--border);
  border-radius: 10px; font-family: inherit; font-size: 14px;
  background: #FCFCFF; transition: border-color .18s;
}
.gb-textarea { min-height: 92px; resize: vertical; line-height: 1.7; }
.gb-input:focus, .gb-textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
.gb-input.bad, .gb-textarea.bad { border-color: var(--danger); background: #FEF2F2; }
.gb-count { text-align: right; font-size: 11.5px; color: var(--text-light); margin-top: 5px; }
.gb-err { font-size: 12px; color: var(--danger); margin-top: 6px; display: none; }
.gb-err.show { display: block; }
.gb-honeypot { position: absolute !important; left: -9999px !important; opacity: 0 !important; }

.gb-contact-row { display: flex; gap: 9px; }
.gb-ctype { display: flex; background: var(--bg); border-radius: 10px; padding: 3px; flex-shrink: 0; }
.gb-ctype button {
  padding: 8px 11px; border: none; background: transparent; cursor: pointer;
  border-radius: 8px; font-family: inherit; font-size: 12.5px; color: var(--text-light);
  display: flex; align-items: center; gap: 4px; transition: all .16s;
}
.gb-ctype button.on { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.gb-contact-row .gb-input { flex: 1; }

.gb-submit {
  width: 100%; padding: 15px; margin-top: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #EA580C 100%);
  color: #fff; border: none; border-radius: 11px;
  font-size: 15.5px; font-weight: 800; font-family: inherit; cursor: pointer;
  transition: opacity .2s, transform .1s; box-shadow: 0 4px 14px rgba(249,115,22,.32);
}
.gb-submit:hover:not(:disabled) { opacity: .93; }
.gb-submit:active:not(:disabled) { transform: scale(.99); }
.gb-submit:disabled { opacity: .6; cursor: not-allowed; }
.gb-note { font-size: 11.5px; color: var(--text-light); text-align: center; margin-top: 12px; line-height: 1.7; }

.gb-done { text-align: center; padding: 34px 20px; display: none; }
.gb-done.show { display: block; }
.gb-done .ic { font-size: 52px; margin-bottom: 14px; }
.gb-done h3 { font-size: 19px; font-weight: 800; margin-bottom: 9px; }
.gb-done p { font-size: 13.5px; color: var(--text-light); line-height: 1.9; }
.gb-done .again {
  margin-top: 20px; padding: 10px 20px; background: #fff; border: 1.5px solid var(--border);
  border-radius: 9px; font-family: inherit; font-size: 13.5px; cursor: pointer; color: var(--text);
}

.gb-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  display: flex; align-items: center; height: 56px; padding: 0 17px;
  background: linear-gradient(135deg, var(--accent), #EA580C);
  color: #fff; border: none; border-radius: 28px; cursor: pointer;
  box-shadow: 0 6px 22px rgba(249,115,22,.45);
  font-family: inherit; font-size: 14.5px; font-weight: 800;
  opacity: 0; visibility: hidden;
  transition: box-shadow .2s, transform .15s, opacity .3s, visibility .3s;
}
.gb-fab.show { opacity: 1; visibility: visible; }
.gb-fab:hover { box-shadow: 0 9px 30px rgba(249,115,22,.6); transform: translateY(-2px); }
.gb-fab .fab-icon { font-size: 22px; line-height: 1; margin-right: 8px; }
.gb-fab .fab-pulse {
  position: absolute; inset: 0; border-radius: 28px;
  border: 2px solid rgba(249,115,22,.5); animation: gbPulse 2s infinite;
}
@keyframes gbPulse {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.28); opacity: 0; }
}
.nav-links a.nav-gb { color: var(--accent); font-weight: 800; cursor: pointer; }
.nav-mobile a.nav-gb { color: var(--accent); font-weight: 800; }

.gb-toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px);
  background: rgba(26,26,46,.94); color: #fff; padding: 13px 22px;
  border-radius: 11px; font-size: 14px; z-index: 200; max-width: 86%; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.gb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .gb-grid { grid-template-columns: 1fr; }
  .gb-sec { padding: 48px 0; }
  .gb-fab { right: 16px; bottom: 16px; height: 50px; padding: 0 14px; font-size: 13.5px; }
  .gb-contact-row { flex-direction: column; }
  .gb-ctype { width: 100%; }
  .gb-ctype button { flex: 1; justify-content: center; }
}
