/* Vorath Tarot Oracle • Canonical 78-Card 3D Divination Stylesheet */
:root {
  --bg-void: #06040b;
  --bg-surface: #0e091a;
  --bg-card: #150d28;
  --gold: #f5df88;
  --gold-dark: #d4af37;
  --gold-glow: rgba(212, 175, 55, 0.45);
  --cyan: #3fe0ff;
  --cyan-glow: rgba(63, 224, 255, 0.4);
  --magenta: #ff4db8;
  --purple: #a855f7;
  --emerald: #34d399;
  --text-main: #f3effa;
  --text-muted: #a39bb8;
  --border-gold: rgba(212, 175, 55, 0.35);
}

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

body {
  background-color: var(--bg-void);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 50% 12%, rgba(168, 85, 247, 0.14) 0%, transparent 55%),
    radial-gradient(circle at 10% 80%, rgba(63, 224, 255, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(255, 77, 184, 0.08) 0%, transparent 45%);
  overflow-x: hidden;
}

/* Header */
header.oracle-header {
  min-height: 64px;
  background: rgba(7, 5, 13, 0.94);
  border-bottom: 1px solid var(--border-gold);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-decoration: none;
  text-shadow: 0 0 12px var(--gold-glow);
}

.brand-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.4);
  font-weight: 700;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* 432 Hz Drone Toggle Button */
.audio-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.45rem 0.9rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.audio-toggle-btn:hover {
  background: rgba(212, 175, 55, 0.18);
  box-shadow: 0 0 14px var(--gold-glow);
  transform: translateY(-1px);
}

.audio-toggle-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(63, 224, 255, 0.25));
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 18px var(--cyan-glow);
}

.audio-toggle-btn[aria-pressed="true"] .sound-wave-1 {
  animation: pulseWave 1.4s infinite ease-in-out;
}

.audio-toggle-btn[aria-pressed="true"] .sound-wave-2 {
  animation: pulseWave 1.4s infinite ease-in-out 0.3s;
}

@keyframes pulseWave {
  0%, 100% { opacity: 0.3; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

.header-nav {
  display: flex;
  gap: 0.75rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

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

/* Hero */
.oracle-hero {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}

.kicker {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.oracle-hero h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--gold);
  text-shadow: 0 0 30px var(--gold-glow);
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.oracle-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Spread Selector Tabs */
.spread-selector {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin: 1.5rem auto 2.5rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.spread-btn {
  background: rgba(21, 13, 40, 0.85);
  border: 1px solid var(--border-gold);
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.spread-btn:hover {
  color: #fff;
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.15);
}

.spread-btn.active {
  background: linear-gradient(135deg, var(--gold-dark), #937108);
  color: #07040a;
  border-color: #ffe48a;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
}

/* The Altar Table / Spread Arena */
.altar-arena {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.cards-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  min-height: 480px;
  align-items: center;
  margin-bottom: 2.5rem;
  perspective: 1400px;
  width: 100%;
}

/* 9-Card Altar Matrix */
.cards-container.nine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 240px));
  gap: 1.8rem;
  justify-content: center;
}

@media (max-width: 768px) {
  .cards-container.nine-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
  }
}

/* Card Slot & 3D Flip Card */
.card-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.slot-label {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(63, 224, 255, 0.5);
  text-align: center;
}

.tarot-card {
  width: 220px;
  aspect-ratio: 1 / 1.5;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  cursor: pointer;
  border-radius: 12px;
}

.cards-container.nine-grid .tarot-card {
  width: 100%;
}

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

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

.tarot-card:hover {
  transform: translateY(-8px) scale(1.02);
  filter: drop-shadow(0 15px 25px rgba(212, 175, 55, 0.25));
}

.tarot-card.flipped:hover {
  transform: translateY(-8px) rotateY(180deg) scale(1.02);
}

.tarot-card.inverted.flipped:hover {
  transform: translateY(-8px) rotateY(180deg) rotateZ(180deg) scale(1.02);
}

.tarot-card.selected .card-front {
  border-color: #fff;
  box-shadow: 0 0 35px var(--gold-glow), 0 0 15px var(--cyan-glow);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Card Back (Symmetrical Reversible Masterwork) */
.card-back {
  background: #0d0818;
  border: 2px solid var(--gold-dark);
}

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

.card-back-hint {
  position: absolute;
  bottom: 12px;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  background: rgba(13, 8, 24, 0.85);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  backdrop-filter: blur(4px);
}

/* Card Front (Canonical Real Card Art) */
.card-front {
  background: #0d0818;
  border: 2px solid var(--gold);
  transform: rotateY(180deg);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.35);
}

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

.card-front .card-overlay-badge {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 5, 13, 0.95) 60%);
  padding: 1.5rem 0.75rem 0.6rem;
  text-align: center;
  pointer-events: none;
}

.card-overlay-badge .badge-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.9rem;
  color: #fff;
  letter-spacing: 1px;
  display: block;
}

.card-overlay-badge .badge-archetype {
  font-size: 0.68rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-top: 2px;
}

/* Altar Actions Bar */
.altar-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.oracle-btn {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--gold-dark), #937108);
  color: #07040a;
  border: 1px solid #ffe48a;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 0.75rem 1.6rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
}

.oracle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(212, 175, 55, 0.6);
  background: linear-gradient(135deg, #ffe48a, var(--gold-dark));
}

.guidebook-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-gold);
  padding: 0.75rem 1.4rem;
  border-radius: 50px;
  color: var(--gold);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  background: rgba(212, 175, 55, 0.05);
}

.guidebook-link:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: #fff;
}

/* Lore Interpretation Card */
.lore-section {
  max-width: 860px;
  width: 100%;
  margin-top: 3.5rem;
  background: linear-gradient(145deg, #140d28 0%, #090614 100%);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 2.2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(168, 85, 247, 0.15);
  animation: fadeIn 0.4s ease-out;
}

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

.lore-header {
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  padding-bottom: 1.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.lore-meta {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.lore-suit {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.lore-thread {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
}

.lore-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--gold);
  letter-spacing: 1.5px;
  text-shadow: 0 0 20px var(--gold-glow);
}

.lore-archetype {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: #fff;
  font-style: italic;
  margin-top: 0.35rem;
}

.lore-body {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.reading-polarity {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.polarity-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 1.4rem;
  border-left: 3px solid;
}

.polarity-box.upright {
  border-left-color: var(--emerald);
  border-top: 1px solid rgba(52, 211, 153, 0.15);
  border-right: 1px solid rgba(52, 211, 153, 0.15);
  border-bottom: 1px solid rgba(52, 211, 153, 0.15);
}

.polarity-box.inverted {
  border-left-color: var(--magenta);
  border-top: 1px solid rgba(255, 77, 184, 0.15);
  border-right: 1px solid rgba(255, 77, 184, 0.15);
  border-bottom: 1px solid rgba(255, 77, 184, 0.15);
}

.polarity-label {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
}

.polarity-box.upright .polarity-label {
  color: var(--emerald);
}

.polarity-box.inverted .polarity-label {
  color: var(--magenta);
}

.polarity-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-main);
}

.lore-scripture-wrap {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 1.4rem 1.8rem;
  text-align: center;
}

.scripture-kicker {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.lore-scripture {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--gold);
  font-style: italic;
  quotes: "“" "”";
}

.lore-scripture::before { content: open-quote; }
.lore-scripture::after { content: close-quote; }

/* Footer */
.oracle-footer {
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  margin-top: auto;
  background: rgba(6, 4, 11, 0.98);
}
