/* ── Keyframe Animations ── */

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

@keyframes fadeSlideDown {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-30px); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
  0%   { box-shadow: 0 0 0 0 rgba(0, 124, 152, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(0, 124, 152, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 124, 152, 0); }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%      { opacity: 1; }
  90%      { opacity: 1; }
  100%     { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

@keyframes containerExit {
  from { opacity: 1; transform: scale(1); filter: blur(0); }
  to   { opacity: 0; transform: scale(0.95); filter: blur(4px); }
}

@keyframes containerEnter {
  from { opacity: 0; transform: scale(1.04); filter: blur(4px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* ── Floating Particles ── */

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -10px;
  width: 6px;
  height: 6px;
  background: rgba(0, 124, 152, 0.4);
  border-radius: 50%;
  animation: float linear infinite;
}

.particle:nth-child(1)  { left: 5%;  width: 4px;  height: 4px;  animation-duration: 14s; animation-delay: 0s; }
.particle:nth-child(2)  { left: 15%; width: 6px;  height: 6px;  animation-duration: 11s; animation-delay: 2s; }
.particle:nth-child(3)  { left: 25%; width: 3px;  height: 3px;  animation-duration: 16s; animation-delay: 4s; }
.particle:nth-child(4)  { left: 38%; width: 5px;  height: 5px;  animation-duration: 12s; animation-delay: 1s; }
.particle:nth-child(5)  { left: 50%; width: 4px;  height: 4px;  animation-duration: 18s; animation-delay: 3s; }
.particle:nth-child(6)  { left: 62%; width: 7px;  height: 7px;  animation-duration: 10s; animation-delay: 5s; }
.particle:nth-child(7)  { left: 72%; width: 3px;  height: 3px;  animation-duration: 15s; animation-delay: 0.5s; }
.particle:nth-child(8)  { left: 85%; width: 5px;  height: 5px;  animation-duration: 13s; animation-delay: 2.5s; }
.particle:nth-child(9)  { left: 92%; width: 4px;  height: 4px;  animation-duration: 17s; animation-delay: 4.5s; }
.particle:nth-child(10) { left: 45%; width: 6px;  height: 6px;  animation-duration: 11s; animation-delay: 6s; }

/* ── Base ── */

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  min-height: 100vh;
  background: #000;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* Transition states */
.main-container.anim-exit {
  animation: containerExit 0.35s ease-in forwards;
}

.main-container.anim-enter {
  animation: containerEnter 0.45s ease-out forwards;
}

.main-container img {
  width: 100%;
  max-width: 450px;
  height: auto;
}

.main-title {
  color: #FFF;
  text-align: center;
  font-family: Inter;
  font-size: 40px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  max-width: 700px;
  margin-bottom: -50px;
  z-index: 1;
  background-clip: text;
}

.main-under-title {
  color: #FFF;
  text-align: center;
  font-family: Inter;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  backdrop-filter: blur(2px);
  margin-top: -45px;
  max-width: 500px;
}

.main-under-subtitle {
  color: #FFF;
  text-align: center;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  max-width: 420px;
  margin-top: 0;
  margin-bottom: 50px;
}

button {
  background-color: #007C98;
  color: white;
  border: none;
  padding: 12px 16px;
  width: 200px;
  height: 40px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
}

.quiz-start-button:hover {
  background-color: #009bb8;
  box-shadow: 4px 4px 10px 0 #006F88;
}
/* Quiz */

.quiz-progress {
  color: rgba(255, 255, 255, 0.5);
  font-family: Inter;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 8px;
  animation: fadeSlideUp 0.5s ease-out both;
}

.quiz-progress-bar {
  width: 100%;
  max-width: 420px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-bottom: 40px;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #007C98, #00b4db, #007C98);
  background-size: 200% 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  animation: shimmer 2s ease-in-out infinite;
}

.quiz-question {
  color: #FFF;
  text-align: center;
  font-family: Inter;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  max-width: 500px;
  margin-bottom: 32px;
  animation: fadeSlideUp 0.5s ease-out 0.1s both;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 420px;
}

.quiz-option {
  background: #CACACA;
  color: #000;
  padding: 14px 20px;
  width: 100%;
  height: auto;
  text-align: left;
  font-family: Inter;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
  animation: fadeSlideLeft 0.4s ease-out both;
}

.quiz-option:nth-child(1) { animation-delay: 0.15s; }
.quiz-option:nth-child(2) { animation-delay: 0.25s; }
.quiz-option:nth-child(3) { animation-delay: 0.35s; }

.quiz-option:hover {
  background: #012638;
  box-shadow: 1px 2px 10px 0 #006F88;
  color: #FFF;
}

.quiz-option.selected {
  background: #007C98;
  border-color: #007C98;
  color: #FFF;
  transform: scale(1.03);
  animation: pulseGlow 0.8s ease-out;
}

.quiz-form-title{
  font-family: Inter;
  font-weight: 700;
  font-size: 36px;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;
  color: #FFF;
  max-width: 650px;
  animation: scaleIn 0.5s ease-out both;
}

.quiz-form-subtitle {
  font-family: Inter;
  font-weight: 300;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;
  color: white;
  margin-bottom: 60px;
  max-width: 650px;
  animation: fadeSlideUp 0.5s ease-out 0.15s both;
}

.quiz-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
  animation: fadeSlideUp 0.5s ease-out 0.3s both;
}

.quiz-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #006F88;
  border-radius: 8px;
  padding: 14px 16px;
  color: #FFF;
  font-family: Inter;
  font-size: 15px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease;
}

.quiz-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.quiz-input:focus {
  border-color: #007C98;
}

.quiz-input.error {
  border-color: #e74c3c;
}

.quiz-phone-group {
  display: flex;
  align-items: center;
  border: 1px solid #006F88;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.quiz-phone-group:focus-within {
  border-color: #007C98;
  box-shadow: 0 0 0 2px rgba(0, 124, 152, 0.25);
}

.quiz-phone-prefix {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-right: 1px solid rgba(0, 111, 136, 0.5);
  color: #FFF;
  font-size: 0.9rem;
  font-weight: 600;
  height: 100%;
  flex-shrink: 0;
}

.quiz-phone-flag {
  font-size: 1rem;
  line-height: 1;
}

.quiz-phone-code {
  letter-spacing: 0.04em;
}

.quiz-input--phone {
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
}

.quiz-input--phone:focus {
  box-shadow: none;
}

.quiz-phone-error {
  color: #e74c3c;
  font-family: Inter;
  font-size: 0.85rem;
  margin-top: 4px;
}

.quiz-alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-family: Inter;
  font-size: 14px;
  text-align: center;
}

.quiz-alert--success {
  background: rgba(39, 174, 96, 0.15);
  color: #27ae60;
  border: 1px solid rgba(39, 174, 96, 0.3);
}

.quiz-alert--error {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.quiz-submit {
  background-color: #007C98;
  color: white;
  border: none;
  padding: 14px 16px;
  width: 100%;
  height: auto;
  text-align: center;
  font-family: Inter;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  margin-top: 8px;
  transition: background-color 0.2s ease;
}

.quiz-submit:hover {
  background-color: #009bb8;
  box-shadow: 2px 3px 10px 0 #006F88;
}

.quiz-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quiz-thank-you {
  color: rgba(255, 255, 255, 0.7);
  font-family: Inter;
  font-size: 16px;
  font-weight: 300;
  text-align: center;
  max-width: 400px;
  line-height: 1.6;
  animation: fadeSlideUp 0.5s ease-out 0.2s both;
}

/* ── Mobile adaptation ── */

@media (max-width: 768px) {
  .main-container {
    padding: 0 10px;
  }

  .main-container img {
    max-width: 450px;
  }

  .main-title {
    font-size: 24px;
    max-width: 340px;
    margin-bottom: -40px;
  }

  .main-under-title {
    font-size: 15px;
    max-width: 320px;
    margin-top: -30px;
  }

  .main-under-subtitle {
    font-size: 12px;
    max-width: 300px;
    margin-bottom: 30px;
  }

  .quiz-question {
    font-size: 18px;
    max-width: 320px;
    margin-bottom: 24px;
  }

  .quiz-progress-bar {
    max-width: 300px;
    margin-bottom: 24px;
  }

  .quiz-options {
    max-width: 320px;
    gap: 10px;
  }

  .quiz-option {
    font-size: 13px;
    padding: 12px 16px;
  }

  .quiz-form-title {
    font-size: 22px;
    max-width: 320px;
  }

  .quiz-form-subtitle {
    font-size: 13px;
    max-width: 320px;
    margin-bottom: 30px;
  }

  .quiz-form {
    max-width: 300px;
  }

  .quiz-input {
    font-size: 14px;
    padding: 12px 14px;
  }

  .quiz-submit {
    font-size: 14px;
    padding: 12px 14px;
  }

  .quiz-thank-you {
    font-size: 14px;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding-bottom: 80px;
  }

  .main-container img {
    max-width: 100%;
  }

  .main-title {
    font-size: 20px;
    max-width: 100%;
    margin-bottom: -10px;
    padding-inline: 20px;
  }

  .main-under-title {
    font-size: 13px;
    max-width: 270px;
    margin-top: -20px;
  }

  .main-under-subtitle {
    font-size: 11px;
    max-width: 260px;
    margin-bottom: 24px;
  }

  button {
    font-size: 14px;
    width: 210px;
    height: 38px;
  }

  .quiz-question {
    font-size: 16px;
    max-width: 280px;
  }

  .quiz-options {
    max-width: 280px;
  }

  .quiz-option {
    font-size: 12px;
    padding: 10px 14px;
  }

  .quiz-form-title {
    font-size: 18px;
    max-width: 280px;
  }

  .quiz-form-subtitle {
    font-size: 12px;
    max-width: 280px;
    margin-bottom: 24px;
  }

  .quiz-form {
    max-width: 260px;
  }
}