:root {
  --bg-dark: #0b0714;
  --bg-card: rgba(26, 16, 60, 0.65);
  --border-gold: rgba(212, 175, 55, 0.3);
  --gold-primary: #d4af37;
  --gold-hover: #f3e5ab;
  --purple-glow: #6b21a8;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(rgba(11, 7, 20, 0.10), rgba(11, 7, 20, 0.20)),
    url('../img/Tarot%20Cigana.jpeg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;

  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* Tipografia Mística */
h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  color: var(--gold-primary);
  letter-spacing: 0.5px;
}


/* Glassmorphism Containers */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}


/* Cabeçalho */
.app-header {
  height: 64px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-gold);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.credits-count {
  color: var(--gold-primary);
  font-weight: 600;
  font-size: 0.875rem;
}


/* Conteúdo Principal */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 5rem 1rem;
}


/* Botões Místicos */
.btn-mystic {
  background: linear-gradient(135deg, #4c1d95 0%, #1e1b4b 100%);
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-mystic:hover {
  background: linear-gradient(135deg, #6b21a8 0%, #312e81 100%);
  color: var(--gold-hover);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}


/* Navegação Inferior (Mobile First / PWA) */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(11, 7, 20, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-gold);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.nav-item.active,
.nav-item:hover {
  color: var(--gold-primary);
}


@media (min-width: 768px) {
  .main-content {
    padding-bottom: 2rem;
  }

  .mobile-nav {
    display: none;
  }
}

/* ==========================================================================
   COMPONENTE: CARTA DE TARÔ 3D (FLIP CARD)
   ========================================================================== */

/* Container da perspectiva 3D */
.tarot-card-container {
  width: 160px;
  height: 270px;
  perspective: 1000px;
  cursor: pointer;
  user-select: none;
  margin: 0 auto;
}

/* Elemento interno que rotaciona */
.tarot-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Estado Revelado (Gira 180 graus no eixo Y) */
.tarot-card-container.flipped .tarot-card-inner {
  transform: rotateY(180deg);
}

/* Estado Invertido (Para cartas viradas de cabeça para baixo) */
.tarot-card-container.flipped.inverted .tarot-card-inner {
  transform: rotateY(180deg) rotateZ(180deg);
}

/* Faces da Carta (Verso e Frente) */
.tarot-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--gold-primary);
  box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.2);
}

/* Verso da Carta (Capa Oculta) */
.tarot-card-back {
  background: #110926 url('../images/cards/back.webp') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tarot-card-back::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(107, 33, 168, 0.3) 0%, transparent 70%);
}

/* Frente da Carta (Revelada) */
.tarot-card-front {
  background-color: #0b0714;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
}

.tarot-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Indicadores de Posição/Legenda */
.card-position-tag {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--gold-primary);
  font-family: var(--font-heading);
  background: rgba(11, 7, 20, 0.85);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--border-gold);
}

/* Efeito de Brilho ao passar o mouse antes de revelar */
.tarot-card-container:not(.flipped):hover .tarot-card-inner {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
}

@media (min-width: 768px) {
  .tarot-card-container {
    width: 200px;
    height: 340px;
  }
}

/* ==========================================================================
   DESTAQUE ESFUMAÇADO — Fundo místico atrás de textos
   ========================================================================== */
.text-glow-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}
.text-glow-bg {
    position: absolute;
    inset: -12px -16px;
    background: radial-gradient(
        ellipse at top left,
        rgba(67, 208, 11, 0.18),
        rgba(36, 106, 26, 0.4),
        transparent 80%
    );
    border-radius: 14px;
    pointer-events: none;
    z-index: 0;
}
.text-glow-content {
    position: relative;
    z-index: 1;
}