/* Base Styles */
:root {
  /* New color scheme based on Astro Flow */
  --cosmic-navy: #0E1820; /* Main background with stars */
  --cosmic-dark-navy: #101B25; /* Cards and footer */
  --cosmic-bronze: #AD7F58; /* Warm bronze/gold accent */
  --cosmic-bronze-hover: #C4915F; /* Lighter bronze for hover */
  --cosmic-bronze-dark: #95664A; /* Darker bronze */
  --cosmic-light: #b8c1cc; /* Muted blue-gray like Astro Flow */
  --cosmic-light-gray: #9ca3af;
  --cosmic-gray: #6c757d;
  --cosmic-border: #1a2226; /* Much darker border to match the darker background */
  --font-heading: 'Cormorant', 'Georgia', serif; /* Serif for headings like Astro Flow */
  --font-body: 'Montserrat', 'Arial', sans-serif; /* Sans-serif for body */
  --border-radius: 12px;
  --transition-speed: 0.3s;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--cosmic-light);
  background: var(--cosmic-navy);
  height: 100vh;
  position: relative;
  overflow: hidden;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
  z-index: 2;
  height: 100vh;
  overflow: hidden;
}

a {
  color: var(--cosmic-bronze);
  text-decoration: none;
  transition: all var(--transition-speed);
}

a:hover {
  color: var(--cosmic-bronze-hover);
  text-shadow: 0 0 5px rgba(173, 127, 88, 0.3);
}

/* Typography */
h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  text-align: center;
  color: var(--cosmic-dark-gray);
  font-weight: 600;
}

h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--cosmic-bronze);
  font-weight: 300;
  text-shadow: 0 0 10px rgba(173, 127, 88, 0.3);
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--cosmic-dark-gray);
  font-weight: 500;
}

p {
  margin-bottom: 1rem;
  color: var(--cosmic-dark-gray);
}

.sub-headline {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #666;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cosmic-bronze); /* Bronze/gold color like Astro Flow */
  color: white;
  border: none;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  font-family: var(--font-heading);
  font-weight: 300;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(173, 127, 88, 0.3);
  letter-spacing: 0.3px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-speed);
  width: 100%;
  text-align: center;
  min-height: 50px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  white-space: normal;
  word-wrap: break-word;
  hyphens: auto;
}



.btn-primary:hover, .btn-primary:focus {
  background: var(--cosmic-bronze-hover); /* Lighter bronze on hover */
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(173, 127, 88, 0.5), 0 4px 15px rgba(173, 127, 88, 0.3);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}



/* Highlight attention class for the unlock button */
.highlight-attention {
  animation: gentle-attention 2s ease;
  box-shadow: 0 4px 15px rgba(0, 195, 137, 0.4);
}

@keyframes gentle-attention {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Optimized Stars Animation - Reduced complexity for faster loading */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  background: var(--cosmic-navy);
  will-change: transform;
}

.stars, .stars2 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  will-change: transform;
}

.stars {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><circle cx="5" cy="5" r="0.5" fill="%23AD7F58" opacity="0.4"/></svg>') repeat;
  background-size: 120px 120px;
  animation: animateStars 60s linear infinite;
}

.stars2 {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><circle cx="5" cy="5" r="0.3" fill="%23C4915F" opacity="0.3"/></svg>') repeat;
  background-size: 180px 180px;
  animation: animateStars2 90s linear infinite;
}

@keyframes animateStars {
  0% { background-position: 0 0; }
  50% { background-position: 500px 300px; }
  100% { background-position: 1000px 600px; }
}

@keyframes animateStars2 {
  0% { background-position: 0 0; }
  50% { background-position: -300px 400px; }
  100% { background-position: -600px 800px; }
}

@keyframes animateStars3 {
  0% { background-position: 0 0; }
  50% { background-position: 400px -250px; }
  100% { background-position: 800px -500px; }
}

@keyframes animateStars4 {
  0% { background-position: 0 0; }
  33% { background-position: 100px 100px; }
  66% { background-position: -100px 200px; }
  100% { background-position: 0 300px; }
}

/* Error Message */
.error-message {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background-color: rgba(255, 59, 48, 0.9);
  color: white;
  text-align: center;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Progress Bar */
.progress-container {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--cosmic-bronze);
  box-shadow: 0 0 10px rgba(173, 127, 88, 0.5);
  transition: width 0.5s ease;
}

/* Section Styles */
.section {
  display: none;
  padding: 1rem 0;
  height: 100%;
  width: 100%;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.section.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 1;
  z-index: 5;
  pointer-events: all;
}

/* Hero Layout */
#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 100%;
  width: 100%;
}

/* Hero Section */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  margin-bottom: 120px; /* Added bottom margin to accommodate footer */
  background: var(--cosmic-dark-navy);
  color: var(--cosmic-dark-gray);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--cosmic-border);
  z-index: 5;
}

.hero-content h2 {
  color: var(--cosmic-bronze) !important;
  font-weight: 300 !important;
  text-shadow: 0 0 10px rgba(173, 127, 88, 0.3) !important;
  font-family: var(--font-heading) !important;
}

/* Form Styles */
.lead-form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  background: var(--cosmic-dark-navy);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--cosmic-border);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  color: var(--cosmic-bronze) !important;
  font-weight: 300 !important;
  text-shadow: 0 0 8px rgba(173, 127, 88, 0.3) !important;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--cosmic-border);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 16px; /* Prevent iOS zoom */
  margin-bottom: 0.5rem;
  color: var(--cosmic-light);
}

.form-group select {
  cursor: pointer;
}

/* Mobile-specific dropdown styling */
@media (max-width: 768px) {
  .form-group select {
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
    background-image: none;
    padding-right: 0.75rem;
  }
}

/* Desktop dropdown styling */
@media (min-width: 769px) {
  .form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 2.5rem;
  }
}

.date-inputs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.date-inputs select {
  flex: 1;
  margin-bottom: 0;
  text-align: center;
  text-align-last: center;
}

.date-inputs select:first-child {
  flex: 1.2; /* Year gets slightly more space */
}

.date-inputs select:last-child {
  flex: 0.8; /* Day gets slightly less space */
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 300;
  color: var(--cosmic-bronze);
  text-shadow: 0 0 8px rgba(173, 127, 88, 0.3);
}

input[type="email"],
input[type="date"],
input[type="password"],
input[type="number"] {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--cosmic-border);
  border-radius: var(--border-radius);
  background: var(--cosmic-dark-navy);
  color: var(--cosmic-dark-gray);
  font-size: 16px; /* iOS Safari zoom prevention */
  transition: all var(--transition-speed);
  min-height: 44px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  -webkit-appearance: none;
  appearance: none;
  cursor: text;
}

/* Remove spinner buttons from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  input[type="number"] {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
  }
  
  /* Prevent double-tap zoom */
  input, select, textarea, button {
    touch-action: manipulation;
  }
}

input::placeholder {
  color: rgba(184, 193, 204, 0.5);
}

input:focus {
  border-color: var(--cosmic-bronze);
  outline: none;
  box-shadow: 0 0 0 2px rgba(173, 127, 88, 0.2);
}

/* Questionnaire */
.question-card {
  display: none;
  background: var(--cosmic-dark-navy);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 0 auto;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--cosmic-border);
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  z-index: 5;
  color: var(--cosmic-light);
}

.question-card.active {
  display: block;
  opacity: 1;
  animation: simpleFadeIn 0.5s ease-out forwards;
}

@keyframes simpleFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.time-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.time-input-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.time-input {
  font-size: 1.2rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--cosmic-border);
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  text-align: center;
  width: 180px;
  -webkit-tap-highlight-color: rgba(0, 195, 137, 0.3);
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}

.time-input:focus {
  border-color: var(--cosmic-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(43, 166, 137, 0.2);
}

.question-subtitle {
  margin-bottom: 1.5rem;
  color: var(--cosmic-light-gray);
  font-size: 0.95rem;
  max-width: 85%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--cosmic-dark-navy);
  padding: 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-speed);
  min-height: 44px;
  border: 1px solid var(--cosmic-border);
  color: var(--cosmic-dark-gray);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.option:hover {
  background: var(--cosmic-gray);
  transform: translateY(-1px);
}

.option input[type="radio"] {
  opacity: 0;
  position: absolute;
}

.option input[type="radio"]:checked + .option-text {
  color: var(--cosmic-accent);
  font-weight: 600;
}

.option-text {
  font-size: 1rem;
}

/* Symbol Options */
.symbol-options {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
}

.symbol-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.symbol {
  font-size: 2.5rem;
  padding: 1rem;
  background: var(--cosmic-dark-navy);
  border-radius: var(--border-radius);
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 75px;
  min-height: 75px;
  border: 1px solid var(--cosmic-border);
  color: var(--cosmic-dark-gray);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.symbol-option input[type="radio"] {
  opacity: 0;
  position: absolute;
}

.symbol-option input[type="radio"]:checked + .symbol {
  background: rgba(0, 195, 137, 0.1);
  border-color: var(--cosmic-accent);
  color: var(--cosmic-accent);
  box-shadow: 0 2px 8px rgba(0, 195, 137, 0.2);
}

/* Results Section */
.results-container {
  background: var(--cosmic-dark-navy);
  border-radius: var(--border-radius);
  padding: 2rem;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  margin: 2rem auto;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--cosmic-border);
  z-index: 5;
  animation: simpleFadeIn 0.6s ease-out forwards;
  color: var(--cosmic-dark-gray);
}

.sign-display {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: bold;
  color: var(--cosmic-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.teaser-content {
  margin-bottom: 2rem;
}

.sneak-peeks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.preview-category {
  background: var(--cosmic-dark-navy);
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--cosmic-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Zodiac Compatibility Mini-Quiz Styles */
.compatibility-section {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  background: rgba(0, 195, 137, 0.05);
  border: 1px solid rgba(0, 195, 137, 0.2);
}

.compatibility-section h3 {
  margin-bottom: 0.75rem;
  color: var(--cosmic-accent);
  font-weight: 600;
}

.compatibility-selector {
  margin-top: 1rem;
}

.zodiac-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .zodiac-buttons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .zodiac-buttons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

.zodiac-button {
  padding: 0.75rem 0.5rem;
  border-radius: var(--border-radius);
  background: var(--cosmic-dark-navy);
  border: 1px solid var(--cosmic-border);
  color: var(--cosmic-dark-gray);
  font-family: var(--body-font);
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  width: 100%;
  height: 100%;
  min-height: 90px;
  aspect-ratio: 1/1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.zodiac-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.zodiac-name {
  font-size: 0.8rem;
  display: block;
  font-weight: 500;
}

.zodiac-button:hover {
  background: var(--cosmic-gray);
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.zodiac-button.active {
  background: rgba(0, 195, 137, 0.1);
  border-color: var(--cosmic-accent);
  color: var(--cosmic-accent);
  box-shadow: 0 2px 8px rgba(0, 195, 137, 0.2);
}

.btn-secondary {
  background: var(--cosmic-bronze); /* Match primary button color */
  color: white;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-speed);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(173, 127, 88, 0.3);
}

.btn-secondary:hover {
  background: var(--cosmic-bronze-hover); /* Lighter bronze on hover */
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(173, 127, 88, 0.5), 0 4px 15px rgba(173, 127, 88, 0.3);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.compatibility-result {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: var(--border-radius);
  background: var(--cosmic-dark-navy);
  border: 1px solid var(--cosmic-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  min-height: 100px;
  display: none;
}

.compatibility-result.active {
  display: block;
  animation: simpleFadeIn 0.5s ease-out forwards;
}

.compatibility-cta {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(to right, rgba(0, 195, 137, 0.08), rgba(33, 150, 243, 0.08));
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 195, 137, 0.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-message {
  text-align: left;
  flex: 1;
}

.cta-message h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.cta-message p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.cta-button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.countdown-badge-horizontal {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 59, 48, 0.1);
  border-radius: 4px;
  color: #e02f26;
  font-weight: bold;
}

.compatibility-cta .btn-primary {
  margin: 0;
  padding: 0.6rem 1.25rem;
  white-space: nowrap;
}

/* Responsive design for mobile */
@media (max-width: 600px) {
  .cta-content {
    flex-direction: column;
    text-align: center;
  }

  .cta-message {
    text-align: center;
    margin-bottom: 0.75rem;
  }
}

.compatibility-cta .countdown-display {
  font-family: monospace;
  font-weight: 700;
  background: rgba(255, 59, 48, 0.15);
  padding: 0.2rem 0.4rem;
  border-radius: 5px;
  margin-left: 0.25rem;
  color: #e02f26;
}

/* Highlight attention class for the unlock button */
.highlight-attention {
  animation: bounceAttention 1.5s ease;
  box-shadow: 0 6px 20px rgba(0, 195, 137, 0.4), 0 0 0 2px rgba(0, 195, 137, 0.2);
  transform: scale(1.03);
  position: relative;
  z-index: 10;
}

@keyframes bounceAttention {
  0%, 20%, 50%, 80%, 100% { transform: scale(1.03); }
  40% { transform: scale(1.05) translateY(-6px); }
  60% { transform: scale(1.03) translateY(-3px); }
}

.compatibility-score {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.compatibility-meter {
  height: 10px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  overflow: hidden;
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.compatibility-fill {
  height: 100%;
  background: linear-gradient(to right, #ff3e3e, #ffb302, var(--cosmic-accent));
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

.compatibility-sign-pair {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.compatibility-sign {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.compatibility-symbol {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.compatibility-descriptor {
  font-weight: bold;
  color: var(--cosmic-accent);
  margin-bottom: 0.5rem;
}

.match-details {
  margin-top: 1rem;
}

.full-reading {
  position: relative;
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  background: var(--cosmic-dark-navy);
  border: 1px solid var(--cosmic-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden; /* Ensure content doesn't spill out */
  color: var(--cosmic-dark-gray);
}

.blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.65);
  z-index: 1;
}

/* Safari-specific fix */
@supports (-webkit-touch-callout: none) {
  .full-content {
    visibility: visible; /* Ensure content is visible */
    color: var(--cosmic-dark-gray); /* Match text color with rest of site */
  }

  .blur-overlay {
    background: rgba(255, 255, 255, 0.7); /* Lighter background for Safari */
  }
}

.lock-icon {
  width: 40px;
  height: 40px;
  filter: invert(55%) sepia(89%) saturate(1401%) hue-rotate(126deg) brightness(93%) contrast(89%); /* Makes lock icon green */
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes pulse{
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.cta-section {
  text-align: center;
  margin-top: 2rem;
}

.countdown-badge {
  display: inline-block;
  background: rgba(255, 59, 48, 0.1);
  color: #e02f26;
  padding: 0.75rem 1.25rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  font-weight: 600;
  border: 1px solid rgba(255, 59, 48, 0.3);
  animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

#countdown {
  font-family: monospace;
  font-weight: 700;
  background: rgba(255, 59, 48, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  margin-left: 0.25rem;
  color: #e02f26;
}

.premium-tag {
  font-size: 0.9rem;
  font-weight: 600;
  color: #9060ff;
  margin-top: 0.75rem;
  animation: fadeUp 0.5s ease forwards;
}

.premium-teaser {
  color: #9060ff;
  font-size: 0.85rem;
  margin-top: 1rem;
  text-align: center;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  background: rgba(144, 96, 255, 0.08);
  border: 1px dashed rgba(144, 96, 255, 0.3);
  animation: fadeIn 1s ease forwards;
}

.premium-insight {
  color: #9060ff;
  font-size: 0.9rem;
  margin-top: 1.25rem;
  font-weight: 500;
}

.reading-teaser {
  border-top: 1px solid var(--cosmic-border);
  margin-top: 1rem;
  padding-top: 0.75rem;
  color: var(--cosmic-dark-gray);
}

.btn-icon {
  margin-right: 0.5rem;
  font-size: 1.2em;
}

.btn-text {
  position: relative;
  z-index: 5;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.reassurance {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4rem 0.5rem;
  border-top: 1px solid var(--cosmic-border);
  text-align: center;
  background: var(--cosmic-dark-navy);
  z-index: 10;
  overflow: hidden; /* Prevent scrolling */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.ratings {
  margin-bottom: 0.4rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.stars-rating {
  color: #ffb400;
  font-size: 0.85rem;
  margin-bottom: 0.1rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stars-rating span:first-child {
  font-size: 0.9rem;
  letter-spacing: -1px;
}

.stars-rating span:last-child {
  margin-left: 0.3rem;
  font-size: 0.8rem;
}

.featured-in {
  margin-bottom: 0.4rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.featured-in p {
  color: #666;
  margin-bottom: 0;
  font-size: 0.75rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.logo {
  display: inline-block;
  background: rgba(0, 195, 137, 0.1);
  padding: 0.1rem 0.4rem;
  margin: 0 0.2rem;
  border-radius: 15px;
  font-size: 0.65rem;
  font-weight: bold;
  border: 1px solid rgba(0, 195, 137, 0.2);
  color: var(--cosmic-dark-gray);
  font-family: var(--font-heading);
  letter-spacing: 0.3px;
}

.legal {
  font-size: 0.6rem;
  color: #888;
  margin-top: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.legal a {
  margin: 0 0.3rem;
  text-decoration: underline;
  color: var(--cosmic-accent);
  white-space: nowrap;
}

.legal span {
  white-space: nowrap;
}

/* Responsive footer adjustments */
@media (max-width: 480px) {
  footer {
    padding: 0.3rem 0.3rem;
    min-height: 75px;
  }
  
  .stars-rating {
    font-size: 0.75rem;
  }
  
  .stars-rating span:last-child {
    font-size: 0.7rem;
  }
  
  .featured-in p {
    font-size: 0.7rem;
  }
  
  .logo {
    font-size: 0.6rem;
    padding: 0.08rem 0.3rem;
    margin: 0 0.15rem;
  }
  
  .legal {
    font-size: 0.55rem;
  }
  
  .legal a {
    margin: 0 0.2rem;
  }
}

@media (max-width: 380px) {
  footer {
    min-height: 70px;
  }
  
  .featured-in p {
    font-size: 0.65rem;
  }
  
  .logo {
    font-size: 0.55rem;
    padding: 0.05rem 0.25rem;
    margin: 0 0.1rem;
  }
  
  .legal {
    font-size: 0.5rem;
    gap: 0.2rem;
  }
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-selector select {
    background: var(--cosmic-dark-navy);
    border: 2px solid var(--cosmic-bronze);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--cosmic-light);
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background: var(--cosmic-navy);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(173, 127, 88, 0.3);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--cosmic-bronze-hover);
    box-shadow: 0 0 0 3px rgba(173, 127, 88, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 1.8rem;
    }

    .language-selector {
        top: 10px;
        right: 10px;
    }

    .language-selector select {
        font-size: 12px;
        padding: 6px 8px;
    }

  .question-card, .results-container {
    position: fixed !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    padding: 1.5rem 1rem !important;
  }

  .hero-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 400px !important;
    padding: 1rem !important;
  }

  .lead-form {
    padding: 1.2rem !important;
    margin: 0 !important;
  }

  .form-group {
    margin-bottom: 1rem !important;
  }

  .date-inputs {
    gap: 0.3rem !important;
  }

  .date-inputs select {
    padding: 0.6rem !important;
    font-size: 0.9rem !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
  }

  /* Results page mobile optimizations */
  .results-container {
    margin: 1rem auto !important;
    max-height: 70vh !important;
    top: 45% !important;
    transform: translate(-50%, -50%) !important;
    padding-bottom: 2rem !important;
  }

  .results-container h2 {
    font-size: 1.4rem !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
  }

  .cta-section {
    margin: 1rem 0 !important;
  }

  .countdown-badge {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.8rem !important;
    margin-bottom: 0.8rem !important;
  }

  .btn-primary {
    padding: 0.8rem 1rem !important;
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    min-height: 48px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    text-align: center !important;
  }

  .premium-tag {
    font-size: 0.8rem !important;
    margin-top: 0.5rem !important;
  }

  .sneak-peeks {
    gap: 0.8rem !important;
  }

  .preview-category h3 {
    font-size: 1rem !important;
  }

  .preview-category p {
    font-size: 0.85rem !important;
  }

  .teaser-content {
    margin-bottom: 1.5rem !important;
  }

  .full-reading {
    margin-bottom: 1rem !important;
  }

  /* iOS Safari specific fix for virtual keyboard */
  @supports (-webkit-appearance: none) {
    .question-card, .results-container, .hero-content {
      top: 45% !important;
    }
  }
}

/* Extra Small Screens like iPhone SE */
@media (max-width: 380px) {
  .hero-content {
    padding-top: 0;
  }

  h2 {
    font-size: 1.3rem;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
  }

  .sub-headline {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .sign-display {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .results-container {
    padding: 1.5rem 1rem;
  }

  .teaser-content {
    margin-bottom: 1rem;
  }

  .full-reading {
    margin-top: 1rem;
    padding: 1rem;
  }

  .btn-primary {
    font-size: 1.1rem;
    padding: 0.7rem 0.8rem;
    letter-spacing: 0.1px;
    line-height: 1.2;
    min-height: 44px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
  }

  .countdown-badge {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }

  .question-card,
  .results-container {
    top: 42%;
    max-height: 85%;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  animation: modalFadeIn 0.5s;
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.modal-content h3 {
  margin: 0 0 15px 0;
  color: var(--cosmic-purple);
  font-size: 22px;
}

.modal-content p {
  margin: 0 0 20px 0;
  color: #444;
  font-size: 16px;
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 195, 137, 0.3);
  border-radius: 50%;
  border-top-color: var(--cosmic-accent);
  animation: spin 1s ease-in-out infinite;
}

@keyframes modalFadeIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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