/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  background: linear-gradient(180deg, #1a0033 0%, #0d001a 40%, #000000 100%);
  color: #f4e4bc;
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* 背景微光层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(123,44,191,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(212,175,55,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 80% 90%, rgba(123,44,191,0.08) 0%, transparent 50%);
}

/* ===== 星空背景 ===== */
#stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 40px 70px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 160px 120px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 230px 80px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 300px 150px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 350px 50px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 450px 200px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 500px 100px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 600px 250px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 700px 80px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 800px 180px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 900px 60px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 1000px 220px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 1100px 140px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 1200px 90px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 1300px 260px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 1400px 170px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 1500px 110px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 1600px 230px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 1700px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 1800px 190px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 1900px 130px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 2000px 210px, rgba(255,255,255,0.5), transparent);
  background-repeat: repeat;
  background-size: 2000px 300px;
  animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.85; }
  100% { opacity: 1; }
}

/* 流星 */
.shooting-star {
  position: fixed;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.8), rgba(255,255,255,0));
  transform: rotate(-45deg);
  pointer-events: none;
  z-index: 0;
  animation: shoot 3s ease-out forwards;
}
@keyframes shoot {
  0%   { transform: translateX(0) translateY(0) rotate(-45deg); opacity: 1; }
  100% { transform: translateX(-400px) translateY(400px) rotate(-45deg); opacity: 0; }
}

/* ===== 屏幕区域 ===== */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

/* 首页特殊处理：允许滚动 */
#hero.screen {
  justify-content: flex-start;
  padding-top: 6vh;
  padding-bottom: 60px;
  min-height: auto;
}

.screen.active {
  display: flex;
}

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

/* ===== 排版 ===== */
h1 {
  font-size: 3.5rem;
  color: #d4af37;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.4), 0 2px 4px rgba(0,0,0,0.8);
  margin-bottom: 12px;
  letter-spacing: 6px;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  0%   { text-shadow: 0 0 20px rgba(212,175,55,0.3), 0 0 40px rgba(212,175,55,0.1), 0 2px 4px rgba(0,0,0,0.8); }
  100% { text-shadow: 0 0 35px rgba(212,175,55,0.6), 0 0 70px rgba(212,175,55,0.25), 0 2px 4px rgba(0,0,0,0.8); }
}

h2 {
  font-size: 2.2rem;
  color: #d4af37;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  margin-bottom: 16px;
  letter-spacing: 4px;
}

.subtitle {
  font-size: 1.2rem;
  color: #c9a0dc;
  margin-bottom: 24px;
  letter-spacing: 2px;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.intro {
  font-size: 1rem;
  color: #b8a0c0;
  max-width: 520px;
  margin-bottom: 28px;
  line-height: 1.8;
  animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 分隔线装饰 */
.divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  margin: 0 auto 24px;
  opacity: 0.6;
  animation: expandLine 1.2s ease-out 0.6s both;
}
@keyframes expandLine {
  from { width: 0; opacity: 0; }
  to   { width: 80px; opacity: 0.6; }
}

/* ===== 首页布局：三栏自适应 ===== */
.hero-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(24px, 4vw, 60px);
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px);
}

/* 左侧 */
.hero-left {
  flex: 0 0 24%;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vh, 48px);
  text-align: left;
  padding-top: 2vh;
}

.hero-left h1 {
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.hero-left .subtitle {
  font-size: clamp(0.9rem, 1.3vw, 1.15rem);
  margin-bottom: 16px;
}

.hero-left .divider {
  margin: 0 0 16px 0;
}

.hero-left .intro {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  max-width: 100%;
  margin-bottom: 0;
  text-align: left;
}

.hero-left .hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.hero-left .btn-primary,
.hero-left .btn-secondary {
  width: 100%;
  padding: clamp(10px, 1.5vh, 14px) clamp(16px, 2vw, 24px);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  margin-top: 0;
}

/* 中间 */
.hero-center {
  flex: 0 0 32%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 320px;
}

/* 每日牌灵 */
.daily-card {
  width: 100%;
  max-width: 420px;
  padding: clamp(20px, 2.5vh, 28px) clamp(18px, 2vw, 24px);
  background: linear-gradient(145deg, rgba(123, 44, 191, 0.15) 0%, rgba(26, 0, 51, 0.35) 50%, rgba(123, 44, 191, 0.1) 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.4s both;
  transition: all 0.4s ease;
}

.daily-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.12), 0 0 0 1px rgba(212, 175, 55, 0.1);
  transform: translateY(-4px);
}

.daily-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.4), transparent);
}

.daily-label {
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  color: #d4af37;
  letter-spacing: 5px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.daily-date {
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  color: #8a7a9a;
  margin-bottom: 12px;
}

.daily-image-wrap {
  width: clamp(150px, 15vw, 200px);
  height: clamp(250px, 26vw, 330px);
  margin: 0 auto 16px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 25px rgba(212, 175, 55, 0.15);
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  transition: transform 0.4s ease;
}

.daily-image-wrap:hover {
  transform: scale(1.03) rotate(-1deg);
}

.daily-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.daily-image-wrap.reversed img {
  transform: rotate(180deg);
}

.daily-name {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: #f4e4bc;
  margin-bottom: 4px;
  font-weight: bold;
}

.daily-orientation {
  font-size: clamp(0.8rem, 1.1vw, 0.9rem);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.daily-keywords {
  font-size: clamp(0.78rem, 1vw, 0.85rem);
  color: #d4af37;
  margin-bottom: 12px;
  letter-spacing: 1px;
  padding: 5px 12px;
  background: rgba(212, 175, 55, 0.08);
  border-radius: 20px;
  display: inline-block;
}

.daily-meaning {
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  color: #b0a0c0;
  line-height: 1.7;
  padding: 0 4px;
}

/* 右侧 */
.hero-right {
  flex: 0 0 28%;
  min-width: 280px;
  padding-top: 2vh;
}

/* 塔罗历史 */
.hero-history h3 {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: #d4af37;
  letter-spacing: 3px;
  margin-bottom: 20px;
  text-align: left;
}

.history-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-item {
  position: relative;
  padding: 18px 20px 18px 68px;
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.08) 0%, rgba(26, 0, 51, 0.2) 100%);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 10px;
  transition: all 0.35s ease;
  overflow: hidden;
}

.history-item:hover {
  border-color: rgba(212, 175, 55, 0.35);
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.15) 0%, rgba(26, 0, 51, 0.3) 100%);
  transform: translateX(4px);
}

.history-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #d4af37, transparent);
  opacity: 0.5;
  transition: opacity 0.3s;
}

.history-item:hover::before {
  opacity: 1;
}

.history-era {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  font-size: clamp(0.7rem, 0.95vw, 0.8rem);
  color: #d4af37;
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.2;
}

.history-item p {
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  color: #a090b0;
  line-height: 1.7;
}

/* 左侧统计 */
.hero-stats {
  margin-top: 8px;
}

.hero-stats h4 {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: #d4af37;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-item {
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.1) 0%, rgba(26, 0, 51, 0.2) 100%);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.stat-item:hover {
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.1);
}

.stat-num {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  color: #d4af37;
  font-weight: bold;
  margin-bottom: 2px;
}

.stat-label {
  font-size: clamp(0.7rem, 0.9vw, 0.8rem);
  color: #a090b0;
  letter-spacing: 1px;
}

/* 中间引言 */
.hero-quote {
  width: 100%;
  max-width: 420px;
  margin-top: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.06) 0%, rgba(123, 44, 191, 0.08) 100%);
  border-left: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 0 8px 8px 0;
  text-align: left;
}

.hero-quote p {
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  color: #c0b0d0;
  font-style: italic;
  line-height: 1.6;
}

/* AI 提供者 */
.hero-api {
  margin-top: 16px;
  text-align: center;
  font-size: clamp(0.75rem, 0.9vw, 0.85rem);
  color: #7a6a8a;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-api a {
  color: #d4af37;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.hero-api a:hover {
  color: #f4e4bc;
  border-bottom-color: rgba(212, 175, 55, 0.5);
}

/* 右侧小贴士 */
.hero-tips {
  margin-top: 24px;
}

.hero-tips h4 {
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  color: #d4af37;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.hero-tips ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-tips li {
  position: relative;
  padding-left: 18px;
  font-size: clamp(0.82rem, 1.05vw, 0.92rem);
  color: #a090b0;
  line-height: 1.5;
}

.hero-tips li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #d4af37;
  font-size: 0.7rem;
  top: 2px;
}

/* 返回按钮 */
.btn-back {
  position: absolute;
  top: 20px;
  left: 20px;
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #d4af37;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.6);
  color: #f4e4bc;
}

/* ===== 按钮 ===== */
.btn-primary {
  position: relative;
  background: linear-gradient(135deg, #7b2cbf 0%, #4a148c 100%);
  color: #f4e4bc;
  border: 1px solid #d4af37;
  padding: 14px 48px;
  font-size: 1.1rem;
  font-family: inherit;
  letter-spacing: 3px;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.3s ease;
  margin-top: 8px;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.8s both;
}

/* 按钮光晕扫过 */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9333ea 0%, #6b21a8 100%);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), 0 0 60px rgba(212, 175, 55, 0.15), inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-3px) scale(1.03);
}

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

.btn-secondary {
  position: relative;
  background: transparent;
  color: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.5);
  padding: 14px 48px;
  font-size: 1.1rem;
  font-family: inherit;
  letter-spacing: 3px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.9s both;
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: #d4af37;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  transform: translateY(-3px) scale(1.03);
}

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

/* ===== 输入框 ===== */
input[type="text"] {
  background: rgba(26, 0, 51, 0.6);
  border: 1px solid #7b2cbf;
  color: #f4e4bc;
  padding: 14px 20px;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 4px;
  width: 100%;
  max-width: 480px;
  margin-bottom: 24px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]::placeholder {
  color: #7a6a8a;
}

input[type="text"]:focus {
  border-color: #d4af37;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

/* ===== Canvas 洗牌舞台 ===== */
#shuffleStage {
  position: relative;
  width: 360px;
  height: 260px;
  margin-top: 10px;
}

#shuffleCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* 洗牌提示文字 */
#shuffleStatus {
  transition: opacity 0.3s ease;
}

/* 响应式：洗牌舞台 */
@media (max-width: 768px) {
  #shuffleStage { width: 300px; height: 220px; }
}

@media (max-width: 400px) {
  #shuffleStage { width: 260px; height: 190px; }
}

/* ===== 抽牌区 ===== */
#drawCounter {
  font-size: 1.1rem;
  color: #d4af37;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

#cardTable {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 1100px;
  padding: 16px;
}

/* ===== 卡牌容器（3D 翻转） ===== */
.card-wrap {
  width: 72px;
  height: 120px;
  perspective: 600px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.card-wrap:hover {
  transform: translateY(-6px);
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-wrap.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* 牌背（CSS 绘制） */
.card-back {
  background: linear-gradient(135deg, #1a0033 0%, #2d0b4e 50%, #1a0033 100%);
  border: 1.5px solid #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 3px;
}

.card-back::after {
  content: "☽✦☾";
  color: #d4af37;
  font-size: 0.85rem;
  letter-spacing: 1px;
  opacity: 0.75;
  text-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}

/* 牌面（真实图片） */
.card-front {
  transform: rotateY(180deg);
  background: #000;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

/* 选中标记 */
.card-wrap.picked .card-back {
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.6);
  border-color: #f4e4bc;
}

.card-wrap.picked .card-back::after {
  opacity: 1;
  font-size: 1rem;
}

/* ===== 牌阵选择 ===== */
.spread-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  max-width: 900px;
  margin-top: 12px;
}

.spread-card {
  width: 220px;
  padding: 32px 20px;
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.15) 0%, rgba(26, 0, 51, 0.4) 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.35s ease;
  text-align: center;
}

.spread-card:hover {
  transform: translateY(-8px);
  border-color: #d4af37;
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.2), 0 0 20px rgba(123, 44, 191, 0.3);
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.25) 0%, rgba(26, 0, 51, 0.5) 100%);
}

.spread-card.selected {
  border-color: #d4af37;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.3), inset 0 0 20px rgba(212, 175, 55, 0.05);
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.3) 0%, rgba(26, 0, 51, 0.55) 100%);
}

.spread-icon {
  font-size: 1.6rem;
  color: #d4af37;
  margin-bottom: 14px;
  letter-spacing: 3px;
  opacity: 0.9;
}

.spread-name {
  font-size: 1.3rem;
  color: #f4e4bc;
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.spread-desc {
  font-size: 0.9rem;
  color: #a890b0;
  margin-bottom: 10px;
}

.spread-count {
  font-size: 0.8rem;
  color: #d4af37;
  letter-spacing: 1px;
  opacity: 0.8;
}

/* ===== 提问区 ===== */
.question-area {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  max-width: 600px;
  width: 100%;
}

.question-area h3 {
  font-size: 1.3rem;
  color: #d4af37;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.question-examples {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 16px 0 24px;
  max-width: 600px;
  width: 100%;
}

.example-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: rgba(123, 44, 191, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 20px;
  font-size: 0.8rem;
  color: #c0b0d0;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  white-space: nowrap;
}

.example-tag:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.5);
  color: #f4e4bc;
  transform: translateY(-2px);
}

/* ===== 解读区 ===== */
#readingCards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  max-width: 1100px;
  margin-bottom: 36px;
}

.reading-card {
  width: 260px;
  text-align: center;
  animation: fadeIn 0.8s ease-out both;
}

.reading-card .position-title {
  font-size: 1.1rem;
  color: #d4af37;
  letter-spacing: 3px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.reading-card .card-image-wrap {
  width: 180px;
  height: 300px;
  margin: 0 auto 16px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6), 0 0 20px rgba(212, 175, 55, 0.15);
  border: 1.5px solid rgba(212, 175, 55, 0.3);
}

.reading-card .card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.reading-card .card-name {
  font-size: 1.25rem;
  color: #f4e4bc;
  margin-bottom: 4px;
}

.reading-card .card-orientation {
  font-size: 0.9rem;
  color: #c9a0dc;
  margin-bottom: 10px;
}

.reading-card .keywords {
  font-size: 0.85rem;
  color: #d4af37;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.reading-card .meaning {
  font-size: 0.95rem;
  color: #c0b0d0;
  line-height: 1.7;
  padding: 0 8px;
}

/* ===== 牌意速查 ===== */
.lookup-hint {
  font-size: 0.9rem;
  color: rgba(212, 175, 55, 0.7);
  letter-spacing: 2px;
  margin-bottom: 16px;
  animation: fadeInUp 1s ease-out both;
}

.lookup-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  background: rgba(26, 0, 51, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #c0b0d0;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.25s ease;
}

.filter-btn:hover {
  border-color: rgba(212, 175, 55, 0.6);
  color: #f4e4bc;
}

.filter-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: #d4af37;
  color: #d4af37;
}

.lookup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  max-width: 900px;
  width: 100%;
  margin-bottom: 32px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
}

.lookup-card {
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.1) 0%, rgba(26, 0, 51, 0.2) 100%);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lookup-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.1);
  transform: translateY(-4px);
}

.lookup-card img {
  width: 60px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  margin-bottom: 8px;
}

.lookup-card .lookup-name {
  font-size: 0.85rem;
  color: #f4e4bc;
  margin-bottom: 4px;
}

.lookup-card .lookup-keywords {
  font-size: 0.7rem;
  color: #a890b0;
  line-height: 1.4;
}

/* 详情弹窗 */
.lookup-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lookup-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lookup-modal-content {
  background: linear-gradient(135deg, #1a0033 0%, #0d001a 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 28px 24px;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.lookup-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  color: #a890b0;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.lookup-modal-close:hover {
  color: #d4af37;
}

.lookup-modal-img {
  width: 140px;
  height: 230px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.lookup-modal-name {
  font-size: 1.3rem;
  color: #f4e4bc;
  margin-bottom: 16px;
}

.lookup-modal-section {
  text-align: left;
  margin-bottom: 16px;
}

.lookup-modal-section h4 {
  font-size: 0.9rem;
  color: #d4af37;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.lookup-modal-section p {
  font-size: 0.9rem;
  color: #c0b0d0;
  line-height: 1.7;
}

.ai-reading {
  max-width: 800px;
  width: 100%;
  margin: 32px auto;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.1) 0%, rgba(26, 0, 51, 0.25) 100%);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  text-align: center;
  animation: fadeIn 0.8s ease-out both;
}

.ai-reading-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.1rem;
  color: #d4af37;
  letter-spacing: 3px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.ai-icon {
  font-size: 1.2rem;
  animation: spinStar 3s ease-in-out infinite;
}

@keyframes spinStar {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

.ai-reading-content {
  font-size: 0.95rem;
  color: #c0b0d0;
  line-height: 1.9;
  text-align: left;
}

.ai-reading-content p {
  margin-bottom: 12px;
}

.ai-loading {
  text-align: center;
  padding: 20px 0;
}

.ai-loading p {
  color: #a090b0;
  font-size: 0.9rem;
  margin-top: 12px;
}

.ai-loading-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.ai-loading-dots span {
  width: 8px;
  height: 8px;
  background: #d4af37;
  border-radius: 50%;
  animation: bounceDot 1.4s ease-in-out infinite both;
  opacity: 0.6;
}

.ai-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes bounceDot {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.ai-error {
  text-align: center;
  color: #c084fc;
  padding: 16px 0;
}

.ai-placeholder {
  text-align: center;
  padding: 20px 0;
  color: #7a6a8a;
  font-size: 0.9rem;
}

.ai-timer {
  color: #d4af37;
  font-size: 0.85rem;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* ===== 教程页 ===== */
.tutorial-content {
  max-width: 800px;
  width: 100%;
  text-align: left;
  margin-bottom: 32px;
}

.tutorial-section {
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.1) 0%, rgba(26, 0, 51, 0.25) 100%);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.tutorial-section:hover {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.08);
}

.tutorial-section h3 {
  font-size: 1.15rem;
  color: #d4af37;
  margin-bottom: 14px;
  letter-spacing: 2px;
}

.tutorial-section p {
  font-size: 0.95rem;
  color: #c0b0d0;
  line-height: 1.8;
  margin-bottom: 10px;
}

.tutorial-section ul {
  margin: 10px 0 10px 20px;
  color: #c0b0d0;
  line-height: 1.8;
}

.tutorial-section li {
  margin-bottom: 6px;
}

.tutorial-section strong {
  color: #f4e4bc;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero-layout { flex-wrap: wrap; }
  .hero-left { flex: 1 1 100%; text-align: center; align-items: center; }
  .hero-left .divider { margin: 0 auto 16px; }
  .hero-left .intro { text-align: center; }
  .hero-left .hero-buttons { flex-direction: row; justify-content: center; width: 100%; }
  .hero-left .btn-primary,
  .hero-left .btn-secondary { width: auto; min-width: 100px; }
  .hero-center { flex: 1 1 45%; min-width: 260px; }
  .hero-right { flex: 1 1 45%; min-width: 260px; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.4rem; letter-spacing: 4px; }
  h2 { font-size: 1.7rem; letter-spacing: 2px; }
  .hero-layout { flex-direction: column; align-items: center; }
  .hero-left { flex: 0 0 auto; width: 100%; }
  .hero-left h1 { font-size: 2.4rem; }
  .hero-center { flex: 0 0 auto; }
  .hero-right { flex: 0 0 auto; width: 100%; }
  .hero-stats { max-width: 320px; width: 100%; }
  .hero-quote { max-width: 320px; width: 100%; }
  .hero-tips { max-width: 320px; width: 100%; }
  .daily-card { margin: 0 auto 24px; padding: 22px 18px; }
  .daily-image-wrap { width: 120px; height: 200px; }
  .history-item { padding: 14px 16px 14px 60px; }
  .history-era { left: 12px; width: 36px; height: 36px; font-size: 0.65rem; }
  .card-wrap { width: 58px; height: 96px; }
  .card-back::after { font-size: 0.7rem; }
  #cardTable { gap: 5px; padding: 10px; }
  .reading-card { width: 100%; max-width: 300px; }
  .reading-card .card-image-wrap { width: 150px; height: 250px; }
  .spread-grid { gap: 16px; }
  .spread-card { width: 160px; padding: 24px 14px; }
  .spread-icon { font-size: 1.3rem; }
  .spread-name { font-size: 1.1rem; }
  .question-examples { grid-template-columns: repeat(3, 1fr); }
  .example-tag { font-size: 0.75rem; padding: 6px 2px; }
}

@media (max-width: 400px) {
  .card-wrap { width: 48px; height: 80px; }
  .card-back::after { font-size: 0.6rem; letter-spacing: 0; }
  #cardTable { gap: 4px; padding: 6px; }
  .spread-card { width: 140px; padding: 20px 12px; }
}
