/* ?? General Page Styles */
body {
    font-family: 'Georgia', serif;
    text-align: center;
    background-color: #1a1a1a;
    color: white;
    margin: 0;
    padding: 0;
}

/* ? Animated Starry Background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://uorealms.com/fortune/images/stars-background.jpg') no-repeat center center fixed;
    background-size: cover;
    opacity: 0.3;
    z-index: -1;
}

/* ?? UORealms Logo */
.logo {
    width: 250px;
    margin: 20px auto;
    display: block;
}

/* ?? Header Styling */
#main-heading {
    font-size: 28px;
    font-weight: bold;
    margin-top: 10px;
    color: #f8e1a1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Restored subtle text shadow */
}

/* ?? Gypsy Image */
#gypsy-container {
    margin-top: 20px;
    position: relative;
    display: inline-block;
}

.gypsy-image {
    width: 350px;
    display: block;
    margin: auto;
    border-radius: 10px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.6); /* Subtle shadow instead of glow */
    animation: fadeIn 2s ease-in-out;
}

/* Subtle fade-in effect */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ?? Tarot Card Styling */
#tarot-cards {
    display: flex;
    justify-content: center;
    gap: 20px; /* Keeps spacing between cards */
    margin-top: 30px;
    align-items: center; /* Ensures they are aligned properly */
}

.tarot-card-container {
    display: inline-block;
    margin: 10px;
    perspective: 1000px; /* Adds depth to flip effect */
}

.tarot-card {
    width: 200px;
    height: 300px;
    transition: transform 0.3s ease-in-out;
    transform-origin: center;
}

.tarot-card:hover {
    transform: scale(1.2) !important; /* Ensures hover still works */
}

.upside-down {
    transform: rotate(180deg) !important; /* Keeps upside-down cards rotated */
}

.upside-down:hover {
    transform: scale(1.2) rotate(180deg) !important; /* Prevents hover from flipping back */
}

/* Center the Shuffle & Draw button */
#drawButton {
    display: block;
    margin: 25px auto;
    padding: 14px 32px;
    font-size: 20px;
    font-family: 'IM Fell English SC', serif;
    color: white;
    background: linear-gradient(135deg, #6a0dad, #b533ff);
    border: 2px solid gold;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0px 0px 15px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease-in-out;
    text-shadow: 1px 1px 2px #000;
}

#drawButton:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #b533ff, #6a0dad);
    box-shadow: 0px 0px 20px rgba(255, 215, 0, 0.6);
}

/* ?? AI Reading Box */
#tarot-reading {
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.7);
    color: #f8e1a1;
    padding: 20px;
    border-radius: 10px;
    font-style: italic;
    text-align: center;
    font-size: 18px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px; /* Adds more space between AI text and footer */
}

/* ?? Call-to-Action Overlay */
#call-to-action {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #f8e1a1;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 20px;
    text-align: center;
}

/* ?? Intro Text Styling */
#intro-text {
    font-size: 20px; /* Slightly larger for readability */
    color: #f8e1a1; /* Matches the tarot reading text */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Adds depth */
    font-style: italic;
    max-width: 600px; /* Keeps it from stretching too wide */
    margin: 15px auto 20px auto; /* Adds spacing below gypsy image */
    padding: 10px;
    line-height: 1.5; /* Improves readability */
    word-wrap: break-word; /* Ensures text wraps properly */
    text-align: center;
}

/* ?? Entry Overlay */
#entry-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 1); /* Fully black background, no transparency */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 2vw; /* Responsive font size */
    z-index: 99999; /* Ensure it's above everything */
    padding: 10px;
}

/* ?? Overlay Content */
.overlay-content {
    background: rgba(0, 0, 0, 0.8);
    padding: 2vw;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(255, 215, 0, 0.6);
    max-width: 500px;
    width: 80%;
}

/* ?? Responsive Gypsy Wagon Image */
.wagon-image {
    width: 100%;
    max-width: 450px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0px 4px 10px rgba(255, 215, 0, 0.6);
}

/* ?? Responsive Text */
#entry-overlay p {
    font-size: 1.8vw;
    line-height: 1.4;
    font-family: 'IM Fell English SC', serif; /* Mystical font */
    color: #f8e1a1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    max-width: 80%;
    margin: 0 auto 20px auto; /* Ensures the container is centered */
    text-align: center;
    display: block; /* Ensures it behaves like a block element */
}

/* ?? Button Styling */
#entry-overlay button {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 1.5vw;
    background: linear-gradient(135deg, #6a0dad, #b533ff);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#entry-overlay button:hover {
    background: linear-gradient(135deg, #b533ff, #6a0dad);
}

/* ?? Mobile Adjustments */
@media (max-width: 600px) {
    .overlay-content {
        width: 90%;
    }

    #entry-overlay p {
        font-size: 4vw; /* Larger for readability on small screens */
        font-family: 'Cinzel Decorative', serif; /* Matches the main styling */
        color: #f8e1a1;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Matches desktop styling */
        text-align: center; /* Keeps it centered on small screens */
    }

    #entry-overlay button {
        font-size: 4vw;
    }

    #tarot-cards {
        flex-direction: column; /* Stack cards vertically */
        align-items: center; /* Centers the cards */
        gap: 15px; /* Adds space between cards */
    }

    .tarot-card-container {
        width: 100%; /* Ensures they take full width */
        text-align: center;
    }

    .tarot-card {
        width: 80%; /* Reduces size for better fit */
        max-width: 250px; /* Prevents them from being too large */
    }

}

/* ?? Add More Space Between AI Text & Footer */
#tarot-reading {
    margin-bottom: 80px; /* Increased from 50px */
}

/* ?? Footer Styling */
#site-footer {
    background: rgba(0, 0, 0, 0.8);
    color: #f8e1a1;
    text-align: center;
    padding: 15px;
    font-size: 14px;
    font-family: 'Cinzel', serif;
    position: relative;
    bottom: 0;
    width: 100%;
    margin-top: 40px;
    max-width: 100%;
}

/* ?? Footer Text Styling */
#site-footer p {
    max-width: 90%; /* Prevents text from stretching across the entire screen */
    margin: 10px auto; /* Centers the text & gives breathing room */
    line-height: 1.5; /* Slightly increased for readability */
    text-align: center;
}

/* ?? Make Footer Responsive */
@media (max-width: 768px) {
    #site-footer {
        font-size: 12px; /* Slightly smaller on mobile */
        padding: 12px;
    }

    #site-footer p {
        max-width: 95%; /* Allows a bit more width on small screens */
        font-size: 11px; /* Prevents footer text from taking too much space */
    }
}

/* Fading effect for the loading message */
.loading-message {
    opacity: 0.7;
    font-style: italic;
    animation: fadeInOut 2s infinite alternate;
}

@keyframes fadeInOut {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* ?? Exit Promo Final Touches */
body.exit-promo {
  background: url('https://uorealms.com/fortune/images/stars-background.jpg') no-repeat center center fixed;
  background-size: cover;
  padding: 40px 20px;
  font-family: 'Georgia', serif;
  color: #f8e1a1;
  text-align: center;
}

body.exit-promo h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #ffdd44;
  text-shadow: 2px 2px 6px #000;
}

body.exit-promo p {
  font-size: 1.2rem;
  margin: 0 auto 25px;
  max-width: 700px;
  line-height: 1.6;
  color: #ffffff;
}

#card-display {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 30px auto;
  max-width: 800px;
}

.promo-card {
  width: 160px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  pointer-events: none;
  user-select: none;
}

.coupon {
  font-size: 1.2rem;
  color: gold;
  margin-top: 20px;
  text-shadow: 1px 1px 3px #000;
}

.shop-button {
  background: linear-gradient(135deg, #6a0dad, #b533ff);
  color: white;
  font-size: 20px;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  margin-top: 20px;
  cursor: pointer;
  box-shadow: 0 0 10px #000;
  transition: transform 0.2s ease;
}

.shop-button:hover {
  background: linear-gradient(135deg, #b533ff, #6a0dad);
  transform: scale(1.05);
}

/* ? Exit Promo Wrapper for Transparency */
.promo-wrapper {
  background: rgba(0, 0, 0, 0.7); /* Transparent dark bg */
  padding: 40px 20px;
  border-radius: 12px;
  max-width: 900px;
  margin: 40px auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

body.exit-promo h1,
body.exit-promo p,
body.exit-promo .coupon {
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9);
}

/* ?? Mobile Styling for Share Buttons */
@media (max-width: 600px) {
  #shareContainer button {
    display: block;
    width: 90%;
    margin: 10px auto;
    font-size: 16px;
    padding: 12px 20px;
    border-radius: 10px;
  }
}

/* Fix for footer on exit-promo page */
body.exit-promo #site-footer p {
  color: #f8e1a1 !important;
  font-size: 14px !important;
  font-family: 'Cinzel', serif;
  line-height: 1.5;
  margin: 10px auto;
  max-width: 90%;
  text-align: center;
}

@media (max-width: 768px) {
  body.exit-promo #site-footer p {
    font-size: 11px !important;
    max-width: 95%;
  }
}