/* 观音灵签共享样式 · 五行纪 */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary: #6B46C1;
  --color-shang: #C53030;     /* 上签 红 */
  --color-zhong: #2B6CB0;     /* 中签 蓝 */
  --color-xia: #2F855A;       /* 下签 绿 */
  --color-bg: #FAFAFA;
  --color-text: #1A202C;
  --color-muted: #718096;
  --color-border: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.qian-nav-top a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 14px;
}

.qian-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Hero */
.qian-hero {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #6B46C1 0%, #2D3748 100%);
  color: white;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.qian-type {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 8px;
}

.qian-title {
  font-size: 36px;
  font-weight: 700;
  margin: 12px 0;
  letter-spacing: 2px;
}

.qian-num {
  font-weight: 700;
  color: #FFD700;
}

.qian-level {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  margin: 12px 4px;
}

.level-shang { background: var(--color-shang); color: white; }
.level-zhong { background: var(--color-zhong); color: white; }
.level-xia { background: var(--color-xia); color: white; }

.qian-palace {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 8px;
}

/* 抽签 */
.qian-draw {
  text-align: center;
  padding: 40px 20px;
  background: white;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.draw-btn {
  padding: 16px 32px;
  font-size: 18px;
  background: linear-gradient(135deg, #B8323D, #6B46C1);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  font-weight: 600;
}

.draw-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.draw-btn:active { transform: translateY(0); }

.draw-anim {
  margin-top: 24px;
  min-height: 120px;
  display: none;
}

.draw-anim.active {
  display: block;
  animation: shake 0.5s ease-in-out 3;
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

.qian-tong {
  width: 80px;
  height: 120px;
  margin: 0 auto;
  background: linear-gradient(180deg, #8B4513, #5D2F0A);
  border-radius: 8px 8px 40% 40%;
  position: relative;
}

.qian-sticks {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: -40px;
}

.qian-sticks::before,
.qian-sticks::after {
  content: '';
  width: 4px;
  height: 80px;
  background: #D4A574;
  border-radius: 2px;
  display: block;
  animation: stick-bounce 0.3s ease-in-out infinite alternate;
}

.qian-sticks::after { animation-delay: 0.15s; }

@keyframes stick-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

/* Section */
section {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-primary);
}

/* 签诗 */
.poem-ancient {
  font-family: "STSong", "SimSun", serif;
  font-size: 22px;
  line-height: 2;
  text-align: center;
  white-space: pre-wrap;
  padding: 20px;
  background: linear-gradient(135deg, #FFF8E7 0%, #FAF0D7 100%);
  border-left: 4px solid var(--color-primary);
  border-radius: 8px;
  color: #2D3748;
  margin-bottom: 16px;
}

.poem-modern {
  font-size: 15px;
  color: var(--color-muted);
  padding: 12px 16px;
  background: #F7FAFC;
  border-radius: 8px;
}

/* 四维解读 */
.interpret-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.interpret-card {
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.interpret-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.interpret-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.interpret-card.career { background: linear-gradient(135deg, #EBF4FF, #BEE3F8); }
.interpret-card.wealth { background: linear-gradient(135deg, #FFF5E7, #FEEBC8); }
.interpret-card.love { background: linear-gradient(135deg, #FFF5F7, #FED7E2); }
.interpret-card.health { background: linear-gradient(135deg, #F0FFF4, #C6F6D5); }

.interpret-card p { font-size: 14px; line-height: 1.7; }

/* 速查表 */
.quick-lookup {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.quick-lookup li {
  padding: 10px 14px;
  background: #F7FAFC;
  border-radius: 6px;
  font-size: 14px;
}

.quick-lookup strong {
  color: var(--color-primary);
  margin-right: 8px;
}

/* 关联 */
.related-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-list a {
  padding: 8px 16px;
  background: #F7FAFC;
  color: var(--color-primary);
  text-decoration: none;
  border-radius: 20px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.related-list a:hover {
  background: var(--color-primary);
  color: white;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 24px;
  color: var(--color-muted);
  font-size: 13px;
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
}

/* Mobile */
@media (max-width: 640px) {
  .qian-title { font-size: 28px; }
  .qian-page { padding: 16px 12px 60px; }
  section { padding: 16px; }
  .poem-ancient { font-size: 18px; }
  .interpret-grid { grid-template-columns: 1fr; }
}