/* 108horo.com — Modern Neo-Mutelu CSS System */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Thai:wght@500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #0A0B16;
  --bg-card: rgba(23, 25, 51, 0.7);
  --bg-card-hover: rgba(33, 36, 74, 0.85);
  --border-gold: rgba(212, 175, 55, 0.3);
  --border-glow: rgba(212, 175, 55, 0.6);
  --gold-primary: #D4AF37;
  --gold-light: #F3E5AB;
  --gold-gradient: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 50%, #AA7C11 100%);
  --violet-glow: rgba(138, 43, 226, 0.25);
  --rose-glow: rgba(224, 138, 156, 0.2);
  --text-main: #F4F4F9;
  --text-sub: #B8B9D0;
  --text-muted: #7E80A4;
  --radius-lg: 18px;
  --radius-md: 12px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 20% 0%, rgba(138, 43, 226, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(212, 175, 55, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(224, 138, 156, 0.1) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Sarabun', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Nav */
header.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 22, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 28px;
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo .symbol {
  font-size: 1.8rem;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
}

.brand-logo .title {
  font-family: 'Noto Serif Thai', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

.brand-logo .subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

nav.main-nav {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-sub);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: 'Sarabun', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-gold);
}

.nav-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

/* Main Container & Hero */
main.content-area {
  flex: 1;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 60px 24px;
}

.hero-section {
  text-align: center;
  padding: 40px 20px 30px 20px;
  margin-bottom: 30px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  color: var(--gold-light);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'Noto Serif Thai', serif;
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #FFFFFF 30%, #F3E5AB 70%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
  line-height: 1.25;
}

.hero-desc {
  color: var(--text-sub);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 28px auto;
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease-in-out forwards;
}

.tab-panel.active {
  display: block;
}

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

/* Cards Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.horo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.horo-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--violet-glow);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-symbol {
  font-size: 2.2rem;
  line-height: 1;
}

.card-badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
  font-family: 'Noto Serif Thai', serif;
  font-size: 1.35rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.card-text {
  color: var(--text-sub);
  font-size: 0.93rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Siamsi Interactive Area */
.siamsi-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.siamsi-box {
  width: 140px;
  height: 200px;
  background: linear-gradient(180deg, #8B0000 0%, #4A0000 100%);
  border: 3px solid var(--gold-primary);
  border-radius: 20px 20px 10px 10px;
  position: relative;
  margin: 20px 0 30px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 0 15px rgba(212,175,55,0.4);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 10px;
}

.siamsi-sticks {
  display: flex;
  gap: 4px;
  position: absolute;
  top: -30px;
}

.stick {
  width: 6px;
  height: 110px;
  background: #D2B48C;
  border: 1px solid #8B4513;
  border-radius: 3px;
}

.siamsi-box.shaking {
  animation: shake 0.6s ease-in-out infinite;
}

@keyframes shake {
  0% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-8deg) translateY(-5px); }
  50% { transform: rotate(8deg) translateY(5px); }
  75% { transform: rotate(-5deg) translateY(-2px); }
  100% { transform: rotate(0deg) translateY(0); }
}

.btn-gold {
  background: var(--gold-gradient);
  color: #0A0B16;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 12px 32px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.6);
}

/* Tarot Spread & Flip */
.tarot-spread-picker {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.tarot-cards-area {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.tarot-card-3d {
  width: 140px;
  height: 230px;
  perspective: 1000px;
  cursor: pointer;
}

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

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

.tarot-front, .tarot-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  border: 2px solid var(--gold-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.tarot-back {
  background: radial-gradient(circle, #1F1535 0%, #0D081D 100%);
  color: var(--gold-light);
  box-shadow: inset 0 0 15px rgba(212,175,55,0.2);
}

.tarot-front {
  background: #171933;
  color: var(--text-main);
  transform: rotateY(180deg);
}

/* Result Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-box {
  background: #14162B;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 32px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Donate UI Styling */
.donate-card-box {
  background: rgba(212, 175, 55, 0.06);
  border: 1px dashed var(--border-glow);
  border-radius: 14px;
  padding: 20px;
  margin-top: 24px;
  text-align: center;
  position: relative;
}

.donate-header {
  font-family: 'Noto Serif Thai', serif;
  color: var(--gold-light);
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.donate-qr-img {
  width: 170px;
  height: auto;
  border-radius: 12px;
  border: 2px solid var(--gold-primary);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  transition: var(--transition);
}

.donate-qr-img:hover {
  transform: scale(1.05);
}

.donate-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Footer & Responsive */
footer.app-footer {
  text-align: center;
  padding: 30px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Social Share Bar Styling */
.share-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 18px;
  text-align: center;
}

.share-header {
  font-size: 0.88rem;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.share-btn-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  color: #FFFFFF;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  filter: brightness(1.15);
}

.share-btn-native {
  background: linear-gradient(135deg, #d3ad6a, #f0e0b8);
  color: #0e0f22;
}

.share-btn-line {
  background: #00C300;
}

.share-btn-fb {
  background: #1877F2;
}

.share-btn-x {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.share-btn-threads {
  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #F0E0B8;
}

.share-btn-copy {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
}

/* Toast notification */
.share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--gold-gradient);
  color: #0e0f22;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.share-toast.show {
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 12px;
  }
  .hero-title {
    font-size: 2rem;
  }
  main.content-area {
    padding: 16px 14px 40px 14px;
  }
  .share-btn {
    padding: 7px 11px;
    font-size: 0.78rem;
  }
}

