body {
    color: #f0f0f0;
    text-align: center;
    padding: 0;
    padding-top: 90px;
  }
  
  .tarot-instructions-box {
    background: rgba(0, 0, 0, 0.65);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 0 auto 1rem;
    max-width: 600px;
    backdrop-filter: blur(4px);
  }

  .tarot-instructions-box h3 {
    font-size: 1.5rem;
  }

  .tarot-button {
    width: 200px;
    padding: 15px;
    margin: 10px;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 30px;
    background-color: #000000;
    color: #ffffff;
    font-weight: bold;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    box-shadow: 
      0 0 8px rgba(255, 255, 0, 0.8),
      0 0 15px rgba(255, 165, 0, 0.7),
      0 0 20px rgba(255, 0, 0, 0.6);
    transition: box-shadow 0.3s ease;
  }
  
  .tarot-button:hover {
    box-shadow: 
      0 0 12px rgba(255, 255, 0, 1),
      0 0 20px rgba(255, 165, 0, 0.9),
      0 0 25px rgba(255, 0, 0, 0.8);
  }
  
  #resultado {
    margin-top: 1rem;
    font-size: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
 /* --- CARTAS TAROT --- */

.tarot-card {
  perspective: 1000px;
  display: inline-block;
  margin: 1rem;
  cursor: pointer;
}

/* Nombre de la carta sobre la imagen (parte inferior) */
.card-name {
  display: none;
}

.card-numeral {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0.6rem 0.5rem;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.5s ease 0.4s;
  pointer-events: none;
  z-index: 2;
}

.card-title {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0.6rem 0.5rem;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.5s ease 0.4s;
  pointer-events: none;
  z-index: 2;
}

.tarot-card.flipped .card-numeral,
.tarot-card.flipped .card-title {
  opacity: 1;
}


body[data-deck="tarot_surrealista"] .card-title {
  bottom: 0.35rem;
}

body[data-deck="tarot_surrealista"] .card-numeral {
    font-size: 0.9rem;
    padding-top: 0.2rem;
}

body[data-deck="tarot_dada"] .card-title {
  font-size: 1.2rem;
  bottom: 1.2rem;
}

body[data-deck="tarot_dada"] .card-numeral {
  font-size: 1.7rem;
}

body[data-deck="tarot_bacon"] .card-title {
  font-size: 1.5rem;
  bottom: 0.55rem;
  color: #e1cdb5;
  text-shadow: #000000 0.1em 0.1em 0.2em, #000000 0.15em 0.15em 0.3em;
}
body[data-deck="tarot_bacon"] .card-numeral {
  font-size: 2rem;
  color: #ecd8c3;
  padding-top: 0.5rem;
  text-shadow: #000000 0.1em 0.1em 0.2em, #000000 0.15em 0.15em 0.3em;
}
body[data-deck="tarot_giger"] .card-numeral {
color:#302e26;
}
body[data-deck="tarot_giger"] .card-title {
color:#20211b;
bottom: 0.7rem;
}
body[data-deck="tarot_bosch"] .card-numeral {
color:#1e1a0f;
    font-size: 1.3rem;
    padding-top: 0.3rem;
}

.card-inner {
  width: 350px;
  height: auto;
  aspect-ratio: 2 / 3;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  transform: rotateY(180deg);
}

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

.card-side {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
}

/* Sin fondo blanco */
.card-front,
.card-back {
  background: transparent;
}

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

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

/* --- RESPONSIVE --- */

/* Móviles */
@media screen and (max-width: 750px) {
  .card-inner {
    width: min(350px, 96vw);
  }

  #resultado {
    flex-direction: column;
    align-items: center;
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding: 0;
  }

  .tarot-card {
    margin: 0.5rem auto;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .card-side img {
    object-fit: contain;
  }
}

/* Contenedor general del tarot */
#tarot-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
}

/* Texto de introducción */
.oraculo-texto {
  max-width: 700px;
  margin: 0 auto 0.5rem;
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Textarea: ancho y alto */
#tarot-question {
  width: 80%;          /* ancho relativo */
  max-width: 700px;    /* ancho máximo en pixeles */
  min-height: 120px;   /* "alto" mínimo */
  padding: 0.75rem;
  font-size: 1.15rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: vertical;    /* permite al usuario estirar hacia abajo */
  box-sizing: border-box;
}

/* Contenedor de los botones de tirada (una carta / triada) */
.tarot-draw-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Botón de "Preguntar al oráculo" en una línea aparte */
#ask-oracle-btn {
  display: block;      /* rompe la línea y ocupa fila propia */
  margin: 1.5rem auto 0;
}

/* Ancho base del texto de respuesta */
#oracle-answer {
  margin: 1.5rem auto 0;
  text-align: left;
  line-height: 1.7;
  font-size: 1.15rem;
  width: 50%;        /* 50% en pantallas grandes */
}

/* Tablets (ej: hasta 1024px) */
@media screen and (max-width: 1024px) {
  #oracle-answer {
    width: 70%;
    font-size: 1.1rem;
  }
  .oraculo-texto {
    font-size: 1.1rem;
  }
  .tarot-instructions-box h3 {
    font-size: 1.35rem;
  }
  .tarot-button {
    font-size: 0.95rem;
  }
}

/* Móviles (ej: hasta 750px, mismo breakpoint que tus cartas) */
@media screen and (max-width: 750px) {
  #oracle-answer {
    width: 90%;
    font-size: 1rem;
  }
  .oraculo-texto {
    font-size: 1rem;
  }
  .tarot-instructions-box h3 {
    font-size: 1.2rem;
  }
  .tarot-button {
    font-size: 0.9rem;
  }
  #tarot-question {
    font-size: 0.95rem;
  }
}
