/* 养老宝典 - 纯移动端共享样式 */
:root {
  --primary: #E8733A;
  --primary-light: #F4A574;
  --primary-dark: #C55A28;
  --secondary: #2C4A6E;
  --secondary-light: #3D6A9E;
  --bg: #F5F5F5;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --text-light: #8C8C8C;
  --border: #ECECEC;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Header */
.header {
  background: var(--secondary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header .logo {
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}
.header .logo-icon {
  width: 30px; height: 30px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.header .header-title {
  font-size: 14px;
  opacity: 0.8;
}

/* Bottom Tab Bar */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: white;
  display: flex;
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 6px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 10px;
  gap: 2px;
  transition: color 0.2s;
}
.tab-item .tab-icon { font-size: 20px; }
.tab-item.active { color: var(--primary); }
.tab-item:active { opacity: 0.7; }

/* Container */
.container { padding: 0 16px; }

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 16px; }

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
  width: 100%;
}
.btn:active { opacity: 0.7; }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: var(--secondary); color: white; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-ghost { background: var(--bg); color: var(--text); }
.btn-sm { padding: 10px 16px; font-size: 14px; border-radius: 8px; }
.btn-danger { background: var(--danger); color: white; }

/* Tags */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.tag-primary { background: #FFF0E8; color: var(--primary); }
.tag-secondary { background: #E8F0FA; color: var(--secondary); }
.tag-success { background: #E8F8F0; color: var(--success); }
.tag-warning { background: #FEF3C7; color: #D97706; }

/* Section titles */
.section-title {
  font-size: 18px;
  font-weight: 700;
  padding: 16px 0 10px;
}
.section-subtitle { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }

/* Stars */
.stars { color: #FBBF24; font-size: 13px; }
.stars .dim { color: #D1D5DB; }

/* Form */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.radio-group, .checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-item, .checkbox-item {
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
  user-select: none;
}
.radio-item:active, .checkbox-item:active { transform: scale(0.97); }
.radio-item.selected, .checkbox-item.selected {
  border-color: var(--primary);
  background: #FFF5EF;
  color: var(--primary);
  font-weight: 600;
}

select, input[type="text"], input[type="number"], input[type="tel"], input[type="date"] {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: white;
  -webkit-appearance: none;
}
select:focus, input:focus { outline: none; border-color: var(--primary); }

/* Placeholder images */
.placeholder-img {
  background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
}

/* Back */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  padding: 12px 0;
}
.back-link:active { color: var(--primary); }

/* Price */
.price { color: var(--primary); font-weight: 700; }
.price-big { font-size: 28px; }
.price-unit { font-size: 14px; font-weight: 400; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.25s ease; }

/* Safe bottom padding for tab bar */
.safe-bottom { padding-bottom: calc(70px + var(--safe-bottom)); }

/* Premium tier badge */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.premium-badge.gold { background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: #92400E; }
.premium-badge.silver { background: linear-gradient(135deg, #F3F4F6, #E5E7EB); color: #4B5563; }
.premium-badge.bronze { background: linear-gradient(135deg, #FED7AA, #FDBA74); color: #9A3412; }

/* Gift card style */
.gift-card {
  background: linear-gradient(135deg, var(--secondary) 0%, #1a3550 100%);
  color: white;
  border-radius: var(--radius);
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}
.gift-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(232,115,58,0.2) 0%, transparent 70%);
}
.gift-card::after {
  content: '🎁';
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
}
