/* UraTarot — Custom Styles (Elegant Classic Light Theme) */

/* Base font size — scales all rem units for readability */
html { font-size: 17px; }

main { position: relative; z-index: 1; }

/* Gold gradient text */
.text-gold-gradient {
  background: linear-gradient(135deg, #D4AF37 0%, #B8920A 60%, #8A6A08 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card subtle lift shadow */
.card-glow {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06), 0 1px 5px rgba(0,0,0,0.04);
}

/* Tarot card flip animation */
.tarot-card { perspective: 1000px; cursor: pointer; }
.tarot-card-inner {
  position: relative; width: 100%; padding-bottom: 175%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.tarot-card.flipped .tarot-card-inner { transform: rotateY(180deg); }
.tarot-card-front,
.tarot-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden; border-radius: 0.75rem; overflow: hidden;
}
.tarot-card-back {
  background: linear-gradient(135deg, #F5F0E8 0%, #EDE5D8 50%, #F5F0E8 100%);
  border: 1px solid rgba(184,146,10,0.2);
  display: flex; align-items: center; justify-content: center;
}
.tarot-card-back::before {
  content: '✦'; font-size: 2.5rem; color: rgba(184,146,10,0.3);
}
.tarot-card-front {
  transform: rotateY(180deg);
  background: #FFFEF9;
  border: 1px solid rgba(184,146,10,0.2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.5rem;
}

/* Uranian Dial canvas container */
#uranianDialContainer {
  position: relative; display: flex; align-items: center; justify-content: center;
}

/* Loading spinner */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(184,146,10,0.15);
  border-top-color: #B8920A;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Reading result prose */
.reading-prose { line-height: 1.9; color: #3C3830; }
.reading-prose h1, .reading-prose h2, .reading-prose h3 {
  color: #B8920A;
  font-family: 'Noto Serif Thai', 'Noto Serif', Georgia, serif;
  margin: 1em 0 0.5em;
}
.reading-prose ul { list-style: disc; padding-left: 1.5em; margin: 0.5em 0; }
.reading-prose li { margin: 0.25em 0; }
.reading-prose strong { color: #8A6A08; }

/* Form inputs */
.input-gold {
  background: #FFFFFF;
  border: 1.5px solid #E7E2D9;
  border-radius: 0.75rem;
  color: #1C1917;
  padding: 0.625rem 1rem;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.input-gold:focus {
  outline: none;
  border-color: #B8920A;
  box-shadow: 0 0 0 3px rgba(184,146,10,0.12);
}
.input-gold::placeholder { color: #A09890; }
select.input-gold { cursor: pointer; }

/* Button variants */
.btn-gold {
  background: linear-gradient(135deg, #D4AF37, #B8920A);
  color: #FFFFFF;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  transition: opacity .2s, transform .1s, box-shadow .2s;
  display: inline-flex; align-items: center; gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(184,146,10,0.25);
}
.btn-gold:hover  { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(184,146,10,0.35); }
.btn-gold:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(184,146,10,0.2); }

.btn-outline {
  border: 1.5px solid rgba(184,146,10,0.45);
  color: #B8920A;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  transition: background .2s, border-color .2s;
}
.btn-outline:hover { background: rgba(184,146,10,0.07); border-color: #B8920A; }

/* Article prose styles */
.prose-article p { margin-bottom: 0; line-height: 1.8; }
.prose-article section { border-bottom: 1px solid #f0ece4; padding-bottom: 1.5rem; }
.prose-article section:last-child { border-bottom: none; }

/* Disclaimer box */
.disclaimer-box {
  background: #FBF8F0;
  border: 1px solid rgba(184,146,10,0.2);
  border-radius: 0.75rem;
  padding: 0.875rem 1.125rem;
  font-size: 0.8rem;
  color: #8A6A08;
  line-height: 1.6;
}

/* Smooth reveal */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.5s ease forwards; }

/* Float animation for decorative elements */
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ── Tarot Spread Layout ───────────────────────────────────────────────── */

/* Spread stage uses padding-top trick for aspect ratio (set inline by JS) */
.spread-stage { position: relative; width: 100%; overflow: visible; }

/* Cards in spread positions */
.spread-tarot-card { perspective: 900px; }
.spread-tarot-card .tarot-card-inner {
  position: relative; width: 100%; padding-bottom: 167%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.spread-tarot-card.flipped .tarot-card-inner { transform: rotateY(180deg); }

/* Hover glow — แสดงให้เห็นว่าคลิกได้ โดยเฉพาะตอนไพ่ซ้อนกัน */
.spread-tarot-card:not(.flipped):hover .tarot-card-back {
  border-color: rgba(184,146,10,0.7);
  box-shadow: 0 0 0 2px rgba(184,146,10,0.25), 0 4px 16px rgba(184,146,10,0.2);
  background: linear-gradient(135deg, #FBF7EF 0%, #F2E9D8 50%, #FBF7EF 100%);
}
.spread-tarot-card:not(.flipped):hover .tarot-card-back::before {
  color: rgba(184,146,10,0.55);
}
/* Drop shadow on hover (actual z-index boost is handled in JS) */
.spread-tarot-card:not(.flipped):hover {
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.18));
}

/* Position number badge (gold circle top-left) */
.spread-pos-badge {
  position: absolute;
  top: -6px; left: -6px;
  background: #B8920A;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: sans-serif;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 0.15s;
}
.spread-tarot-card:not(.flipped):hover .spread-pos-badge {
  transform: scale(1.2);
}

/* Full-bleed image on spread card fronts */
.spread-tarot-card .tarot-card-front { padding: 0; }

/* Card strip in reading stage */
#cardStrip img { transition: opacity 0.3s; }
#cardStripWrap { scrollbar-width: thin; scrollbar-color: #E7E2D9 transparent; }
#cardStripWrap::-webkit-scrollbar { height: 4px; }
#cardStripWrap::-webkit-scrollbar-thumb { background: #E7E2D9; border-radius: 2px; }

/* Spread option cards in selector */
.spread-option:focus-visible {
  outline: 2px solid #B8920A;
  outline-offset: 2px;
}

/* line-clamp for Safari fallback */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
