/* ==================== 韓國現代 App UI 風格主題 v5.0 ==================== */
/* 核心設計語言：現代高級感、流暢交互、細膩細節、呼吸感佈局 */

/* ==================== CSS 變數定義 ==================== */
:root {
  /* 系統背景 - 極致純淨與深度平衡 */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --bg-dark-glass: rgba(15, 23, 42, 0.9);

  /* 品牌主色調 - 選用具有高級感的韓系配比 */
  --primary: #6366f1;
  /* 現代靛藍 */
  --primary-glow: rgba(99, 102, 241, 0.2);
  --secondary: #ec4899;
  /* 柔美粉紅 */
  --accent: #8b5cf6;
  /* 優雅紫色 */

  /* 狀態色 */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* 文字系統 - 降低純黑度增加深度感 */
  --text-main: #1e293b;
  --text-body: #475569;
  --text-muted: #94a3b8;
  --text-light: #f1f5f9;

  /* 占卜系統專用色 - 更柔和且高級的配色 */
  --bazi-color: #6366f1;
  --bazi-bg: #eef2ff;
  --ziwei-color: #8b5cf6;
  --ziwei-bg: #f5f3ff;
  --tarot-color: #ec4899;
  --tarot-bg: #fff1f2;
  --astro-color: #f59e0b;
  --astro-bg: #fffbeb;
  --num-color: #10b981;
  --num-bg: #f0fdf4;

  /* 陰影系統 - 韓系設計的核心靈魂：多層次微影 */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05),
    0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-premium: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.15);

  /* 圓角系統 - 大圓角增加親和力 */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-full: 9999px;

  /* 動畫曲線 */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==================== 全局設定 ==================== */
body {
  background: var(--bg-primary) !important;
  color: var(--text-main) !important;
  font-family: "Inter", "Noto Sans TC", -apple-system, sans-serif !important;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==================== 高級組件重構 ==================== */

/* 1. 強化玻璃擬態 */
.glass-effect {
  background: var(--bg-glass) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: var(--radius-lg) !important;
}

/* 2. 精緻導覽列 */
nav {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
  height: 72px;
}

.nav-btn {
  color: var(--text-body) !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-full) !important;
  transition: all 0.3s var(--ease-out) !important;
  border: none !important;
  background: transparent !important;
}

.nav-btn:hover {
  color: var(--primary) !important;
  background: var(--bazi-bg) !important;
  transform: translateY(-1px);
}

.nav-btn.active {
  color: var(--primary) !important;
  background: var(--bazi-bg) !important;
  font-weight: 700 !important;
}

/* 3. 韓系輸入系統 */
.input-field {
  background: #f1f5f9 !important;
  border: 1.5px solid transparent !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-main) !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  transition: all 0.3s var(--ease-out) !important;
  width: 100%;
  appearance: none;
}

.input-field:focus {
  background: var(--bg-secondary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px var(--primary-glow) !important;
  outline: none !important;
}

select.input-field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d=' immigration-19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px !important;
}

/* 4. 高級按鈕 */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    #4f46e5 100%
  ) !important;
  color: white !important;
  border-radius: var(--radius-md) !important;
  padding: 14px 28px !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.3) !important;
  transition: all 0.4s var(--ease-out) !important;
  border: none !important;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px -8px rgba(99, 102, 241, 0.4) !important;
}

/* ==================== 占卜系統卡片 ==================== */
.analysis-premium-card {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.03) 0%,
    rgba(168, 85, 247, 0.03) 100%
  ) !important;
  border: 1px solid rgba(99, 102, 241, 0.1) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.3s var(--ease-out);
}

.analysis-premium-card:hover {
  border-color: rgba(99, 102, 241, 0.3) !important;
  box-shadow: var(--shadow-md) !important;
}

.divination-card label > div {
  border-radius: var(--radius-xl) !important;
  border: 2px solid transparent !important;
  transition: all 0.5s var(--ease-out) !important;
  background: var(--bg-secondary) !important;
  box-shadow: var(--shadow-md) !important;
}

.divination-icon {
  font-size: 4.2rem !important;
  /* 配合 7 欄位佈局進行微調，防止過度重疊 */
  margin-bottom: 20px !important;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.05));
  transition: all 0.5s var(--ease-out) !important;
}

.divination-card:hover label > div {
  transform: translateY(-12px);
  box-shadow: var(--shadow-premium) !important;
  border-color: var(--primary-glow) !important;
}

.divination-card input:checked + label > div {
  border-color: var(--primary) !important;
  background: var(--bg-secondary) !important;
  box-shadow: 0 0 0 5px var(--primary-glow), var(--shadow-lg) !important;
}

/* ==================== 分析結果區塊 ==================== */
.analysis-section {
  background: var(--bg-secondary) !important;
  border-radius: var(--radius-lg) !important;
  padding: 2.5rem !important;
  border: 1px solid rgba(0, 0, 0, 0.03) !important;
  box-shadow: var(--shadow-lg) !important;
  margin-bottom: 2rem !important;
  position: relative;
  overflow: hidden;
}

.analysis-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}

/* 八字四柱與宮位樣式 */
.pillar,
.ziwei-palace-card {
  background: var(--bg-primary) !important;
  border: none !important;
  border-radius: var(--radius-lg) !important;
  padding: 2rem 1.5rem !important;
  transition: all 0.3s var(--ease-out) !important;
  box-shadow: var(--shadow-sm) !important;
}

.pillar:hover,
.ziwei-palace-card:hover {
  background: white !important;
  transform: translateY(-5px);
  box-shadow: var(--shadow-md) !important;
}

/* 五行元素 */
.wood {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
}

.fire {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: white !important;
}

.earth {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: white !important;
}

.metal {
  background: linear-gradient(135deg, #94a3b8, #64748b) !important;
  color: white !important;
}

.water {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: white !important;
}

/* ==================== 背景修飾 ==================== */
body::before {
  content: "";
  position: fixed;
  top: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.05) 0%,
    transparent 70%
  );
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  bottom: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(236, 72, 153, 0.05) 0%,
    transparent 70%
  );
  z-index: -1;
  pointer-events: none;
}

/* ==================== Bento Grid & Mesh Gradients ==================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(160px, auto);
  }
}

.bento-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl) !important;
  transition: all 0.5s var(--ease-out) !important;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: var(--shadow-md) !important;
}

.bento-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-premium) !important;
  z-index: 10;
}

.col-span-2 {
  grid-column: span 2 / span 2;
}

.row-span-2 {
  grid-row: span 2 / span 2;
}

/* Mesh Gradients (韓系高級感色調) */
.mesh-primary {
  background: radial-gradient(at 0% 0%, #6366f1 0, transparent 50%),
    radial-gradient(at 100% 0%, #a855f7 0, transparent 50%),
    radial-gradient(at 50% 100%, #ec4899 0, transparent 50%), #4f46e5;
}

.mesh-indigo {
  background: radial-gradient(at 0% 0%, #818cf8 0, transparent 50%),
    radial-gradient(at 100% 100%, #4f46e5 0, transparent 50%), #6366f1;
}

.mesh-rose {
  background: radial-gradient(at 0% 100%, #fb7185 0, transparent 50%),
    radial-gradient(at 100% 0%, #f43f5e 0, transparent 50%), #e11d48;
}

.mesh-emerald {
  background: radial-gradient(at 0% 0%, #34d399 0, transparent 50%),
    radial-gradient(at 100% 100%, #059669 0, transparent 50%), #10b981;
}

.mesh-amber {
  background: radial-gradient(at 0% 100%, #fbbf24 0, transparent 50%),
    radial-gradient(at 100% 0%, #d97706 0, transparent 50%), #f59e0b;
}

.mesh-violet {
  background: radial-gradient(at 0% 0%, #a78bfa 0, transparent 50%),
    radial-gradient(at 100% 100%, #7c3aed 0, transparent 50%), #8b5cf6;
}

.bento-content {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: white;
  position: relative;
  z-index: 10;
}

.bento-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
  letter-spacing: -0.05em;
}

.bento-desc {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.8;
}

.bento-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Scanning Animation */
.scanning-line {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: scan 3s linear infinite;
  pointer-events: none;
  z-index: 5;
}

@keyframes scan {
  0% {
    top: -100%;
  }

  100% {
    top: 100%;
  }
}

/* Selected State */
.bento-item input:checked + label .bento-content {
  background: linear-gradient(to top, var(--primary), transparent);
}

.bento-item input:checked + label {
  box-shadow: 0 0 20px var(--primary-light) !important;
  border: 2px solid white !important;
}

.bento-item input:checked + label::after {
  content: "✓";
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: white;
  font-weight: 900;
  font-size: 1.25rem;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

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

  100% {
    transform: translateX(100%);
  }
}

.group:hover .shimmer-animation {
  animation: shimmer 2s infinite;
}

/* 3D Glassmorphic Blobs for "Cute Modern" Style */
.bento-blob {
  position: absolute;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  animation: float-blob 6s ease-in-out infinite;
}

.bento-blob-2 {
  width: 30px;
  height: 30px;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation-delay: -2s;
}

@keyframes float-blob {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  33% {
    transform: translate(8px, -12px) rotate(10deg) scale(1.1);
  }

  66% {
    transform: translate(-4px, 8px) rotate(-10deg) scale(0.95);
  }
}

/* Category Specific Blobs - Corner Positioned */
.blob-bazi {
  top: 5%;
  right: 5%;
  background: rgba(255, 255, 255, 0.25);
}

.blob-bazi-2 {
  bottom: 5%;
  left: 5%;
}

.blob-astrology {
  top: 5%;
  right: 10%;
}

.blob-astrology-2 {
  bottom: 5%;
  right: 5%;
  width: 35px;
  height: 35px;
}

.blob-tarot {
  top: 5%;
  right: 5%;
}

.blob-tarot-2 {
  bottom: 5%;
  right: 5%;
}

.blob-palm {
  top: 8%;
  right: 8%;
  background: rgba(16, 185, 129, 0.2);
}

.blob-numerology {
  top: 5%;
  right: 5%;
  background: rgba(139, 92, 246, 0.2);
}

.blob-nameology {
  bottom: 8%;
  right: 8%;
  background: rgba(245, 158, 11, 0.2);
}

.blob-face {
  top: 5%;
  right: 5%;
  background: rgba(79, 70, 229, 0.2);
}

/* ==================== 文章一頁式詳情系統 ==================== */
.article-onepage-content h2 {
  font-size: 2.25rem;
  font-weight: 900;
  margin-top: 4rem;
  margin-bottom: 2rem;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.article-onepage-content h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
}

.article-onepage-content ul,
.article-onepage-content ol {
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.article-onepage-content li {
  margin-bottom: 1rem;
  position: relative;
  list-style: none;
  padding-left: 1.5rem;
}

.article-onepage-content ul li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.8rem;
  top: 0.2rem;
}

@keyframes scroll-hint {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}

.animate-scroll-hint {
  animation: scroll-hint 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes float-slow {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.animate-float-slow {
  animation: float-slow 8s ease-in-out infinite;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }

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

.animate-modal-in {
  animation: modal-in 0.8s var(--ease-out);
}

/* ==================== 八字專用進階組件 ==================== */

/* 極致現代四柱卡片 */
.bazi-pillar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 2rem;
}

.bazi-pillar-card {
    background: var(--bg-secondary) !important;
    border-radius: var(--radius-lg) !important;
    padding: 1.5rem 1rem !important;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
    transition: all 0.4s var(--ease-out) !important;
}

.bazi-pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    opacity: 0.1;
}

.bazi-pillar-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg) !important;
}

.bazi-pillar-card.is-day-pillar {
    border: 2px solid var(--primary) !important;
    background: linear-gradient(to bottom, var(--bg-secondary), var(--bazi-bg)) !important;
}

.bazi-pillar-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.bazi-heavenly-stem {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--text-main);
}

.bazi-earthly-branch {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
    color: var(--text-main);
}

.bazi-shishen-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--bazi-bg);
    color: var(--primary);
    display: inline-block;
    margin: 4px 0;
}

.bazi-element-energy {
    height: 3px;
    width: 60%;
    margin: 12px auto;
    border-radius: 99px;
    background: #E2E8F0;
    position: relative;
}

.bazi-element-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 99px;
}

.bazi-nayin-text {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 8px;
}

/* 水平大運流年捲動器 */
.luck-cycle-scroller {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 1rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.luck-cycle-scroller::-webkit-scrollbar {
    display: none;
}

.luck-card {
    flex: 0 0 110px;
    background: var(--bg-primary) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: var(--radius-md) !important;
    padding: 1rem !important;
    text-align: center;
    transition: all 0.3s var(--ease-out) !important;
}

.luck-card.is-current {
    background: var(--bg-secondary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
    transform: scale(1.05);
}

.luck-card-gz {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.luck-card-shishen {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
}

.luck-card-age {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 高級文章感佈局 */
.article-style-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text-body);
}

.article-style-content h4 {
    font-size: 1.4rem;
    font-weight: 900;
    margin: 2.5rem 0 1.5rem 0;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.article-style-content h4::before {
    content: '';
    width: 4px;
    height: 1.4rem;
    background: var(--primary);
    margin-right: 12px;
    border-radius: 99px;
}

.article-style-content p {
    margin-bottom: 1.5rem;
}

/* 進度條樣式 */
.premium-progress-container {
    background: #F1F5F9;
    height: 8px;
    border-radius: 99px;
    overflow: hidden;
    margin: 10px 0;
}

.premium-progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 1s var(--ease-out);
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slide-up 0.6s var(--ease-out) forwards;
}

/* Section Headers & Container */
.section-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.025em;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 1.25rem;
    background: var(--primary);
    border-radius: 2px;
}

.premium-card-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--ease-out);
    margin-bottom: 24px;
}

.premium-card-container:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

/* Sub-card styles */
.sub-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-light);
}
/* ==================== 丟銅板小遊戲專屬樣式 ==================== */
.coin-wrapper {
  perspective: 1000px;
  width: 120px;
  height: 120px;
}

.coin {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 3s cubic-bezier(0.15, 0.45, 0.2, 1);
  cursor: pointer;
}

.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.1), var(--shadow-lg);
  border: 4px solid #fff;
}

.coin-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.coin-heads {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: white;
}

.coin-tails {
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  color: var(--text-main);
  transform: rotateY(180deg);
}

/* 旋轉動畫類 */
.coin.flipping-heads {
  transform: rotateY(1800deg); /* 5 圈 + 正面 */
}

.coin.flipping-tails {
  transform: rotateY(1980deg); /* 5 圈 + 反面 */
}

/* 輕微晃動效果 */
@keyframes coin-hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.coin-wrapper:hover .coin {
  animation: coin-hover 2s ease-in-out infinite;
}
/* ==================== 擲幣小決定進階組件 ==================== */
.coin-toss-modal {
    z-index: 100 !important;
}

#coin-container {
    perspective: 1000px;
    width: 160px;
    height: 160px;
    margin: 2rem auto;
}

#coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s linear;
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2), 0 10px 30px rgba(0,0,0,0.1);
    border: 6px solid rgba(255,255,255,0.8);
}

.coin-heads {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: white;
    z-index: 2;
}

.coin-tails {
    background: linear-gradient(135deg, #94a3b8, #475569);
    color: white;
    transform: rotateY(180deg);
}

@keyframes flip-heads {
    from { transform: rotateY(0); }
    to { transform: rotateY(1800deg); } /* 5 full rotations */
}

@keyframes flip-tails {
    from { transform: rotateY(0); }
    to { transform: rotateY(1980deg); } /* 5.5 full rotations */
}

.scenario-chip {
    padding: 8px 16px;
    background: #f1f5f9;
    border: 1.5px solid transparent;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.scenario-chip:hover {
    background: #eef2ff;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.fortune-mini-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: 20px;
    padding: 12px;
    text-align: center;
}
