/**
 * Lightfaden Light-Test Styles
 * Brand: #2D4356 (navy), #E76F51 (orange), #A3B18A (green)
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Work+Sans:wght@400;500;600;700&display=swap');

/* Base Container */
.lf-light-test {
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 600px;
  margin: 0 auto;
  background: #2D4356;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(45, 67, 86, 0.3);
}

.lf-light-test * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Screens */
.lf-screen {
  display: none;
  padding: 48px 40px;
  min-height: 500px;
}

.lf-screen.active {
  display: block;
  animation: lfFadeIn 0.4s ease;
}

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

.lf-screen-content {
  text-align: center;
}

/* Typography */
.lf-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #A3B18A;
  margin-bottom: 20px;
}

.lf-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 38px;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 16px;
}

.lf-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Intro Areas */
.lf-intro-areas {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.lf-area-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.lf-area-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
}

.lf-area-icon {
  width: 36px;
  height: 36px;
}

.lf-area-icon svg {
  width: 100%;
  height: 100%;
}

.lf-area-name {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.lf-intro-info {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 32px;
}

/* Buttons */
.lf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 40px;
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.lf-btn svg {
  width: 18px;
  height: 18px;
}

.lf-btn-primary {
  background: linear-gradient(135deg, #E76F51, #d45a3d);
  color: #FFFFFF;
  box-shadow: 0 6px 24px rgba(231, 111, 81, 0.4);
}

.lf-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(231, 111, 81, 0.5);
}

.lf-btn-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.lf-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Quiz Screen */
.lf-screen-quiz {
  padding: 32px 40px;
}

/* Progress */
.lf-quiz-progress {
  margin-bottom: 40px;
}

.lf-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.lf-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #E76F51, #A3B18A);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.lf-progress-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  display: block;
}

/* Questions */
.lf-questions {
  position: relative;
  min-height: 320px;
}

.lf-question {
  display: none;
  text-align: center;
  animation: lfQuestionIn 0.4s ease;
}

.lf-question.active {
  display: block;
}

@keyframes lfQuestionIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.lf-question-category {
  display: inline-block;
  padding: 8px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 50px;
  margin-bottom: 28px;
}

.lf-question-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.4;
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Answer Buttons */
.lf-answers {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.lf-answer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 130px;
  padding: 20px 24px;
  font-family: 'Work Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lf-answer-check {
  font-size: 14px;
  opacity: 0.7;
}

.lf-answer-btn:hover {
  transform: translateY(-4px);
}

.lf-answer-btn[data-answer="1"]:hover {
  background: #A3B18A;
  border-color: #A3B18A;
  box-shadow: 0 10px 30px rgba(163, 177, 138, 0.4);
}

.lf-answer-btn[data-answer="0"]:hover {
  background: #E76F51;
  border-color: #E76F51;
  box-shadow: 0 10px 30px rgba(231, 111, 81, 0.4);
}

.lf-answer-btn.selected {
  transform: scale(0.95);
}

/* Email Screen */
.lf-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: #A3B18A;
}

.lf-success-icon svg {
  width: 100%;
  height: 100%;
}

/* Form - FIXED STYLING */
.lf-email-form {
  max-width: 360px;
  margin: 0 auto;
  text-align: left;
}

.lf-form-group {
  margin-bottom: 16px;
}

.lf-form-group input[type="text"],
.lf-form-group input[type="email"] {
  width: 100%;
  padding: 16px 20px;
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
  color: #2D4356;
  background: #FFFFFF;
  border: 2px solid #FFFFFF;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.lf-form-group input:focus {
  outline: none;
  border-color: #A3B18A;
  box-shadow: 0 0 0 4px rgba(163, 177, 138, 0.25);
}

.lf-form-group input::placeholder {
  color: #7a8a8a;
}

/* Checkbox */
.lf-checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.lf-checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: #A3B18A;
  cursor: pointer;
}

.lf-checkbox-group a {
  color: #A3B18A;
  text-decoration: underline;
}

.lf-checkbox-group a:hover {
  color: #FFFFFF;
}

.lf-form-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-top: 16px;
}

.lf-email-form .lf-btn {
  width: 100%;
  margin-top: 24px;
}

/* Results Screen */
.lf-screen-results {
  padding: 48px 40px;
}

/* Score Circle */
.lf-score-display {
  margin-bottom: 40px;
}

.lf-score-circle {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
}

.lf-score-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.lf-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 8;
}

.lf-ring-fill {
  fill: none;
  stroke: url(#scoreGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 1.5s ease;
}

.lf-score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.lf-score-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 52px;
  font-weight: 500;
  color: #FFFFFF;
  display: block;
  line-height: 1;
}

.lf-score-max {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
}

.lf-score-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

/* Score Breakdown */
.lf-score-breakdown {
  max-width: 360px;
  margin: 0 auto 40px;
}

.lf-score-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.lf-item-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lf-item-name {
  width: 90px;
  min-width: 90px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.lf-item-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.lf-item-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 1s ease 0.3s;
}

.lf-item-value {
  width: 35px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
}

/* Result Message */
.lf-result-message {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 40px;
  text-align: center;
}

.lf-result-message h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.lf-result-message p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
}

.lf-result-message.level-high { border-left: 4px solid #A3B18A; }
.lf-result-message.level-medium { border-left: 4px solid #E76F51; }
.lf-result-message.level-low { border-left: 4px solid #f4a261; }
.lf-result-message.level-verylow { border-left: 4px solid #FFFFFF; }

/* CTA */
.lf-result-cta {
  text-align: center;
}

.lf-result-cta > p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
}

.lf-result-cta .lf-btn {
  margin: 0 8px 12px;
}

/* Loading */
.lf-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.lf-btn.loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: lfSpin 0.8s linear infinite;
  margin-left: 8px;
}

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

/* Error */
.lf-error {
  background: rgba(231, 111, 81, 0.2);
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  text-align: center;
}

/* Mobile */
@media (max-width: 600px) {
  .lf-light-test {
    margin: 0 16px;
    border-radius: 20px;
  }
  
  .lf-screen {
    padding: 36px 24px;
    min-height: auto;
  }
  
  .lf-title {
    font-size: 30px;
  }
  
  .lf-intro-areas {
    flex-direction: column;
    gap: 10px;
  }
  
  .lf-area-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 14px 20px;
  }
  
  .lf-question-text {
    font-size: 22px;
  }
  
  .lf-answers {
    flex-direction: column;
    gap: 12px;
  }
  
  .lf-answer-btn {
    width: 100%;
  }
  
  .lf-result-cta .lf-btn {
    display: block;
    width: 100%;
    margin: 0 0 12px 0;
  }
}
