/* ================================
   GLOBAL PAGE STYLING
================================ */

body {
  background: #f7f3e9;
  font-family: 'Manrope', Arial, sans-serif;
  text-align: center;
  padding: 20px;
  color: #3a2e2e;
  margin: 0;
}

/* Container for entire tarot layout */
.tarot-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ================================
   BACK BUTTON
================================ */

.back-button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #5a4b43;
  margin-bottom: 10px;
}

.back-button:hover {
  color: #a87c5a;
}

/* ================================
   READING SELECTION BUTTONS (index.html)
================================ */
.reading-options {
  display: grid;
  gap: 15px;
  justify-content: center;
  max-width: 400px;
  margin: 30px auto;
}

.reading-btn {
  padding: 14px 18px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  background: white;
  color: #3a2e2e;
  cursor: pointer;
  border: 2px solid #dec9aa;
  transition: 0.25s;
}

.reading-btn:hover {
  background: #f1e2c9;
}
.reading-title {
  font-weight: 700;
}

/* ================================
   DRAW AREA — FACE DOWN CARDS
================================ */

#drawArea {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 30px 0;
}

/* Tarot card basic style */
.tarot-card {
  width: 140px;
  height: 240px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transform-style: preserve-3d;
}

.tarot-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Flip animation */
.tarot-card.flipped {
  animation: flipCard 0.6s forwards ease-in-out;
}

@keyframes flipCard {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}

/* ================================
   CONTINUE BUTTON
================================ */

.continue-btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  background: #eac89f;
  color: #3a2e2e;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.25s;
}

.continue-btn:hover {
  background: #d4a87a;
}

/* ================================
   RESULTS AREA
================================ */

#resultsArea {
  text-align: left;
  margin-top: 30px;
  padding: 20px 25px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.tarot-result-block {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #d9c9b6;
}

.tarot-result-block:last-child {
  border-bottom: none;
}

.tarot-result-block h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #5c4633;
}

.tarot-result-block p {
  margin: 6px 0;
  line-height: 1.5;
}

/* ================================
   PREMIUM READING
================================ */

.premium-btn {
  margin-top: 25px;
  padding: 14px 32px;
  font-size: 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #c79c58, #e8c88b);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: 0.3s;
}

.premium-btn:hover {
  background: linear-gradient(135deg, #b88a4a, #d6b477);
}

.reading-description {
  font-size: 14px;
  color: #6b5b53;
  margin: 6px 0 20px;
  max-width: 400px;
}

.card-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0 12px;
}

.card-label {
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid #d8c9b8;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #3a2e2e;
  min-width: 120px;
  text-align: center;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.result-card-img {
  width: 90px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#premiumOutput {
  display: none;
  margin: 24px auto;
  padding: 22px 26px;
  max-width: 720px;

  background: linear-gradient(135deg, #f3e5c7, #e7cfa3);
  color: #3a2e2e;

  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(0,0,0,0.22);

  cursor: pointer;
  user-select: text;

  text-align: left;              /* 🔑 button feel */
  font-weight: 500;

  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.premium-lock-message {
  background: #f8d7da;           /* soft reddish */
  color: #842029;                /* dark red text */
  font-size: 1.15rem;            /* slightly larger */
  font-weight: 600;              /* bold but not shouty */
  padding: 16px 20px;
  border-radius: 12px;
  margin: 16px auto;
  max-width: 700px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* Hover = button affordance */
#premiumOutput:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  filter: brightness(1.02);
}

/* Active = pressed */
#premiumOutput:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
}

.inline-spinner {
  width: 16px;
  height: 16px;
  margin-left: 8px;
  vertical-align: middle;
  animation: svg-spin 0.8s linear infinite;
}

.inline-spinner circle {
  stroke: #c79c58;
  stroke-linecap: round;
  stroke-dasharray: 90;
  stroke-dashoffset: 60;
}

@keyframes svg-spin {
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 6px;
}

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

  
/* ================================
   MOBILE LAYOUT (CLEAN)
================================ */
@media (max-width: 600px) {

  body {
    padding: 12px;
  }

  .tarot-container {
    max-width: 100%;
    padding: 12px;
  }

  /* Stack cards vertically */
  #drawArea {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .tarot-card {
    width: 220px;
    height: 360px;
  }

  .card-label {
    font-size: 16px;
    padding: 10px 16px;
  }

  button,
  .continue-btn,
  .premium-btn {
    width: 100%;
    max-width: 320px;
    font-size: 18px;
    padding: 16px 20px;
  }

  #resultsArea,
  #premiumOutput {
    font-size: 18px;
    line-height: 1.7;
    padding: 18px;
  }

  .tarot-result-block h2 {
    font-size: 22px;
  }
}

/* ========================
   AUTH MODAL BUTTONS
   ======================== */

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

/* Base button style */
.auth-buttons button {
  font-size: 1.05rem;
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Login button - bright green */
.auth-buttons .btn-login {
  background-color: #00c853;   /* bright green */
  color: #ffffff;
}

.auth-buttons .btn-login:hover {
  background-color: #00b347;   /* darker green on hover */
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Cancel button */
.auth-buttons .btn-cancel {
  background-color: #dc3545; /* red */
  color: #ffffff;
}

.auth-buttons .btn-cancel:hover {
  background-color: #bb2d3b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

/* Full-screen overlay */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;      /* ✅ keeps everything centred */
  justify-content: center;  /* ✅ keeps everything centred */
  z-index: 9999;
  padding: 18px;            /* ✅ mobile safe padding */
}

/* White modal box */
.auth-box {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  width: min(420px, 92vw);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* The lock message INSIDE modal */
.auth-notice {
  background: #f8d7da;
  color: #842029;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 14px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 14px;
}