/* Main styling for the tarot love forecast web page */

/* Base styles and resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Montserrat', sans-serif;
  color: white;
  scroll-behavior: smooth;
  overscroll-behavior: none;
}

body {
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 25%, #c2e9fb 50%, #a1c4fd 75%, #d4a5ff 100%);
  background-size: 400% 400%;
  animation: gradient-shift 30s ease infinite;
}

/* Gradient animation */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Section styling */
.section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Opening blessing section */
#opening {
  text-align: center;
}

.title {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 1rem;
  letter-spacing: 2px;
  opacity: 0;
  animation: fade-in 1s ease forwards;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 3rem;
  opacity: 0.8;
  max-width: 80%;
  line-height: 1.6;
  opacity: 0;
  animation: fade-in 1s ease 0.5s forwards;
}

.start-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  opacity: 0;
  animation: fade-in 1s ease 1s forwards;
}

.start-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card draw section */
#card-draw {
  position: relative;
}

.deck-container {
  width: 100%;
  max-width: 300px;
  height: 150px;
  position: relative;
  margin-bottom: 3rem;
}

.deck {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.deck:hover {
  transform: translateY(-5px);
}

.deck:before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.deck-instruction {
  position: absolute;
  bottom: -40px;
  width: 100%;
  text-align: center;
  font-size: 1rem;
  opacity: 0.8;
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
}

.card-slot {
  width: 100%;
  max-width: 280px;
  height: 400px;
  perspective: 1000px;
  margin-bottom: 1rem;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  cursor: pointer;
}

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

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.card-front {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-back {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transform: rotateY(180deg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.card-symbol {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.card-name {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.card-orientation {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.card-meaning {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.card-visual-tag {
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  margin-top: 1rem;
}

.continue-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.continue-button {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border: none;
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.continue-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Utility classes */
.hidden {
  display: none !important;
}

.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Ambient background elements */
.ambient-element {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.4;
  z-index: -1;
  animation: float 10s infinite ease-in-out;
}

.ambient-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 154, 158, 0.7) 0%, rgba(250, 208, 196, 0) 70%);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.ambient-2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(212, 165, 255, 0.7) 0%, rgba(161, 196, 253, 0) 70%);
  bottom: 10%;
  right: 10%;
  animation-delay: 2s;
}

.ambient-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(194, 233, 251, 0.7) 0%, rgba(161, 196, 253, 0) 70%);
  top: 50%;
  right: 20%;
  animation-delay: 4s;
}

/* Media queries for responsiveness */
@media (min-width: 768px) {
  .cards-container {
    flex-direction: row;
  }
  
  .card-slot {
    max-width: 220px;
  }
}

@media (max-width: 767px) {
  .title {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .cards-container {
    flex-direction: column;
    align-items: center;
  }
  
  .card-slot {
    max-width: 280px;
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  opacity: 0.7;
  font-size: 1.5rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-20px) translateX(-50%);
  }
  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

/* Loading animation */
.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 25%, #c2e9fb 50%, #a1c4fd 75%, #d4a5ff 100%);
  background-size: 400% 400%;
  animation: gradient-shift 10s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-spinner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  animation: spin 1s linear infinite;
}

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