/* ============================================================
   观音灵签 (Guanyin Lingqian) — Form + Result styles
   ============================================================ */

/* ---------- Form Panel ---------- */
.guanyin-instructions {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.06) 0%, rgba(212, 160, 23, 0.08) 100%);
  border: 1px solid rgba(139, 0, 0, 0.15);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.guanyin-step {
  font-size: 13px;
  line-height: 1.9;
  color: #2d1b0e;
}
.guanyin-step strong {
  color: #8b0000;
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
}

/* ---------- 签筒区 ---------- */
.guanyin-tube-section {
  text-align: center;
  padding: 24px 10px;
  background: radial-gradient(ellipse at center, rgba(253, 246, 236, 0.6) 0%, transparent 70%);
  border-radius: 12px;
  margin: 18px 0;
}
.guanyin-tube-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  color: #8b0000;
  margin-bottom: 16px;
  letter-spacing: 3px;
}
.gy-tube-wrap {
  display: inline-block;
  position: relative;
  width: 150px;
  transition: transform 0.2s;
}
.gy-tube-svg {
  width: 140px;
  height: 200px;
  filter: drop-shadow(0 4px 12px rgba(139, 0, 0, 0.2));
}
.gy-tube-wrap.gy-tube-drawn {
  opacity: 0.7;
}

/* 摇签按钮 */
.guanyin-shake-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 32px;
  background: linear-gradient(135deg, #8b0000 0%, #c41e3a 50%, #8b0000 100%);
  color: #fff;
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  letter-spacing: 3px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(139, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.guanyin-shake-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(139, 0, 0, 0.4);
}
.guanyin-shake-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.guanyin-shake-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- 摇签动画 ---------- */
@keyframes gy-shake {
  0%, 100%   { transform: rotate(0deg) translateY(0); }
  10%        { transform: rotate(-8deg) translateY(-4px); }
  20%        { transform: rotate(6deg)  translateY(-2px); }
  30%        { transform: rotate(-10deg) translateY(-6px); }
  40%        { transform: rotate(8deg)  translateY(-3px); }
  50%        { transform: rotate(-12deg) translateY(-7px); }
  60%        { transform: rotate(10deg)  translateY(-4px); }
  70%        { transform: rotate(-6deg) translateY(-2px); }
  80%        { transform: rotate(4deg)  translateY(-1px); }
  90%        { transform: rotate(-2deg) translateY(0); }
}
.gy-tube-wrap.gy-shaking {
  animation: gy-shake 1.2s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  transform-origin: 50% 100%;
}

/* ---------- 抽签结果预览 ---------- */
.guanyin-preview-wrap {
  margin-top: 20px;
  padding: 20px;
  background: #fdf6ec;
  border: 1px solid #e8d5b7;
  border-radius: 12px;
}
.guanyin-preview-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  color: #8b0000;
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: 2px;
}

/* 抽到的签 — 长条竹签 */
.gy-drawn-stick {
  display: inline-block;
  width: 200px;
  padding: 16px 12px;
  border-radius: 8px;
  text-align: center;
  background: linear-gradient(180deg, #f0d080 0%, #d4a017 50%, #b88a10 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(184, 138, 16, 0.3);
  position: relative;
  animation: gy-stick-drop 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes gy-stick-drop {
  0%   { transform: translateY(-30px) rotate(-5deg); opacity: 0; }
  60%  { transform: translateY(4px) rotate(2deg); opacity: 1; }
  100% { transform: translateY(0) rotate(0); opacity: 1; }
}
.gy-drawn-stick::before,
.gy-drawn-stick::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: rgba(139, 0, 0, 0.3);
}
.gy-drawn-stick::before { top: 8px; }
.gy-drawn-stick::after  { bottom: 8px; }
.gy-drawn-stick-inner {
  font-family: 'Noto Serif SC', serif;
}
.gy-drawn-num {
  font-size: 15px;
  margin-bottom: 8px;
  color: #2d1b0e;
  letter-spacing: 1px;
}
.gy-drawn-num strong {
  font-size: 26px;
  color: #8b0000;
  margin: 0 2px;
}
.gy-drawn-level {
  display: inline-block;
  padding: 3px 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #8b0000;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 3px;
}
.gy-drawn-name {
  font-size: 14px;
  color: #2d1b0e;
  letter-spacing: 1px;
  padding-top: 8px;
  border-top: 1px dashed rgba(139, 0, 0, 0.3);
}

/* 3 档吉凶色彩 (上签/中签/下签) */
.gy-drawn-stick.gy-top  { background: linear-gradient(180deg, #f7d9dc 0%, #c41e3a 70%, #8b0000 100%); }
.gy-drawn-stick.gy-top .gy-drawn-level  { color: #8b0000; }
.gy-drawn-stick.gy-mid  { background: linear-gradient(180deg, #f0d080 0%, #d4a017 70%, #b88a10 100%); }
.gy-drawn-stick.gy-mid .gy-drawn-level  { color: #8b6032; }
.gy-drawn-stick.gy-bad  { background: linear-gradient(180deg, #d9cbb5 0%, #8b6b52 70%, #4d2f15 100%); }
.gy-drawn-stick.gy-bad .gy-drawn-level  { color: #4d2f15; }

/* 宫位显示 */
.gy-drawn-palace {
  display: inline-block;
  font-size: 12px;
  color: rgba(139, 0, 0, 0.7);
  background: rgba(255, 255, 255, 0.6);
  padding: 1px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

/* 重抽按钮 */
.guanyin-reset-btn {
  display: block;
  margin: 16px auto 0;
  padding: 8px 24px;
  background: transparent;
  color: #8b0000;
  border: 1px solid #8b0000;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.guanyin-reset-btn:hover {
  background: #8b0000;
  color: #fff;
}

/* ---------- 结果页 ---------- */

/* 签头横幅 — 显示签号/等级/典故名 (在红色 banner 之后) */
.gy-result-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: #fdf6ec;
  border: 1px solid #e8d5b7;
  border-radius: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.gy-result-header-left {
  flex: 0 0 auto;
}
.gy-result-header-right {
  flex: 1;
  min-width: 240px;
}
.gy-result-header-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px;
  color: #8b0000;
  margin-bottom: 6px;
  letter-spacing: 2px;
}
.gy-result-header-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.gy-level-chip {
  display: inline-block;
  padding: 4px 14px;
  background: #8b0000;
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}
.gy-level-chip.gy-top { background: linear-gradient(135deg, #c41e3a, #8b0000); }
.gy-level-chip.gy-mid { background: linear-gradient(135deg, #d4a017, #8b6032); }
.gy-level-chip.gy-bad { background: linear-gradient(135deg, #8b6b52, #4d2f15); }

.gy-name-chip {
  display: inline-block;
  padding: 4px 14px;
  background: #faf0e0;
  color: #6b4c3b;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid #d9cbb5;
}
/* 诗意 card (卦象) */
.gy-imagery-card {
  background: #fff;
  border: 1px solid #e8d5b7;
  border-left: 4px solid #d4a017;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 16px;
}
.gy-imagery-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 17px;
  color: #8b6032;
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}
.gy-imagery-body {
  font-size: 16px;
  color: #2d1b0e;
  line-height: 2;
}

/* 解曰 card (四句口诀) */
.gy-verdict-card {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.04) 0%, rgba(212, 160, 23, 0.04) 100%);
  border: 1px dashed #8b0000;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 14px;
  text-align: center;
}
.gy-verdict-title {
  display: inline-block;
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  color: #fff;
  background: #8b0000;
  padding: 2px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  letter-spacing: 2px;
}
.gy-verdict-body {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  color: #2d1b0e;
  letter-spacing: 3px;
  line-height: 2;
}

/* 签诗 card — 古典四句诗 */
.gy-poem-card {
  background: linear-gradient(135deg, #fef8eb 0%, #fdf6ec 100%);
  border: 1px solid #e4c97a;
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 18px;
  text-align: center;
  position: relative;
}
.gy-poem-card::before {
  content: '签诗';
  position: absolute;
  top: -10px;
  left: 18px;
  background: #8b0000;
  color: #fff;
  padding: 2px 14px;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 3px;
}
.gy-poem-line {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  line-height: 2;
  color: #2d1b0e;
  letter-spacing: 3px;
}
.gy-poem-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #d9cbb5;
  font-size: 13px;
  color: #6b4c3b;
  font-style: italic;
}

/* 七事判断 grid */
.gy-seven-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 20px;
}
/* 七事 grid 后面紧跟的卡片 (综合建议) 需额外上间距 */
.gy-seven-grid + .sv-card {
  margin-top: 8px;
}
.gy-seven-item {
  background: #fff;
  border: 1px solid #e8d5b7;
  border-left: 4px solid #d4a017;
  border-radius: 10px;
  padding: 16px 18px;
  transition: box-shadow 0.2s;
}
.gy-seven-item:hover {
  box-shadow: 0 4px 10px rgba(139, 0, 0, 0.08);
}
.gy-seven-item-label {
  font-family: 'Noto Serif SC', serif;
  font-size: 17px;
  font-weight: 700;
  color: #8b0000;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gy-seven-item-verdict {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 4px;
  margin-left: auto;
  letter-spacing: 1px;
}
.gy-seven-verdict-good { background: #e3f5e7; color: #2d8a4e; border: 1px solid #b8dec3; }
.gy-seven-verdict-mid  { background: #faf0e0; color: #8b6032; border: 1px solid #e4c97a; }
.gy-seven-verdict-bad  { background: #fde4e8; color: #c41e3a; border: 1px solid #f0bcc5; }
/* 七事正文对标 .reading-text 16px / line-height 2 */
.gy-seven-item-body {
  font-size: 16px;
  color: #2d1b0e;
  line-height: 2;
}

/* 白话解签 card — 对标八字 .reading-card */
.gy-explain-card {
  background: #fdf6ec;
  border: 1px solid #e8d5b7;
  border-left: 4px solid #8b0000;
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 18px;
}
.gy-explain-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 20px;
  color: #8b0000;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(139, 0, 0, 0.15);
  font-weight: 700;
}
/* 正文对标 .reading-text 16px / line-height 2 */
.gy-explain-body {
  font-size: 16px;
  line-height: 2;
  color: #2d1b0e;
}

/* 典故 card — 金色古风 */
.gy-story-card {
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.08) 0%, rgba(212, 160, 23, 0.03) 100%);
  border: 1px dashed #d4a017;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 18px;
}
.gy-story-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 17px;
  color: #8b6032;
  margin-bottom: 10px;
  font-weight: 700;
}
/* 典故正文略缩 (15px) — 因为是辅助阅读而非主体解读 */
.gy-story-body {
  font-size: 15px;
  line-height: 1.9;
  color: #2d1b0e;
}

/* 响应式 */
@media (max-width: 640px) {
  .gy-seven-grid { grid-template-columns: 1fr 1fr; }
  .gy-result-header { flex-direction: column; text-align: center; }
  .gy-result-header-meta { justify-content: center; }
  .gy-poem-line { font-size: 16px; letter-spacing: 2px; }
}
@media (max-width: 420px) {
  .gy-seven-grid { grid-template-columns: 1fr; }
}
