/**
 * 塔罗牌手势隔空抽卡牌样式 — 神秘空灵现代风
 * Mystical Ethereal Modern — gradient glow, glassmorphism, cosmic palette
 */

/* ── Gesture Cylinder Area ── */
.tarot-cylinder-container {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 380px;
  max-height: 520px;
  overflow: visible;
  margin: 0 auto;
  background: transparent;
  padding-bottom: 100px;
  touch-action: none;
}

/* ── Mystical Background SVG ── */
.tarot-bg-svg {
  position: absolute;
  inset: 12%;
  width: 76%;
  height: 76%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  animation: tarotBgRotate 25s linear infinite, tarotBgGlow 4s ease-in-out infinite;
}

.tarot-bg-svg svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.4)) drop-shadow(0 0 60px rgba(255, 215, 0, 0.2));
}

@keyframes tarotBgRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes tarotBgGlow {
  0%, 100% {
    opacity: 0.2;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.3)) brightness(0.9);
  }
  50% {
    opacity: 0.45;
    filter: drop-shadow(0 0 50px rgba(168, 85, 247, 0.6)) drop-shadow(0 0 80px rgba(255, 215, 0, 0.3)) brightness(1.4);
  }
}

/* ── Cylinder Position ── */
.tarot-cylinder {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── Gesture Instruction ── */
.gesture-instruction {
  position: absolute;
  top: calc(8% + 384px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 10;
}

.gesture-instruction.visible { opacity: 1; }

.gesture-instruction .hand-icon { font-size: 40px; }

.gesture-instruction .instruction-text {
  margin-top: 5px;
  font-size: 12px;
  opacity: 0.8;
  color: rgba(255, 255, 255, 0.7);
}

.swipe-indicator {
  display: none;
}

/* ── Cylinder Cards ── */
.cylinder-card {
  position: absolute;
  width: 96px;
  height: 134px;
  left: 50%;
  top: 50%;
  transform-origin: center center;
  will-change: transform, opacity;
  backface-visibility: hidden;
  pointer-events: auto;
  border-radius: 5px;
}

.cylinder-card .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: block;
  border-radius: 5px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    0 0 16px rgba(168, 85, 247, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.cylinder-card .card-front {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 5px;
  border: 2px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(160deg, #1a1440 0%, #0f0d24 60%, #08081a 100%);
  z-index: 1;
}

.cylinder-card .card-front.golden-glow {
  border-color: rgba(255, 215, 0, 0.9);
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.8),
    0 0 60px rgba(255, 215, 0, 0.5),
    0 0 90px rgba(168, 85, 247, 0.3);
  animation: goldenBorderPulse 0.5s ease-in-out infinite;
}

@keyframes goldenBorderPulse {
  0%, 100% {
    border-color: rgba(255, 215, 0, 0.7);
    box-shadow:
      0 0 30px rgba(255, 215, 0, 0.6),
      0 0 60px rgba(255, 215, 0, 0.4),
      0 0 80px rgba(168, 85, 247, 0.2);
  }
  50% {
    border-color: rgba(255, 215, 0, 1);
    box-shadow:
      0 0 50px rgba(255, 215, 0, 0.9),
      0 0 90px rgba(255, 215, 0, 0.6),
      0 0 120px rgba(168, 85, 247, 0.4);
  }
}

.cylinder-card .card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ── Drawn Cards Container ── */
.drawn-cards-container {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 100;
  justify-content: center;
}

.drawn-card-slot {
  width: 90px;
  height: 126px;
  position: relative;
  border: 2px solid rgba(255, 215, 0, 0.25);
  border-radius: 6px;
  background: rgba(26, 20, 64, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.1);
}

.drawn-card-slot.filled {
  border-color: rgba(255, 215, 0, 0.7);
  box-shadow:
    0 0 24px rgba(255, 215, 0, 0.3),
    0 0 48px rgba(168, 85, 247, 0.2);
}

/* ── Drawn Cards Labels ── */
.drawn-cards-labels {
  display: flex;
  justify-content: center;
  gap: 12px 46px;
  margin-top: 4px;
}

.drawn-card-label {
  width: 56px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(15, 13, 36, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.12);
  padding: 4px 8px;
  border-radius: 10px;
}

/* ── Gesture Status ── */
.gesture-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 20px;
  max-width: 200px;
  margin: auto;
  padding: 6px 12px;
  background: rgba(15, 13, 36, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.08);
}

.gesture-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4444;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.gesture-status-indicator.active {
  background: #44ff44;
  box-shadow: 0 0 12px rgba(68, 255, 68, 0.6);
}

.gesture-status-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.gesture-status-text.active {
  color: #44ff44;
  font-weight: 500;
}

/* ── Drawn Card Inner ── */
.drawn-cards-container .drawn-card {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.drawn-cards-container .drawn-card .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.drawn-cards-container .drawn-card.revealed .card-back { opacity: 0; z-index: 1; }
.drawn-cards-container .drawn-card.revealed .card-front { opacity: 1; z-index: 2; }

.drawn-cards-container .drawn-card .card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 6px;
  background: linear-gradient(160deg, #1a1440 0%, #0f0d24 60%, #08081a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  overflow: hidden;
}

.drawn-cards-container .drawn-card .card-front.reversed {
  transform: rotate(180deg);
}

.drawn-cards-container .drawn-card .card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

@keyframes drawCardAnimation {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  50%  { transform: translateY(-40vh) scale(0.8); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.drawn-cards-container .drawn-card.drawing {
  animation: drawCardAnimation 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ═══════════════════════════════════════════════════════════════
   Tarot Result Modal (3-card reveal after gesture)
   ═══════════════════════════════════════════════════════════════ */

.tarot-result-content {
  width: min(700px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-xl);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 215, 0, 0.05) 0%, transparent 40%),
    rgba(15, 13, 36, 0.88);
  border-radius: 24px;
  border: 1px solid rgba(255, 215, 0, 0.12);
  box-shadow:
    0 0 60px rgba(168, 85, 247, 0.25),
    0 0 120px rgba(107, 63, 160, 0.15),
    0 20px 50px rgba(0, 0, 0, 0.5);
  animation: resultEtherealIn 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes resultEtherealIn {
  from { opacity: 0; transform: translateY(24px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tarot-result-content::-webkit-scrollbar {
  width: 5px;
}

.tarot-result-content::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.2);
  border-radius: 3px;
}

.tarot-result-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: none;
  position: relative;
}

.tarot-result-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.4), transparent);
}

.tarot-result-header h4 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin: 0;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #d4af37 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tarot-result-cards {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.tarot-result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  animation: tarotCardReveal 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) backwards;
}

.tarot-result-card:nth-child(1) { animation-delay: 0.1s; }
.tarot-result-card:nth-child(2) { animation-delay: 0.25s; }
.tarot-result-card:nth-child(3) { animation-delay: 0.4s; }

@keyframes tarotCardReveal {
  from { opacity: 0; transform: translateY(16px) scale(0.88) rotateX(5deg); }
  to   { opacity: 1; transform: translateY(0) scale(1) rotateX(0deg); }
}

.tarot-result-card-inner {
  width: 120px;
  height: 168px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 30px rgba(168, 85, 247, 0.3),
    0 8px 30px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 215, 0, 0.25);
  background: #0f0d24;
}

.tarot-result-card-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 2;
}

.tarot-result-card-inner.reversed {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow:
    0 0 30px rgba(168, 85, 247, 0.4),
    0 8px 30px rgba(0, 0, 0, 0.5);
}

.tarot-result-card-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  user-select: none;
  -webkit-user-select: none;
}

.tarot-result-card-inner.reversed .tarot-result-card-img {
  transform: rotate(180deg);
}

.tarot-result-position {
  font-size: 14px;
  color: var(--tarot-mystic-purple);
  letter-spacing: 2px;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.tarot-result-card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.tarot-result-orientation {
  font-size: 13px;
  font-weight: 600;
  color: var(--tarot-gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.tarot-result-orientation.reversed {
  color: var(--tarot-mystic-purple);
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.tarot-result-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   Interpretation Modal (card details + question + AI)
   ═══════════════════════════════════════════════════════════════ */

.interpretation-content {
  width: min(800px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: var(--space-xl);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(168, 85, 247, 0.06) 0%, transparent 45%),
    rgba(8, 8, 26, 0.92);
  border-radius: 24px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  box-shadow:
    0 0 80px rgba(168, 85, 247, 0.2),
    0 0 160px rgba(107, 63, 160, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.6);
  animation: resultEtherealIn 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  position: relative;
}

.interpretation-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.15), transparent);
  pointer-events: none;
}

.interpretation-content::-webkit-scrollbar {
  width: 6px;
}

.interpretation-content::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.2);
  border-radius: 3px;
}

.interpretation-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 215, 0, 0.35);
}

/* ── Interpretation Header ── */
.interpretation-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: none;
  position: relative;
}

.interpretation-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.35), transparent);
}

.interpretation-header h4 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin: 0;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #d4af37 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Interpretation Cards ── */
.interpretation-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.interpretation-card {
  display: flex;
  gap: 14px;
  background: rgba(26, 20, 64, 0.35);
  border: 1px solid rgba(255, 215, 0, 0.08);
  border-radius: 16px;
  padding: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.interpretation-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
  pointer-events: none;
}

.interpretation-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 215, 0, 0.2);
  box-shadow:
    0 0 30px rgba(168, 85, 247, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.3);
}

.interpretation-card-image {
  flex-shrink: 0;
  width: 96px;
  height: 168px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.15);
  background: #0f0d24;
  box-shadow:
    0 0 20px rgba(168, 85, 247, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.3);
  position: relative;
}

.interpretation-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 215, 0, 0.06) 0%, transparent 65%);
  pointer-events: none;
}

.interpretation-card-image.reversed {
  border-color: rgba(168, 85, 247, 0.35);
}

.interpretation-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.interpretation-card-image.reversed img {
  transform: rotate(180deg);
}

.interpretation-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.interpretation-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.interpretation-card-position {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 215, 0, 0.9);
  font-weight: 500;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
}

.interpretation-card-orientation {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
  text-align: right;
}

.interpretation-card-orientation.reversed {
  color: rgba(168, 85, 247, 0.85);
}

.interpretation-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.interpretation-card-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.interpretation-card-keywords-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.interpretation-card-keywords-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255, 215, 0, 0.85);
}

.interpretation-card-keywords {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.interpretation-card-keyword {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.15);
  padding: 4px 10px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.interpretation-card-keyword:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.3);
}

.interpretation-card-tip-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.interpretation-card-tip-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255, 215, 0, 0.85);
}

.interpretation-card-tip {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

/* ── Question Section ── */
.interpretation-question {
  margin-bottom: var(--space-xl);
  background: rgba(26, 20, 64, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 20px;
  padding: 20px;
  position: relative;
}

.interpretation-question-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 215, 0, 0.9);
  margin-bottom: 12px;
}

.interpretation-question-header svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 215, 0, 0.7);
}

.interpretation-textarea {
  width: 100%;
  background: rgba(8, 8, 26, 0.75);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  padding: 14px;
  resize: none;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.75;
  min-height: 110px;
}

.interpretation-textarea:focus {
  border-color: rgba(255, 215, 0, 0.45);
  background: rgba(8, 8, 26, 0.9);
  box-shadow:
    0 0 20px rgba(255, 215, 0, 0.1),
    0 0 40px rgba(168, 85, 247, 0.08);
}

.interpretation-textarea::placeholder {
  color: rgba(255, 255, 255, 0.22);
  font-size: 13px;
}

/* ── Quick Questions Marquee ── */
.interpretation-quick-questions {
  display: flex;
  gap: 8px;
  overflow: hidden;
  padding-bottom: 8px;
  margin-top: 12px;
  position: relative;
  width: 100%;
}

.quick-questions-track {
  display: flex;
  gap: 8px;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}

.quick-questions-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.quick-question-btn {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(26, 20, 64, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 24px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  white-space: nowrap;
}

.quick-question-btn:hover {
  color: var(--tarot-gold);
  background: rgba(107, 63, 160, 0.25);
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.15);
  transform: translateY(-1px);
}

.interpretation-charcount {
  text-align: right;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 8px;
}

/* ── AI Section ── */
.interpretation-ai-section {
  background: rgba(26, 20, 64, 0.25);
  border: 1px solid rgba(255, 215, 0, 0.08);
  border-radius: 20px;
  padding: 20px;
  position: relative;
}

.interpretation-ai-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.interpretation-ai-header::before,
.interpretation-ai-header::after {
  content: '';
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.35));
}

.interpretation-ai-header::after {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.35), transparent);
}

.interpretation-ai-header svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 215, 0, 0.5);
}

.interpretation-ai-header h3 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffd700 0%, #f0a500 40%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  text-shadow: none;
}

/* ── User Question Display ── */
.interpretation-user-question {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 10px 18px;
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 12px;
}

.interpretation-question-tag {
  font-size: 12px;
  color: rgba(255, 215, 0, 0.55);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.interpretation-user-question #interpretation-user-question-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

/* ── AI Result Wrapper ── */
.interpretation-ai-result-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 20px;
  text-align: center;
}

.interpretation-ai-result-intro {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  margin-bottom: 20px;
}

.interpretation-ai-result-intro span {
  display: block;
}

.interpretation-ai-result {
  width: 100%;
  background: rgba(8, 8, 26, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.08);
  border-radius: 16px;
  padding: 24px 22px;
  line-height: 1.8;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  max-height: fit-content;
  overflow-y: auto;
  text-align: left;
  position: relative;
}

.interpretation-ai-result::-webkit-scrollbar {
  width: 5px;
}

.interpretation-ai-result::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.2);
  border-radius: 3px;
}

/* ── Loading ── */
.interpretation-ai-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl) 0;
}

.interpretation-ai-loading p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
}

/* ── Analyze Buttons ── */
.interpretation-analyze-btn-wrapper {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
}

.interpretation-analyze-btn {
  flex: 1;
  min-width: 180px;
  max-width: 240px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 700;
  color: #0f0d24;
  background: linear-gradient(135deg, #ffd700, #d89f45);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 0 30px rgba(216, 159, 69, 0.35),
    0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

/* 深度解读：紫金渐变区分 */
.interpretation-analyze-deep {
  background: linear-gradient(135deg, #c084fc, #a855f7);
  box-shadow:
    0 0 30px rgba(168, 85, 247, 0.35),
    0 4px 16px rgba(0, 0, 0, 0.3);
  color: #fff;
}

.interpretation-analyze-btn::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -40%;
  width: 180%;
  height: 180%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.interpretation-analyze-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 0 50px rgba(216, 159, 69, 0.5),
    0 8px 30px rgba(0, 0, 0, 0.4);
}

.interpretation-analyze-quick:hover {
  background: linear-gradient(135deg, #ffe44d, #e0a82e);
}

.interpretation-analyze-deep:hover {
  background: linear-gradient(135deg, #d8b4fe, #c084fc);
  box-shadow:
    0 0 50px rgba(168, 85, 247, 0.5),
    0 8px 30px rgba(0, 0, 0, 0.4);
}

.interpretation-analyze-btn:hover::after {
  opacity: 1;
}

.interpretation-analyze-btn:active {
  transform: translateY(0) scale(0.98);
}

.interpretation-analyze-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Mode Tabs ── */
.interpretation-mode-tabs {
  display: flex;
  background: rgba(26, 20, 64, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 50px;
  padding: 4px;
  width: 100%;
  max-width: 200px;
}

.interpretation-mode-tab {
  flex: 1;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border: none;
  border-radius: 46px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.interpretation-mode-tab.active {
  color: #0f0d24;
  background: linear-gradient(135deg, #ffd700, #d89f45);
  box-shadow:
    0 0 20px rgba(216, 159, 69, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.25);
}

.interpretation-mode-tab:hover:not(.active) {
  color: var(--tarot-gold);
  background: rgba(255, 215, 0, 0.08);
}

.interpretation-mode-tab svg {
  width: 14px;
  height: 14px;
}

/* ── Extra Actions ── */
.interpretation-extra-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.interpretation-action-btn {
  padding: 10px 24px;
  font-size: 13px;
  color: rgba(255, 215, 0, 0.75);
  background: transparent;
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.interpretation-action-btn:hover {
  color: rgba(255, 215, 0, 1);
  border-color: rgba(255, 215, 0, 0.45);
  background: rgba(255, 215, 0, 0.06);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
  transform: translateY(-1px);
}

.interpretation-action-btn svg {
  width: 14px;
  height: 14px;
}

.interpretation-action-vip {
  color: rgba(168, 85, 247, 0.6);
  border-color: rgba(168, 85, 247, 0.2);
}

.interpretation-action-vip:hover {
  color: rgba(168, 85, 247, 0.9);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.interpretation-action-vip-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   AI Analysis Typography (Desktop)
   ═══════════════════════════════════════════════════════════════ */

.analysis-content {
  width: 100%;
  text-align: left;
  line-height: 1.8;
}

.analysis-content > :first-child { margin-top: 0 !important; }
.analysis-content > :last-child  { margin-bottom: 0 !important; }

.analysis-h2 {
  font-size: 1.24rem;
  line-height: 1.6;
  color: #f4e4bf;
  font-weight: 700;
  margin: 1.2rem 0 0.32rem;
  text-align: left;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

.analysis-p {
  font-size: 1rem;
  margin: 0 0 0.7rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.85);
}

.analysis-highlight {
  color: var(--tarot-gold);
  font-weight: 700;
  padding: 0 0.08em 0.02em;
  border-radius: 0.08em;
  background: linear-gradient(180deg, transparent, transparent 62%, rgba(255, 215, 0, 0.18) 0, rgba(255, 215, 0, 0.28));
  border: 0;
  box-shadow: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.analysis-ordered-list {
  list-style: decimal;
  padding-left: 1.35rem;
  margin: 0 0 0.7rem;
}

.analysis-ordered-list .analysis-li {
  font-size: 1rem;
  margin-bottom: 0.28rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
}

/* ═══════════════════════════════════════════════════════════════
   Spirit Button (general tarot action)
   ═══════════════════════════════════════════════════════════════ */

.control-btn {
  padding: 8px 16px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 20px;
  background: rgba(107, 63, 160, 0.1);
  color: var(--tarot-mystic-purple);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.control-btn.active {
  background: linear-gradient(135deg, #7c3aed, #6b3fa0);
  color: white;
  border-color: transparent;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
}

.control-btn:hover {
  background: rgba(107, 63, 160, 0.2);
  border-color: rgba(168, 85, 247, 0.6);
}

.control-btn.active:hover {
  background: linear-gradient(135deg, #8b4cf5, #7c3aed);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.5);
}

/* ═══════════════════════════════════════════════════════════════
   Responsive — Tablet (≤768px)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .cylinder-card {
    width: 72px;
    height: 100px;
  }

  .drawn-cards-container {
    gap: 8px;
    top: 6%;
  }

  .drawn-card-slot {
    width: 56px;
    height: 80px;
    border-width: 1.5px;
  }

  .drawn-cards-labels {
    gap: 8px 20px;
    margin-top: 3px;
  }

  .drawn-card-label {
    width: 44px;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 8px;
  }

  .gesture-instruction {
    top: calc(6% + 106px);
  }

  .gesture-status {
    gap: 6px;
    max-width: 160px;
    padding: 5px 10px;
  }

  .gesture-status-indicator {
    width: 6px;
    height: 6px;
  }

  .gesture-status-text {
    font-size: 11px;
  }

  /* Result modal */
  .tarot-result-content {
    width: 96vw;
    padding: var(--space-lg);
    border-radius: 20px;
  }

  .tarot-result-cards {
    gap: var(--space-md);
  }

  .tarot-result-card-inner {
    width: 90px;
    height: 126px;
  }

  .tarot-result-position   { font-size: 12px; }
  .tarot-result-orientation { font-size: 11px; }
  .tarot-result-name       { font-size: 14px; }

  /* Interpretation modal */
  .interpretation-content {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    padding: 20px 16px 32px;
    overflow-y: auto;
  }

  .interpretation-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .interpretation-header h4 {
    font-size: 1.1rem;
  }

  .interpretation-cards {
    gap: 10px;
    margin-bottom: 16px;
  }

  .interpretation-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
  }

  .interpretation-card-image {
    width: 60px;
    height: 88px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .interpretation-card-body {
    align-items: flex-start;
    text-align: left;
    gap: 6px;
    flex: 1;
    min-width: 0;
  }

  .interpretation-card-header {
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
  }

  .interpretation-card-position    { font-size: 10px; }
  .interpretation-card-orientation { font-size: 10px; }
  .interpretation-card-name        { font-size: 14px; }
  .interpretation-card-desc        { font-size: 11px; line-height: 1.5; }

  .interpretation-card-keywords { gap: 5px; }

  .interpretation-card-keyword {
    font-size: 9px;
    padding: 3px 7px;
  }

  .interpretation-card-tip {
    font-size: 11px;
    line-height: 1.5;
  }

  .interpretation-card-keywords-label,
  .interpretation-card-tip-title {
    font-size: 9px;
  }

  .interpretation-question {
    padding: 14px;
    border-radius: 16px;
    margin-bottom: 16px;
  }
}

/* ── API Error Display ── */
.analysis-error {
  text-align: center;
  padding: 30px 24px;
  background: rgba(180, 30, 30, 0.12);
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 16px;
  margin: 12px 0;
}

.analysis-error-icon {
  font-size: 42px;
  margin-bottom: 12px;
  color: #ff6b6b;
}

.analysis-error-title {
  font-size: 18px;
  font-weight: 600;
  color: #ff8c8c;
  margin: 0 0 10px 0;
}

.analysis-error-detail {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.analysis-error-hint {
  text-align: left;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 auto;
  max-width: 400px;
}

.analysis-error-hint p {
  margin: 0 0 6px 0;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.analysis-error-hint ul {
  margin: 0;
  padding-left: 18px;
}

.analysis-error-hint li {
  margin: 4px 0;
  line-height: 1.5;
}

.analysis-error-hint code {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
}

.analysis-error-debug {
  margin-top: 16px;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.analysis-error-debug summary {
  cursor: pointer;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
}

.analysis-error-debug pre {
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  padding: 10px;
  border-radius: 6px;
  margin-top: 6px;
  overflow-x: auto;
  max-height: 200px;
}

  .interpretation-question-header {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .interpretation-question-header svg {
    width: 14px;
    height: 14px;
  }

  .interpretation-textarea {
    font-size: 13px;
    padding: 12px;
    min-height: 85px;
    border-radius: 14px;
  }

  .interpretation-quick-questions {
    gap: 6px;
    margin-top: 10px;
  }

  .quick-question-btn {
    font-size: 11px;
    padding: 6px 11px;
  }

  .interpretation-charcount {
    font-size: 10px;
    margin-top: 6px;
  }

  .interpretation-ai-section {
    padding: 14px;
    border-radius: 16px;
  }

  .interpretation-ai-header {
    gap: 8px;
    margin-bottom: 14px;
  }

  .interpretation-ai-header h3 {
    font-size: 17px;
  }

  .interpretation-ai-header::before,
  .interpretation-ai-header::after {
    width: 24px;
  }

  .interpretation-ai-result-wrapper {
    min-height: auto;
    padding: 12px 4px;
  }

  .interpretation-ai-result-intro {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  .interpretation-ai-result {
    padding: 14px 12px;
    font-size: 13px;
    line-height: 1.7;
    border-radius: 14px;
    max-height: fit-content;
  }

  .interpretation-analyze-btn-wrapper {
    gap: 10px;
  }

  .interpretation-analyze-btn {
    min-width: 0;
    max-width: none;
    flex: 1;
    padding: 12px 14px;
    font-size: 13px;
    border-radius: 40px;
  }

  .interpretation-analyze-btn svg { width: 14px; height: 14px; }

  .interpretation-ai-loading {
    padding: 16px 0;
  }

  .interpretation-extra-actions {
    gap: 10px;
    margin-top: 14px;
  }

  .interpretation-action-btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .interpretation-action-btn svg { width: 12px; height: 12px; }

  .interpretation-action-vip-desc {
    font-size: 10px;
    margin-top: 6px;
  }

  .analysis-h2 {
    font-size: 1.05rem;
    margin: 0.9rem 0 0.24rem;
  }

  .analysis-p,
  .analysis-ordered-list .analysis-li {
    font-size: 0.88rem;
    line-height: 1.7;
  }

  .analysis-highlight { font-size: 0.88rem; }

  .analysis-ordered-list {
    padding-left: 1.1rem;
    margin: 0 0 0.5rem;
  }

  .analysis-ordered-list .analysis-li {
    margin-bottom: 0.2rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Responsive — Mobile (≤480px)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .drawn-cards-container {
    gap: 6px;
    top: 5%;
  }

  .drawn-card-slot {
    width: 48px;
    height: 68px;
    border-width: 1px;
  }

  .drawn-cards-labels {
    gap: 6px 15px;
    margin-top: 2px;
  }

  .drawn-card-label {
    width: 38px;
    font-size: 8px;
    padding: 2px 5px;
    border-radius: 6px;
  }

  .gesture-status {
    gap: 4px;
    max-width: 140px;
    padding: 4px 8px;
  }

  .gesture-status-indicator {
    width: 5px;
    height: 5px;
  }

  .gesture-status-text {
    font-size: 10px;
  }

  /* Result modal */
  .tarot-result-card-inner {
    width: 72px;
    height: 100px;
  }

  .tarot-result-cards {
    gap: var(--space-sm);
  }

  /* Interpretation modal */
  .interpretation-content {
    padding: 14px 12px 24px;
  }

  .interpretation-card {
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
  }

  .interpretation-card-image {
    width: 72px;
    height: 102px;
    border-radius: 8px;
  }

  .interpretation-card-body {
    align-items: center;
    text-align: center;
  }

  .interpretation-card-header {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .interpretation-header h4 {
    font-size: 1rem;
  }

  .interpretation-ai-header h3 {
    font-size: 15px;
  }

  .interpretation-ai-result {
    padding: 12px 10px;
    font-size: 12px;
    max-height: fit-content;
  }

  .analysis-h2 {
    font-size: 1rem;
  }

  .analysis-p,
  .analysis-ordered-list .analysis-li {
    font-size: 0.83rem;
    line-height: 1.65;
  }
}
