/* ========================================
   Sun Tarot - Dark Mystic Theme
   ======================================== */

:root {
  /* Colors */
  --color-background: #0a0a0a;
  --color-background-secondary: #141414;
  --color-card: #1a1a1a;
  --color-primary: #d4a95d;
  --color-accent: #c9a227;
  --color-text: #f5f5f5;
  --color-text-muted: #a3a3a3;
  --color-border: rgba(212, 169, 93, 0.2);

  /* Fonts */
  --font-headline: 'Playfair Display', serif;
  --font-body: 'PT Sans', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  color: var(--color-text-muted);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-medium);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: var(--color-background);
  box-shadow: 0 0 20px rgba(212, 169, 93, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(212, 169, 93, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-background);
}

/* ========================================
   Header / Navigation
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--spacing-sm) 0;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 102;
  /* Ensure above nav-links */
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-background);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    border-top: 1px solid var(--color-border);
    /* Separator */
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
    order: 2;
    /* Force to right */
  }

  .auth-container {
    order: 1;
    margin-left: auto;
    /* Push to right, next to hamburger */
    margin-right: 1rem;
  }
}

/* User Profile Styles */
.user-avatar {
  width: 35px;
  /* Strict size */
  height: 35px;
  /* Strict size */
  min-width: 35px;
  /* Prevent squishing */
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(212, 169, 93, 0.5);
}

.user-name {
  display: none;
  /* Hide name in header by default as requested */
}

/* Welcome Banner */
#welcomeBanner {
  background: linear-gradient(to right, rgba(10, 10, 10, 0.95), rgba(20, 20, 20, 0.95));
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem var(--spacing-sm);
  text-align: center;
  position: fixed;
  top: 70px;
  /* Below header (approx header height) */
  left: 0;
  right: 0;
  z-index: 90;
  backdrop-filter: blur(5px);
  display: none;
  /* Hidden by default */
  animation: slideDown 0.3s ease-out;
}

#welcomeBanner span {
  color: var(--color-primary);
  font-family: var(--font-headline);
  letter-spacing: 0.5px;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* User Dropdown */
.user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  min-width: 150px;
  display: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 200;
}

.user-dropdown-menu.active {
  display: block;
}

.user-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.user-dropdown-menu a:hover {
  background: rgba(212, 169, 93, 0.1);
  color: var(--color-primary);
}

.user-dropdown-menu hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0.25rem 0;
}

/* Mobile profile adjustments */
@media (max-width: 768px) {
  .user-avatar {
    width: 32px;
    height: 32px;
  }

  .user-name {
    display: none;
  }

  .user-dropdown-menu {
    right: -0.5rem;
  }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-sm);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(212, 169, 93, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-subtitle {
  color: var(--color-primary);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
  animation: pulse 2s infinite;
}

.hero-title {
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 50%, var(--color-text) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-md);
}

.hero-description {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto var(--spacing-md);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   Card Styles
   ======================================== */
.tarot-card {
  width: 150px;
  height: 250px;
  perspective: 1000px;
  cursor: pointer;
}

@media (min-width: 768px) {
  .tarot-card {
    width: 180px;
    height: 300px;
  }
}

.tarot-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s;
  transform-style: preserve-3d;
}

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

.tarot-card-front,
.tarot-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tarot-card-front {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, var(--color-background-secondary), var(--color-card));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
}

.tarot-card-front img {
  width: 100%;
  flex: 1;
  object-fit: contain;
}

.tarot-card-front .card-name {
  font-family: var(--font-headline);
  font-size: 0.875rem;
  color: var(--color-primary);
  padding: 0.5rem;
  white-space: nowrap;
}

.tarot-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 3D Tilt Effect */
.tarot-card:hover .tarot-card-inner {
  box-shadow: 0 20px 40px rgba(212, 169, 93, 0.2);
}

/* Reversed Card - Rotated 180 degrees */
.tarot-card.reversed .tarot-card-front img {
  transform: rotate(180deg);
}

.tarot-card.reversed .card-name::before {
  content: '↺ ';
  color: #e74c3c;
}

/* Reversed indicator badge */
.reversed-badge {
  display: inline-block;
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* ========================================
   Card Animations
   ======================================== */

/* Shuffle Animation - More dramatic */
@keyframes shuffleCards {
  0% {
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
  }

  15% {
    transform: translateX(-30px) translateY(-10px) rotate(-8deg) scale(0.95);
  }

  30% {
    transform: translateX(25px) translateY(5px) rotate(6deg) scale(1.02);
  }

  45% {
    transform: translateX(-20px) translateY(-5px) rotate(-4deg) scale(0.98);
  }

  60% {
    transform: translateX(15px) translateY(3px) rotate(3deg) scale(1.01);
  }

  75% {
    transform: translateX(-8px) translateY(-2px) rotate(-2deg) scale(0.99);
  }

  90% {
    transform: translateX(4px) translateY(1px) rotate(1deg) scale(1);
  }

  100% {
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
  }
}

/* Golden glow pulse during shuffle */
@keyframes shuffleGlow {

  0%,
  100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 40px rgba(212, 169, 93, 0.6), 0 0 60px rgba(212, 169, 93, 0.3);
  }
}

.tarot-card.shuffling {
  animation: shuffleCards 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.tarot-card.shuffling .tarot-card-inner {
  animation: shuffleGlow 0.7s ease-in-out;
}

/* Deal Animation - Cards fly in from above */
@keyframes dealCard {
  0% {
    opacity: 0;
    transform: translateY(-200px) translateX(50px) scale(0.3) rotate(-25deg);
    filter: blur(4px);
  }

  40% {
    opacity: 0.8;
    transform: translateY(20px) translateX(-10px) scale(1.1) rotate(5deg);
    filter: blur(0);
  }

  60% {
    transform: translateY(-10px) translateX(5px) scale(0.95) rotate(-2deg);
  }

  80% {
    transform: translateY(5px) translateX(-2px) scale(1.02) rotate(1deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1) rotate(0deg);
  }
}

.tarot-card.dealing {
  animation: dealCard 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Staggered delays for multiple cards */
.reading-card:nth-child(1) .tarot-card.dealing {
  animation-delay: 0ms;
}

.reading-card:nth-child(2) .tarot-card.dealing {
  animation-delay: 200ms;
}

.reading-card:nth-child(3) .tarot-card.dealing {
  animation-delay: 400ms;
}

.reading-card:nth-child(4) .tarot-card.dealing {
  animation-delay: 600ms;
}

.reading-card:nth-child(5) .tarot-card.dealing {
  animation-delay: 800ms;
}

/* Enhanced 3D Flip with Spring Effect */
.tarot-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

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

/* Magical glow during flip */
@keyframes flipGlow {
  0% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  30% {
    box-shadow: 0 0 50px rgba(212, 169, 93, 0.8),
      0 0 80px rgba(212, 169, 93, 0.4),
      0 0 120px rgba(212, 169, 93, 0.2);
  }

  100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }
}

.tarot-card.flipping .tarot-card-inner {
  animation: flipGlow 0.9s ease-out;
}

/* 3D Tilt effect on hover */
.tarot-card {
  transition: transform 0.3s ease;
}

.tarot-card:hover:not(.flipped) {
  transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateY(-5px);
}

.tarot-card:hover .tarot-card-inner {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(212, 169, 93, 0.2);
}

/* Card reveal sparkle effect */
@keyframes sparkle {

  0%,
  100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
}

.tarot-card.revealed::before {
  content: '✨';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  animation: sparkle 0.6s ease-out forwards;
  z-index: 10;
  pointer-events: none;
}

/* Floating idle animation for unflipped cards */
@keyframes cardFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-8px) rotate(0.5deg);
  }
}

.tarot-card:not(.flipped):not(.shuffling):not(.dealing) {
  animation: cardFloat 3s ease-in-out infinite;
}

/* Pause animation on hover for better UX */
.tarot-card:hover {
  animation-play-state: paused;
}

/* Card click ripple effect */
@keyframes cardRipple {
  0% {
    transform: scale(0);
    opacity: 0.5;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.tarot-card.clicked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(212, 169, 93, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: cardRipple 0.5s ease-out forwards;
  pointer-events: none;
}

/* Magical particles background for cards during interactions */
@keyframes magicParticle {
  0% {
    transform: translateY(0) scale(0);
    opacity: 1;
  }

  100% {
    transform: translateY(-50px) scale(1);
    opacity: 0;
  }
}

/* Golden border glow for revealed cards */
.tarot-card.flipped .tarot-card-front {
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(212, 169, 93, 0.4),
    inset 0 0 20px rgba(212, 169, 93, 0.1);
}


/* ========================================
   Profile Page Styles
   ======================================== */
.profile-header {
  text-align: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--color-primary);
  object-fit: cover;
  margin-bottom: 1rem;
  background-color: var(--color-card);
  /* Fallback background */
}

.profile-name {
  font-family: var(--font-headline);
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.profile-email {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.profile-badges {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: rgba(212, 169, 93, 0.1);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  font-size: 0.75rem;
  color: var(--color-primary);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-primary);
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Streak Section */
.streak-section {
  background: linear-gradient(135deg, rgba(212, 169, 93, 0.1), rgba(212, 169, 93, 0.05));
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.streak-flame {
  font-size: 4rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.streak-count {
  font-size: 3rem;
  font-weight: bold;
  color: var(--color-primary);
}

.streak-label {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.streak-calendar {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 1rem;
}

.streak-day {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
}

.streak-day.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.streak-day.today {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(212, 169, 93, 0.3);
}

/* Favorite Cards */
.favorite-cards {
  margin-bottom: 2rem;
}

.favorite-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.favorite-card {
  text-align: center;
}

.favorite-card img {
  width: 100%;
  border-radius: 0.5rem;
  border: 2px solid var(--color-border);
  transition: transform 0.3s;
}

.favorite-card img:hover {
  transform: scale(1.05);
}

.favorite-card-name {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.favorite-card-count {
  font-size: 0.65rem;
  color: var(--color-primary);
}

/* Achievements */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.achievement {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  opacity: 0.5;
  transition: all 0.3s;
}

.achievement.unlocked {
  opacity: 1;
  border-color: var(--color-primary);
}

.achievement-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.achievement-name {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.achievement-desc {
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

/* Login Prompt */
.login-prompt {
  text-align: center;
  padding: 4rem 2rem;
}

.login-prompt h2 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.card-grid-item {
  position: relative;
}

.card-preview-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: var(--color-card);
  border: 1px solid var(--color-primary);
  border-radius: 0.75rem;
  padding: 1rem;
  width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.card-preview-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--color-primary);
}

.card-grid-item:hover .card-preview-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

.card-preview-tooltip h4 {
  color: var(--color-primary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.card-preview-tooltip p {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  margin: 0;
}

/* Adjust tooltip position for edge cards */
.card-grid-item:first-child .card-preview-tooltip,
.card-grid-item:nth-child(3n+1) .card-preview-tooltip {
  left: 0;
  transform: translateX(0) translateY(-10px);
}

.card-grid-item:first-child:hover .card-preview-tooltip,
.card-grid-item:nth-child(3n+1):hover .card-preview-tooltip {
  transform: translateX(0) translateY(-5px);
}

.card-grid-item:first-child .card-preview-tooltip::after,
.card-grid-item:nth-child(3n+1) .card-preview-tooltip::after {
  left: 30px;
}

/* ========================================
   Booking Progress Bar
   ======================================== */
.booking-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  position: relative;
}

.booking-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-border);
  transform: translateY(-50%);
  z-index: 0;
}

.progress-line {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: translateY(-50%);
  transition: width 0.5s ease;
  z-index: 1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-background);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all 0.3s;
}

.progress-step.active .step-circle {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 15px rgba(212, 169, 93, 0.3);
}

.progress-step.completed .step-circle {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-background);
}

.step-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
}

.progress-step.active .step-label {
  color: var(--color-primary);
  font-weight: 600;
}

.progress-step.completed .step-label {
  color: var(--color-text);
}

@media (max-width: 480px) {
  .step-label {
    display: none;
  }

  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
}

/* ========================================
   Sections
   ======================================== */
.section {
  padding: var(--spacing-lg) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-title {
  color: var(--color-text);
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Card of the Day */
.card-of-day {
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.card-of-day::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(212, 169, 93, 0.1), transparent 50%);
  pointer-events: none;
}

.card-of-day-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--spacing-lg);
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .card-of-day-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .card-of-day-content .tarot-card {
    margin: 0 auto;
  }
}

.card-meaning {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-text-muted);
  border-left: 4px solid var(--color-primary);
  padding-left: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

/* Deck Showcase */
.deck-showcase {
  overflow: hidden;
  padding: var(--spacing-md) 0;
}

.deck-track {
  display: flex;
  gap: var(--spacing-sm);
  animation: scroll 30s linear infinite;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.deck-showcase:hover .deck-track {
  animation-play-state: paused;
}

.deck-card {
  flex-shrink: 0;
  width: 100px;
  height: 166px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform var(--transition-medium);
}

.deck-card:hover {
  transform: scale(1.1) translateY(-10px);
}

.deck-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Card Grid (Learn Page) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
  position: relative;
  padding: var(--spacing-md);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
  border: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.card-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform var(--transition-medium);
}

.card-grid-item:hover {
  transform: translateY(-5px) scale(1.05);
}

.card-grid-item img {
  width: 100%;
  aspect-ratio: 9/15;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-fast);
}

.card-grid-item:hover img {
  border-color: var(--color-primary);
}

.card-grid-item .card-name {
  font-size: 0.625rem;
  margin-top: 0.5rem;
  text-align: center;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

@media (min-width: 768px) {
  .card-grid-item .card-name {
    font-size: 0.875rem;
  }
}

.card-grid-item:hover .card-name {
  color: var(--color-primary);
}

/* Spotlight Effect */
.spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.card-grid:hover .spotlight {
  opacity: 1;
}

/* ========================================
   Pricing Section
   ======================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.pricing-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: var(--spacing-md);
  text-align: center;
  transition: all var(--transition-medium);
}

.pricing-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-primary);
  box-shadow: 0 10px 40px rgba(212, 169, 93, 0.1);
}

.pricing-card.featured {
  border-color: var(--color-primary);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-background);
  padding: 0.25rem 1rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.pricing-name {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  color: var(--color-text);
  margin-bottom: var(--spacing-xs);
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--spacing-md);
}

.pricing-features li {
  padding: 0.5rem 0;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.pricing-features li:last-child {
  border-bottom: none;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--color-background-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-section h4 {
  color: var(--color-primary);
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ========================================
   Utilities
   ======================================== */
.text-primary {
  color: var(--color-primary);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-center {
  text-align: center;
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.hidden {
  display: none !important;
}

/* ========================================
   Scroll Progress
   ======================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: 200;
  transform-origin: left;
  transform: scaleX(0);
}

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: var(--color-background);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(212, 169, 93, 0.4);
}

/* Audio Toggle */
.audio-toggle {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 48px;
  height: 48px;
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(10px);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-medium);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.audio-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.audio-toggle.playing {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ========================================
   Modal / Dialog
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  transform: scale(0.9);
  transition: transform var(--transition-medium);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: var(--color-background);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  transform: scale(1.1);
}

.modal-content {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .modal-content {
    flex-direction: row;
  }
}

.modal-image {
  flex: 0 0 40%;
  background: rgba(0, 0, 0, 0.4);
  padding: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.modal-details {
  flex: 1;
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-title {
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.modal-description {
  font-size: 1.125rem;
  line-height: 1.8;
}

/* ========================================
   Animations
   ======================================== */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* Starry Background */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 3s infinite;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 0.8;
  }
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  width: calc(100% - 40px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: bold;
}

.toast-message {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--color-text);
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

/* Toast Types */
.toast-success {
  border-color: rgba(39, 174, 96, 0.5);
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), var(--color-card));
}

.toast-success .toast-icon {
  background: rgba(39, 174, 96, 0.2);
  color: #27ae60;
}

.toast-error {
  border-color: rgba(231, 76, 60, 0.5);
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), var(--color-card));
}

.toast-error .toast-icon {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.toast-warning {
  border-color: rgba(241, 196, 15, 0.5);
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.1), var(--color-card));
}

.toast-warning .toast-icon {
  background: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
}

.toast-info {
  border-color: rgba(52, 152, 219, 0.5);
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), var(--color-card));
}

.toast-info .toast-icon {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .toast-container {
    top: auto;
    bottom: 20px;
    left: 20px;
    right: 20px;
  }

  .toast {
    transform: translateY(120%);
  }

  .toast.show {
    transform: translateY(0);
  }

  .toast.hide {
    transform: translateY(120%);
  }
}

/* ========================================
   Lazy Loading & Performance
   ======================================== */

/* Lazy loading images with blur-up effect */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src=""]) {
  opacity: 1;
}

/* Image placeholder while loading */
.img-placeholder {
  background: linear-gradient(135deg,
      var(--color-card) 0%,
      rgba(212, 169, 93, 0.1) 50%,
      var(--color-card) 100%);
  background-size: 200% 200%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Skeleton loading states */
.skeleton {
  background: linear-gradient(90deg,
      var(--color-card) 0%,
      rgba(212, 169, 93, 0.15) 50%,
      var(--color-card) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 0.5rem;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text:last-child {
  width: 70%;
}

.skeleton-title {
  height: 1.5em;
  width: 50%;
  margin-bottom: 1em;
}

.skeleton-card {
  height: 200px;
  margin-bottom: 1rem;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* Content visibility optimization */
.content-visibility-auto {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* GPU acceleration for animations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Optimized card images */
.tarot-card img {
  will-change: transform;
}

/* Mobile adjustments for achievements */
@media (max-width: 480px) {
  .achievements-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem;
  }

  .achievement {
    padding: 0.5rem;
  }

  .achievement-icon {
    font-size: 1.5rem;
  }
}