/* ===== Apple iOS 17 风格 — 浅色毛玻璃主题 ===== */
:root {
  --accent: #6C5CE7;
  --accent-light: #A29BFE;
  --accent-soft: rgba(108, 92, 231, 0.1);
  --rose: #FD79A8;
  --rose-soft: rgba(253, 121, 168, 0.1);
  --gold: #F39C12;
  --gold-soft: rgba(243, 156, 18, 0.08);
  --teal: #00B894;
  --teal-soft: rgba(0, 184, 148, 0.08);
  --text-primary: #1a1a2e;
  --text-secondary: #636e83;
  --text-tertiary: #9ba3b5;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-hover: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-blur: 24px;
  --card-shadow: 0 2px 20px rgba(0, 0, 0, 0.04), 0 1px 6px rgba(0, 0, 0, 0.03);
  --card-shadow-hover: 0 8px 40px rgba(108, 92, 231, 0.08), 0 4px 16px rgba(0, 0, 0, 0.05);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(145deg, #f5f0ff 0%, #e8ecf8 30%, #fdf0f3 60%, #eef5ff 100%);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Noto Sans SC', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ===== 背景渐变层 ===== */
#bg-gradient {
  background:
    radial-gradient(ellipse at 15% 20%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 30%, rgba(253, 121, 168, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(0, 184, 148, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 70%, rgba(243, 156, 18, 0.04) 0%, transparent 40%);
  pointer-events: none;
}

/* ===== 毛玻璃卡片 ===== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
  background: var(--glass-bg-hover);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.03);
}

.glass-input {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-family: inherit;
}
.glass-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}
.glass-input::placeholder { color: var(--text-tertiary); }

/* ===== 强调色文字 ===== */
/* .text-gold 使用主题色（accent 紫色），用于强调文字；真正的金色请用 .wx-jin */
.text-gold {
  color: var(--accent) !important;
}
.text-mystic {
  color: var(--rose) !important;
}

/* glow-text: 浅色主题下不使用 text-shadow 发光效果，仅保留强调色 */
.glow-text {
  color: var(--accent);
  text-shadow: none;
  letter-spacing: 0.02em;
}
.glow-text-purple {
  color: var(--rose);
  text-shadow: none;
}

/* ===== 导航链接 ===== */
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 10px;
  transition: all 0.3s;
  font-weight: 500;
  font-size: 14px;
}
.nav-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.nav-link.active::after { display: none; }

.mobile-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  transition: all 0.3s;
  font-weight: 500;
  font-size: 16px;
}
.mobile-nav-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ===== 底部导航 ===== */
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: 4px 12px;
  transition: all 0.3s;
  font-size: 11px;
}
.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--accent);
}

/* ===== 按钮 ===== */
.btn-gold {
  background: linear-gradient(135deg, var(--accent) 0%, #8B7CF6 100%);
  color: #fff;
  font-weight: 600;
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(108, 92, 231, 0.3);
}
.btn-gold:active { transform: translateY(0); }
.btn-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-mystic {
  background: linear-gradient(135deg, var(--rose) 0%, #E17DAD 100%);
  color: #fff;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}
.btn-mystic:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(253, 121, 168, 0.3);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.6);
  color: var(--accent);
  border: 1px solid rgba(108, 92, 231, 0.2);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
}
.btn-outline:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ===== 页面过渡动画 ===== */
.page-enter {
  animation: pageIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.page-exit {
  animation: pageOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pageOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

/* ===== 抽签动画 ===== */
@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(-8deg); }
  20% { transform: rotate(8deg); }
  30% { transform: rotate(-6deg); }
  40% { transform: rotate(6deg); }
  50% { transform: rotate(-4deg); }
  60% { transform: rotate(4deg); }
  70% { transform: rotate(-2deg); }
  80% { transform: rotate(2deg); }
  90% { transform: rotate(-1deg); }
}
.shake-anim { animation: shake 0.8s ease-in-out; }

/* ===== 铜钱翻转动画 ===== */
@keyframes coinFlip {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(1800deg); }
}
.coin-flip { animation: coinFlip 1.5s ease-out; }

/* ===== 浮动动画 ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.float-anim { animation: float 4s ease-in-out infinite; }

/* ===== 渐入动画 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease-out forwards; opacity: 0; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ===== 柔和脉冲 ===== */
@keyframes softPulse {
  0%, 100% { box-shadow: var(--card-shadow); }
  50% { box-shadow: 0 4px 30px rgba(108, 92, 231, 0.08), 0 2px 12px rgba(0, 0, 0, 0.04); }
}
.glow-pulse { animation: softPulse 3s ease-in-out infinite; }

/* ===== 签文等级颜色 ===== */
.sign-level-ss { color: #E74C3C; }
.sign-level-s { color: var(--accent); }
.sign-level-m { color: var(--teal); }
.sign-level-x { color: #3498DB; }
.sign-level-xx { color: var(--text-tertiary); }

/* ===== Tab 样式 ===== */
.tab-btn {
  padding: 8px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-secondary);
  font-size: 14px;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-weight: 500;
}
.tab-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #8B7CF6 100%);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.2);
}

/* Tab VIP 小标记 */
.tab-vip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-left: 3px;
  font-size: 9px;
  line-height: 1;
  vertical-align: middle;
  position: relative;
  top: -1px;
  flex-shrink: 0;
}
.tab-vip-badge i {
  font-size: 9px;
  line-height: 1;
}
.tab-vip-tianji {
  background: linear-gradient(135deg, #F39C12, #F1C40F);
  color: #fff;
  box-shadow: 0 1px 4px rgba(243, 156, 18, 0.35);
  animation: tab-vip-glow 2.5s ease-in-out infinite;
}
.tab-vip-xuanji {
  background: linear-gradient(135deg, #6C5CE7, #A29BFE);
  color: #fff;
  box-shadow: 0 1px 4px rgba(108, 92, 231, 0.35);
}
.tab-btn.active .tab-vip-tianji {
  background: linear-gradient(135deg, #FFF3CD, #FFE082);
  color: #D4880F;
  box-shadow: 0 1px 4px rgba(255, 255, 255, 0.4);
}
.tab-btn.active .tab-vip-xuanji {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: none;
}
@keyframes tab-vip-glow {
  0%, 100% { box-shadow: 0 1px 4px rgba(243, 156, 18, 0.35); }
  50% { box-shadow: 0 1px 8px rgba(243, 156, 18, 0.6); }
}

/* ===== 八卦图形 ===== */
.yao-line {
  height: 8px;
  border-radius: 4px;
  margin: 4px 0;
  transition: all 0.3s;
}
.yao-yang {
  background: linear-gradient(135deg, var(--accent) 0%, #8B7CF6 100%);
}
.yao-yin {
  background: transparent;
  display: flex;
  gap: 8px;
}
.yao-yin span {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent) 0%, #8B7CF6 100%);
}

/* ===== 九宫格 ===== */
.qimen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.qimen-cell {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 100px;
  transition: all 0.3s;
}
.qimen-cell:hover {
  background: rgba(108, 92, 231, 0.06);
  border-color: rgba(108, 92, 231, 0.15);
}

/* ===== 五行颜色（浅色主题优化） ===== */
.wx-jin { color: #F39C12; }
.wx-mu { color: #27AE60; }
.wx-shui { color: #2980B9; }
.wx-huo { color: #E74C3C; }
.wx-tu { color: #8E6B3E; }

/* ===== 紫微命盘格子 ===== */
.ziwei-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
}
.ziwei-cell {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  padding: 8px;
  min-height: 80px;
  font-size: 12px;
  transition: all 0.3s;
}
.ziwei-cell:hover {
  background: rgba(108, 92, 231, 0.06);
  border-color: rgba(108, 92, 231, 0.15);
}

/* ===== 弹窗遮罩 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-content {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  animation: modalIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== 进度圆环 ===== */
.score-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(108, 92, 231, 0.3); }

/* ===== 选择器美化 ===== */
select.glass-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236C5CE7' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== 辅助工具类 ===== */
.bg-white\/3 { background: rgba(255, 255, 255, 0.4); }
.border-white\/5 { border-color: rgba(0, 0, 0, 0.04); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  body { padding-bottom: 60px; }
  .glass-nav { padding: 8px 12px; }
}

/* ===== 装饰性漂浮球 ===== */
#floating-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}
.orb-1 {
  width: 300px; height: 300px;
  background: rgba(108, 92, 231, 0.15);
  top: 10%; left: 10%;
  animation-delay: 0s;
}
.orb-2 {
  width: 250px; height: 250px;
  background: rgba(253, 121, 168, 0.12);
  top: 50%; right: 10%;
  animation-delay: -7s;
}
.orb-3 {
  width: 200px; height: 200px;
  background: rgba(0, 184, 148, 0.1);
  bottom: 15%; left: 30%;
  animation-delay: -14s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(10px, -10px) scale(1.02); }
}

/* ===== 特殊颜色覆盖（兼容原有class） ===== */
.text-gold\/60, .text-gold\/80, .text-gold\/90, .text-gold\/50 {
  color: var(--accent) !important;
  opacity: 0.8;
}
.border-gold\/30, .border-gold\/50 {
  border-color: rgba(108, 92, 231, 0.2) !important;
}
.bg-gold\/5 {
  background: rgba(108, 92, 231, 0.05) !important;
}
.text-mystic-light {
  color: var(--rose) !important;
}

/* accent-color for radio/checkbox */
.accent-gold { accent-color: var(--accent); }

/* ===== 导航栏用户头像按钮 ===== */
.user-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.2);
}
.user-avatar-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.35);
}

/* ===== 表单错误 shake 动画 ===== */
.shake {
  animation: formShake 0.4s ease-in-out;
}
@keyframes formShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ===== 导航栏 Logo 图标 ===== */
.logo-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: visible;
  position: relative;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
.logo-icon-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(108,92,231,0.15), rgba(241,196,15,0.12), rgba(108,92,231,0.08), rgba(241,196,15,0.15));
  opacity: 0;
  transition: opacity 0.5s;
  z-index: -1;
  animation: logoConicSpin 6s linear infinite paused;
}
.logo-icon-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow:
    0 2px 16px rgba(13, 6, 40, 0.3),
    0 0 20px rgba(108, 92, 231, 0.15),
    inset 0 0 8px rgba(108, 92, 231, 0.05);
  pointer-events: none;
  transition: all 0.5s;
}
#logo-home:hover .logo-icon-wrapper::before {
  opacity: 1;
  animation-play-state: running;
}
#logo-home:hover .logo-icon-wrapper::after {
  box-shadow:
    0 4px 30px rgba(13, 6, 40, 0.4),
    0 0 40px rgba(108, 92, 231, 0.2),
    0 0 60px rgba(241, 196, 15, 0.08),
    inset 0 0 12px rgba(108, 92, 231, 0.1);
}
.logo-icon {
  width: 100%;
  height: 100%;
  display: block;
}
#logo-home {
  position: relative;
}
#logo-home:hover .logo-icon-wrapper {
  transform: scale(1.08) translateY(-1px);
}
@keyframes logoConicSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 品牌文字组 */
.logo-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  gap: 3px;
}
.logo-text {
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1.1;
}
.logo-subtitle {
  font-size: 5.5px;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  font-weight: 500;
  transition: all 0.5s;
  text-transform: uppercase;
  white-space: nowrap;
}
#logo-home:hover .logo-text {
  background: linear-gradient(135deg, #6C5CE7 0%, #F1C40F 40%, #FFE066 60%, #A29BFE 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoTextAurora 2.5s ease-in-out infinite;
}
#logo-home:hover .logo-subtitle {
  color: var(--accent);
  letter-spacing: 0.3em;
}
@keyframes logoTextAurora {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

