:root {
  --bg-1: #262626;
  --bg-2: #262626;
  --bg-3: #262626;
  --gold: #d9b66f;
  --gold-soft: rgba(217, 182, 111, 0.24);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f7f4ee;
  --sub: rgba(247, 244, 238, 0.72);
  --panel: rgba(40, 40, 40, 0.85);
  --panel-border: rgba(255,255,255,0.08);
  --shadow: 0 18px 60px rgba(0,0,0,0.6);
  --radius: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 隐藏滚动条但保持滚动功能 */
*::-webkit-scrollbar {
  display: none;
}

* {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #16161D;
  color: var(--text);
  overflow: hidden;
  position: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle 864px at 69.5% 6.9%, rgba(26, 53, 74, 0.6), transparent),
    radial-gradient(circle 832.5px at 32.9% 32.4%, rgba(26, 53, 74, 0.4), transparent),
    radial-gradient(circle 450.5px at 99.5% 90.5%, rgba(26, 53, 74, 0.4), transparent),
    radial-gradient(circle 632.5px at 8.7% 93.9%, rgba(35, 32, 27, 0.8), transparent);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

@keyframes driftBg {
  0% { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  100% { transform: translate3d(1.5%, 1.2%, 0) scale(1.05); }
}

/* ===== Particle Canvas ===== */
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.95;
  mix-blend-mode: screen;
}

/* 历史回放 & 问题页：左上角返回胶囊按钮 */
.history-back-nav {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 12px;
  font-size: 11px;
  letter-spacing: 2px;
  color: #8a8d91;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  background: rgba(10,10,15,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s;
  cursor: pointer;
  font-family: inherit;
}
.history-back-nav:hover {
  color: #d9b66f;
  border-color: rgba(217,182,111,0.4);
  box-shadow: 0 0 16px rgba(217,182,111,0.2);
}

/* 历史记录入口按钮 */
.history-btn {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 12px;
  color: #8a8d91;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  background: rgba(10,10,15,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 2px;
}
.history-btn:hover {
  color: #d9b66f;
  border-color: rgba(217,182,111,0.4);
  box-shadow: 0 0 16px rgba(217,182,111,0.2);
}
.history-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.065;
  background-image: radial-gradient(circle, rgba(255,255,255,0.9) 0.5px, transparent 0.6px);
  background-size: 8px 8px;
  mix-blend-mode: soft-light;
}

/* ===== Page Structure ===== */
.scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  isolation: isolate;
  opacity: 1;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
  overflow: auto;
  transform: translateY(0);
}

/* 结果页需要允许滚动 */
#resultPage {
  display: block;
  padding: 0;
}

.scene.slide-up {
  transform: translateY(-100%);
  opacity: 0;
}

.scene.slide-in-from-bottom {
  transform: translateY(100%);
  opacity: 0;
}

.scene.slide-in-from-bottom.active {
  transform: translateY(0);
  opacity: 1;
}

.scene.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== 首页样式 ===== */
.content {
  position: relative;
  z-index: 5;
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 28px;
  align-items: center;
}

.left {
  position: relative;
  min-height: 700px;
  display: grid;
  place-items: center;
  max-width: 100%;
  overflow: visible;
  z-index: 1;
}

/* Orbits */
.orbits {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(720px, 90vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

.orbit,
.orbit::before,
.orbit::after {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(100, 150, 180, 0.08);
  content: "";
}

.orbit::before { inset: 10%; }
.orbit::after { inset: 22%; }

/* Chart */
.chart-wrap {
  position: relative;
  width: min(560px, 90vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  z-index: 3;
  filter: drop-shadow(0 0 40px rgba(80, 150, 190, 0.2)) drop-shadow(0 0 80px rgba(60, 120, 160, 0.15));
}


.star-chart {
  position: relative;
  width: 100%;
  height: 100%;
  animation: slowRotate 92s linear infinite;
  transform-origin: center center;
  opacity: 0.75;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.star-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

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

/* Center Card */
.center-card {
  position: absolute;
  width: min(240px, 32vw);
  height: min(410px, 55vw);
  border-radius: 18px;
  background: #16161D;
  border: 1px solid rgba(120, 160, 190, 0.2);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(60, 120, 160, 0.15),
    inset 0 0 0 1px rgba(120, 160, 190, 0.1),
    inset 0 20px 30px rgba(80, 140, 180, 0.05);
  display: grid;
  place-items: center;
  overflow: hidden;
  transform-style: preserve-3d;
  cursor: pointer;
  z-index: 6;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  --x: 50%;
  --y: 50%;
  --bg-x: 50%;
  --bg-y: 50%;
}

/* 极度克制的底层点光源 */
.center-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle 300px at var(--x) var(--y),
    rgba(255, 255, 255, 0.12) 0%,
    transparent 80%
  );
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.4s;
  opacity: 0.6;
}

/* 丝绒哑光流光 */
.center-card::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.06) 44%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.06) 56%,
    transparent 62%
  );
  background-size: 200% 200%;
  background-position: var(--bg-x) var(--bg-y);
  mix-blend-mode: normal;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.4s;
  opacity: 0.8;
}

.center-card:hover::before,
.center-card:hover::after {
  opacity: 1;
}

.card-inner {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transform: translateZ(60px);
  z-index: 1;
  pointer-events: none;
  background-image: url('图片/image 2744.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.7;
}

.card-inner .sigil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: rgba(217,182,111,0.95);
  font-size: 72px;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(217, 182, 111, 0.3);
  opacity: 0; /* 隐藏原来的符号，使用图片代替 */
}

.card-inner .sigil::after {
  content: 'DESTINY';
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 8px;
  margin-top: 30px;
  margin-left: 8px;
  opacity: 0; /* 隐藏原来的文字，使用图片代替 */
}

/* Right Panel */
.right {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding-left: 40px;
}

.right-content {
  max-width: 440px;
}

.panel {
  width: min(500px, 100%);
  background: rgba(25, 25, 32, 0.4);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(217,182,111,0.15);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(217, 182, 111, 0.08);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(217,182,111,0.03), transparent 28%, transparent 72%, rgba(217,182,111,0.03));
  pointer-events: none;
}

.eyebrow {
  color: var(--gold);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.right-content .page-zh-small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 10px;
  text-indent: 10px;
  color: #d9b66f;
  margin-bottom: 18px;
  opacity: 0.8;
  text-transform: uppercase;
}

.right-content .page-en-large {
  font-size: clamp(42px, 5.5vw, 56px);
  color: #e2e2e2;
  letter-spacing: 8px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.8), 0 0 20px rgba(255,255,255,0.05);
  margin-bottom: 24px;
  line-height: 1.1;
  font-weight: 300;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  color: #ffffff;
}

.desc {
  margin: 0 0 44px;
  color: #9a9ca3;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  max-width: 560px;
}

.right-content .desc {
  text-align: left;
}

/* Form Elements */
.question-box {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.question-box label {
  font-size: 14px;
  color: rgba(255,255,255,0.82);
}

.input-wrap {
  position: relative;
}

input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(6,8,18,0.5);
  color: var(--text);
  padding: 18px;
  border-radius: 18px;
  font-size: 15px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

input:focus {
  border-color: rgba(217,182,111,0.42);
  box-shadow: 0 0 0 4px rgba(217,182,111,0.08);
  transform: translateY(-1px);
}

/* Quick Buttons */
.quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.quick {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.84);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: all .24s ease;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  flex-shrink: 0;
}

.quick:hover {
  border-color: rgba(217,182,111,0.3);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

/* Action Buttons */
.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

.primary,
.ghost {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 18px 44px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.primary {
  background: linear-gradient(135deg, rgba(15, 25, 38, 0.8) 0%, rgba(8, 15, 25, 0.95) 100%);
  color: #d9b66f;
  border: 1px solid rgba(217, 182, 111, 0.25);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(217, 182, 111, 0.08),
    0 0 20px rgba(26, 53, 74, 0.2);
}

.primary:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, rgba(20, 32, 48, 0.9) 0%, rgba(10, 18, 30, 1) 100%);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(217, 182, 111, 0.2),
    inset 0 1px 2px rgba(217, 182, 111, 0.12);
  border-color: rgba(217, 182, 111, 0.4);
  color: #e8c888;
}

.primary:active {
  transform: translateY(-2px);
}

.ghost {
  background: rgba(25, 25, 32, 0.3);
  color: rgba(217, 182, 111, 0.8);
  border: 1px solid rgba(217, 182, 111, 0.15);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.ghost:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 182, 111, 0.3);
  color: #d9b66f;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.ghost:active {
  transform: translateY(-2px);
}

.btn-icon {
  margin-right: 6px;
}

/* Status Box */
.status-box {
  border-radius: 18px;
  background: rgba(60,60,60,0.4);
  border: 1px solid rgba(217,182,111,0.15);
  padding: 14px 16px;
  color: var(--sub);
  font-size: 14px;
  line-height: 1.7;
}

.status-box strong {
  color: var(--text);
  font-weight: 600;
}

.status-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(217,182,111,0.6);
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* Floating Badge */
.floating-badge {
  position: absolute;
  right: -12px;
  top: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(50,50,50,0.85);
  border: 1px solid rgba(217,182,111,0.22);
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.24);
  backdrop-filter: blur(10px);
  animation: badgeFloat 4.8s ease-in-out infinite;
}

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hidden {
  display: none !important;
}

/* ===== 问题输入页样式 ===== */
.question-page-content {
  position: relative;
  z-index: 5;
  width: min(1100px, 95%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
}

.question-panel {
  width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  position: relative;
}

.question-panel .page-header {
  margin-bottom: 35px;
}

.question-panel .page-zh-small {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 12px;
  text-indent: 12px;
  color: #d9b66f;
  margin-bottom: 12px;
  opacity: 0.8;
  text-transform: uppercase;
}

.question-panel .page-en-large {
  font-size: 52px;
  color: #e2e2e2;
  letter-spacing: 10px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.8), 0 0 20px rgba(255,255,255,0.05);
}

.font-classical {
  font-family: 'Playfair Display', 'Cinzel', 'Times New Roman', Times, serif;
}

.question-panel .query-intro {
  font-size: 14px;
  color: #8a8d91;
  letter-spacing: 3px;
  line-height: 2;
  margin-bottom: 50px;
  font-weight: 300;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.question-panel .query-intro strong {
  color: #d9b66f;
  font-weight: 400;
}

.question-box {
  margin-bottom: 25px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  border: none;
  padding: 0;
  backdrop-filter: none;
}

.question-box .input-wrap {
  width: 100%;
  margin-bottom: 25px;
}

.question-box input {
  width: 100%;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(217, 182, 111, 0.3) !important;
  border-radius: 0 !important;
  padding: 20px 0 !important;
  font-size: 20px !important;
  color: #e2e2e2 !important;
  text-align: center !important;
  letter-spacing: 2px !important;
  outline: none !important;
  transition: all 0.5s ease !important;
  font-weight: 300 !important;
  box-shadow: none !important;
}

.question-box input:focus {
  border-bottom-color: rgba(217, 182, 111, 0.9) !important;
  box-shadow: 0 20px 30px -20px rgba(217, 182, 111, 0.2) !important;
  color: #d9b66f !important;
  transform: none !important;
}

.question-box input::placeholder {
  color: rgba(138, 141, 145, 0.3) !important;
  font-weight: 300 !important;
  letter-spacing: 4px !important;
  font-size: 16px !important;
  transition: all 0.3s !important;
}

.question-box input:focus::placeholder {
  opacity: 0 !important;
  transform: translateY(-10px) !important;
}

.quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-bottom: 40px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.quick-list button {
  background: transparent !important;
  border: none !important;
  color: #6a6d75 !important;
  font-size: 12px !important;
  letter-spacing: 2px !important;
  padding: 8px 0 !important;
  cursor: pointer !important;
  transition: all 0.3s !important;
  position: relative !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

.quick-list button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: #d9b66f;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.quick-list button:hover {
  color: #d9b66f !important;
  transform: none !important;
}

.quick-list button:hover::after {
  width: 100%;
}

.sys-protocol {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0.5;
}

.sys-badge {
  font-size: 10px;
  font-family: monospace;
  color: #d9b66f;
  letter-spacing: 4px;
}

.sys-text {
  font-size: 11px;
  color: #8a8d91;
  letter-spacing: 4px;
  font-weight: 300;
}

/* ===== 抽牌页样式 ===== */
.draw-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 40px 20px 20px;
  height: 100vh;
  justify-content: space-between;
}

/* 顶部标题 */
.draw-header {
  text-align: center;
  margin-bottom: 20px;
}

.draw-subtitle {
  font-size: 11px;
  color: #8a8d91;
  letter-spacing: 6px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.draw-title {
  font-size: clamp(28px, 4vw, 40px);
  color: #e2e2e2;
  letter-spacing: 10px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  font-weight: 300;
}

.fate-banner {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--gold);
  text-align: center;
  letter-spacing: 0.08em;
  font-style: italic;
  opacity: 0.8;
  margin-bottom: 10px;
  min-height: 40px;
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 日期天气信息 - 单行展示 */
.date-weather-info {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 100;
  background: rgba(25, 25, 32, 0.35);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(217, 182, 111, 0.15);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  color: rgba(247, 244, 238, 0.85);
  letter-spacing: 0.3px;
}

.date-separator {
  color: rgba(217, 182, 111, 0.4);
  font-size: 12px;
  margin: 0 2px;
}

.weather-icon {
  font-size: 14px;
  filter: drop-shadow(0 0 6px rgba(217, 182, 111, 0.3));
  margin-left: 2px;
}

.weather-text {
  font-weight: 500;
}

#cityName {
  font-weight: 500;
}

/* 六芒星闪烁背景 */
.hexagram-flash {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}

.hexagram-flash svg {
  width: 100vmin;
  height: 100vmin;
  max-width: 800px;
  max-height: 800px;
}

.hexagram-flash.active {
  animation: hexagramFlash 1.5s ease-out forwards;
}

@keyframes hexagramFlash {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(0deg);
  }
  30% {
    opacity: 0.3;
    transform: scale(1.2) rotate(30deg);
  }
  60% {
    opacity: 0.2;
    transform: scale(1) rotate(60deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.5) rotate(90deg);
  }
}

/* 堆叠牌组容器 */
.card-stack-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 220px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
  padding-top: 0;
  margin: -10px auto 0;
  flex-shrink: 0;
}

/* 内部容器 */
.card-stack-container > div {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  position: relative;
}

/* 单张卡牌 - 横向重叠排列 */
.stacked-card {
  width: 130px;
  height: 175px;
  background: linear-gradient(135deg, rgba(25, 25, 32, 0.4) 0%, rgba(10, 10, 15, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(217, 182, 111, 0.3);
  border-radius: 6px;
  box-shadow:
    3px 0 8px rgba(0, 0, 0, 0.4),
    -2px 0 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  margin-left: -120px;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.stacked-card:first-child {
  margin-left: 0;
}

/* 使用 transform 实现抛物线和旋转 */
.stacked-card {
  transform: translateY(var(--base-y, 0)) rotate(var(--base-rot, 0deg));
}

/* 卡牌背面样式 - 使用图片 */
.stacked-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('图片/image 2744.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 6px;
  z-index: 1;
}

/* 卡牌背面装饰 */
.stacked-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 20px;
  height: 20px;
  border: 1px dashed rgba(217, 182, 111, 0.2);
  transition: all 0.3s ease;
  z-index: 2;
}

/* 悬停效果 */
.stacked-card:hover {
  transform: translateY(calc(var(--base-y, 0) - 40px)) rotate(var(--base-rot, 0deg)) scale(1.15);
  z-index: 100 !important;
  border-color: rgba(217, 182, 111, 0.6);
  box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 20px rgba(217, 182, 111, 0.4), inset 0 1px 2px rgba(255,255,255,0.2);
}

.stacked-card:hover::after {
  border-color: #d9b66f;
  background: rgba(217, 182, 111, 0.1);
  box-shadow: 0 0 15px rgba(217, 182, 111, 0.4);
}

.stacked-card:hover + .stacked-card {
  transform: translateY(var(--base-y, 0)) rotate(var(--base-rot, 0deg)) translateX(10px);
}

/* 已选中的卡牌 */
.stacked-card.selected {
  pointer-events: none;
  opacity: 0;
  transform: scale(0.7) !important;
}

/* 提示文字 */
.draw-instruction {
  font-size: 13px;
  color: #8a8d91;
  letter-spacing: 2px;
  text-align: center;
  margin: 15px 0 20px;
  opacity: 0.8;
}

.draw-instruction .highlight {
  color: #d9b66f;
  font-weight: 500;
}

/* 已选卡牌展示区 */
.selected-cards-area {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  margin: 10px 0 0 0;
  animation: fadeIn 0.8s ease;
  flex-shrink: 0;
}

/* 槽位样式 - 与卡牌同比例 */
.selected-card-slot {
  width: 140px;
  height: 220px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  transition: all 0.3s ease;

  /* 空槽位样式 */
  border: 2px dashed rgba(217,182,111,0.3);
  background: rgba(217,182,111,0.05);
}

/* 槽位标签 */
.slot-label {
  font-size: 11px;
  color: #8a8d91;
  letter-spacing: 2px;
  font-family: monospace;
  opacity: 0.7;
  position: absolute;
  bottom: 15px;
}

.selected-card-slot.filled .slot-label {
  display: none;
}

/* 填充后的槽位 */
.selected-card-slot.filled {
  background: rgba(25, 25, 32, 0.4);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(217,182,111,0.15);
  box-shadow: inset 0 0 0 1px rgba(217, 182, 111, 0.15),
              inset 0 20px 30px rgba(217, 182, 111, 0.03),
              0 30px 60px rgba(0, 0, 0, 0.6);
}

/* 极细的内部蚀刻装饰框 - 只在填充后显示 */
.selected-card-slot.filled::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(217, 182, 111, 0.2);
  border-radius: 8px;
  pointer-events: none;
  z-index: 1;
}

.selected-card-slot.filled::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  pointer-events: none;
  z-index: 1;
}

/* 槽位内的所有元素样式 - z-index确保在装饰框之上 */
.selected-card-slot .card-top-number {
  font-family: 'Times New Roman', Times, serif;
  font-size: 18px;
  letter-spacing: 2px;
  z-index: 2;
}

.selected-card-slot .card-center-icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.selected-card-slot .suit-icon {
  width: 56px;
  height: 56px;
}

.selected-card-slot .revealed-card-name-en {
  font-size: 9px;
  color: #8a8d91;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
  z-index: 2;
}

.selected-card-slot .revealed-card-name {
  font-size: 14px;
  color: #e2e2e2;
  font-weight: 500;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  text-align: center;
  width: 100%;
  margin-top: 4px;
  z-index: 2;
}

.selected-card-slot .position-badge-small {
  margin-top: 6px;
  z-index: 2;
}

/* 槽位角标 - 右上角 - 与结果页完全统一 */
.selected-card-slot .slot-badge,
.result-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  padding: 3px 8px;
  background: rgba(217,182,111,0.15);
  border: 1px solid rgba(217,182,111,0.4);
  border-radius: 4px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 10;
}

/* 下落到展示区的卡牌 */
.revealed-card {
  width: 137px;
  height: 240px;
  border-radius: 12px;
  position: absolute;
  animation: cardReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transform-style: preserve-3d;
}

@keyframes cardReveal {
  0% {
    transform: translateY(-300px) rotateY(0deg) scale(0.8);
    opacity: 0;
  }
  50% {
    transform: translateY(0) rotateY(180deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(0) rotateY(180deg) scale(1);
    opacity: 1;
  }
}

.revealed-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
}

/* 卡牌正面：采用牌面2的设计 */
.revealed-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: rgba(25, 25, 32, 0.4);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(217,182,111,0.15);
  box-shadow:
    inset 0 0 0 1px rgba(217, 182, 111, 0.15),
    inset 0 20px 30px rgba(217, 182, 111, 0.03);
  padding: 20px 16px;
  box-sizing: border-box;
  overflow: hidden;
}

/* 极细的内部蚀刻装饰框 */
.revealed-card-face::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(217, 182, 111, 0.2);
  border-radius: 6px;
  pointer-events: none;
}

.revealed-card-face::after {
  content: '';
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  pointer-events: none;
}

/* 顶部数字/阶级 */
.card-top-number {
  font-family: 'Times New Roman', Times, serif;
  font-size: 18px;
  color: #d9b66f;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(217, 182, 111, 0.4);
  z-index: 2;
}

/* 中心符号区域 */
.card-center-icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* 符号图标 */
.suit-icon {
  width: 56px;
  height: 56px;
  color: #d9b66f;
  filter: drop-shadow(0 0 10px rgba(217, 182, 111, 0.5));
  transition: transform 0.3s ease;
}

.revealed-card-symbol {
  font-size: 48px;
  color: #d9b66f;
  filter: drop-shadow(0 0 10px rgba(217, 182, 111, 0.5));
}

/* 底部信息区 */
.card-bottom-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  width: 100%;
}

.revealed-card-name-en {
  font-size: 9px;
  color: #8a8d91;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
}

.revealed-card-name {
  font-size: 14px;
  color: #e2e2e2;
  font-weight: 500;
  letter-spacing: 2px;
  text-indent: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  text-align: center;
}

/* 正逆位标签 */
.position-badge {
  padding: 4px 12px;
  font-size: 10px;
  letter-spacing: 2px;
  text-indent: 2px;
  border-radius: 100px;
  margin-top: 4px;
  border: 1px solid;
  backdrop-filter: blur(4px);
}

.position-badge.upright {
  color: #d9b66f;
  border-color: rgba(217, 182, 111, 0.3);
  background: rgba(217, 182, 111, 0.05);
  box-shadow: 0 0 10px rgba(217, 182, 111, 0.1);
}

.position-badge.reversed {
  color: #9aa0a6;
  border-color: rgba(154, 160, 166, 0.3);
  background: rgba(154, 160, 166, 0.05);
  box-shadow: 0 0 10px rgba(154, 160, 166, 0.1);
}

/* 逆位逻辑控制 */
.revealed-card-inner.is-reversed .card-top-number {
  color: #9aa0a6;
  text-shadow: 0 0 10px rgba(154, 160, 166, 0.4);
}

.revealed-card-inner.is-reversed .suit-icon {
  color: #9aa0a6;
  filter: drop-shadow(0 0 10px rgba(154, 160, 166, 0.4));
  transform: rotate(180deg);
}

.position-badge-small {
  padding: 3px 10px;
  font-size: 9px;
  letter-spacing: 2px;
  border-radius: 100px;
  border: 1px solid;
  backdrop-filter: blur(4px);
  margin-top: 4px;
}

.position-badge-small.upright {
  color: #d9b66f;
  border-color: rgba(217, 182, 111, 0.3);
  background: rgba(217, 182, 111, 0.05);
}

.position-badge-small.reversed {
  color: #9aa0a6;
  border-color: rgba(154, 160, 166, 0.3);
  background: rgba(154, 160, 166, 0.05);
}

/* 逆位样式控制 */
.revealed-card-inner.reversed .card-top-number {
  color: #9aa0a6;
  text-shadow: 0 0 10px rgba(154, 160, 166, 0.4);
}

.revealed-card-inner.reversed .suit-icon,
.revealed-card-inner.reversed .card-center-icon .suit-icon {
  color: #9aa0a6;
  filter: drop-shadow(0 0 10px rgba(154, 160, 166, 0.4));
  transform: rotate(180deg);
}

.revealed-card-inner.reversed .revealed-card-symbol {
  color: #9aa0a6;
  filter: drop-shadow(0 0 10px rgba(154, 160, 166, 0.4));
  transform: rotate(180deg);
}

/* 槽位中逆位的SVG */
.suit-icon.reversed {
  color: #9aa0a6;
  filter: drop-shadow(0 0 10px rgba(154, 160, 166, 0.4));
  transform: rotate(180deg);
}

/* 逆位卡牌旋转 */
.revealed-card-inner.reversed {
  transform: rotateY(180deg) rotateZ(180deg);
}

.reversed-symbol {
  transform: rotate(180deg);
}

/* 第四张牌特殊样式 - 微微发光 */
.fourth-card-slot {
  animation: fourthCardAppear 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
  box-shadow:
    inset 0 0 0 1px rgba(217, 182, 111, 0.15),
    inset 0 20px 30px rgba(217, 182, 111, 0.03),
    0 30px 60px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(217, 182, 111, 0.2) !important;
  animation: fourthCardAppear 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, subtleGlow 3s ease-in-out infinite;
}

@keyframes subtleGlow {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(217, 182, 111, 0.15),
      inset 0 20px 30px rgba(217, 182, 111, 0.03),
      0 30px 60px rgba(0, 0, 0, 0.6),
      0 0 20px rgba(217, 182, 111, 0.15);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(217, 182, 111, 0.25),
      inset 0 20px 30px rgba(217, 182, 111, 0.05),
      0 30px 60px rgba(0, 0, 0, 0.6),
      0 0 35px rgba(217, 182, 111, 0.25);
  }
}

@keyframes fourthCardAppear {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(-30px);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.fourth-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(217,182,111,0.2);
  border: 1px solid rgba(217,182,111,0.6);
  border-radius: 4px;
  color: var(--gold);
  font-weight: 600;
}

.fourth-card-item {
  animation: glowPulse 2s ease-in-out infinite;
}

/* Ritual Stage */
.ritual-stage {
  position: relative;
  width: min(400px, 80vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.ritual-orbits {
  position: absolute;
  inset: 0;
  animation: fadeIn 1s ease;
}

.ritual-ring {
  position: absolute;
  border: 1px solid rgba(217,182,111,0.3);
  border-radius: 50%;
  animation: ringRotate 20s linear infinite;
}

.ring-1 {
  inset: 0;
  animation-duration: 30s;
}

.ring-2 {
  inset: 15%;
  animation-duration: 25s;
  animation-direction: reverse;
}

.ring-3 {
  inset: 30%;
  animation-duration: 20s;
}

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

.ritual-symbols {
  position: absolute;
  inset: 0;
}

.ritual-symbols .sym {
  position: absolute;
  color: rgba(217,182,111,0.8);
  font-size: 24px;
  animation: symbolPulse 2s ease-in-out infinite;
}

.sym-n { top: 0; left: 50%; transform: translateX(-50%); }
.sym-e { top: 50%; right: 0; transform: translateY(-50%); }
.sym-s { bottom: 0; left: 50%; transform: translateX(-50%); }
.sym-w { top: 50%; left: 0; transform: translateY(-50%); }

@keyframes symbolPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.ritual-center {
  font-size: 80px;
  color: rgba(217,182,111,0.9);
  animation: pulseGlow 3s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(217,182,111,0.4);
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* Deck Stage */
.deck-stage {
  position: relative;
  width: 160px;
  height: 240px;
  animation: fadeIn 0.8s ease;
}

.deck-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(217,182,111,0.2), transparent 60%);
  filter: blur(20px);
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.deck-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.deck-card {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(50,50,50,0.95), rgba(45,45,45,0.98));
  border: 1px solid rgba(217,182,111,0.3);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.deck-card:nth-child(1) { transform: rotate(-2deg) translateY(-4px); z-index: 3; }
.deck-card:nth-child(2) { transform: rotate(0deg); z-index: 2; }
.deck-card:nth-child(3) { transform: rotate(2deg) translateY(4px); z-index: 1; opacity: 0.8; }

.deck-stage.shuffle .deck-card {
  animation: shuffleMove 0.6s ease-in-out 3;
}

@keyframes shuffleMove {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(20px) rotate(5deg); }
}

/* Cards Display */
.cards-display {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 260px;
  animation: fadeIn 0.8s ease;
}

.tarot-card {
  width: 140px;
  height: 210px;
  background: linear-gradient(180deg, rgba(50,50,50,0.95), rgba(45,45,45,0.98));
  border: 1px solid rgba(217,182,111,0.3);
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  transform-style: preserve-3d;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.tarot-card:hover:not(.flipped) {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 20px 50px rgba(217,182,111,0.3);
}

.tarot-card.appear {
  animation: cardAppear 0.6s ease forwards;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tarot-card.flipped {
  animation: flipCard 0.6s ease forwards;
}

@keyframes flipCard {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(180deg); }
}

.card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 20px;
}

.card-back {
  background: linear-gradient(180deg, rgba(50,50,50,0.95), rgba(45,45,45,0.98));
}

.card-back::before {
  content: '☽';
  font-size: 48px;
  color: rgba(217,182,111,0.8);
}

.card-front {
  background: linear-gradient(180deg, rgba(45,45,45,0.98), rgba(50,50,50,0.95));
  transform: rotateY(180deg);
  flex-direction: column;
  gap: 10px;
}

.card-symbol {
  font-size: 48px;
}

.card-name {
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* Instant Feedback */
.instant-feedback {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  color: var(--sub);
  font-style: italic;
  text-align: center;
  animation: fadeIn 0.6s ease;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.feedback-icon {
  color: var(--gold);
  font-size: 14px;
  display: none;
}

/* Draw Actions */
.draw-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== 结果页样式 (影院级风格) ===== */

/* 整体叙事容器 */
.narrative-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 80px 40px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 5;
}

/* 古典英文字体 */
.font-classical {
  font-family: 'Playfair Display', 'Cinzel', 'Times New Roman', Times, serif;
}

/* 页面标题 */
.page-header {
  text-align: center;
  margin-bottom: 30px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-zh-small {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 8px;
  color: #d9b66f;
  margin-bottom: 12px;
  opacity: 0.8;
}

.page-en-large {
  font-size: 42px;
  color: #e2e2e2;
  letter-spacing: 6px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Hero Section */
.hero-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
}

/* 卡牌一字排开的主祭坛 */
.card-altar {
  display: flex;
  gap: 32px;
  justify-content: center;
  width: 100%;
  margin-bottom: 50px;
  position: relative;
  z-index: 2;
}

/* 高挑的高级卡牌样式 */
.tarot-card {
  width: 220px;
  height: 380px;
  background: rgba(25, 25, 32, 0.4);
  backdrop-filter: blur(24px);
  border-radius: 14px;
  border: 1px solid rgba(217, 182, 111, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 30px 20px;
  box-sizing: border-box;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.05);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  animation: cardReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  position: relative;
}

/* 卡牌内部装饰线条 */
.tarot-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(217, 182, 111, 0.2);
  border-radius: 8px;
  pointer-events: none;
}

.tarot-card::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  pointer-events: none;
}

.tarot-card:nth-child(1) { animation-delay: 0.3s; }
.tarot-card:nth-child(2) { animation-delay: 0.5s; }
.tarot-card:nth-child(3) { animation-delay: 0.7s; }
.tarot-card:nth-child(4) { animation-delay: 0.9s; }

@keyframes cardReveal {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.tarot-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 30px rgba(217,182,111,0.15);
  border-color: rgba(217, 182, 111, 0.5);
}

.tarot-card svg {
  width: 56px;
  height: 56px;
  color: #d9b66f;
  filter: drop-shadow(0 0 10px rgba(217,182,111,0.4));
  transition: all 0.3s;
}

.card-top-tag {
  font-size: 10px;
  border: 1px solid rgba(217,182,111,0.3);
  padding: 4px 10px;
  border-radius: 4px;
  color: #d9b66f;
  letter-spacing: 2px;
}

.card-bottom-text {
  text-align: center;
}

.card-zh-small {
  font-size: 11px;
  color: #8a8d91;
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.card-en-large {
  font-size: 18px;
  color: #d9b66f;
  letter-spacing: 1px;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(217,182,111,0.3);
}

/* 逆位 */
.is-reversed svg {
  color: #9aa0a6;
  transform: rotate(180deg);
  filter: drop-shadow(0 0 10px rgba(154,160,166,0.3));
}

.is-reversed .card-en-large {
  color: #9aa0a6;
  text-shadow: 0 2px 10px rgba(154,160,166,0.3);
}

.is-reversed .card-top-tag {
  color: #9aa0a6;
  border-color: rgba(154,160,166,0.3);
}

/* 异常态 (第四张牌，全息铂金质感) */
.is-anomaly {
  border-color: rgba(255,255,255,0.3);
}

.is-anomaly .card-top-tag {
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
  animation: breathe-glow 3s infinite;
}

.is-anomaly svg {
  color: #ffffff;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.6));
}

.is-anomaly .card-en-large {
  color: #f4f6f9;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.7), 0 0 4px rgba(200, 220, 255, 0.5);
  animation: breathe-text 3s ease-in-out infinite;
}

@keyframes breathe-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; box-shadow: 0 0 10px rgba(255,255,255,0.5); }
}

@keyframes breathe-text {
  0%, 100% { opacity: 0.85; text-shadow: 0 0 8px rgba(255,255,255,0.4); }
  50% { opacity: 1; text-shadow: 0 0 18px rgba(255,255,255,0.9), 0 0 6px rgba(200, 220, 255, 0.6); }
}

/* 巨型悬浮命运结论 */
.core-conclusion {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 860px;
  margin-top: 10px;
}

.conclusion-text {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 0%, #d9b66f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 28px;
  animation: fadeIn 1s ease forwards 1.2s;
  opacity: 0;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.conclusion-zh {
  font-size: 12px;
  color: #8a8d91;
  letter-spacing: 8px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.conclusion-en {
  font-size: 24px;
  color: #d9b66f;
  letter-spacing: 6px;
  opacity: 0.7;
}

/* 深度解析区 */
.details-section {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 50px;
}

.analysis-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
  margin-bottom: 30px;
}

/* 极简玻璃态矩阵块 */
.matrix-block {
  background: rgba(20, 20, 28, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(217, 182, 111, 0.15);
  border-radius: 12px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

.matrix-block:hover {
  background: rgba(217, 182, 111, 0.03);
  border-top-color: rgba(217, 182, 111, 0.4);
  transform: translateY(-2px);
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.block-sys {
  font-size: 10px;
  font-family: monospace;
  color: #6a6d75;
  letter-spacing: 2px;
}

.block-role {
  font-size: 11px;
  color: #d9b66f;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.block-card-name {
  font-size: 18px;
  color: #e2e2e2;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.block-desc {
  font-size: 14px;
  color: #9aa0a6;
  line-height: 1.8;
  font-weight: 300;
}

/* 弱化项 */
.is-dimmed {
  opacity: 0.7;
  border-top-color: rgba(255, 255, 255, 0.05);
}

.is-dimmed .block-role {
  color: #8a8d91;
}

/* 异常变量块 */
.anomaly-block {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(20, 20, 28, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.03), inset 0 1px 20px rgba(255, 255, 255, 0.02);
}

.anomaly-header {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.anomaly-header .block-sys {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
  animation: breathe-glow 3s ease-in-out infinite;
}

.anomaly-header .block-role {
  color: #ffffff;
  letter-spacing: 4px;
}

.anomaly-text {
  color: #ffffff;
  font-style: italic;
  opacity: 0.9;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* 现实执行日志 */
.reality-log-footer {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border-top: 1px dashed rgba(217, 182, 111, 0.2);
  border-bottom: 1px dashed rgba(217, 182, 111, 0.2);
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.log-badge {
  font-size: 10px;
  color: #d9b66f;
  border: 1px solid rgba(217, 182, 111, 0.3);
  padding: 4px 16px;
  border-radius: 100px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.log-text {
  font-size: 14px;
  color: #9aa0a6;
  line-height: 1.8;
  max-width: 80%;
  font-weight: 300;
}

/* === 隐藏事件触发专属模块 (全息降维拦截) === */
.hidden-anomaly-module {
  width: 100%;
  margin-bottom: 10px;
  padding: 32px 40px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(10, 10, 15, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  box-sizing: border-box;
}

.hidden-anomaly-module::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  box-shadow: 0 0 15px rgba(255,255,255,0.4);
  animation: breathe-line 4s ease-in-out infinite;
}

@keyframes breathe-line {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.anomaly-title-wrap {
  text-align: center;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.anomaly-title-en {
  font-size: 14px;
  color: #ffffff;
  letter-spacing: 8px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  gap: 12px;
}

.anomaly-title-en::before,
.anomaly-title-en::after {
  content: '✦';
  font-size: 10px;
  color: #d9b66f;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.anomaly-title-zh {
  font-size: 11px;
  color: #8a8d91;
  letter-spacing: 4px;
}

.anomaly-event-item {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border-left: 2px solid rgba(217, 182, 111, 0.5);
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.anomaly-event-item:hover {
  background: rgba(217, 182, 111, 0.05);
  border-left-color: #d9b66f;
  transform: translateX(4px);
}

.anomaly-event-item:last-child {
  margin-bottom: 0;
}

.event-tag {
  font-size: 11px;
  color: #d9b66f;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.event-text {
  font-size: 14px;
  color: #e2e2e2;
  line-height: 1.6;
  font-style: italic;
  font-weight: 300;
}



/* 动作按钮 */
.action-area {
  margin-top: 50px;
  display: flex;
  gap: 24px;
}

.btn {
  padding: 16px 40px;
  font-size: 14px;
  letter-spacing: 3px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(25, 25, 32, 0.8);
  color: #9aa0a6;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-weight: 500;
}

.btn.primary {
  border-color: rgba(217, 182, 111, 0.5);
  color: #d9b66f;
  box-shadow: 0 0 20px rgba(217,182,111,0.1);
}

.btn:hover {
  background: rgba(217, 182, 111, 0.1);
  color: #fff;
  transform: translateY(-4px);
}

/* ===== AI 加载页面 ===== */
.ai-loading-overlay {
  position: fixed;
  inset: 0;
  background: #16161D;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.ai-loading-overlay::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle 864px at 69.5% 6.9%, rgba(26, 53, 74, 0.6), transparent),
    radial-gradient(circle 832.5px at 32.9% 32.4%, rgba(26, 53, 74, 0.4), transparent),
    radial-gradient(circle 450.5px at 99.5% 90.5%, rgba(26, 53, 74, 0.4), transparent),
    radial-gradient(circle 632.5px at 8.7% 93.9%, rgba(35, 32, 27, 0.8), transparent);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.ai-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.loading-star-chart {
  width: 300px;
  height: 300px;
  animation: loadingRotate 8s linear infinite;
}

.loading-star-chart svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 20px rgba(217, 182, 111, 0.3));
}

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

.loading-text {
  text-align: center;
  animation: loadingPulse 2s ease-in-out infinite;
}

.loading-zh {
  font-size: 14px;
  color: #d9b66f;
  letter-spacing: 6px;
  margin-bottom: 10px;
  font-weight: 500;
}

.loading-en {
  font-size: 16px;
  color: #8a8d91;
  letter-spacing: 4px;
  font-family: 'Playfair Display', 'Times New Roman', serif;
}

@keyframes loadingPulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}


.fourth-card-display {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  opacity: 0;
  animation: fourthCardSlideIn 1s ease forwards 0.3s;
}

@keyframes fourthCardSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fourth-card-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.fourth-card-label {
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0;
  animation: labelFadeIn 0.6s ease forwards 0.6s;
}

@keyframes labelFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 所有卡牌展示区域 */
.all-cards-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  width: 100%;
}

/* 结果页卡牌样式 - 完全按照牌面2.html */
.result-card-wrapper {
  position: relative;
  width: 200px;
  height: 340px;
  perspective: 1000px;
}

.result-card-inner {
  width: 100%;
  height: 100%;
  background: rgba(25, 25, 32, 0.4);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(217, 182, 111, 0.15),
    inset 0 20px 30px rgba(217, 182, 111, 0.03),
    0 30px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 26px 20px;
  box-sizing: border-box;
  overflow: hidden;
  animation: cardReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
}

.result-card-wrapper:nth-child(1) .result-card-inner {
  animation-delay: 0.3s;
}

.result-card-wrapper:nth-child(2) .result-card-inner {
  animation-delay: 0.5s;
}

.result-card-wrapper:nth-child(3) .result-card-inner {
  animation-delay: 0.7s;
}

.result-card-wrapper:nth-child(4) .result-card-inner {
  animation-delay: 0.9s;
}

@keyframes cardReveal {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 极细的内部蚀刻装饰框 */
.result-card-inner::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(217, 182, 111, 0.2);
  border-radius: 8px;
  pointer-events: none;
}

.result-card-inner::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  pointer-events: none;
}

/* 顶部数字 */
.result-card-top {
  font-family: 'Times New Roman', Times, serif;
  font-size: 22px;
  letter-spacing: 3px;
  text-shadow: 0 0 12px rgba(217, 182, 111, 0.4);
  z-index: 2;
}

/* 中心图标区域 */
.result-card-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.result-card-inner .suit-icon {
  width: 60px;
  height: 60px;
}

/* 底部信息区 */
.result-card-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.result-card-name-en {
  font-size: 10px;
  color: #8a8d91;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.result-card-name-zh {
  font-size: 16px;
  color: #e2e2e2;
  font-weight: 500;
  letter-spacing: 3px;
  text-indent: 3px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* 正逆位标签 */
.result-position-badge {
  padding: 4px 12px;
  font-size: 10px;
  letter-spacing: 2px;
  text-indent: 2px;
  border-radius: 100px;
  margin-top: 4px;
  border: 1px solid;
  backdrop-filter: blur(4px);
}

.result-position-badge.upright {
  color: #d9b66f;
  border-color: rgba(217, 182, 111, 0.3);
  background: rgba(217, 182, 111, 0.05);
  box-shadow: 0 0 10px rgba(217, 182, 111, 0.1);
}

.result-position-badge.reversed {
  color: #9aa0a6;
  border-color: rgba(154, 160, 166, 0.3);
  background: rgba(154, 160, 166, 0.05);
  box-shadow: 0 0 10px rgba(154, 160, 166, 0.1);
}

/* 逆位逻辑控制 */
.result-card-inner.is-reversed .result-card-top {
  color: #9aa0a6;
  text-shadow: 0 0 12px rgba(154, 160, 166, 0.4);
}

.result-card-inner.is-reversed .suit-icon {
  color: #9aa0a6;
  filter: drop-shadow(0 0 12px rgba(154, 160, 166, 0.4));
  transform: rotate(180deg);
}

.fourth-card-hint {
  margin-top: 16px;
  font-size: 13px;
  color: rgba(217, 182, 111, 0.7);
  font-style: italic;
  letter-spacing: 1px;
  text-align: center;
  opacity: 0;
  animation: hintFadeIn 0.6s ease forwards 1.5s;
  max-width: 90%;
}

@keyframes hintFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result-panel {
  background: rgba(25, 25, 32, 0.4);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-radius: 20px;
  box-shadow:
    inset 0 0 0 1px rgba(217, 182, 111, 0.1),
    0 40px 80px rgba(0, 0, 0, 0.6);
  padding: 48px 56px;
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* 面板内部极其微弱的光晕 */
.result-panel::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(217, 182, 111, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.result-title {
  font-size: 36px;
  margin: 0 0 32px 0;
  font-weight: 600;
  letter-spacing: 2px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  color: #e2e2e2;
}

.conclusion-box {
  background: linear-gradient(135deg, rgba(217, 182, 111, 0.08) 0%, rgba(25, 25, 32, 0.5) 100%);
  border-left: 2px solid #d9b66f;
  border-radius: 0 12px 12px 0;
  padding: 24px 32px;
  margin-bottom: 48px;
  box-shadow: inset 0 0 0 1px rgba(217, 182, 111, 0.05);
}

.conclusion-box h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  color: #fff;
  letter-spacing: 1px;
}

.conclusion-box p {
  margin: 0;
  color: #9aa0a6;
  line-height: 1.6;
  font-size: 15px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: #d9b66f;
  letter-spacing: 3px;
  margin-bottom: 24px;
  font-weight: 500;
}

.title-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(217, 182, 111, 0.3), transparent);
}

.cards-explain-section {
  margin-bottom: 32px;
}

#cardsExplanation {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 单张牌启示的数据列 - 使用结论分析.html样式 */
.card-explain-item {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(10, 10, 15, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 20px 24px;
  transition: all 0.3s ease;
}

.card-explain-item:hover {
  background: rgba(217, 182, 111, 0.03);
  border-color: rgba(217, 182, 111, 0.2);
  transform: translateX(4px);
}

/* 图标容器：使用SVG替代Emoji */
.card-explain-symbol {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: rgba(217, 182, 111, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(217, 182, 111, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #d9b66f;
}

.card-explain-symbol .suit-icon {
  width: 32px;
  height: 32px;
  color: #d9b66f;
  filter: drop-shadow(0 0 6px rgba(217, 182, 111, 0.5));
}

/* 文字内容区 */
.card-explain-content {
  flex: 1;
}

.card-explain-content h4 {
  margin: 0 0 6px 0;
  font-size: 18px;
  color: #e2e2e2;
  letter-spacing: 1px;
}

.card-explain-content p {
  margin: 0;
  font-size: 13px;
  color: #8a8d91;
  line-height: 1.5;
}

/* 角色标签 */
.card-explain-role {
  font-size: 11px;
  color: #d9b66f;
  letter-spacing: 2px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(217, 182, 111, 0.05);
  border: 1px solid rgba(217, 182, 111, 0.2);
  white-space: nowrap;
}

.reality-section {
  margin-bottom: 32px;
}

.reality-box {
  background: rgba(60,60,60,0.3);
  border: 1px solid rgba(217,182,111,0.15);
  border-radius: 12px;
  padding: 20px;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
}

.hidden-event-section {
  background: radial-gradient(circle at 50% 0%, rgba(217,182,111,0.15), transparent 60%),
              rgba(60,60,60,0.4);
  border: 1px solid rgba(217,182,111,0.3);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 32px;
  animation: eventGlow 2s ease-in-out infinite;
}

@keyframes eventGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(217,182,111,0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(217,182,111,0.4);
  }
}

.event-badge {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

#hiddenEventContent {
  line-height: 1.8;
  color: rgba(255,255,255,0.9);
}

.result-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 32px;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .content {
    grid-template-columns: 1fr;
  }
  .left {
    min-height: 380px;
    order: 1;                /* 视觉在上 */
    justify-items: center;
    align-items: center;
  }
  .right {
    order: 2;                /* 文字在下 */
    justify-content: center;
    align-items: center;
    padding-left: 0;
    text-align: center;
  }
  .right-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .right-content .desc {
    text-align: center;
  }
  .panel {
    width: min(680px, 100%);
  }
  .floating-badge {
    right: 14px;
  }

  /* 抽牌页响应式 */
  .card-stack-container {
    height: 220px;
  }

  .stacked-card {
    width: 110px;
    height: 165px;
    margin-left: -100px; /* 10px visible per card, fix negative flex issue */
  }

  .selected-cards-area {
    gap: 20px;
  }

  .selected-card-slot {
    width: 110px;
    height: 165px;
  }
}

@media (max-width: 640px) {
  /* ===== 通用 ===== */
  .scene { padding: 16px 12px 24px; }
  .panel { padding: 16px; border-radius: 16px; }
  .action-row { flex-direction: column; align-items: stretch; }
  .primary, .ghost { width: 100%; }
  .history-btn { top: 20px; right: 16px; padding: 12px 20px 12px 16px; font-size: 13px; }
  .history-btn svg { width: 16px; height: 16px; }

  /* ===== 首页左侧视觉区域 ===== */
  .left {
    min-height: 280px;
    width: 100%;
  }
  .chart-wrap {
    width: min(300px, 85vw);
  }
  .orbits {
    width: min(360px, 92vw);
  }

  /* ===== 首页右侧文字区域 ===== */
  .right {
    padding-left: 0;
    justify-content: center;
    text-align: center;
  }
  .right-content {
    align-items: center;
    text-align: center;
    padding: 0 4px;
  }
  .right-content .page-en-large {
    font-size: clamp(30px, 9vw, 42px);
    letter-spacing: 5px;
  }
  .right-content .page-zh-small {
    letter-spacing: 8px;
    text-indent: 8px;
  }
  .right-content .desc {
    text-align: center;
    font-size: 14px;
    margin-bottom: 28px;
  }

  /* ===== 日期天气徽章：移入内容流 ===== */
  .date-weather-info {
    position: static;
    width: 100%;
    margin-bottom: 24px;
    padding: 10px 16px;
    font-size: 12px;
    gap: 6px;
    justify-content: center;
    border-radius: 10px;
  }

  /* ===== 问题输入页 ===== */
  .question-page-content {
    padding: 72px 20px 40px;
    min-height: 100svh;
    justify-content: center;
  }
  .question-panel .page-en-large { font-size: 30px; letter-spacing: 5px; }
  .question-panel .query-intro {
    font-size: 13px;
    letter-spacing: 1.5px;
    margin-bottom: 28px;
  }
  .question-box { max-width: 100%; }
  .question-box input { font-size: 16px !important; }

  /* ===== 抽牌页 ===== */
  .draw-content {
    padding: 20px 0 16px;          /* 左右去掉 padding，让卡牌扇形可以居中撑满 */
    justify-content: space-around;
    align-items: center;           /* 所有子元素水平居中 */
    width: 100%;
  }

  /* 标题区：居中 + 裁剪溢出，不影响布局 */
  .draw-header {
    width: 100%;
    text-align: center;
    overflow: hidden;              /* 标题文字两侧超出部分对称裁剪 */
    padding: 0 12px;
  }

  .draw-subtitle {
    font-size: 10px;
    letter-spacing: 4px;           /* 减小间距，避免溢出 */
  }

  /* 标题字号缩小 + 间距缩小：让文字尽量在屏幕内完整展示 */
  .draw-title {
    font-size: clamp(18px, 5.5vw, 26px);
    letter-spacing: clamp(2px, 1vw, 5px);
    white-space: nowrap;           /* 不换行，配合 overflow:hidden 对称裁剪 */
  }

  /* 命运风格横幅 */
  .fate-banner {
    font-size: 13px;
    letter-spacing: 0.05em;
    padding: 0 16px;
    text-align: center;
    width: 100%;
  }

  /* 牌堆容器：裁剪两侧飞出的扇形，保持视觉居中 */
  .card-stack-container {
    height: 170px;
    overflow-x: clip;              /* 只裁剪水平溢出，不影响垂直悬停动画 */
    overflow-y: visible;
    width: 100%;
  }

  /* 关键修复：margin-left 必须小于卡牌宽度，否则 flex 宽度为负偏右 */
  .stacked-card {
    width: 84px;
    height: 126px;
    margin-left: -74px; /* 10px visible per card */
  }

  .stacked-card:first-child { margin-left: 0; }

  /* 提示文字 */
  .draw-instruction {
    text-align: center;
    width: 100%;
    padding: 0 16px;
    font-size: 12px;
    letter-spacing: 1px;
  }

  /* 已选卡牌：保持横排居中，缩小尺寸 */
  .selected-cards-area {
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .selected-card-slot {
    width: 84px;
    height: 126px;
    padding: 10px;
  }

  .revealed-card {
    width: 84px;
    height: 126px;
  }

  .revealed-card-symbol { font-size: 34px; }
  .revealed-card-name { font-size: 11px; letter-spacing: 1px; }

  /* slot 内小元素也缩小 */
  .selected-card-slot .card-top-number { font-size: 13px; }
  .revealed-card-name-en { font-size: 9px; letter-spacing: 1px; }
  .position-badge-small { font-size: 9px; padding: 2px 6px; }
  .slot-badge { font-size: 9px; padding: 3px 8px; }

  /* 即时反馈 */
  .instant-feedback {
    text-align: center;
    width: 100%;
    padding: 0 16px;
    font-size: 12px;
  }

  /* ===== 结果页 ===== */
  .narrative-container {
    padding: 80px 14px 60px;
  }
  .history-back-nav {
    top: 20px;
    left: 16px;
    padding: 12px 20px 12px 16px;
    font-size: 13px;
  }

  .page-en-large { font-size: 26px; letter-spacing: 3px; }
  .page-zh-small { letter-spacing: 5px; }

  /* 结果页卡牌：两列排列 */
  .card-altar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    justify-items: center;
    margin-bottom: 32px;
    width: 100%;
  }

  .tarot-card {
    width: 100%;
    max-width: 160px;
    height: 220px;
    padding: 16px 10px;
    border-radius: 12px;
    gap: 8px;
  }

  .card-top-tag { font-size: 9px; padding: 3px 8px; }
  .card-zh-small { font-size: 13px; }
  .card-en-large { font-size: 10px; letter-spacing: 1px; }

  /* 核心结论 */
  .hero-section { margin-bottom: 20px; }  /* 减少 hero 底部空白 */
  .conclusion-text {
    font-size: 18px;
    letter-spacing: 1px;
    margin-bottom: 36px;  /* 增大"命运结论"标题上方间距 */
  }
  .conclusion-en { font-size: 14px; letter-spacing: 3px; }
  .conclusion-zh { font-size: 11px; letter-spacing: 5px; }

  /* 解析矩阵：单列 */
  .analysis-matrix {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .matrix-block { padding: 18px 14px; }

  /* 底部按钮：上下排列 */
  .action-area {
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
  }
  .btn { padding: 14px 24px; width: 100%; text-align: center; white-space: nowrap; }

  /* ===== 移动端长按抽牌UI ===== */
  /* 桌面隐藏 / 移动显示 */
  .draw-content { display: none; }  /* 无 !important，JS inline style 可覆盖 */
  .mobile-draw-ui { display: flex !important; }
  /* 提取完成后显示的卡槽区允许换行（第四张牌另起一行） */
  .selected-cards-area { flex-wrap: wrap; }
}

/* ===== 移动端长按抽牌UI — 基础样式 ===== */
.mobile-draw-ui {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  /* 不设 height:100%，避免在 grid 中渲染出可见矩形框 */
  padding: 0 20px;
  background: transparent;
  border: none;
  box-shadow: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.mobile-draw-header {
  text-align: center;
}

.mobile-draw-title {
  font-size: 22px;
  letter-spacing: 6px;
  color: #e2e2e2;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* 旋转曼陀罗容器 */
.mobile-extractor {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.mandala-svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.mandala-spin-slow {
  animation: mandala-spin 20s linear infinite;
  transform-origin: center;
}

.mandala-spin-reverse {
  animation: mandala-spin-rev 15s linear infinite;
  transform-origin: center;
}

@keyframes mandala-spin { 100% { transform: rotate(360deg); } }
@keyframes mandala-spin-rev { 100% { transform: rotate(-360deg); } }

/* 中心触控区 */
.mobile-touch-core {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,182,111,0.1) 0%, rgba(20,20,28,0.8) 100%);
  border: 1px solid rgba(217,182,111,0.3);
  box-shadow: inset 0 0 20px rgba(217,182,111,0.1), 0 0 30px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: all 0.3s ease;
}

.mobile-touch-icon {
  font-size: 22px;
  color: #d9b66f;
  margin-bottom: 4px;
  animation: mobile-pulse 2s infinite;
}

.mobile-touch-text {
  font-size: 9px;
  color: rgba(217,182,111,0.8);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: monospace;
}

@keyframes mobile-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 10px #d9b66f; }
}

/* 蓄力中状态 */
.mobile-extractor.is-holding .mandala-spin-slow { animation-duration: 2s; }
.mobile-extractor.is-holding .mandala-spin-reverse { animation-duration: 1.5s; }
.mobile-extractor.is-holding circle,
.mobile-extractor.is-holding polygon {
  stroke: rgba(217,182,111,0.8);
  filter: drop-shadow(0 0 8px rgba(217,182,111,0.6));
}
.mobile-extractor.is-holding .mobile-touch-core {
  transform: scale(0.9);
  background: rgba(217,182,111,0.2);
  box-shadow: inset 0 0 40px rgba(217,182,111,0.4), 0 0 50px rgba(217,182,111,0.3);
}
.mobile-extractor.is-holding .mobile-touch-text { color: #fff; text-shadow: 0 0 8px #fff; }

/* 屏幕震动特效 */
.mobile-shake {
  animation: mobile-screen-shake 0.1s linear infinite;
  filter: contrast(1.1) brightness(1.2);
}
@keyframes mobile-screen-shake {
  0%   { transform: translate(1px, 1px) rotate(0deg); }
  25%  { transform: translate(-1px, -1px) rotate(-0.5deg); }
  50%  { transform: translate(-1px, 1px) rotate(0.5deg); }
  75%  { transform: translate(1px, -1px) rotate(0deg); }
  100% { transform: translate(1px, 1px) rotate(0deg); }
}

/* 系统日志条 */
.mobile-sys-log {
  font-family: monospace;
  font-size: 11px;
  color: #8a8d91;
  letter-spacing: 2px;
  height: 16px;
  text-align: center;
}

/* 移动端提取完成后：两行大卡布局 */
.selected-cards-area.mobile-card-reveal {
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  width: 100%;
}

.selected-cards-area.mobile-card-reveal .selected-card-slot {
  width: calc(50% - 6px);
  max-width: 160px;
  height: 236px;
  padding: 14px 10px;
}
