/* General styles */
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: radial-gradient(ellipse at top, #1a174d, #0b0920);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}

.container {
  max-width: 700px;
  padding: 2rem;
}

/* Title and subtitle */
h1 {
  font-size: 2.5rem;
  color: #19d46a;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: #cfcfff;
  margin-bottom: 3rem;
}

/* Box layout */
.options {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.glow-box {
  background: rgba(83, 180, 75, 0.05);
  border: 1px solid rgba(122, 21, 21, 0.1);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  width: 250px;
  transition: all 0.4s ease;
  box-shadow: 0 0 15px rgba(160, 100, 255, 0.2);
}

.glow-box img {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

.glow-box h2 {
  color: #ffffff;
  margin-bottom: 0.5rem;
  transition: color 0.4s ease;
}

.glow-box p {
  color: #b8b8d4;
}

/* Hover effects */
.glow-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 30px rgba(180, 120, 255, 0.6);
}

.glow-box:hover h2 {
  color: #b695ff;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 25, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2rem;
  width: 380px;
  max-width: 90%;
  box-shadow: 0 0 25px rgba(180, 120, 255, 0.5);
  text-align: left;
  color: #fff;
  animation: fadeInUp 0.3s ease;
  position: relative;
}

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

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
}

.input-label {
  display: block;
  margin: 1.5rem 0 0.5rem;
}

.date-input {
  width: 100%;
  padding: 0.6rem;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
}

.modal-buttons {
  margin-top: 2rem;
  text-align: right;
}

.next-btn {
  background: linear-gradient(90deg, #b48cff, #8672ff);
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.next-btn:hover {
  transform: scale(1.05);
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .modal-content {
    width: 90%;
    height: auto;
    text-align: center;
  }
}

/* ---------- Steps ---------- */
.modal-step {
  display: none;
}

.active-step {
  display: block;
}

.hidden-step {
  display: none;
}

/* ---------- Topic buttons ---------- */
.topic-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.topic-btn {
  flex: 1 1 45%;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.topic-btn:hover,
.topic-btn.selected {
  background: linear-gradient(90deg, #b48cff, #8672ff);
  box-shadow: 0 0 10px rgba(180, 120, 255, 0.5);
  transform: scale(1.05);
}

/* ---------- Timeframe buttons ---------- */
.timeframe-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.timeframe-btn {
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.timeframe-btn:hover,
.timeframe-btn.selected {
  background: linear-gradient(90deg, #b48cff, #8672ff);
  box-shadow: 0 0 10px rgba(180, 120, 255, 0.5);
  transform: scale(1.05);
}

/* ======================
   Tarot Card Styling
   ====================== */
.card-img {
  width: 200px;
  height: auto;
  border-radius: 12px;
  margin: 10px auto;
  display: block;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* ---------- Reading output ---------- */
.reading-box {
  max-height: 500px; /* limit height so it fits on screen */
  overflow-y: auto; /* make it scrollable */
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

#readingText {
  line-height: 1.6;
  color: #e5e5ff;
  font-size: 1rem;
}

/* ---------- Follow-up buttons ---------- */
.followup-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.followup-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.followup-btn:hover {
  background: linear-gradient(90deg, #b48cff, #8672ff);
  transform: scale(1.05);
}

/* 🌟 AI insight button (green) */
#aiInterpret {
  background: linear-gradient(90deg, #00ff85, #14d964);
  color: #0b0920;
  font-weight: 700;
  border: none;
  box-shadow: 0 0 20px rgba(0, 255, 120, 0.7);
  transition: all 0.3s ease;
}
#aiInterpret:hover {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(0, 255, 120, 1);
  background: linear-gradient(90deg, #00ffaa, #18f77c);
  color: #000;
}

/* 💛 Draw Again button (yellow) */
#newCard {
  background: linear-gradient(90deg, #ffe65c, #ffcf00);
  color: #000;
  font-weight: 700;
  border: none;
  box-shadow: 0 0 20px rgba(255, 223, 0, 0.7);
  transition: all 0.3s ease;
}
#newCard:hover {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(255, 240, 0, 1);
  background: linear-gradient(90deg, #fff27a, #ffdd33);
}

/* ❤️ Close button (red) */
#closeTarot {
  background: linear-gradient(90deg, #ff5858, #d41e1e);
  color: #fff;
  font-weight: 700;
  border: none;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  transition: all 0.3s ease;
}
#closeTarot:hover {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(255, 50, 50, 1);
  background: linear-gradient(90deg, #ff7070, #ff2020);
}

/* 🌐 Language bar styling */
.language-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: linear-gradient(90deg, #b48cff, #8672ff);
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(180, 120, 255, 0.6);
}

.shining-star {
  display: inline-block;
  font-size: clamp(1.5rem, 4vw, 2.5rem); /* responsive scaling */
  color: #ffffff; /* the same green you used before */
  text-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88, 0 0 40px #00ff88;
  animation: starGlow 2s ease-in-out infinite alternate;
  white-space: nowrap; /* keeps stars and text together */
}

.theme-selector {
  margin: 10px 0;
  text-align: center;
}

.theme-selector label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #c9ffd8;
}

.theme-selector select {
  background: rgba(0, 0, 0, 0.5);
  color: #00ff99;
  border: 1px solid #00ff99;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
}

#askMore {
  background-color: #3030ff;
  border: none;
  color: white;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.2s ease;
}
#askMore:hover {
  background-color: #5050ff;
  box-shadow: 0 0 10px #5050ff;
}

/* ✨ Flatpickr style tweaks */
.flatpickr-calendar {
  background: #1a1530;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 25px rgba(120, 80, 255, 0.4);
  border-radius: 12px;
  color: #fff;
}

.flatpickr-day.today {
  border-color: #7a5cff;
}

.flatpickr-day.selected,
.flatpickr-day:hover {
  background: #7a5cff;
  color: #fff;
}

/* 🎂 Simple day/month dropdowns */
.birthday-selectors {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.date-select {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff; /* ensure text is white */
  font-size: 1rem;
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  appearance: none;
  outline: none;
  cursor: pointer;
  text-align: center; 
}

.date-select:hover,
.date-select:focus {
  border-color: #00ff99;
  box-shadow: 0 0 10px rgba(0, 255, 128, 0.6);  
}

/* Make dropdown list readable on dark theme */
.date-select option {
  color: #000; /* dark text in dropdown menu */
  background-color: #fff; /* white background for options */
}

#card-interpretation h3 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0.4em;
}

#card-interpretation strong {
  color: #88f2c8; /* soft green highlight */
}

#card-interpretation br {
  line-height: 1.6;
}
#aiInterpretation {
  line-height: 1.4;
  margin-top: 0.5em;
}

#aiInterpretation h3 {
  line-height: 1.2;
  color: #e0e0e0;
  font-weight: 600;
}

#aiInterpretation strong {
  color: #b3ffd2;
}
#aiInterpretation {
  line-height: 1.35;
}

#aiInterpretation h3 {
  line-height: 1.2;
  margin-bottom: 0;
  font-weight: 600;
  color: #e0e0e0;
}

#aiInterpretation strong {
  color: #a9ffd3;
}

/* ================================
   🌟 Horoscope Step 4 Buttons
================================ */

/* Container holding both buttons */
.button-row {
  margin-top: 1.2rem;           /* space above, separating from reading box */
  display: flex;
  justify-content: center;      /* centre the buttons horizontally */
  gap: 12px;                    /* distance between the two buttons */
}

/* --- Summarise This button --- */
.followup-btn[data-action="summary"] {
  background: linear-gradient(90deg, #ffe65c, #ffcf00);
  color: #000;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 207, 0, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.followup-btn[data-action="summary"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(255, 207, 0, 0.8);
}

/* --- Start Over button --- */
#restartReading {
  background: linear-gradient(90deg, #ff5858, #d41e1e);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(212, 30, 30, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#restartReading:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(212, 30, 30, 0.8);
}

/* Make horoscope reading scrollable and nicely contained */
#readingBox {
  max-height: 400px;            /* limit height so modal doesn't overflow */
  overflow-y: auto;             /* adds vertical scrollbar when text is long */
  background: rgba(30, 33, 40, 0.5);
  padding: 1rem;
  border-radius: 10px;
  line-height: 1.5;
}

/* Optional: style scrollbar to match the design */
#readingBox::-webkit-scrollbar {
  width: 8px;
}

#readingBox::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 10px;
}

#readingBox::-webkit-scrollbar-thumb:hover {
  background-color: #aaa;
}

/* ================================
   Horoscope Reading Text Formatting
================================ */
#readingText {
  white-space: pre-line; /* keeps spacing and line breaks */
}

#readingText strong,
#readingText span,
#readingText b {
  font-weight: 700;
  color: #ffd700; /* soft gold for emphasis */
}

.reader-label {
  font-family: 'Cinzel', serif;
  color: #f8e9ff;
  font-size: 1.2rem;
  text-shadow: 0 0 8px rgba(200, 150, 255, 0.6);
  margin-bottom: 0.8rem;
  text-align: left;
  padding-left: 4px;
}

.reader-label {
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  color: #f0e6ff;
  margin: 0.6rem 0 0.8rem;
  text-align: left;
  font-weight: 600;
}

#backHome {
  background: #7CFC00;   /* light green */
  color: #000;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

#backHome:hover {
  background: #6be000;
}

@media (max-width: 768px) {
  body {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .options {
    flex-direction: column;
    gap: 1.2rem;
  }
}

@media (max-width: 768px) {
  .glow-box {
    width: 100%;
    max-width: 320px;
    padding: 1.4rem 1rem;
  }

  .glow-box img {
    width: 56px;
    height: 56px;
  }
}

/* Loading spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #ffd700;  /* gold */
  border-radius: 50%;
  display: inline-block;
  animation: spin 1s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Back to Home button inside Oracle modal */
#backHomeOracle {
  background: #7CFC00;   /* light green */
  color: #000;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

#backHomeOracle:hover {
  background: #6be000;
}

.reading-btn {
  padding: 10px 16px;
  margin: 6px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}

.reading-btn.premium {
  background: #ffd8ff;
  color: #5a007c;
  font-weight: bold;
  box-shadow: 0 0 10px #ffb8ff;
}

.premium-btn {
  background-color: #ffb3ff;
  color: #4a0055;
  font-weight: bold;
  border: 2px solid #ff66ff;
  box-shadow: 0 0 12px #ff66ff;
}
.premium-btn:hover {
  background-color: #ffccff;
}

@media (max-width: 768px) {

  /* Stop vertical centering */
  body {
    align-items: flex-start;
  }

  /* Compact grid instead of flex */
  .options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
  }

  /* Make Oracle span full width */
  .glow-box:last-child {
    grid-column: 1 / -1;
  }

  /* Shrink the boxes */
  .glow-box {
    width: 100%;
    padding: 1.1rem 0.9rem;
    border-radius: 16px;
  }

  /* Smaller icons */
  .glow-box img {
    width: 48px;
    height: 48px;
    margin-bottom: 0.6rem;
  }

  /* Smaller headings */
  .glow-box h2 {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
  }

  /* Smaller descriptions */
  .glow-box p {
    font-size: 0.85rem;
    line-height: 1.3;
  }

  /* Reduce space above boxes */
  .subtitle {
    margin-bottom: 1.5rem;
  }
}
