/* ===== FateNow - 全局样式 ===== */

:root {
  --bg-primary: #0a0a1a;
  --bg-card: #141428;
  --bg-glass: rgba(255,255,255,0.04);
  --accent-gold: #d4a574;
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --text-primary: #f0e6d6;
  --text-secondary: #8b8ba0;
  --text-warn: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --phone-width: 393px;
  --phone-height: 852px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ===== 星空背景 ===== */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.starfield .star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle var(--dur) ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.1; }
  100% { opacity: var(--max-o, 0.8); }
}

/* ===== iPhone 模拟框 ===== */
.iphone-frame {
  position: relative;
  z-index: 1;
  width: var(--phone-width);
  height: var(--phone-height);
  background: #000;
  border-radius: 55px;
  padding: 12px;
  box-shadow:
    0 0 0 2px #333,
    0 0 0 4px #1a1a2e,
    0 25px 80px rgba(0,0,0,0.6),
    0 0 120px rgba(139,92,246,0.08);
}

.iphone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  border-radius: 44px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 36px;
  background: #000;
  border-radius: 20px;
  z-index: 100;
}

/* 状态栏 */
.status-bar {
  height: 54px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 28px 6px;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.status-bar .time { font-size: 15px; font-weight: 700; }
.status-bar .icons { display: flex; gap: 5px; font-size: 12px; }

/* 内容区域 */
#app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#app-content::-webkit-scrollbar { display: none; }

/* Home Indicator */
.home-indicator {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-indicator-bar {
  width: 134px;
  height: 5px;
  background: var(--text-secondary);
  border-radius: 3px;
  opacity: 0.3;
}

/* 底部导航 */
#bottom-nav {
  display: none;
  height: 56px;
  background: rgba(10,10,26,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-item.active { color: var(--accent-gold); }
.nav-icon { font-size: 19px; }
.nav-label { font-size: 9.5px; letter-spacing: 0.2px; white-space: nowrap; }

/* ===== 启动页 ===== */
.splash-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  animation: fadeIn 0.8s ease;
}

.splash-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(139,92,246,0.15), transparent 70%);
}

.splash-content {
  text-align: center;
  z-index: 1;
  animation: floatUp 1.2s ease;
}

.splash-logo {
  font-size: 60px;
  color: var(--accent-gold);
  margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}

.splash-title {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: 6px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.splash-sub {
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 4px;
}

/* ===== 输入页 ===== */
.input-page {
  padding: 20px;
  animation: fadeIn 0.5s ease;
}

.input-header {
  text-align: center;
  padding: 30px 0 24px;
}

.input-logo {
  font-size: 28px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.input-header h2 {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.input-header p {
  color: var(--text-secondary);
  font-size: 13px;
}

.input-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-form.compact { gap: 14px; }

.form-group {
  position: relative;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-glass);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-gold);
}

.form-group label {
  position: absolute;
  left: 16px;
  top: 14px;
  color: var(--text-secondary);
  font-size: 14px;
  pointer-events: none;
  transition: all 0.2s ease;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: -8px;
  left: 12px;
  font-size: 11px;
  color: var(--accent-gold);
  background: var(--bg-primary);
  padding: 0 4px;
}

/* select 永远浮动 label，因为 select 总有可见文字 */
.form-group .select-label {
  top: -8px;
  left: 12px;
  font-size: 11px;
  color: var(--accent-gold);
  background: var(--bg-primary);
  padding: 0 4px;
}

/* 卡片内表单 label 背景适配 */
.card .form-group .select-label,
.card .form-group input:focus + label,
.card .form-group input:not(:placeholder-shown) + label {
  background: var(--bg-card);
}

/* date/time 输入总是有值 */
.form-group input[type="date"] + label,
.form-group input[type="time"] + label {
  top: -8px;
  left: 12px;
  font-size: 11px;
  color: var(--accent-gold);
  background: var(--bg-primary);
  padding: 0 4px;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ===== 城市搜索下拉 ===== */
.city-search-group {
  position: relative;
}

.city-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid rgba(212,165,116,0.3);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-gold) transparent;
}

.city-dropdown.show {
  display: block;
}

.city-dropdown-item {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.city-dropdown-item:last-child {
  border-bottom: none;
}

.city-dropdown-item:hover,
.city-dropdown-item.active {
  background: rgba(212,165,116,0.12);
  color: var(--accent-gold);
}

.city-dropdown-item .city-item-en {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.city-dropdown-empty,
.city-dropdown-loading {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.city-dropdown-loading {
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
  opacity: 0.7;
}

.city-dropdown::-webkit-scrollbar {
  width: 4px;
}

.city-dropdown::-webkit-scrollbar-thumb {
  background: rgba(212,165,116,0.3);
  border-radius: 2px;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-gold), #c4915a);
  border: none;
  border-radius: var(--radius-sm);
  color: #0a0a1a;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 1px;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 8px;
}

.btn-primary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* ===== 加载页 ===== */
.loading-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.loading-spinner {
  width: 120px;
  height: 120px;
  animation: spinSlow 3s linear infinite;
}

.loading-chart { width: 100%; height: 100%; }

.loading-text {
  margin-top: 24px;
  font-size: 15px;
  color: var(--text-secondary);
}

.loading-text strong { color: var(--accent-gold); }

.loading-dots {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.loading-dots span {
  font-size: 24px;
  color: var(--accent-gold);
  animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ===== 档案页 ===== */
.profile-page { padding: 0 0 16px; animation: fadeIn 0.5s ease; }

.profile-tabs {
  display: flex;
  background: var(--bg-card);
  padding: 4px;
  margin: 8px 16px;
  border-radius: var(--radius-sm);
  gap: 4px;
}

.tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active {
  background: rgba(212,165,116,0.15);
  color: var(--accent-gold);
}

.profile-section { padding: 8px 16px; }

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

.profile-sign-big { font-size: 42px; }
.profile-name-header h3 { font-size: 18px; font-weight: 500; }
.profile-name-header .sub { color: var(--text-secondary); font-size: 13px; }

/* 顶栏名字可点击切换 */
.profile-top-name-btn {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 0;
  flex: 1;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.switch-arrow-icon {
  font-size: 13px;
  opacity: 0.6;
}

.switch-modal .paywall-title { margin-bottom: 12px; }
.switch-modal { padding: 24px 16px; }

/* 输入页返回栏 */
.input-back-bar {
  padding: 8px 4px 0;
}

.switch-list {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
}

.switch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.switch-item:last-child { border-bottom: none; }

.switch-item:active { background: rgba(255,255,255,0.04); }

.switch-current {
  background: rgba(212,165,116,0.08);
}

.switch-emoji {
  font-size: 22px;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}

.switch-name {
  font-size: 15px;
  font-weight: 500;
}

.switch-info {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: auto;
}

.switch-badge {
  font-size: 10px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
}

.switch-add {
  color: var(--accent-gold);
}

.switch-add .switch-emoji {
  font-size: 18px;
  color: var(--accent-gold);
}

/* 星座网格 */
.astro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.astro-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.04);
}

.astro-icon { font-size: 18px; width: 24px; text-align: center; }
.astro-label { color: var(--text-secondary); font-size: 12px; }
.astro-value { margin-left: auto; font-size: 13px; font-weight: 500; }

/* 卡片 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.04);
}

.card h4 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--accent-gold);
}

/* 星盘 SVG */
.chart-svg { width: 100%; max-width: 300px; display: block; margin: 0 auto; }

/* 五行圆形图 */
.wuxing-svg {
  width: 100%;
  max-width: 300px;
  display: block;
  margin: 0 auto 8px;
}

.wuxing-summary {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
}

.wuxing-summary strong { font-weight: 600; }
.text-warn { color: var(--text-warn); }

/* 五行色 */
.wx-金 { color: #C0C0C0; }
.wx-木 { color: #4CAF50; }
.wx-水 { color: #2196F3; }
.wx-火 { color: #FF5722; }
.wx-土 { color: #FF9800; }

/* 八字柱 */
.bazi-pillars {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.bazi-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.06);
  min-width: 68px;
}

.pillar-label { font-size: 11px; color: var(--text-secondary); }
.pillar-gan { font-size: 22px; font-weight: 600; }
.pillar-zhi { font-size: 22px; font-weight: 600; }
.pillar-wx { font-size: 10px; color: var(--text-secondary); }

/* 幸运信息 */
.lucky-info { display: flex; flex-direction: column; gap: 10px; }
.lucky-item { display: flex; align-items: baseline; gap: 8px; }
.lucky-label { font-size: 13px; color: var(--text-secondary); min-width: 60px; }
.lucky-value { font-size: 13px; }

/* 流年图 */
.yearly-chart-svg { width: 100%; display: block; }

/* 流年列表 */
.yearly-list { display: flex; flex-direction: column; gap: 8px; }

.yearly-item {
  padding: 10px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-gold);
}

.yearly-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.yearly-year { font-weight: 600; font-size: 15px; }
.yearly-gz { color: var(--text-secondary); font-size: 12px; }
.yearly-score {
  margin-left: auto;
  font-weight: 700;
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 12px;
}

.score-high { background: rgba(76,175,80,0.2); color: #4CAF50; }
.score-mid { background: rgba(255,152,0,0.2); color: #FF9800; }
.score-low { background: rgba(239,83,80,0.2); color: #EF5350; }

.yearly-item.yearly-lucky {
  border-left-color: #4CAF50;
}

.yearly-star {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(212,165,116,0.15);
  color: var(--accent-gold);
}

.yearly-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.yearly-dims {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.yearly-dims span {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-glass);
  color: var(--text-secondary);
}

.yearly-advice {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ===== 生肖 ===== */
.zodiac-hero {
  text-align: center;
  padding: 20px 0;
}

.zodiac-emoji { font-size: 64px; display: block; margin-bottom: 8px; }
.zodiac-hero h3 { font-size: 22px; font-weight: 400; }

.trait-list { list-style: none; padding: 0; }
.trait-list li {
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
}

.trait-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.trait-list.pros li::before { background: #4CAF50; }
.trait-list.cons li::before { background: #EF5350; }

.desc-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* ===== 星体解读卡片 ===== */
.planet-card {
  margin-bottom: 8px;
}

.planet-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.planet-card-icon {
  font-size: 28px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212,165,116,0.1);
  border-radius: 50%;
  flex-shrink: 0;
}

.planet-card-header h4 {
  font-size: 15px;
  color: var(--accent-gold);
  margin: 0;
}

.planet-card-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 2px 0 0;
}

.planet-meaning {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.planet-interp {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* ===== 付费内容区 ===== */
.premium-content.unlocked {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(212,165,116,0.15);
}

.premium-content.unlocked .planet-interp {
  margin-bottom: 10px;
}

.premium-gate {
  position: relative;
  margin-top: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.premium-blur {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  padding: 14px;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

.premium-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(10,10,26,0.3) 0%, rgba(10,10,26,0.95) 60%);
  padding: 20px;
  text-align: center;
}

.premium-lock {
  font-size: 28px;
  margin-bottom: 8px;
}

.premium-tip {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.premium-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.btn-premium {
  background: linear-gradient(135deg, var(--accent-gold), #c9956a);
  color: #0a0a1a;
  border: none;
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-premium:active {
  transform: scale(0.95);
}

/* ===== 付费弹窗 ===== */
.paywall-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background 0.3s;
  padding: 20px;
}

.paywall-overlay.show {
  background: rgba(0,0,0,0.7);
}

.paywall-modal {
  background: var(--bg-card);
  border: 1px solid rgba(212,165,116,0.2);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.paywall-overlay.show .paywall-modal {
  transform: translateY(0);
  opacity: 1;
}

.paywall-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.paywall-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.paywall-title {
  font-size: 20px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.paywall-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.paywall-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  text-align: left;
}

.paywall-features li {
  font-size: 13px;
  color: var(--text-primary);
  padding: 5px 0;
  padding-left: 20px;
  position: relative;
}

.paywall-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-weight: 700;
}

.paywall-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.paywall-original {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.paywall-current {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
}

.paywall-badge {
  font-size: 11px;
  background: rgba(212,165,116,0.15);
  color: var(--accent-gold);
  padding: 2px 8px;
  border-radius: 10px;
}

.btn-pay {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-gold), #c9956a);
  color: #0a0a1a;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(212,165,116,0.3);
}

.btn-pay:active {
  transform: scale(0.97);
}

.paywall-note {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.zodiac-compat {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.compat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.compat-item.good { background: rgba(76,175,80,0.1); border: 1px solid rgba(76,175,80,0.2); }
.compat-item.bad { background: rgba(239,83,80,0.1); border: 1px solid rgba(239,83,80,0.2); }
.compat-emoji { font-size: 28px; }

.compat-clickable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  position: relative;
}

.compat-clickable:active { transform: scale(0.95); }

.compat-arrow {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 生肖年份面板 */
.zodiac-years-panel {
  margin-top: 4px;
}

.zodiac-years-card {
  animation: fadeIn 0.3s ease;
}

.zodiac-years-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 500;
}

.zodiac-years-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.zodiac-years-note {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.zodiac-years-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zodiac-year-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 8px 10px;
  background: var(--bg-glass);
  border-radius: 8px;
  border-left: 3px solid var(--accent-gold);
}

.zy-year {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-gold);
  min-width: 50px;
}

.zy-ganzhi {
  font-size: 13px;
  color: var(--text-primary);
}

.zy-range {
  font-size: 11px;
  color: var(--text-secondary);
  width: 100%;
}

/* ===== 运势页 ===== */
.fortune-page { padding: 16px; animation: fadeIn 0.5s ease; }

.page-title {
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 16px;
}

.fortune-tabs {
  display: flex;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-sm);
  gap: 4px;
  margin-bottom: 16px;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.fortune-card { text-align: center; }

.fortune-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.fortune-keyword {
  font-size: 22px;
  color: var(--accent-gold);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.fortune-advice {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding: 0 8px;
}

.fortune-detail {
  text-align: left;
  margin-bottom: 12px;
}

.fortune-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.fortune-row:last-child { border-bottom: none; }
.stars { color: var(--accent-gold); letter-spacing: 2px; }

.fortune-extra {
  text-align: left;
  margin-bottom: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.fortune-yiji {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.yi, .ji { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.yi-label {
  padding: 2px 8px;
  background: rgba(76,175,80,0.2);
  color: #4CAF50;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.ji-label {
  padding: 2px 8px;
  background: rgba(239,83,80,0.2);
  color: #EF5350;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.fortune-score-big {
  font-size: 56px;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 8px 0 16px;
}

.score-unit { font-size: 18px; font-weight: 400; }

.fortune-special {
  text-align: left;
  margin-top: 12px;
  font-size: 13px;
}

.special-label { color: var(--text-secondary); }
.special-day {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(139,92,246,0.15);
  color: var(--accent-purple);
  border-radius: 4px;
  margin: 2px 4px;
  font-size: 12px;
}

/* 月度柱状图 */
.monthly-scores { margin-top: 16px; }

.month-grid {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 120px;
}

.month-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  height: 100%;
}

.month-num { font-size: 9px; color: var(--text-secondary); order: 3; }
.month-bar-bg {
  flex: 1;
  width: 100%;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  order: 2;
}

.month-bar-fill {
  width: 100%;
  border-radius: 4px;
  transition: height 0.6s ease;
  min-height: 4px;
}

.month-score { font-size: 8px; color: var(--text-secondary); order: 1; }

/* ===== 合盘页 ===== */
.hepan-page { padding: 16px; animation: fadeIn 0.5s ease; }

.hepan-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-size: 16px;
}

.hepan-emoji { font-size: 32px; }
.hepan-sign { color: var(--text-secondary); font-size: 13px; margin-left: auto; }

.hepan-heart {
  text-align: center;
  font-size: 28px;
  color: var(--accent-gold);
  margin: 8px 0;
  animation: pulse 2s ease-in-out infinite;
}

.hepan-result-card { text-align: center; margin-top: 16px; }

.hepan-names {
  font-size: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hepan-x { color: var(--accent-gold); }

.hepan-ring {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
}

.hepan-ring svg { width: 100%; height: 100%; }

.hepan-score {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
}

.hepan-dims { margin-bottom: 16px; }

.dim-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}

.dim-row > span:first-child { width: 60px; color: var(--text-secondary); font-size: 12px; }
.dim-row > span:last-child { width: 30px; text-align: right; }

.dim-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.dim-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.hepan-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ===== 解读页 ===== */
.reading-page { padding: 16px; animation: fadeIn 0.5s ease; }

.reading-hero {
  text-align: center;
  padding: 20px 0;
}

.reading-symbol { font-size: 48px; display: block; margin-bottom: 8px; }
.reading-hero h4 { font-size: 20px; margin-bottom: 4px; }
.reading-hero p { color: var(--text-secondary); font-size: 13px; }

.reading-card p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 8px;
}

.reading-tips {
  list-style: none;
  padding: 0;
}

.reading-tips li {
  padding: 8px 0 8px 20px;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.reading-tips li:last-child { border-bottom: none; }

.reading-tips li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-gold);
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
}

/* ===== 移动端适配 ===== */
@media (max-width: 430px) {
  .iphone-frame {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }

  .iphone-screen {
    border-radius: 0;
  }

  .dynamic-island { display: none; }

  body { align-items: stretch; }
}

/* ===== 档案列表页 ===== */
.profiles-page {
  padding: 20px;
  animation: fadeIn 0.5s ease;
}

.profiles-header {
  text-align: center;
  padding: 24px 0 20px;
}

.profiles-header h2 {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.profiles-header p {
  color: var(--text-secondary);
  font-size: 13px;
}

.profiles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.profile-card:active {
  transform: scale(0.98);
}

.profile-card:hover {
  border-color: rgba(212,165,116,0.3);
}

.profile-card-left { flex-shrink: 0; }

.profile-card-emoji {
  font-size: 36px;
  display: block;
}

.profile-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-card-name {
  font-size: 16px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.profile-card-del {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(239,83,80,0.1);
  color: #EF5350;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.profile-card-del:hover {
  background: rgba(239,83,80,0.25);
}

.btn-add-profile {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 2px dashed rgba(212,165,116,0.3);
  border-radius: var(--radius);
  color: var(--accent-gold);
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn-add-profile:hover {
  border-color: var(--accent-gold);
  background: rgba(212,165,116,0.05);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 48px;
  color: var(--accent-gold);
  opacity: 0.4;
  margin-bottom: 12px;
}

.empty-state p { margin-bottom: 4px; }
.empty-state .sub { font-size: 13px; opacity: 0.7; }

/* 档案详情顶部返回栏 */
.profile-top-bar {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 8px;
}

.btn-back {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
  width: 56px;
  text-align: left;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.profile-top-name {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
}

.profile-top-space {
  width: 56px;
  flex-shrink: 0;
}

/* 通用页面顶栏 */
.page-top-bar {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 8px;
  margin-bottom: 8px;
}

.page-top-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

/* ===== Hub 首页 ===== */
.hub-page { padding: 20px; animation: fadeIn 0.5s ease; }

.hub-header {
  text-align: center;
  padding: 30px 0 28px;
}

.hub-header h2 {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.hub-header p { color: var(--text-secondary); font-size: 13px; }

.hub-cards { display: flex; flex-direction: column; gap: 12px; }

.hub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.hub-card:active { transform: scale(0.98); }
.hub-card:hover { border-color: rgba(212,165,116,0.3); }

.hub-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212,165,116,0.08);
  border-radius: 14px;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.hub-info { flex: 1; }
.hub-info h3 { font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.hub-info p { font-size: 12px; color: var(--text-secondary); }

.hub-arrow { font-size: 20px; color: var(--text-secondary); }

/* ===== 缘分配对页 ===== */
.pairing-page { padding: 16px; animation: fadeIn 0.5s ease; }

.pair-slots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.pair-slot {
  flex: 1;
  max-width: 140px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius);
  text-align: center;
}

.pair-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

.pair-slot-icon { font-size: 24px; opacity: 0.4; }

.pair-slot-filled {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
}

.pair-slot-filled span:first-child { font-size: 28px; }

.pair-heart {
  font-size: 24px;
  color: var(--accent-gold);
  animation: pulse 2s ease-in-out infinite;
}

.pair-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.pair-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-glass);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s;
}

.pair-option:active { transform: scale(0.98); }

.pair-selected-a { border-color: var(--accent-gold); background: rgba(212,165,116,0.08); }
.pair-selected-b { border-color: var(--accent-purple); background: rgba(139,92,246,0.08); }

.pair-opt-emoji { font-size: 22px; }
.pair-opt-name { font-size: 14px; font-weight: 500; }
.pair-opt-sign { font-size: 12px; color: var(--text-secondary); margin-left: auto; }

.pair-add-btn { margin-top: 0; padding: 10px; font-size: 13px; }

.pair-empty { font-size: 13px; color: var(--text-secondary); text-align: center; padding: 12px 0; }

.pair-start-btn { margin-top: 8px; }
.pair-start-btn:disabled { opacity: 0.4; pointer-events: none; }

/* 配对结果 */
.pair-result-card { text-align: center; margin-top: 20px; }
.pair-asp-summary { font-size: 12px; color: var(--text-secondary); margin-top: 12px; }

.pair-insights { margin-top: 8px; }

.pair-insight-card { margin-bottom: 8px; }

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

.insight-header h4 { font-size: 14px; margin: 0; }

.insight-source {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.insight-astro { background: rgba(139,92,246,0.15); color: var(--accent-purple); }
.insight-zodiac { background: rgba(212,165,116,0.15); color: var(--accent-gold); }
.insight-bazi { background: rgba(59,130,246,0.15); color: var(--accent-blue); }

.insight-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* ===== 缘分配对深度报告卡片 ===== */
.pair-report-card {
  margin-top: 18px;
  padding: 20px 18px 18px;
  background: linear-gradient(160deg, rgba(212,165,116,0.05) 0%, rgba(139,92,246,0.06) 60%, rgba(10,10,26,0) 100%);
  border: 1px solid rgba(212,165,116,0.22);
}
.pair-report-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(212,165,116,0.14);
}
.pair-report-icon {
  font-size: 24px;
  color: var(--accent-gold);
  line-height: 1;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(212,165,116,0.30);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pair-report-header-text { flex: 1; min-width: 0; }
.pair-report-header h4 {
  margin: 0;
  font-size: 15px;
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.pair-report-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}
.pair-report-verdict {
  color: var(--accent-gold);
  font-weight: 600;
}

/* 三阶段 */
.pair-report-phase {
  margin-top: 22px;
}
.pair-report-phase-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212,165,116,0.12);
}
.pair-report-phase-icon {
  font-size: 13px;
  color: var(--accent-gold);
  width: 22px;
  height: 22px;
  border: 1px solid rgba(212,165,116,0.40);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pair-report-phase-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.pair-report-phase-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

/* 每一段小 block */
.pair-report-block {
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 2px solid rgba(212,165,116,0.25);
}
.pair-report-block:last-child { margin-bottom: 0; }
.pair-report-block-h {
  font-size: 12px;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 500;
  opacity: 0.95;
}
.pair-report-block-p p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.pair-report-block-p p:last-child { margin-bottom: 0; }
.pair-report-block-p strong { color: var(--accent-gold); font-weight: 600; }

/* 预览模式 */
.pair-report-preview p {
  font-size: 12.5px;
  line-height: 1.75;
  margin-bottom: 10px;
  color: var(--text-secondary);
}
.pair-report-preview strong {
  color: var(--accent-gold);
}
.pair-report-preview-icon {
  display: inline-block;
  color: var(--accent-gold);
  margin-right: 6px;
}

.pair-report-price-hint {
  font-size: 11px;
  color: var(--accent-gold);
  margin: 10px 0 8px;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* ===== 左滑删除 ===== */
.swipe-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.swipe-wrap:last-child { margin-bottom: 0; }
.swipe-del-layer {
  position: absolute;
  top: 0; right: 0;
  width: 92px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: linear-gradient(135deg, #d9413f 0%, #a82a28 100%);
  color: #fff;
  cursor: pointer;
  user-select: none;
  z-index: 0;
}
.swipe-del-icon  { font-size: 18px; }
.swipe-del-label { font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.swipe-card {
  position: relative;
  z-index: 1;
  touch-action: pan-y;
  background: inherit;
  transition: transform 0.22s ease;
  will-change: transform;
}
.swipe-wrap.opened .swipe-card { transform: translateX(-92px); }

/* ===== 新建/分享按钮条 ===== */
.profile-actions-bar {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.profile-actions-bar .btn-add-profile { flex: 1; margin-top: 0; }
.btn-share-profile {
  padding: 12px 16px;
  border: 1px dashed rgba(212,165,116,0.55);
  background: rgba(212,165,116,0.06);
  color: var(--accent-gold);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s;
}
.btn-share-profile:hover {
  background: rgba(212,165,116,0.14);
  border-color: var(--accent-gold);
}
.btn-share-profile:active { transform: scale(0.97); }

/* ===== 删除确认弹窗 ===== */
.confirm-overlay .confirm-modal {
  padding: 28px 24px 20px;
  text-align: center;
  max-width: 320px;
}
.confirm-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(216,60,60,0.18);
  border: 1.5px solid rgba(216,80,80,0.6);
  color: #e87373;
  font-weight: 900;
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.confirm-message {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 22px;
}
.confirm-btns { display: flex; gap: 10px; }
.btn-confirm-cancel, .btn-confirm-ok {
  flex: 1;
  padding: 11px 0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.12s, background 0.2s;
}
.btn-confirm-cancel {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}
.btn-confirm-cancel:hover { background: rgba(255,255,255,0.10); }
.btn-confirm-ok {
  background: linear-gradient(135deg, #d9413f 0%, #a82a28 100%);
  color: #fff;
}
.btn-confirm-ok:hover { filter: brightness(1.08); }
.btn-confirm-cancel:active,
.btn-confirm-ok:active { transform: scale(0.97); }

/* ===== 分享弹窗 ===== */
.share-overlay .share-modal {
  padding: 22px 20px 18px;
  max-width: 340px;
}
.share-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-gold);
  text-align: center;
  letter-spacing: 0.5px;
}
.share-sub {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin: 4px 0 18px;
  letter-spacing: 0.3px;
}
.share-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212,165,116,0.18);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.12s;
  color: var(--text-primary);
}
.share-item:hover {
  background: rgba(212,165,116,0.10);
  border-color: rgba(212,165,116,0.45);
}
.share-item:active { transform: scale(0.95); }
.share-item-ico { font-size: 24px; line-height: 1; }
.share-item-label {
  font-size: 10.5px;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
  text-align: center;
  line-height: 1.2;
}
.share-link-preview {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  padding: 8px 0 0;
  border-top: 1px dashed rgba(212,165,116,0.18);
  word-break: break-all;
  opacity: 0.75;
}

/* ===== 新建档案展开面板（自己填 / 邀请好友填）===== */
.add-profile-toggle.expanded {
  background: rgba(212,165,116,0.12);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.add-profile-panel {
  margin-top: 10px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(212,165,116,0.22);
  border-radius: var(--radius-sm);
  animation: dropdown-fade 0.24s ease-out;
}
.self-fill-btn { width: 100%; margin: 0; }
.panel-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 10px;
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 1.5px;
}
.panel-divider::before,
.panel-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(212,165,116,0.18);
}
.invite-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.3px;
  text-align: center;
  margin-bottom: 4px;
}
.invite-sub {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.5;
}
.invite-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.invite-grid .share-item {
  padding: 10px 3px;
  gap: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,165,116,0.18);
  border-radius: 10px;
}
.invite-grid .share-item-ico { font-size: 22px; }
.invite-grid .share-item-label { font-size: 9.5px; }

/* ===== 设置页 ===== */
.settings-page { padding-bottom: 40px; }
.settings-section {
  margin: 16px 16px 0;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
}
.settings-section-h {
  font-size: 14px;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.settings-body-line {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-primary);
}
.settings-body-note {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(212,165,116,0.06);
  border-left: 2px solid rgba(212,165,116,0.35);
  border-radius: 3px;
}
.settings-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px 0;
  background: rgba(212,165,116,0.10);
  color: var(--accent-gold);
  border: 1px solid rgba(212,165,116,0.35);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.settings-btn:hover { background: rgba(212,165,116,0.18); }
.settings-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-gold);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.settings-link:hover { text-decoration: underline; }
.settings-version {
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  margin: 28px 0 10px;
  letter-spacing: 0.5px;
  opacity: 0.6;
}

/* 语言选择网格 */
.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  text-align: left;
}
.lang-btn:hover { border-color: rgba(212,165,116,0.45); background: rgba(212,165,116,0.08); }
.lang-btn.active {
  border-color: var(--accent-gold);
  background: rgba(212,165,116,0.12);
  color: var(--accent-gold);
}
.lang-flag { font-size: 20px; }
.lang-name { font-size: 13px; flex: 1; }
.lang-check { color: var(--accent-gold); font-weight: 700; }

/* =============================================================== */
/* 点灯仪式 · 本命佛坛                                                 */
/* =============================================================== */

.hub-card-ceremony .hub-icon {
  background: radial-gradient(circle, rgba(212,165,116,0.25), rgba(212,165,116,0.0));
  color: #F6E3A5;
}

.ceremony-page .ceremony-hero {
  text-align: center;
  padding: 24px 18px 18px;
}
.ceremony-hero-icon {
  width: 56px; height: 56px;
  border: 1px solid rgba(212,165,116,0.4);
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--accent-gold);
  background: radial-gradient(circle, rgba(246,227,165,0.18), rgba(0,0,0,0));
}
.ceremony-hero h3 { font-size: 16px; color: var(--accent-gold); font-weight: 600; margin-bottom: 8px; }
.ceremony-hero p  { font-size: 12.5px; line-height: 1.7; color: var(--text-secondary); padding: 0 12px; }

/* ================================================= */
/* 点灯仪式 · 档案选择器（与出生地下拉同一视觉语言）        */
/* ================================================= */
.ceremony-picker-card { padding: 20px 18px 16px; }

.ceremony-picker-group { position: relative; margin-bottom: 16px; }

/* 触发输入框——复用 .form-group 的字号与 padding，但强制 cursor/readOnly */
.ceremony-picker-group input {
  cursor: pointer;
  padding-right: 44px;           /* 给右侧插销让位 */
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.ceremony-picker-group input:disabled { cursor: not-allowed; opacity: 0.55; }

/* 浮动 label：沿用 .form-group 已有规则，但 readonly input 的 label 也要始终上浮，
   让"为谁点灯"永远作为金色小标题悬挂在左上。 */
.ceremony-picker-group input + label {
  top: -8px; left: 12px;
  font-size: 11px;
  color: var(--accent-gold);
  background: var(--bg-card);
  padding: 0 4px;
  letter-spacing: 0.6px;
}

/* 金色下拉插销 */
.ceremony-caret {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--accent-gold);
  font-size: 13px;
  pointer-events: none;
  transition: transform 0.22s ease;
  opacity: 0.85;
}
.ceremony-picker-group.open .ceremony-caret { transform: translateY(-50%) rotate(180deg); }

/* 点击输入框后展开：竖向档案列表（每位档案独立成框）*/
.ceremony-list-wrap[hidden] { display: none !important; }
.ceremony-list-wrap {
  margin: 14px 0 4px;
  animation: dropdown-fade 0.22s ease-out;
}
.ceremony-list-hint {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.8px;
  margin: 0 0 10px;
  opacity: 0.75;
  text-align: center;
}
.ceremony-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px;              /* 每张卡片之间明显的间隔 */
}
@keyframes dropdown-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 每张档案卡 = 全宽独立金框盒子，视觉上和"为谁点灯"输入框一致 */
.picker-card {
  position: relative;
  width: 100%;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(212,165,116,0.32);
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.18s, background 0.18s, transform 0.12s, box-shadow 0.18s;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}
.picker-card:hover {
  border-color: rgba(246,227,165,0.75);
  background: rgba(212,165,116,0.10);
}
.picker-card:active { transform: scale(0.99); }

/* 选中 = 主题金色填充，像"为谁点灯"框被 focus 的感觉 */
.picker-card.selected {
  border-color: var(--accent-gold);
  background: linear-gradient(180deg, rgba(246,227,165,0.22) 0%, rgba(212,165,116,0.08) 100%);
  box-shadow: 0 0 0 1px var(--accent-gold), 0 0 24px rgba(246,227,165,0.22);
}
.picker-card.selected .picker-card-name  { color: #FFF4D6; }
.picker-card.selected .picker-card-deity { color: #FFE9B8; opacity: 1; }
.picker-card.selected .picker-card-emoji {
  border-color: var(--accent-gold);
  background: radial-gradient(circle, rgba(246,227,165,0.40), rgba(212,165,116,0.08));
}

.picker-card-emoji {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: radial-gradient(circle, rgba(212,165,116,0.18), rgba(212,165,116,0.04));
  border: 1px solid rgba(212,165,116,0.30);
  border-radius: 50%;
  flex-shrink: 0;
}

.picker-card-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-card-deity {
  font-size: 12px;
  color: var(--accent-gold);
  opacity: 0.9;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  padding-left: 10px;
  border-left: 1px solid rgba(212,165,116,0.25);
}

.picker-chip {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.picker-chip.lit {
  color: #FFF4D6;
  background: rgba(212,165,116,0.30);
  border: 1px solid rgba(246,227,165,0.45);
}

.picker-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0.3px;
  border: 1px dashed rgba(212,165,116,0.25);
  border-radius: var(--radius-sm);
}

.ceremony-next-btn { width: 100%; margin-top: 4px; margin-bottom: 8px; }
.ceremony-next-btn:disabled { opacity: 0.42; pointer-events: none; }
.ceremony-addnew-btn { width: 100%; margin-top: 0; padding: 10px; font-size: 13px; }

/* 佛坛页 */
.ceremony-altar-page { padding-bottom: 40px; }
/* 去掉固定画布，按画作真实比例自适应——宽度固定、高度随图自动伸长 */
.altar-portrait-wrap {
  position: relative;
  width: 310px;               /* 放大到接近整机宽度，保留两侧少量呼吸 */
  max-width: calc(100% - 24px);
  margin: 12px auto 14px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 0 26px rgba(212,165,116,0.22), 0 8px 22px rgba(0,0,0,0.48);
  border: 1px solid rgba(212,165,116,0.55);
  line-height: 0;             /* 防止 img 行内间隙 */
}
img.deity-portrait {
  display: block;
  width: 100%;
  height: auto;             /* 严格按自然比例延伸高度，没有裁切、没有留白 */
}
svg.deity-portrait {
  display: block;
  width: 100%;
  height: auto;             /* SVG 会按 viewBox 比例自动算高度 */
}

.altar-info { text-align: center; }
.altar-name-block h3 { font-size: 17px; color: var(--accent-gold); margin: 0; letter-spacing: 0.6px; font-weight: 600; }
.altar-sanskrit {
  font-size: 11.5px; color: var(--text-secondary); letter-spacing: 1px;
  margin: 4px 0 12px; font-style: italic;
}
.altar-attr { font-size: 13px; line-height: 1.85; color: var(--text-primary); }

.ceremony-already {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px dashed rgba(212,165,116,0.35);
  border-radius: var(--radius-sm);
  background: rgba(212,165,116,0.05);
}
.ceremony-already-h    { font-size: 12px; color: var(--accent-gold); letter-spacing: 0.6px; margin-bottom: 6px; }
.ceremony-already-body { font-size: 13px; line-height: 1.8; color: var(--text-primary); }
.ceremony-already-foot { font-size: 11px; color: var(--text-secondary); margin-top: 8px; }

.altar-lamps-h      { text-align: center; margin: 26px 0 14px; }
.altar-lamps-h h4   { font-size: 15px; color: var(--accent-gold); font-weight: 600; letter-spacing: 0.4px; }
.altar-lamps-sub    { font-size: 11.5px; color: var(--text-secondary); margin-top: 4px; letter-spacing: 0.4px; }

.lamps-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 0 4px;
}
.lamp {
  position: relative;
  padding: 18px 12px 14px;
  border: 1px solid rgba(212,165,116,0.18);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0));
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.lamp:active { transform: scale(0.97); }
.lamp:hover { border-color: var(--lamp-color); box-shadow: 0 0 24px color-mix(in srgb, var(--lamp-color) 35%, transparent); }
.lamp-flame {
  width: 44px; height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, color-mix(in srgb, var(--lamp-color) 60%, transparent) 0%, transparent 70%);
  position: relative;
}
.lamp-icon { font-size: 22px; color: var(--lamp-color); }
.lamp-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.lamp-hint  { font-size: 10.5px; color: var(--text-secondary); margin-top: 3px; letter-spacing: 0.3px; }
.lamp.lit {
  border-color: var(--lamp-color);
  background: radial-gradient(ellipse at top, color-mix(in srgb, var(--lamp-color) 15%, transparent) 0%, rgba(0,0,0,0) 70%);
}
.lamp.lit .lamp-flame::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  box-shadow: 0 0 18px var(--lamp-color);
  animation: lamp-breathe 2.6s ease-in-out infinite;
}
@keyframes lamp-breathe {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

.ceremony-history {
  margin-top: 28px;
  padding: 14px 16px;
  border-top: 1px dashed rgba(212,165,116,0.12);
}
.ceremony-history h5 { font-size: 12px; color: var(--accent-gold); margin-bottom: 8px; letter-spacing: 0.4px; }
.ceremony-history-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-secondary);
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Toast: 本月已点灯 */
.ceremony-toast {
  position: fixed; bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(10,10,26,0.92);
  border: 1px solid rgba(212,165,116,0.28);
  color: var(--text-primary);
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 20px;
  opacity: 0;
  transition: transform 0.28s, opacity 0.28s;
  z-index: 2000;
  pointer-events: none;
}
.ceremony-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 点灯动画 ===== */
.ceremony-animation-overlay {
  position: fixed; inset: 0; z-index: 1500;
  background: radial-gradient(ellipse at center, rgba(30,15,40,0.92) 0%, rgba(5,2,12,0.98) 100%);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.5s;
}
.ceremony-animation-overlay.show { opacity: 1; }
.ceremony-anim-stage {
  position: relative;
  width: 300px; height: 440px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 36px;
}
.ceremony-anim-glow {
  position: absolute;
  top: 40px; left: 50%;
  width: 260px; height: 260px;
  transform: translateX(-50%) scale(0);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lamp-color) 60%, transparent) 0%, color-mix(in srgb, var(--lamp-color) 10%, transparent) 45%, transparent 75%);
  filter: blur(4px);
  animation: anim-glow 3.2s ease-out forwards;
}
@keyframes anim-glow {
  0%   { transform: translateX(-50%) scale(0); opacity: 0; }
  40%  { transform: translateX(-50%) scale(1); opacity: 0.95; }
  100% { transform: translateX(-50%) scale(1.15); opacity: 0.85; }
}

.ceremony-anim-flame {
  position: absolute;
  top: 150px;
  width: 44px; height: 60px;
  transform: scale(0);
  animation: anim-flame 3.2s ease-out forwards;
}
.ceremony-anim-flame-inner {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 65%, #FFF4D6 0%, var(--lamp-color) 40%, color-mix(in srgb, var(--lamp-color) 60%, #8b3a00) 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 0 28px var(--lamp-color), 0 0 50px color-mix(in srgb, var(--lamp-color) 50%, transparent);
  animation: anim-flame-flicker 0.6s ease-in-out infinite alternate;
}
@keyframes anim-flame {
  0%   { transform: scale(0) translateY(40px); }
  25%  { transform: scale(0.8) translateY(0); }
  100% { transform: scale(1) translateY(0); }
}
@keyframes anim-flame-flicker {
  0%   { transform: scaleY(1);   opacity: 1; }
  100% { transform: scaleY(1.08); opacity: 0.92; }
}

.ceremony-anim-sparks {
  position: absolute;
  top: 150px; left: 50%;
  width: 0; height: 0;
  pointer-events: none;
}
.ceremony-anim-sparks .spark {
  position: absolute;
  width: 4px; height: 4px;
  background: #FFE9B8;
  border-radius: 50%;
  box-shadow: 0 0 6px #FFE9B8;
  animation: anim-spark 2.4s ease-out forwards;
  animation-delay: calc(0.08s * var(--i));
}
@keyframes anim-spark {
  0%   { transform: rotate(calc(var(--i) * 26deg)) translateY(0) scale(1); opacity: 1; }
  100% { transform: rotate(calc(var(--i) * 26deg)) translateY(-110px) scale(0.3); opacity: 0; }
}

.ceremony-anim-text {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  opacity: 0;
  transform: translateY(12px);
  animation: anim-text 0.9s ease-out 2.4s forwards;
}
@keyframes anim-text {
  to { opacity: 1; transform: translateY(0); }
}
.ceremony-anim-kicker {
  font-size: 11.5px;
  color: var(--accent-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0.8;
}
.ceremony-anim-blessing {
  font-size: 16px;
  line-height: 2;
  color: #FFF4D6;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 22px;
  text-shadow: 0 0 14px rgba(246,227,165,0.35);
}
.ceremony-anim-close { min-width: 140px; }

/* 命格解读卡片 */
.life-card h4 { margin-bottom: 8px; }
.life-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* ===== 通用 ===== */
.page { min-height: 100%; }

strong { color: var(--accent-gold); font-weight: 600; }
