/* ============================================
   蓉蓉子个人品牌网站 — 移动端优先样式表
   品牌色：深海黑蓝 #0F172A | 电光蓝 #3B82F6 | 琥珀金 #F59E0B
   霜白 #F8FAFC | 炭灰 #1E293B
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --deep-sea: #0F172A;
  --electric-blue: #3B82F6;
  --amber-gold: #F59E0B;
  --frost-white: #F8FAFC;
  --charcoal: #1E293B;
  --text-muted: #64748B;
  --border-light: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Noto Sans SC', 'PingFang SC', sans-serif;
  color: var(--charcoal);
  background: var(--frost-white);
  line-height: 1.7;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Container ---- */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--deep-sea);
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }

p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
}

.text-center { text-align: center; }
.text-white { color: #fff; }
.text-amber { color: var(--amber-gold); }
.text-blue { color: var(--electric-blue); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--amber-gold);
  color: var(--deep-sea);
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

.btn-primary:hover {
  background: #E8910A;
  box-shadow: 0 4px 16px rgba(245,158,11,0.4);
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--charcoal);
  color: var(--charcoal);
}

.btn-secondary:hover {
  background: var(--charcoal);
  color: #fff;
}

.btn-blue {
  background: var(--electric-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.btn-blue:hover {
  background: #2563EB;
  box-shadow: 0 4px 16px rgba(59,130,246,0.4);
}

.btn-outline-blue {
  background: transparent;
  border: 1.5px solid var(--electric-blue);
  color: var(--electric-blue);
}

.btn-outline-blue:hover {
  background: var(--electric-blue);
  color: #fff;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- Cards ---- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-highlight {
  border: 2px solid var(--amber-gold);
  position: relative;
}

.card-highlight::before {
  content: '推荐';
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--amber-gold);
  color: var(--deep-sea);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* ---- Section Styles ---- */
.section {
  padding: 56px 0;
}

.section-dark {
  background: var(--deep-sea);
  color: #fff;
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-dark p {
  color: rgba(255,255,255,0.7);
}

.section-light {
  background: var(--frost-white);
}

.section-white {
  background: #fff;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--electric-blue);
  margin-bottom: 12px;
  display: block;
}

.section-label-amber {
  color: var(--amber-gold);
}

/* ---- Hero Section ---- */
.hero {
  min-height: 100vh;
  background: var(--deep-sea);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 20px 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 100%;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 32px;
}

.hero h1 {
  font-size: 32px;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.25;
}

.hero .subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.hero-stat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

.hero-stat .icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.hero-footer {
  margin-top: 48px;
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}

/* ---- About Section ---- */
.about-photo {
  width: 200px;
  height: 260px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  object-position: top center;
  margin: 0 auto 28px;
  border: 3px solid var(--frost-white);
  box-shadow: var(--shadow-md);
}

.principles {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.principle {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.principle-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.principle-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--deep-sea);
  margin-bottom: 4px;
}

.principle-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.quote {
  margin-top: 32px;
  padding: 20px;
  background: var(--deep-sea);
  border-radius: var(--radius-md);
  text-align: center;
}

.quote p {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  font-style: italic;
  line-height: 1.5;
}

/* ---- Products Section ---- */
.products-intro {
  text-align: center;
  margin-bottom: 32px;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.product-icon {
  font-size: 28px;
}

.product-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--deep-sea);
}

.product-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: auto;
}

.badge-free {
  background: #DCFCE7;
  color: #166534;
}

.badge-paid {
  background: #FEF3C7;
  color: #92400E;
}

.badge-premium {
  background: #DBEAFE;
  color: #1E40AF;
}

.badge-vip {
  background: var(--deep-sea);
  color: var(--amber-gold);
}

.product-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

.product-features {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-left: 0;
  list-style: none;
}

.product-features li {
  padding: 3px 0;
  padding-left: 18px;
  position: relative;
}

.product-features li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--electric-blue);
  font-weight: bold;
}

.product-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--deep-sea);
  margin-bottom: 16px;
}

.product-price .unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ---- Diagnosis Section ---- */
.diagnosis-hero {
  background: var(--deep-sea);
  padding: 60px 20px 40px;
  text-align: center;
  position: relative;
}

.diagnosis-hero .icon-big {
  font-size: 56px;
  margin-bottom: 20px;
}

.diagnosis-hero h2 {
  color: #fff;
  font-size: 26px;
  margin-bottom: 12px;
}

.diagnosis-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 16px;
}

.diagnosis-hero .count {
  margin-top: 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

/* ---- Diagnosis Flow ---- */
.diagnosis-flow {
  min-height: 100vh;
  background: var(--frost-white);
  display: none;
  flex-direction: column;
}

.diagnosis-flow.active {
  display: flex;
}

.diagnosis-header {
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diagnosis-progress {
  flex: 1;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin-right: 16px;
  overflow: hidden;
}

.diagnosis-progress-fill {
  height: 100%;
  background: var(--electric-blue);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.diagnosis-step {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.diagnosis-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px 80px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.question-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--deep-sea);
  margin-bottom: 28px;
  line-height: 1.4;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  margin-bottom: 0;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 15px;
  text-align: left;
  background: #fff;
  color: var(--charcoal);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.5;
}

.option-btn:hover {
  border-color: var(--electric-blue);
  background: #EFF6FF;
}

.option-btn:active {
  transform: scale(0.98);
  background: #DBEAFE;
  border-color: var(--electric-blue);
}

.skip-btn {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 100%;
}

.skip-btn:hover {
  color: var(--electric-blue);
}

/* ---- Diagnosis Result ---- */
.result-screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: var(--frost-white);
}

.result-screen.active {
  display: flex;
}

.result-header {
  padding: 20px;
  text-align: center;
  background: var(--deep-sea);
}

.result-header h3 {
  color: #fff;
  font-size: 20px;
}

.result-body {
  flex: 1;
  padding: 24px 20px 100px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.result-stage {
  text-align: center;
  margin-bottom: 28px;
}

.result-stage-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.result-stage-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--deep-sea);
  margin-bottom: 8px;
}

.result-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.result-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--electric-blue);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result-card p {
  font-size: 16px;
  color: var(--charcoal);
  line-height: 1.7;
}

.result-recommend {
  background: var(--deep-sea);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 20px;
  text-align: center;
}

.result-recommend h4 {
  color: var(--amber-gold);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.result-recommend .product-name {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.result-recommend .product-price {
  color: var(--amber-gold);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-recommend .product-desc {
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  margin-bottom: 20px;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.result-footer {
  text-align: center;
  margin-top: 24px;
}

.result-footer p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.result-footer .secondary-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.result-footer .secondary-actions a {
  font-size: 14px;
  color: var(--electric-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Product Detail Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--frost-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--charcoal);
}

.modal-content h3 {
  font-size: 20px;
  margin-bottom: 20px;
  padding-right: 32px;
}

/* ---- Contact Section ---- */
.contact-qr {
  width: 180px;
  height: 180px;
  background: #fff;
  border-radius: var(--radius-md);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.contact-qr-placeholder {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.contact-note {
  background: #FEF3C7;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  color: #92400E;
  margin-bottom: 24px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  color: var(--charcoal);
  transition: var(--transition);
}

.contact-link:hover {
  box-shadow: var(--shadow-md);
}

.contact-link .icon {
  font-size: 20px;
}

/* ---- Bottom Navigation ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  -webkit-appearance: none;
}

.bottom-nav-item .icon {
  font-size: 22px;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--electric-blue);
}

/* ---- Top Header (for desktop) ---- */
.top-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  padding: 0 24px;
}

.top-header-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.top-header .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--deep-sea);
}

.top-header nav {
  display: flex;
  gap: 24px;
}

.top-header nav a {
  font-size: 14px;
  color: var(--charcoal);
  font-weight: 500;
  transition: var(--transition);
}

.top-header nav a:hover {
  color: var(--electric-blue);
}

/* ---- Utility ---- */
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }

.pt-80 { padding-top: 80px; }
.pb-100 { padding-bottom: 100px; }

.hidden { display: none !important; }

/* ---- Page Transitions ---- */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

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

/* ---- Scroll padding for fixed nav ---- */
html {
  scroll-padding-bottom: 80px;
}

/* ============================================
   RESPONSIVE — Tablet & Desktop
   ============================================ */

@media (min-width: 768px) {
  .container {
    max-width: 680px;
  }

  .container-wide {
    max-width: 720px;
  }

  h1 { font-size: 36px; }
  h2 { font-size: 30px; }

  .hero h1 {
    font-size: 40px;
  }

  .hero {
    padding: 100px 40px 120px;
  }

  .btn-group {
    flex-direction: row;
    gap: 16px;
  }

  .btn {
    width: auto;
    min-width: 200px;
  }

  .product-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .principles {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .principle {
    flex: 1;
    min-width: 280px;
  }

  .modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .modal-content {
    border-radius: var(--radius-xl);
    max-height: 70vh;
  }

  .bottom-nav {
    display: none;
  }

  .top-header {
    display: block;
  }

  .page {
    padding-top: 56px;
  }

  .diagnosis-flow,
  .result-screen {
    padding-top: 56px;
  }

  .diagnosis-body,
  .result-body {
    max-width: 560px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 800px;
  }

  .container-wide {
    max-width: 840px;
  }

  .hero h1 {
    font-size: 48px;
  }
}

/* ---- Print styles ---- */
@media print {
  .bottom-nav,
  .top-header {
    display: none;
  }
}
