@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Auth Tab Active State */
.auth-tab-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
  color: #fff;
  box-shadow: 0 2px 12px -3px rgba(59, 130, 246, 0.3);
}

/* Auth Card Glow */
.auth-card {
  box-shadow: 0 0 80px -20px rgba(59, 130, 246, 0.08), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Base Aurora Animation */
@keyframes aurora {
  from {
    background-position: 50% 50%, 50% 50%;
  }

  to {
    background-position: 350% 50%, 350% 50%;
  }
}

.aurora-bg {
  background-image:
    repeating-linear-gradient(100deg, #fff 0%, #fff 7%, transparent 10%, transparent 12%, #fff 16%),
    repeating-linear-gradient(100deg, #3b82f6 10%, #a855f7 15%, #3b82f6 20%, #a855f7 25%, #3b82f6 30%);
  background-size: 300% 200%;
  background-position: 50% 50%, 50% 50%;
  filter: blur(10px) invert(1);
  mix-blend-mode: overlay;
}

/* Meteor Animation */
@keyframes meteor {
  0% {
    transform: rotate(215deg) translateX(0);
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    transform: rotate(215deg) translateX(-500px);
    opacity: 0;
  }
}

.animate-meteor {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 2px;
  width: 100px;
  background: linear-gradient(to right, #94a3b8, transparent);
  opacity: 0;
  transform: rotate(215deg) translateX(0);
  border-radius: 9999px;
  box-shadow: 0 0 20px rgba(148, 163, 184, 0.5);
}

/* Pulse Ring Animation */
@keyframes pulse-ring {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 20px rgba(220, 38, 38, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

.recording {
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  background-color: #dc2626 !important;
  border-color: #ef4444 !important;
}

/* Card Flip Styles */
.perspective-1000 {
  perspective: 1000px;
}

.flip-card {
  height: 70px;
  cursor: default;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
}

.flipped-correct .flip-card-inner,
.flipped-revealed .flip-card-inner {
  transform: rotateX(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  border-radius: 1rem;
  padding: 0 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.flip-card-front {
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #475569;
  font-size: 1.5rem;
  font-weight: 800;
  justify-content: flex-start;
  backdrop-filter: blur(12px);
}

.flip-card-back {
  transform: rotateX(180deg);
  justify-content: space-between;
  font-weight: 800;
  border: 1px solid transparent;
}

.flipped-correct .flip-card-back {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
  box-shadow: 0 0 30px -10px rgba(34, 197, 94, 0.3);
}

.flipped-revealed .flip-card-back {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Animations Utilities */
.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes clock-urgent {
  0% {
    transform: scale(var(--timer-scale)) rotate(0);
  }

  25% {
    transform: scale(calc(var(--timer-scale) * 1.1)) rotate(10deg);
  }

  50% {
    transform: scale(var(--timer-scale)) rotate(-10deg);
  }

  75% {
    transform: scale(calc(var(--timer-scale) * 1.1)) rotate(5deg);
  }

  100% {
    transform: scale(var(--timer-scale)) rotate(0);
  }
}

.animate-urgent {
  animation: clock-urgent 0.2s infinite;
}

.surprise-active {
  border-color: rgba(96, 165, 250, 0.5) !important;
  box-shadow: 0 0 20px -5px rgba(59, 130, 246, 0.4);
}

.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(1);
  transform: scale(0.98);
}

/* --- PREMIUM PRICING STYLES --- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  align-items: stretch;
  /* Forces all cards to same height */
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.pricing-card {
  position: relative;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 2rem;
  /* user wanted non-sausage, but equal length */
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  height: 100%;
  /* Fills the grid cell */
}

.pricing-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.price-decimal {
  font-size: 0.6em;
  opacity: 0.7;
  vertical-align: top;
  margin-left: 2px;
  font-weight: 700;
}

/* Spotlight Effect */
.pricing-card::before {
  content: '';
  position: absolute;
  inset: 0px;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 255, 255, 0.04),
      transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 0;
}

.pricing-card:hover::before {
  opacity: 1;
}

.pricing-card>* {
  position: relative;
  z-index: 1;
}

/* Featured Card Override */
.pricing-card.featured {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.2) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1), 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

.pricing-card.featured:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -15px rgba(37, 99, 235, 0.3);
}

/* Typography Layout */
.card-header {
  margin-bottom: 2rem;
  text-align: left;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.card-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-top: 0.5rem;
  line-height: 1.5;
}

.price-area {
  margin-bottom: 2rem;
  display: flex;
  align-items: baseline;
  color: white;
}

.price-val {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

.price-currency {
  font-size: 1.5rem;
  margin-right: 4px;
  font-weight: 500;
  color: #cbd5e1;
}

/* List Styling */
.benefits-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-grow: 1;
  /* Pushes button down, creates equal height feel */
}

.benefits-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  /* Center align with tick */
  gap: 12px;
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.4;
  text-align: left;
}

/* Sexy Tick Marks */
.tick-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.featured .tick-mark {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

/* Gradient Punchy Buttons */
.action-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 9999px;
  /* Pill shape is always sexy */
  background: linear-gradient(to bottom, #1e293b, #0f172a);
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
  position: relative;
  overflow: hidden;
  /* For the shine */
  z-index: 10;
}

/* The Shine Effect */
.action-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: 0.5s;
  z-index: -1;
}

.action-btn:hover::after {
  left: 100%;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Featured Button Override */
.featured .action-btn {
  background: linear-gradient(to bottom, #3b82f6, #2563eb);
  border: none;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.featured .action-btn:hover {
  background: linear-gradient(to bottom, #60a5fa, #3b82f6);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.6), 0 0 20px rgba(37, 99, 235, 0.5);
}

/* VIP Button Override (Purple/Gold hint) */
.pricing-card:last-child .action-btn {
  background: linear-gradient(to bottom, #9333ea, #7e22ce);
  border: none;
  box-shadow: 0 4px 10px rgba(147, 51, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.pricing-card:last-child .action-btn:hover {
  background: linear-gradient(to bottom, #a855f7, #9333ea);
  box-shadow: 0 10px 25px -5px rgba(147, 51, 234, 0.6), 0 0 20px rgba(147, 51, 234, 0.5);
}

/* ═══ UPSELL SYSTEM ═══ */

/* Upsell Banner on Setup */
.upsell-banner {
  position: relative;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.upsell-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.3);
}

/* Shimmer sweep on upsell banner */
.upsell-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: upsell-shimmer 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes upsell-shimmer {
  0% {
    left: -100%;
  }

  50% {
    left: 200%;
  }

  100% {
    left: 200%;
  }
}

/* Low Credits Pulse on Widget */
@keyframes credits-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

.credits-low .credits-widget-btn {
  border-color: rgba(239, 68, 68, 0.4) !important;
  animation: credits-pulse 2s ease-in-out infinite;
}

.credits-low #creditsOrb {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.credits-low #creditsCount {
  color: #f87171 !important;
}

/* Credits OK = green glow */
.credits-ok #creditsOrb {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
}

/* Guest Teaser Widget (not logged in) */
@keyframes teaser-glow {

  0%,
  100% {
    box-shadow: 0 4px 15px -3px rgba(59, 130, 246, 0.3);
  }

  50% {
    box-shadow: 0 4px 25px -3px rgba(59, 130, 246, 0.5);
  }
}

.guest-teaser-btn {
  animation: teaser-glow 3s ease-in-out infinite;
}