/* Specific styles for this page only */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Animated background (adjusted z-index for this page) */
body::before {
  z-index: 1;
}

@media (max-width: 768px) {
  .container {
    max-width: calc(100%);
    padding: 0 15px;
  }
}

/* Header */
header {
  border-bottom: 1px solid rgba(189, 129, 95, 0.2);
}

.logo {
  font-size: 48px;
}

.nav-desktop a::after {
  bottom: -5px;
}

/* Main Content */
main {
  flex: 1;
}

.quiz-container {
  padding-top: 120px;
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.quiz-header {
  text-align: center;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s ease-out forwards;
}

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

.quiz-title {
  font-family: "Helvetica Neue", sans-serif;
  font-size: 128px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #bd815f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

/* Glowing effect */
.quiz-title::before {
  content: "GLOWSKYN";
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  background: linear-gradient(180deg, #bd815f 0%, #c68642 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: blur(20px);
  opacity: 0.5;
}

.quiz-subtitle {
  font-size: 24px;
  color: #999;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.3s forwards;
}

.quiz-description {
  font-size: 18px;
  color: #bd815f;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

/* Quiz Embed Container */
.quiz-embed-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out 0.7s forwards;
}

.quiz-embed-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(189, 129, 95, 0.2);
  border: 1px solid rgba(189, 129, 95, 0.3);
  min-height: 600px;
  position: relative;
  overflow: hidden;
}

.quiz-embed-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(189, 129, 95, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 20s linear infinite;
}

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

/* Loading state */
.loading-message {
  text-align: center;
  font-size: 20px;
  color: #bd815f;
  padding: 100px 20px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(189, 129, 95, 0.3);
  border-top-color: #bd815f;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

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

/* Responsive overrides */
@media (max-width: 1024px) {
  .quiz-title {
    font-size: 80px;
  }
}

@media (max-width: 768px) {
  .quiz-title {
    font-size: 60px;
  }

  .quiz-subtitle {
    font-size: 20px;
  }

  .quiz-description {
    font-size: 16px;
  }

  .quiz-embed-container {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .quiz-title {
    font-size: 48px;
  }

  .quiz-container {
    padding-top: 100px;
  }
}

/* Quiz Form Styles */
.quiz-form {
  position: relative;
  z-index: 10;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(189, 129, 95, 0.1);
  border-radius: 2px;
  margin-bottom: 40px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #bd815f, #c68642);
  border-radius: 2px;
  width: 8.33%;
  transition: width 0.5s ease;
  position: relative;
  box-shadow: 0 0 15px rgba(189, 129, 95, 0.6);
}

.quiz-step {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  animation: stepFadeIn 0.6s ease-out forwards;
}

.quiz-step.active {
  display: block;
}

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

.step-title {
  font-family: "Helvetica Neue", sans-serif;
  font-size: 36px;
  font-weight: 500;
  background: linear-gradient(180deg, #ffffff 0%, #bd815f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  line-height: 1.3;
}

.step-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 32px;
  font-weight: 300;
}

/* Form Controls */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  background: #000;
  border: 1px solid rgba(189, 129, 95, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  transition: all 0.3s ease;
  font-weight: 300;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #bd815f;
  background: #000;
  box-shadow: 0 0 15px rgba(189, 129, 95, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Radio and Checkbox Styles */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  background: #000;
  border: 1px solid rgba(189, 129, 95, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.radio-option::before,
.checkbox-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(189, 129, 95, 0.1),
    transparent
  );
  transition: left 0.7s;
}

.radio-option:hover::before,
.checkbox-option:hover::before {
  left: 100%;
}

.radio-option:hover,
.checkbox-option:hover {
  background: rgba(189, 129, 95, 0.05);
  border-color: rgba(189, 129, 95, 0.3);
  transform: translateX(5px);
}

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

.radio-custom,
.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(189, 129, 95, 0.3);
  border-radius: 50%;
  margin-right: 16px;
  position: relative;
  transition: all 0.3s ease;
  background: #000;
}

.checkbox-custom {
  border-radius: 6px;
}

.radio-custom::after,
.checkbox-custom::after {
  content: "";
  position: absolute;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.radio-custom::after {
  width: 10px;
  height: 10px;
  background: #bd815f;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
}

.checkbox-custom::after {
  content: "✓";
  color: #bd815f;
  font-size: 12px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
}

.radio-option input:checked ~ .radio-custom::after,
.checkbox-option input:checked ~ .checkbox-custom::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.radio-option input:checked ~ .radio-custom,
.checkbox-option input:checked ~ .checkbox-custom {
  border-color: #bd815f;
}

.radio-option input:checked ~ span:last-child {
  color: #bd815f;
}

.radio-option span:last-child,
.checkbox-option span:last-child {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 300;
  transition: color 0.3s ease;
}

/* Navigation Buttons */
.quiz-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  gap: 16px;
}

.nav-btn {
  padding: 14px 36px;
  background: transparent;
  color: #bd815f;
  border: 1px solid rgba(189, 129, 95, 0.3);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(189, 129, 95, 0.2),
    transparent
  );
  transition: left 0.6s;
}

.nav-btn:hover::before {
  left: 100%;
}

.nav-btn:hover {
  transform: translateY(-2px);
  border-color: #bd815f;
}

.next-btn,
.submit-btn {
  background: rgba(189, 129, 95, 0.6);
  border: none;
  color: #fff;
}

.next-btn:hover,
.submit-btn:hover {
  background: #bd815f;
  box-shadow: 0 8px 24px rgba(189, 129, 95, 0.3);
}

.prev-btn {
  background: transparent;
  border: 1px solid rgba(189, 129, 95, 0.2);
  color: rgba(255, 255, 255, 0.6);
}

.prev-btn:hover {
  background: rgba(189, 129, 95, 0.05);
  border-color: rgba(189, 129, 95, 0.5);
  color: #bd815f;
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Thank You Message */
.thank-you-message {
  text-align: center;
  padding: 60px 0;
}

.success-icon {
  font-size: 72px;
  margin-bottom: 32px;
  animation: glow 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes glow {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 15px rgba(189, 129, 95, 0.4));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 25px rgba(189, 129, 95, 0.6));
  }
}

.email-notice {
  font-size: 18px;
  color: #bd815f;
  margin-top: 24px;
  font-weight: 400;
  opacity: 0.8;
}

/* Override the container background to pure black */
.quiz-embed-container {
  background: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(189, 129, 95, 0.1) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

/* Remove the rotating background effect for cleaner look */
.quiz-embed-container::before {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .step-title {
    font-size: 28px;
  }

  .radio-option,
  .checkbox-option {
    padding: 14px 18px;
  }

  .nav-btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .quiz-navigation {
    flex-direction: column;
  }

  .nav-btn {
    width: 100%;
  }

  .step-title {
    font-size: 24px;
  }
}

/*
============================================================
== Final Polish for Quiz Results
============================================================
*/

/* Add spacing to the main section title's emojis */
.result-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Style the "Morning Routine" and "Evening Routine" sub-headers */
.result-section h4 {
    color: #c0c0c0;
    margin-top: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a2a;
    font-weight: 500;
    font-size: 1.2rem;
}

/* Style each step as a distinct "card" */
.routine-step {
    display: flex;
    align-items: flex-start; /* Aligns number to the top of text */
    gap: 18px;
    background-color: #1C1C1E; /* A slightly lighter dark for the card */
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    border: 1px solid #2a2a2a;
    border-left: 3px solid #D4AC79; /* Your gold accent color */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.routine-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.step-number {
    background-color: #D4AC79; /* Re-using gold accent */
    color: #121212;
    min-width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 3px; /* Better vertical alignment with the title */
}

.step-content h5 {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.step-content p {
    color: #a0a0a0;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}
.product-recs {
  margin-top: 15px;
  padding: 10px 15px;
  background-color: #121212;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  font-size: 0.9rem;
  color: #c0c0c0;
}

.product-recs strong {
  color: #D4AC79;
  font-weight: 500;
}
/* --- NEW: Styles for Improvised Results --- */

.rationale-section p {
    font-size: 18px;
    line-height: 1.7;
    color: #c0c0c0;
    background-color: #1C1C1E;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.skin-analysis-section .analysis-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.analysis-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.analysis-label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 150px; /* Fixed width for alignment */
    font-size: 16px;
}

.analysis-bar {
    flex: 1;
    height: 12px;
    background-color: #1C1C1E;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #bd815f, #c68642);
    border-radius: 6px;
    transition: width 1s ease-out;
}

.analysis-score {
    font-weight: 500;
    color: #fff;
    width: 40px; /* Fixed width for alignment */
    text-align: right;
}

@media (max-width: 480px) {
    .analysis-item {
        flex-wrap: wrap;
    }
    .analysis-label {
        width: 100%;
        margin-bottom: 5px;
    }
    .analysis-bar {
        order: 2;
    }
    .analysis-score {
        order: 3;
    }
}
/* --- ENHANCED SAVE PDF SECTION --- */

/* This targets the existing .email-notice class when it's inside the results */
.results-container .email-notice {
    text-align: center;
    background: linear-gradient(145deg, #2a2a2d 0%, #1c1c1e 100%);
    border: 1px solid #3a3a3a;
    border-top: 3px solid #D4AC79; /* Gold accent on top */
    padding: 35px;
    margin-top: 40px;
    border-radius: 16px;
    font-size: 1rem; /* Reset font size for this block */
    color: #b0b0b0; /* Reset color */
    opacity: 1; /* Reset opacity */
}

.results-container .email-notice h4 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #ffffff; /* Ensure heading color is white */
}

.results-container .email-notice p {
    font-size: 1rem;
    color: #b0b0b0;
    margin-bottom: 25px;
}

.save-routine-btn {
    background-color: #D4AC79;
    color: #121212;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.save-routine-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 172, 121, 0.1);
    opacity: 0.95;
}
/* Styling for dynamically generated results content */
.result-section { 
    margin-bottom: 40px; 
}

.result-section h4 { 
    color: #b0b0b0; 
    margin-top: 0; 
    margin-bottom: 15px; 
    font-weight: 500; 
}
/* --- Increase Quiz Container Width on Mobile --- */
/* --- Final Forceful Fix for Mobile Container Width --- */
@media (max-width: 768px) {
  .quiz-container .quiz-embed-wrapper {
    padding-left: 15px !important;  /* Increased from 10px */
    padding-right: 15px !important;
    max-width: 100% !important;  /* Add this line */
  }
}
@media (max-width: 768px) {
  .quiz-embed-container {
    padding: 20px 15px;  /* Reduce horizontal padding on mobile */
  }
}