/* ============================================
   Luna Tarot - 完整样式
   配色: 夜空黑 #0A0A1A / 深紫蓝 #1A1A3E
         星金色 #FFD700 / 梦幻紫 #C084FC
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: #0A0A1A;
  color: #F5E6FF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

#app {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

/* --- Starfield Canvas --- */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Screens --- */
.screen {
  position: relative;
  z-index: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
  padding: 40px 24px;
  min-height: 100vh;
  animation: fadeIn 0.6s ease-out;
}

.screen.active {
  display: flex;
}

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

/* --- Home Screen --- */
.title-group {
  text-align: center;
  margin-top: 60px;
  margin-bottom: 20px;
}

.brand-name {
  font-family: 'EB Garamond', serif;
  font-size: 72px;
  font-weight: 600;
  background: linear-gradient(135deg, #FFD700 0%, #C084FC 50%, #60A5FA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 8px;
  line-height: 1;
}

.brand-subtitle {
  font-size: 14px;
  color: rgba(245, 230, 255, 0.6);
  letter-spacing: 6px;
  margin-top: 8px;
}

.moon-icon {
  font-size: 48px;
  margin-top: 16px;
  animation: float 3s ease-in-out infinite;
}

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

.home-quote {
  font-size: 18px;
  color: rgba(245, 230, 255, 0.9);
  text-align: center;
  margin: 40px 24px;
  line-height: 1.6;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  letter-spacing: 2px;
}

/* --- Buttons --- */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 48px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #C084FC, #7C3AED);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 30px rgba(192, 132, 252, 0.3);
  letter-spacing: 2px;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: glowPulse 2s ease-in-out infinite;
  pointer-events: none;
}

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

.btn-secondary {
  padding: 14px 40px;
  border: 1.5px solid rgba(192, 132, 252, 0.5);
  border-radius: 50px;
  background: rgba(192, 132, 252, 0.1);
  color: #C084FC;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.btn-secondary:active {
  background: rgba(192, 132, 252, 0.2);
  transform: scale(0.97);
}

.btn-text-only {
  background: none;
  border: none;
  color: rgba(245, 230, 255, 0.5);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.3s;
  letter-spacing: 1px;
}

.btn-text-only:active {
  color: rgba(245, 230, 255, 0.9);
}

.home-hint {
  color: rgba(245, 230, 255, 0.3);
  font-size: 13px;
  margin-top: 20px;
  margin-bottom: 4px;
  letter-spacing: 3px;
}

/* --- Daily Fortune (首页每日运势) --- */
.daily-fortune {
  width: 100%;
  max-width: 380px;
  margin: 16px auto 8px;
  background: linear-gradient(145deg, rgba(26, 26, 62, 0.6), rgba(10, 10, 26, 0.6));
  border: 1px solid rgba(192, 132, 252, 0.12);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.daily-fortune:active {
  transform: scale(0.98);
  border-color: rgba(192, 132, 252, 0.3);
}

.daily-fortune-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.daily-fortune-label {
  font-size: 14px;
  font-weight: 600;
  color: #C084FC;
  letter-spacing: 2px;
}

.daily-fortune-streak {
  font-size: 12px;
  color: rgba(255, 215, 0, 0.7);
  letter-spacing: 1px;
}

.daily-fortune-preview {
  display: flex;
  gap: 14px;
  align-items: center;
}

.daily-card-mini {
  flex-shrink: 0;
  width: 52px;
  height: 78px;
  border-radius: 6px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(192, 132, 252, 0.15);
  background: #1A1A3E;
  line-height: 0;
}

.daily-card-mini .dc-symbol {
  font-size: 20px;
  line-height: 1;
}

.daily-card-mini .dc-name {
  font-size: 10px;
  font-weight: 600;
  color: #FFD700;
  margin-top: 2px;
  letter-spacing: 1px;
}

.mini-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.daily-fortune-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 230, 255, 0.6);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.daily-fortune-text .loading-dots {
  padding: 0;
}

.daily-fortune-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(192, 132, 252, 0.08);
}

.daily-fortune-hint {
  font-size: 11px;
  color: rgba(245, 230, 255, 0.25);
  letter-spacing: 1px;
}

.daily-notif-btn {
  font-size: 11px;
  background: none;
  border: 1px solid rgba(192, 132, 252, 0.2);
  border-radius: 12px;
  padding: 4px 10px;
  color: rgba(245, 230, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.daily-notif-btn:active {
  border-color: #C084FC;
  color: #C084FC;
}

.daily-notif-btn.enabled {
  border-color: #C084FC;
  color: #C084FC;
  background: rgba(192, 132, 252, 0.1);
}

/* --- Daily Fortune Modal --- */
.fortune-modal-content {
  max-width: 380px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 36px 24px 28px;
  -webkit-overflow-scrolling: touch;
}

.fortune-header {
  text-align: center;
  margin-bottom: 20px;
}

.fortune-date {
  font-size: 13px;
  color: rgba(245, 230, 255, 0.4);
  letter-spacing: 2px;
  font-family: 'EB Garamond', serif;
}

.fortune-title {
  font-size: 24px;
  font-weight: 600;
  color: #F5E6FF;
  margin-top: 4px;
  letter-spacing: 3px;
}

.fortune-card-big {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.fortune-card-big .tarot-card {
  width: 120px;
  height: 190px;
}

.fortune-card-big .tarot-card .card-inner {
  transition-delay: 0s !important;
}

.fortune-reading {
  padding: 12px 0;
  min-height: 60px;
}

.fortune-reading .loading-dots {
  padding: 10px 0;
}

.fortune-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

/* --- Card Detail Modal (卡片大图观赏) --- */
.card-detail-overlay {
  z-index: 1100;
}

.card-detail-body {
  max-width: 340px;
  width: 88vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0 !important;
  background: linear-gradient(160deg, #1A1A3E, #0A0A1A) !important;
  border-color: rgba(255, 215, 0, 0.15) !important;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-detail-body.cd-visible {
  transform: scale(1);
  opacity: 1;
}

.cd-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: rgba(245,230,255,0.6);
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.08);
}

.cd-close-btn:active {
  background: rgba(0,0,0,0.6);
  color: #F5E6FF;
}

.cd-image-wrapper {
  width: 100%;
  aspect-ratio: 3 / 5;
  max-height: 50vh;
  overflow: hidden;
  border-radius: 23px 23px 0 0;
  background: #0A0A1A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0A0A1A;
}

.cd-info {
  padding: 20px 24px 28px;
  text-align: center;
}

.cd-position {
  font-size: 11px;
  color: rgba(255, 215, 0, 0.5);
  font-family: 'EB Garamond', serif;
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.cd-name {
  font-size: 28px;
  font-weight: 700;
  color: #FFD700;
  letter-spacing: 3px;
  line-height: 1.3;
}

.cd-name-en {
  font-size: 14px;
  color: rgba(245, 230, 255, 0.4);
  font-family: 'EB Garamond', serif;
  font-style: italic;
  letter-spacing: 1px;
  margin-top: 2px;
}

.cd-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.cd-tag {
  font-size: 11px;
  color: rgba(245, 230, 255, 0.5);
  background: rgba(192, 132, 252, 0.1);
  border: 1px solid rgba(192, 132, 252, 0.15);
  border-radius: 12px;
  padding: 3px 10px;
  letter-spacing: 1px;
}

.cd-divider {
  width: 40px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #C084FC, transparent);
  margin: 16px auto;
}

.cd-reading {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(245, 230, 255, 0.7);
  text-align: left;
  padding: 0 4px;
}

@media (max-width: 360px) {
  .card-detail-body {
    width: 92vw;
  }
  .cd-name { font-size: 22px; }
  .cd-info { padding: 16px 18px 22px; }
  .cd-image-wrapper { max-height: 42vh; }
}

.home-footer {
  margin-top: auto;
  padding-top: 20px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C084FC;
  animation: dotPulse 2s ease-in-out infinite;
}

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

.footer-text {
  font-size: 12px;
  color: rgba(245, 230, 255, 0.3);
  letter-spacing: 2px;
}

/* --- Shuffle Screen --- */
.screen-title {
  font-size: 28px;
  font-weight: 600;
  color: #F5E6FF;
  letter-spacing: 3px;
  text-align: center;
  margin-top: 40px;
}

.screen-subtitle {
  font-size: 14px;
  color: rgba(245, 230, 255, 0.5);
  margin-top: 8px;
  letter-spacing: 2px;
  text-align: center;
  padding: 0 20px;
}

.shuffle-cards {
  position: relative;
  width: 120px;
  height: 180px;
  margin: 50px auto;
}

.shuffle-card {
  position: absolute;
  width: 120px;
  height: 180px;
  border-radius: 10px;
  background: linear-gradient(145deg, #2A1A3E, #1A1A3E);
  border: 1.5px solid rgba(192, 132, 252, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: rgba(192, 132, 252, 0.5);
  transition: all 0.15s ease;
  will-change: transform;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.shuffle-card .card-back-pattern {
  width: 60px;
  height: 90px;
  border: 1.5px solid rgba(192, 132, 252, 0.2);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.shuffle-progress {
  width: 200px;
  margin: 20px auto;
}

.progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(192, 132, 252, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #C084FC, #FFD700);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* --- Result Screen --- */
.result-header {
  text-align: center;
  margin-bottom: 20px;
}

.cards-display {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.tarot-card {
  width: 100px;
  height: 160px;
  border-radius: 8px;
  cursor: pointer;
  perspective: 800px;
  transition: transform 0.3s ease;
}

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

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

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card-back {
  background: linear-gradient(145deg, #2A1A3E, #1A1A3E);
  border: 1px solid rgba(192, 132, 252, 0.3);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.card-back-pattern {
  font-size: 36px;
  color: rgba(192, 132, 252, 0.4);
}

.card-front {
  background: #1A1A3E;
  border: 1px solid rgba(255, 215, 0, 0.3);
  transform: rotateY(180deg);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(192, 132, 252, 0.2);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 7px;
  /* 加载占位渐变 — 图片加载前显示微光底纹 */
  background: linear-gradient(135deg, rgba(192,132,252,0.08), rgba(88,56,250,0.12));
  transition: opacity 0.4s ease;
}

/* picture 下 img 自带内联 opacity 和 onload 切换，此留空 */

.card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 4px 5px;
  background: linear-gradient(transparent, rgba(10, 10, 26, 0.85) 35%);
  text-align: center;
  pointer-events: none;
}

.card-info .card-id {
  font-size: 9px;
  color: rgba(255, 215, 0, 0.7);
  font-family: 'EB Garamond', serif;
  letter-spacing: 1px;
}

.card-info .card-name {
  font-size: 14px;
  font-weight: 600;
  color: #FFD700;
  letter-spacing: 1px;
  margin: 1px 0;
  line-height: 1.2;
}

.card-info .card-name-en {
  font-size: 8px;
  color: rgba(245, 230, 255, 0.5);
  font-family: 'EB Garamond', serif;
  font-style: italic;
}

/* --- Card flip animation delay --- */
.tarot-card:nth-child(1) .card-inner { transition-delay: 0.2s; }
.tarot-card:nth-child(2) .card-inner { transition-delay: 0.6s; }
.tarot-card:nth-child(3) .card-inner { transition-delay: 1.0s; }

/* --- Reading Section --- */
.reading-section {
  width: 100%;
  max-width: 380px;
  margin-top: 24px;
}

.reading-card {
  background: linear-gradient(145deg, rgba(26, 26, 62, 0.8), rgba(10, 10, 26, 0.8));
  border: 1px solid rgba(192, 132, 252, 0.15);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}

.reading-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(245, 230, 255, 0.6);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.paid-label {
  color: #FFD700;
}

.reading-content {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(245, 230, 255, 0.85);
  position: relative;
  z-index: 1;
}

.reading-content::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border-radius: 16px;
  opacity: 0.06;
  z-index: -1;
  transition: background 1.5s ease;
  pointer-events: none;
}

/* 付费解读区域背景微光 */
#paidReading {
  position: relative;
}

#paidReading::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 16px;
  opacity: 0.04;
  transition: background 1.5s ease;
  pointer-events: none;
  z-index: 0;
}

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

/* --- Reading Typography (富文本排版) --- */
.rd-heading {
  font-size: 18px;
  font-weight: 600;
  color: #F5E6FF;
  letter-spacing: 2px;
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(192, 132, 252, 0.15);
}

.rd-heading:first-child {
  margin-top: 0;
}

.rd-card-label {
  font-size: 16px;
  font-weight: 600;
  color: #C084FC;
  letter-spacing: 2px;
  margin: 20px 0 8px;
}

.rd-paragraph {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(245, 230, 255, 0.82);
  margin-bottom: 14px;
  text-align: justify;
  word-break: break-word;
}

.rd-paragraph:last-child {
  margin-bottom: 0;
}

.rd-paragraph strong {
  color: #FFD700;
  font-weight: 600;
}

.rd-paragraph em {
  color: #C084FC;
  font-style: italic;
}

/* 打字机光标动画 */
.typing-cursor {
  display: inline-block;
  color: #C084FC;
  font-size: 20px;
  line-height: 1;
  animation: cursorBlink 0.8s ease-in-out infinite;
  padding: 20px 0;
}

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

/* 解读的最后一段（"一句话送给你"金句）特殊强调 */
.rd-paragraph:last-child {
  font-size: 16px;
  color: rgba(245, 230, 255, 0.95);
  padding: 16px 20px;
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.08), rgba(255, 215, 0, 0.05));
  border-left: 3px solid #C084FC;
  border-radius: 0 12px 12px 0;
  line-height: 1.7;
}

/* --- 分割线（日记回顾保留） --- */
.unlock-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192, 132, 252, 0.3), transparent);
  margin: 20px 0 16px;
}

/* 按钮脉冲动画（增强版） */
.btn-pulse {
  animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(192, 132, 252, 0.2); }
  50% { box-shadow: 0 0 35px rgba(192, 132, 252, 0.5), 0 0 60px rgba(255, 215, 0, 0.15); }
}

/* 价格跳动动画 */
.price-jump {
  display: inline-block;
  animation: priceJump 0.6s ease-out;
}

@keyframes priceJump {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); color: #FFD700; }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* 全屏庆祝效果 */
.celebration-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.celebration-particle {
  position: absolute;
  font-size: 24px;
  animation: particleFloat 2.5s ease-out forwards;
  opacity: 0;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-300px) rotate(720deg) scale(0.3);
  }
}

.celebration-text {
  text-align: center;
  animation: celebrateText 0.6s ease-out 0.3s both;
  z-index: 1;
}

.celebration-text .emoji {
  font-size: 64px;
  display: block;
  margin-bottom: 12px;
}

.celebration-text h3 {
  font-size: 24px;
  color: #F5E6FF;
  letter-spacing: 4px;
  font-weight: 600;
}

.celebration-text p {
  font-size: 14px;
  color: rgba(245, 230, 255, 0.5);
  margin-top: 8px;
  letter-spacing: 2px;
}

@keyframes celebrateText {
  0% { opacity: 0; transform: scale(0.5) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.reading-preview {
  font-size: 14px;
  color: rgba(245, 230, 255, 0.6);
  line-height: 1.8;
}

.reading-preview ul {
  list-style: none;
  margin-top: 12px;
}

.reading-preview li {
  padding: 4px 0;
  font-size: 14px;
  color: rgba(245, 230, 255, 0.5);
}

.btn-paid {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  font-size: 16px;
}

/* --- Loading Dots --- */
.loading-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 20px 0;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C084FC;
  animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.3; }
  40% { transform: translateY(-12px); opacity: 1; }
}

/* --- Action Buttons --- */
.result-actions {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  justify-content: center;
}

/* --- Payment Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: linear-gradient(145deg, #1A1A3E, #0A0A1A);
  border: 1px solid rgba(192, 132, 252, 0.2);
  border-radius: 24px;
  padding: 40px 32px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  position: relative;
  animation: slideUp 0.4s ease;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: rgba(245, 230, 255, 0.4);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.modal-close:active {
  background: rgba(255,255,255,0.1);
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
  color: #F5E6FF;
  letter-spacing: 2px;
}

.modal-desc {
  font-size: 13px;
  color: rgba(245, 230, 255, 0.4);
  margin-top: 6px;
  letter-spacing: 1px;
}

.modal-price {
  font-size: 36px;
  font-weight: 700;
  color: #FFD700;
  margin: 20px 0;
  font-family: 'EB Garamond', serif;
}

.modal-note {
  font-size: 12px;
  color: rgba(245, 230, 255, 0.3);
  margin-top: 12px;
}

/* --- Share Card Modal --- */
.share-modal-content {
  max-width: 420px;
  width: 95vw;
  padding: 28px 18px;
  max-height: 90vh;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .share-modal-content {
    max-width: 520px;
    padding: 32px 28px;
    max-height: 85vh;
  }
  .share-card-canvas {
    max-height: 55vh;
    width: auto;
    aspect-ratio: 600 / 960;
  }
  .share-card-wrapper {
    margin: 12px auto;
    max-width: 380px;
  }
}

.share-card-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 16px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.share-card-canvas {
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 600 / 960;
  display: block;
  border-radius: 16px;
  background: #0A0A1A;
}

.share-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  width: 100%;
}

@media (max-width: 400px) {
  .share-actions {
    flex-direction: column;
    gap: 8px;
  }
}

.share-save-btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 15px;
  white-space: nowrap;
}

.share-copy-btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 15px;
  white-space: nowrap;
}

.share-modal-content .modal-close {
  top: 12px;
  right: 12px;
}

/* ============================================
   📓 占卜日记 — 首页入口
   ============================================ */
.btn-diary-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 32px;
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.18), rgba(124, 58, 237, 0.12));
  border: 1.5px solid rgba(192, 132, 252, 0.35);
  border-radius: 50px;
  color: #D4A0FF;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 2px;
  position: relative;
  min-width: 240px;
  box-shadow: 0 4px 20px rgba(192, 132, 252, 0.15);
}

.btn-diary-entry:active {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.3), rgba(124, 58, 237, 0.2));
  border-color: rgba(192, 132, 252, 0.6);
  color: #E8D0FF;
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(192, 132, 252, 0.2);
}

.btn-diary-entry .diary-entry-icon {
  font-size: 22px;
}

.btn-diary-entry .diary-entry-text {
  font-size: 15px;
}

.diary-entry-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: linear-gradient(135deg, #C084FC, #7C3AED);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(192, 132, 252, 0.4);
  letter-spacing: 0;
}

/* --- 占卜日记弹窗 --- */
.diary-modal-content {
  max-width: 400px;
  width: 92vw;
  max-height: 85vh;
  padding: 32px 20px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.diary-header {
  text-align: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.diary-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
}

.diary-list {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
  max-height: 55vh;
  -webkit-overflow-scrolling: touch;
  margin: 0 -8px;
  padding: 0 8px;
}

/* 空状态 */
.diary-empty {
  text-align: center;
  padding: 40px 20px;
}

.diary-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.diary-empty-text {
  font-size: 16px;
  color: rgba(245, 230, 255, 0.5);
  letter-spacing: 2px;
}

.diary-empty-hint {
  font-size: 13px;
  color: rgba(245, 230, 255, 0.25);
  margin-top: 6px;
  letter-spacing: 1px;
}

/* 日记条目 */
.diary-entry {
  padding: 14px 14px;
  margin-bottom: 8px;
  background: rgba(192, 132, 252, 0.04);
  border: 1px solid rgba(192, 132, 252, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.diary-entry:active {
  background: rgba(192, 132, 252, 0.1);
  border-color: rgba(192, 132, 252, 0.2);
  transform: scale(0.98);
}

.diary-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.diary-entry-date {
  font-size: 11px;
  color: rgba(245, 230, 255, 0.3);
  font-family: 'EB Garamond', serif;
  letter-spacing: 1px;
}

.diary-entry-elements {
  font-size: 14px;
  letter-spacing: 2px;
}

.diary-entry-cards {
  font-size: 15px;
  font-weight: 600;
  color: #FFD700;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.diary-entry-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.diary-entry-snippet {
  font-size: 12px;
  color: rgba(245, 230, 255, 0.4);
  line-height: 1.4;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diary-entry-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.diary-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.diary-tag-latest {
  background: rgba(192, 132, 252, 0.15);
  color: #C084FC;
  border: 1px solid rgba(192, 132, 252, 0.2);
}

.diary-tag-paid {
  background: rgba(255, 215, 0, 0.1);
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.15);
}

.diary-fb-icon {
  font-size: 14px;
}

.diary-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(192, 132, 252, 0.08);
  flex-shrink: 0;
}

/* 日记详情 */
.diary-detail {
  padding: 4px 0;
}

.diary-detail-back {
  background: none;
  border: none;
  color: rgba(245, 230, 255, 0.4);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
  display: block;
  text-align: left;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.diary-detail-back:active {
  color: rgba(245, 230, 255, 0.8);
}

.diary-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 14px;
}

.diary-detail-date {
  font-size: 13px;
  color: rgba(245, 230, 255, 0.4);
  font-family: 'EB Garamond', serif;
  letter-spacing: 1px;
}

.diary-detail-cards {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 16px 0;
}

.diary-detail-card {
  width: 80px;
  text-align: center;
}

.diary-detail-card-img {
  width: 100%;
  aspect-ratio: 3 / 5;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(192, 132, 252, 0.15);
  background: #1A1A3E;
}

.diary-detail-card-name {
  font-size: 12px;
  font-weight: 600;
  color: #FFD700;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.diary-detail-card-element {
  font-size: 10px;
  color: rgba(245, 230, 255, 0.3);
  letter-spacing: 0.5px;
}

.diary-detail-reading {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(245, 230, 255, 0.6);
  padding: 12px 14px;
  background: rgba(192, 132, 252, 0.04);
  border-radius: 10px;
  border: 1px solid rgba(192, 132, 252, 0.08);
  margin-top: 8px;
}

.diary-detail-section {
  margin-top: 14px;
}

.diary-detail-section-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(245, 230, 255, 0.5);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.diary-detail-section-label.paid-label {
  color: #FFD700;
}

.diary-detail-unlock {
  margin-top: 14px;
  text-align: center;
}

/* ============================================
   🧠 解读反馈系统
   ============================================ */
.feedback-section {
  width: 100%;
  max-width: 380px;
  margin-top: 12px;
  text-align: center;
  padding: 0 8px;
}

.feedback-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192, 132, 252, 0.15), transparent);
  margin-bottom: 14px;
}

.feedback-prompt {
  font-size: 14px;
  color: rgba(245, 230, 255, 0.5);
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.feedback-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.feedback-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 32px;
  border-radius: 18px;
  border: 1.5px solid rgba(192, 132, 252, 0.15);
  background: rgba(192, 132, 252, 0.06);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
}

.feedback-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.feedback-yes:hover:not(:disabled) {
  border-color: rgba(255, 100, 100, 0.4);
  background: rgba(255, 100, 100, 0.1);
}

.feedback-yes:active:not(:disabled) {
  border-color: rgba(255, 80, 80, 0.5);
  background: rgba(255, 80, 80, 0.15);
}

.feedback-no:hover:not(:disabled) {
  border-color: rgba(100, 150, 255, 0.4);
  background: rgba(100, 150, 255, 0.1);
}

.feedback-no:active:not(:disabled) {
  border-color: rgba(80, 130, 255, 0.5);
  background: rgba(80, 130, 255, 0.15);
}

.feedback-btn .fb-icon {
  font-size: 28px;
}

.feedback-btn .fb-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(245, 230, 255, 0.5);
  letter-spacing: 1px;
}

.feedback-thanks {
  font-size: 14px;
  color: rgba(192, 132, 252, 0.7);
  font-weight: 500;
  margin-top: 16px;
  letter-spacing: 1px;
  animation: fadeIn 0.5s ease;
  padding: 8px 0;
}

/* --- Bottom Placeholder --- */
.bottom-placeholder {
  height: 40px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 0;
}

/* --- Responsive --- */
@media (max-width: 360px) {
  .brand-name { font-size: 56px; }
  .tarot-card { width: 85px; height: 136px; }
  .tarot-card .card-name { font-size: 14px; }
  .screen { padding: 30px 16px; }
}
