/* ===== 姓名命理分析 - 全局样式 ===== */
/* 深色神秘风格 + 金色强调 + 移动端优先 */

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1a2332;
  --bg-card-hover: #1e2d3d;
  --gold: #facc15;
  --gold-dark: #ca8a04;
  --gold-light: #fde047;
  --gold-glow: rgba(250, 204, 21, 0.25);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --border-gold: rgba(250, 204, 21, 0.3);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-gold: 0 0 30px rgba(250, 204, 21, 0.15);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 粒子背景 */
.particles-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
  position: absolute; width: 2px; height: 2px;
  background: var(--gold); border-radius: 50%; opacity: 0;
  animation: floatUp 4s ease-in infinite;
}
@keyframes floatUp {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.2; }
  100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* 容器 */
.container { max-width: 480px; margin: 0 auto; padding: 16px 20px 40px; position: relative; z-index: 1; }
.container-wide { max-width: 640px; margin: 0 auto; padding: 16px 20px 40px; position: relative; z-index: 1; }

/* 头部 */
.header { text-align: center; padding: 32px 0 20px; }
.header-icon { font-size: 48px; margin-bottom: 8px; display: block; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}
.header h1 {
  font-size: 28px; font-weight: 800;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; letter-spacing: 2px;
}
.header .subtitle { color: var(--text-secondary); font-size: 14px; margin-top: 6px; letter-spacing: 1px; }

/* 卡片 */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 20px; margin-bottom: 16px;
  transition: all 0.3s ease;
}
.card:hover { border-color: var(--border-gold); box-shadow: var(--shadow-gold); transform: translateY(-2px); }
.card-gold { border-color: var(--border-gold); box-shadow: var(--shadow-gold); }
.card-title { font-size: 18px; font-weight: 700; color: var(--gold); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title .icon { font-size: 20px; }

/* 表单 */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; letter-spacing: 0.5px; }
.form-input {
  width: 100%; padding: 14px 16px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 16px; font-family: var(--font-sans);
  transition: all 0.3s ease; outline: none;
}
.form-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.form-input::placeholder { color: var(--text-muted); }
.form-select {
  width: 100%; padding: 14px 16px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 16px; font-family: var(--font-sans);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23facc15' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  cursor: pointer; outline: none; transition: all 0.3s ease;
}
.form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }

/* 历法选择 */
.radio-group { display: flex; gap: 12px; margin-bottom: 20px; }
.radio-option {
  flex: 1; text-align: center; padding: 12px 8px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 14px;
  color: var(--text-secondary); transition: all 0.3s ease; user-select: none;
}
.radio-option.active { border-color: var(--gold); color: var(--gold); background: rgba(250,204,21,0.08); box-shadow: 0 0 12px var(--gold-glow); }
.radio-option input { display: none; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px 24px; border: none; border-radius: var(--radius-sm);
  font-size: 17px; font-weight: 700; font-family: var(--font-sans);
  cursor: pointer; letter-spacing: 1px; transition: all 0.3s ease;
  text-decoration: none; position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-dark)); color: #0f172a; box-shadow: 0 4px 20px var(--gold-glow); }
.btn-gold:hover { box-shadow: 0 6px 30px rgba(250,204,21,0.4); transform: translateY(-2px); }
.btn-gold-glow {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-dark));
  color: #0f172a; box-shadow: 0 4px 20px var(--gold-glow);
  animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 20px var(--gold-glow); }
  50% { box-shadow: 0 6px 40px rgba(250,204,21,0.5); }
}
.btn-outline { background: transparent; border: 2px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: rgba(250,204,21,0.08); box-shadow: 0 0 20px var(--gold-glow); }
.btn-secondary { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-secondary); }
.btn-secondary:hover { border-color: var(--text-muted); color: var(--text-primary); }
.btn-sm { padding: 8px 16px; font-size: 14px; width: auto; }
.btn-block { display: block; width: 100%; }

/* 评分圆环 */
.score-ring-wrapper { display: flex; justify-content: center; margin: 24px 0; }
.score-ring { position: relative; width: 140px; height: 140px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .bg-circle { fill: none; stroke: var(--border); stroke-width: 8; }
.score-ring .progress-circle { fill: none; stroke: var(--gold); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1.5s ease; }
.score-ring .score-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.score-ring .score-number { font-size: 48px; font-weight: 800; color: var(--gold); line-height: 1; }
.score-ring .score-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* 五行展示 */
.wuxing-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0; }
.wuxing-item { text-align: center; padding: 12px 4px; background: var(--bg-secondary); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.wuxing-item .element-icon { font-size: 24px; display: block; margin-bottom: 4px; }
.wuxing-item .element-name { font-size: 13px; font-weight: 600; display: block; }
.wuxing-item .element-level { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }
.wuxing-item.strong { border-color: rgba(34,197,94,0.4); }
.wuxing-item.weak { border-color: rgba(239,68,68,0.4); }
.wuxing-item.moderate { border-color: rgba(250,204,21,0.4); }

/* 分析区块 */
.analysis-block { margin-bottom: 20px; }
.analysis-block h3 { font-size: 16px; font-weight: 700; color: var(--gold); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.analysis-block p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; }
.analysis-block ul { list-style: none; padding: 0; }
.analysis-block ul li { padding: 8px 0 8px 20px; position: relative; color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.analysis-block ul li::before { content: ''; position: absolute; left: 0; top: 14px; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }

/* 收费卡片 */
.price-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 20px; margin-bottom: 16px; text-align: center;
  cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden;
}
.price-card:hover { border-color: var(--border-gold); box-shadow: var(--shadow-gold); transform: translateY(-2px); }
.price-card.featured { border-color: var(--gold); box-shadow: var(--shadow-gold); }
.price-card .price-amount { font-size: 42px; font-weight: 800; color: var(--gold); line-height: 1; }
.price-card .price-amount .yen { font-size: 24px; font-weight: 600; }
.price-card .price-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 8px 0; }
.price-card .price-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; margin-top: 8px; }
.badge-hot { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }

/* 名字方案卡片 */
.name-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px;
  transition: all 0.3s ease;
}
.name-card:hover { border-color: var(--border-gold); }
.name-card .name-text { font-size: 22px; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.name-card .name-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.name-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.name-tag { font-size: 11px; padding: 3px 10px; border-radius: 12px; background: rgba(250,204,21,0.1); color: var(--gold); border: 1px solid rgba(250,204,21,0.2); }

/* 进度指示器 */
.progress-steps { display: flex; justify-content: space-between; margin: 24px 0; position: relative; }
.progress-steps::before { content: ''; position: absolute; top: 14px; left: 10%; right: 10%; height: 2px; background: var(--border); z-index: 0; }
.step { text-align: center; position: relative; z-index: 1; flex: 1; }
.step .step-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-secondary); border: 2px solid var(--border); margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.step.active .step-dot { background: var(--gold); border-color: var(--gold); color: var(--bg-primary); }
.step.done .step-dot { background: var(--success); border-color: var(--success); color: white; }
.step .step-label { font-size: 11px; color: var(--text-muted); }
.step.active .step-label { color: var(--gold); font-weight: 600; }

/* 警告/提示 */
.alert { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; line-height: 1.6; }
.alert-warning { background: rgba(250,204,21,0.08); border: 1px solid rgba(250,204,21,0.3); color: var(--gold); }
.alert-danger { background: var(--danger-bg); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }
.alert-info { background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.3); color: #38bdf8; }

/* 遮罩/锁定 */
.locked-section { position: relative; overflow: hidden; }
.locked-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15,23,42,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; border-radius: var(--radius);
}
.locked-overlay .lock-icon { font-size: 36px; margin-bottom: 8px; }
.locked-overlay .lock-text { font-size: 14px; color: var(--gold); font-weight: 600; }

/* 导航 */
.top-nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; margin-bottom: 8px; }
.back-btn { display: flex; align-items: center; gap: 4px; color: var(--text-secondary); font-size: 14px; text-decoration: none; cursor: pointer; background: none; border: none; font-family: var(--font-sans); }
.back-btn:hover { color: var(--gold); }

/* 分隔线 */
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.divider-gold { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 24px 0; }

/* 底部 */
.footer { text-align: center; padding: 32px 0 16px; color: var(--text-muted); font-size: 12px; }
.footer a { color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: var(--gold); }

/* 信任标识 */
.trust-badges { display: flex; justify-content: center; gap: 16px; margin: 20px 0; flex-wrap: wrap; }
.trust-badge { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }

/* Toast */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; z-index: 999; animation: slideDown 0.3s ease; pointer-events: none; }
.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }
@keyframes slideDown { from { transform: translateX(-50%) translateY(-100%); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }

/* 加载动画 */
.loading-spinner { display: inline-block; width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
.loading-container { text-align: center; padding: 60px 0; }
.loading-container .loading-text { color: var(--text-secondary); font-size: 14px; margin-top: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 加载遮罩 */
.analysis-loading { text-align: center; padding: 40px 20px; animation: fadeIn 0.3s ease; }
.analysis-loading .al-spinner { width: 48px; height: 48px; border: 3px solid rgba(250,204,21,0.15); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 20px; }
.analysis-loading .al-title { font-size: 16px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.analysis-loading .al-subtitle { font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.analysis-loading .al-dots { display: inline-block; animation: dotPulse 1.5s ease-in-out infinite; }
@keyframes dotPulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 骨架屏 */
.skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, rgba(250,204,21,0.05) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
.skeleton-card { height: 80px; margin-bottom: 12px; }
.skeleton-line { height: 16px; margin-bottom: 8px; width: 80%; }
.skeleton-line.short { width: 50%; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* 风险列表 */
.risk-list { list-style: none; padding: 0; }
.risk-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.risk-item:last-child { border-bottom: none; }
.risk-icon { font-size: 20px; flex-shrink: 0; }
.risk-content h4 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.risk-content p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* 响应式 */
@media (min-width: 768px) {
  .container, .container-wide { padding: 24px 32px 48px; }
  .wuxing-grid { gap: 12px; }
  .wuxing-item { padding: 16px 8px; }
}

/* 工具类 */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.hidden { display: none !important; }
