/* 安分 H5 — 深色设计体系（黑金主题） */

/* ==================== 全局字体 ==================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'HarmonyOS Sans SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ==================== 主题变量 ==================== */
:root {
  --bg: #0a0a0b;
  --bg-gradient-start: #141416;
  --bg-gradient-end: #050607;
  --bg-card: rgba(255, 255, 255, .05);
  --bg-card-hover: rgba(255, 255, 255, .09);
  --bg-elevated: #1c1c1e;
  --text-1: rgba(255, 255, 255, .95);
  --text-2: rgba(255, 255, 255, .6);
  --text-3: rgba(255, 255, 255, .35);
  --accent: #c6a571;
  --accent-soft: rgba(212, 175, 55, .12);
  --accent-text: #1a1a1a;
  --border: rgba(255, 255, 255, .1);
  --divider: rgba(255, 255, 255, .07);
  --btn-ghost-border: rgba(255, 255, 255, .25);
  --btn-ghost-text: rgba(255, 255, 255, .9);
  --chip-bg: rgba(255, 255, 255, .06);
  --chip-active-bg: rgba(212, 175, 55, .14);
  --chip-active-text: #ffffff;
  --chip-text: rgba(255, 255, 255, .5);
  --success: #30d158;
  --danger: #ff453a;
  --shadow: rgba(0, 0, 0, .4);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;
}

/* ==================== App 容器 ==================== */
#app {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-1);
  position: relative;
  overflow: hidden;
}
.app-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* ==================== 按钮 ==================== */
.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: opacity .2s;
}
.primary-btn:active { opacity: .75; }
.primary-btn:disabled { opacity: .4; cursor: not-allowed; }

.ghost-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  background: transparent;
  border: 1px solid var(--btn-ghost-border);
  color: var(--btn-ghost-text);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: opacity .2s;
}
.ghost-btn:active { opacity: .75; }

/* ==================== 卡片 ==================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px;
}

/* ==================== 顶部导航 ==================== */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--divider);
}
.nav-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-1);
  position: relative;
  z-index: 1;
}
.nav-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 悬浮返回（子页面大图页） ==================== */
.float-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  padding-top: env(safe-area-inset-top, 12px);
}
.float-back {
  width: 36px;
  height: 36px;
  margin: 8px 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
}
.float-back-arrow {
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 4px;
}

/* ==================== 首页：顶部浮层 ==================== */
.top-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
}

/* 品牌标签 */
.header {
  height: 48px;
  display: flex;
  align-items: center;
  padding-left: 20px;
  position: relative;
  z-index: 20;
}
.brand-tabs { display: flex; align-items: center; }
.brand-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 28px;
  padding: 6px 2px 4px;
  cursor: pointer;
  user-select: none;
}
.brand-tab-text {
  font-size: 17px;
  font-weight: 400;
  color: var(--text-3);
  transition: color .25s ease, font-weight .25s ease;
}
.brand-tab-active .brand-tab-text {
  color: var(--text-1);
  font-weight: 700;
}
.brand-tab-indicator {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  margin-top: 4px;
  transition: background .25s ease;
}

/* 系列标签条 */
.series-bar {
  height: 40px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 20;
}
.series-scroll {
  width: 100%;
  height: 40px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.series-scroll::-webkit-scrollbar { display: none; }
.series-chips {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  gap: 8px;
}
.series-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: all .25s ease;
}
.series-chip-active {
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
}

/* ==================== 首页：全屏 Swiper ==================== */
/* 内容动画层 */
.content-anim {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
}

.hero-swiper {
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}
.hero-swiper::-webkit-scrollbar { display: none; }
.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 顶部占位 */
.hero-top-spacer {
  height: 92px;
  flex-shrink: 0;
}

/* ==================== Hero 大图区 ==================== */
.hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 24px 0;
}
.hero-bg-glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 280px;
  pointer-events: none;
}
.hero-image {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
}
.hero-info {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 12px;
}
.hero-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: .5px;
}
.hero-tagline {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}

/* CTA 按钮组 */
.cta-group {
  display: flex;
  gap: 12px;
  padding: 20px 24px 0;
}
.cta-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
  border: none;
}
.cta-btn:active { opacity: .7; }
.cta-btn-ghost {
  background: transparent;
  border: 1px solid var(--btn-ghost-border);
  color: var(--btn-ghost-text);
}
.cta-btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

/* ==================== 商品配置页 ==================== */
.config-hero {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 480px;
}
.config-hero-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}
.config-hero-mask-top {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 110px;
  background: linear-gradient(180deg, var(--bg-gradient-start), transparent);
  opacity: .85;
}
.config-hero-mask-bottom {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 130px;
  background: linear-gradient(0deg, var(--bg), transparent);
}
.config-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.config-hero-spacer { height: 350px; }
.config-tagline {
  padding: 0 16px;
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 12px;
}

/* 选项区块 */
.section {
  margin: 0 12px 12px;
}
.section-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--text-1);
  margin-bottom: 12px;
}

/* 型号：卡片式单选 */
.model-list {
  display: flex;
  flex-wrap: wrap;
}
.model-item {
  padding: 7px 18px;
  margin: 0 8px 8px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-1);
  cursor: pointer;
  user-select: none;
  transition: all .2s;
}
.model-item-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* 参数/容量：chips 单选 */
.chip-list { display: flex; flex-wrap: wrap; }
.chip {
  padding: 7px 18px;
  margin: 0 8px 8px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-1);
  cursor: pointer;
  user-select: none;
  transition: all .2s;
}
.chip-compact { padding: 7px 13px; }
.chip-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* 分期信息行 */
.installment-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.installment-info {
  font-size: 12px;
  font-weight: normal;
  color: var(--text-2);
}

/* ==================== 底部固定栏 ==================== */
.footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-elevated);
  box-shadow: 0 -2px 12px var(--shadow);
  z-index: 50;
}
.footer-placeholder { height: 80px; }

/* ==================== TabBar ==================== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: var(--bg-elevated);
  border-top: 1px solid var(--divider);
  z-index: 100;
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 6px;
  color: var(--text-3);
  cursor: pointer;
  transition: color .2s;
  user-select: none;
}
.tabbar-item.active { color: var(--text-1); }
.tabbar-icon { width: 24px; height: 24px; margin-bottom: 2px; }
.tabbar-label { font-size: 10px; line-height: 1.2; }

/* ==================== 表单 ==================== */
.form-row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}
.form-row:last-child { border-bottom: none; }
.form-label {
  width: 80px;
  font-size: 14px;
  color: var(--text-2);
  flex-shrink: 0;
}
.form-input {
  flex: 1;
  border: none;
  font-size: 14px;
  outline: none;
  background: transparent;
  color: var(--text-1);
}
.form-input::placeholder { color: var(--text-3); }
.form-select {
  appearance: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 8px center;
  padding-right: 28px;
}

/* ==================== 步骤条 ==================== */
.step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  gap: 8px;
}
.step-item { font-size: 13px; color: var(--text-3); }
.step-active { color: var(--text-1); font-weight: 600; }
.step-divider { width: 20px; height: 1px; background: var(--divider); }

/* ==================== 结果页 ==================== */
.result { text-align: center; padding: 40px 16px; }
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--success);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-tick { color: #fff; font-size: 32px; font-weight: 700; }
.result-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--text-1); }

/* 信息行 */
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 13px; color: var(--text-2); }
.info-value { font-size: 13px; color: var(--text-1); text-align: right; max-width: 60%; }
.info-highlight { color: var(--accent); font-weight: 600; }

/* ==================== 引导页 ==================== */
.guide-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.guide-card {
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 2px 12px var(--shadow);
}
.guide-icon { font-size: 48px; margin-bottom: 12px; }
.guide-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text-1); }
.guide-desc { font-size: 14px; color: var(--text-2); margin-bottom: 20px; }
.guide-qr img { width: 200px; height: 200px; border-radius: var(--radius-md); border: 1px solid var(--border); }
.guide-steps { margin-top: 20px; text-align: left; }
.guide-step { font-size: 13px; color: var(--text-2); padding: 6px 0; }

/* ==================== "我的"页面 ==================== */
.my-header {
  padding: 24px 20px 16px;
}
.my-header-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: .5px;
}

/* 用户信息区 */
.my-profile {
  display: flex;
  align-items: center;
  margin: 0 16px 20px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
}
.my-profile-guest {
  cursor: pointer;
}
.my-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 16px;
}
.my-avatar-guest {
  background: var(--chip-bg);
  color: var(--text-3);
}
.my-avatar-user {
  background: var(--accent);
  color: var(--accent-text);
  font-size: 22px;
  font-weight: 600;
}
.my-profile-info {
  flex: 1;
  min-width: 0;
}
.my-profile-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
}
.my-profile-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}
.my-profile-arrow {
  color: var(--text-3);
  font-size: 20px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* 功能菜单列表 */
.my-menu {
  margin: 0 16px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.my-menu-item {
  display: flex;
  align-items: center;
  padding: 16px 16px;
  cursor: pointer;
}
.my-menu-item + .my-menu-item {
  border-top: 1px solid var(--divider);
}
.my-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
}
.my-menu-content {
  flex: 1;
  min-width: 0;
}
.my-menu-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
}
.my-menu-desc {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.my-menu-arrow {
  color: var(--text-3);
  font-size: 18px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* ==================== 加载/空态 ==================== */
.loading { text-align: center; padding: 60px 0; color: var(--text-3); font-size: 14px; }
.empty-wrap { text-align: center; padding: 60px 0; }
.empty-text { font-size: 14px; color: var(--text-3); margin-top: 12px; }

/* ==================== 底部安全间距 ==================== */
.bottom-safe { height: 60px; }
