/* ============================================================
   六爻占卜 UI — 龟壳 + 铜钱 动画
   ============================================================ */
.liuyao-instructions {
  background: linear-gradient(135deg, #fff8e7 0%, #fcefc7 100%);
  border: 1px solid #d4a017;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #5b4330;
  line-height: 1.8;
}
.liuyao-step strong {
  color: #8b0000;
  font-size: 14px;
}

.liuyao-shells-wrap {
  background: #faf7f0;
  border: 1px solid #e8d5b7;
  border-radius: 10px;
  padding: 18px 14px;
  margin-top: 16px;
}
.liuyao-shells-title {
  font-size: 14px;
  font-weight: 700;
  color: #8b0000;
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: 1px;
}
.liuyao-shells-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
@media (max-width: 640px) {
  .liuyao-shells-row { grid-template-columns: repeat(3, 1fr); }
}

.liuyao-shell-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  background: #fff;
  border: 2px dashed #c2b3a0;
  border-radius: 8px;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}
.liuyao-shell-cell.is-tossed {
  background: linear-gradient(135deg, #fff8e7 0%, #f5ebd1 100%);
  border: 2px solid #d4a017;
  cursor: default;
}
.liuyao-shell-cell:hover:not(.is-tossed) {
  transform: translateY(-2px);
  border-color: #8b0000;
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.15);
}
.liuyao-shell-label {
  font-size: 11px;
  color: #6b4c3b;
  font-weight: 600;
}
.liuyao-shell-icon {
  width: 64px;
  height: 48px;
  display: block;
  user-select: none;
  transition: transform 0.35s;
}
.liuyao-shell-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
}
.liuyao-shell-cell:hover:not(.is-tossed) .liuyao-shell-icon {
  animation: liuyao-shake 0.6s ease-in-out infinite;
}
@keyframes liuyao-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg) translateY(-1px); }
  75% { transform: rotate(6deg) translateY(-1px); }
}
.liuyao-shell-cell.is-tossed .liuyao-shell-icon {
  width: 40px;
  height: 30px;
  opacity: 0.55;
}

.liuyao-coins-row {
  display: flex;
  gap: 4px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
}
.liuyao-coin {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid #8b5a00;
  background: radial-gradient(circle at 30% 30%, #ffe180 0%, #d4a017 60%, #a07c10 100%);
  color: #5b4330;
  font-family: 'Noto Serif SC', serif;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  position: relative;
  animation: liuyao-coin-flip 0.6s ease;
}
.liuyao-coin.coin-yin {
  background: radial-gradient(circle at 30% 30%, #d0d0d0 0%, #8b8b8b 60%, #555 100%);
  color: #fff;
}
.liuyao-coin.coin-yin::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1.5px solid #333;
  border-radius: 50%;
}
@keyframes liuyao-coin-flip {
  0% { transform: rotateY(0deg) scale(0.3); opacity: 0; }
  50% { transform: rotateY(720deg) scale(1.1); opacity: 0.6; }
  100% { transform: rotateY(1440deg) scale(1); opacity: 1; }
}

.liuyao-yao-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.liuyao-yao-badge.y-old-yang  { background: #c41e3a; color: #fff; }    /* 老阳 ◯ 变爻 */
.liuyao-yao-badge.y-young-yin { background: #e8e8e8; color: #555; }    /* 少阴 */
.liuyao-yao-badge.y-young-yang { background: #fff6d5; color: #8b5a00; border: 1px solid #d4a017; } /* 少阳 */
.liuyao-yao-badge.y-old-yin   { background: #8b0000; color: #fff; }    /* 老阴 ✕ 变爻 */

/* 卦象预览 */
.liuyao-preview-wrap {
  margin-top: 20px;
  padding: 18px;
  background: linear-gradient(135deg, #fff8e7 0%, #fcefc7 100%);
  border: 2px solid #d4a017;
  border-radius: 12px;
  text-align: center;
}
.liuyao-preview-title {
  font-size: 16px;
  font-weight: 700;
  color: #8b0000;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.liuyao-preview-body {
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.liuyao-hex-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.liuyao-hex-label {
  font-size: 14px;
  font-weight: 700;
  color: #8b0000;
  margin-bottom: 6px;
}
.liuyao-hex-line {
  width: 100px;
  height: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #2d1b0e;
  position: relative;
}
.liuyao-hex-yang .liuyao-hex-bar { width: 100px; height: 8px; background: #2d1b0e; border-radius: 2px; }
.liuyao-hex-yin  .liuyao-hex-bar { width: 100px; height: 8px; background: linear-gradient(90deg, #2d1b0e 0 44%, transparent 44% 56%, #2d1b0e 56% 100%); border-radius: 2px; }
.liuyao-hex-changing { position: absolute; right: -24px; font-size: 14px; color: #c41e3a; font-weight: 700; }

.liuyao-hex-name {
  margin-top: 8px;
  font-size: 13px;
  color: #6b4c3b;
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 0.5px;
}
.liuyao-hex-name strong { color: #8b0000; font-size: 15px; }

.liuyao-reset-btn {
  padding: 8px 20px;
  background: #fff;
  color: #8b0000;
  border: 1px solid #8b0000;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}
.liuyao-reset-btn:hover { background: #8b0000; color: #fff; }

/* 结果页卦象展示 */
.liuyao-result-wrap {
  padding: 16px;
}
.liuyao-result-hero {
  background: linear-gradient(135deg, #8b0000 0%, #c41e3a 100%);
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 18px;
}
.liuyao-result-hero h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 28px;
  margin-bottom: 6px;
}
.liuyao-result-hero .question {
  background: rgba(255,255,255,0.12);
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-top: 6px;
}
.liuyao-result-hexagrams {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 16px 0 24px;
  flex-wrap: wrap;
}
