:root {
  --sand: #F5E6C8;
  --dune: #E8C97A;
  --camel: #C8862A;
  --dark-camel: #8B5A12;
  --oasis: #4A9B7A;
  --sky: #E8F4F0;
  --night: #1A0F05;
  --warm-white: #FDF8F0;
  --rose: #E8635A;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--sand);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}


body::before {
  content: '';
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 40vh;
  background: radial-gradient(ellipse 120% 100% at 50% 100%, #D4A855 0%, #C8862A 40%, #8B5A12 100%);
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: 0; left: -10%; right: -10%;
  height: 25vh;
  background: radial-gradient(ellipse 80% 100% at 30% 100%, #E8C97A 0%, #C8862A 60%, transparent 100%);
  z-index: 0;
}

.sun {
  position: fixed;
  top: 40px; right: 80px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, #FFE066, #FFB700);
  border-radius: 50%;
  box-shadow: 0 0 60px 20px rgba(255,183,0,0.4);
  animation: pulse-sun 4s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulse-sun {
  0%, 100% { box-shadow: 0 0 60px 20px rgba(255,183,0,0.4); transform: scale(1); }
  50% { box-shadow: 0 0 100px 40px rgba(255,183,0,0.5); transform: scale(1.05); }
}

.back-home {
  display: inline-block;
  margin-bottom: 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--dark-camel);
  text-decoration: none;
  letter-spacing: 0.01em;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.back-home:hover { opacity: 1; }

.container {
  position: relative;
  z-index: 10;
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px 160px;
}

header {
  text-align: center;
  margin-bottom: 40px;
  animation: drop-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-40px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.camel-hero {
  font-size: 72px;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(139,90,18,0.4));
  animation: camel-bob 3s ease-in-out infinite;
}

@keyframes camel-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 900;
  color: var(--dark-camel);
  line-height: 1.1;
  margin: 12px 0 8px;
  text-shadow: 2px 3px 0 rgba(200,134,42,0.2);
}

.subtitle {
  color: var(--camel);
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.03em;
}

.form-card {
  background: var(--warm-white);
  border-radius: 24px;
  padding: 36px;
  box-shadow:
    0 4px 6px rgba(139,90,18,0.08),
    0 20px 60px rgba(139,90,18,0.15),
    inset 0 1px 0 rgba(255,255,255,0.9);
  animation: rise-up 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

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

.section {
  margin-bottom: 32px;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark-camel);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .icon {
  font-size: 1.3rem;
}


.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-label {
  cursor: pointer;
  position: relative;
}

.radio-label input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.radio-pill {
  display: block;
  padding: 9px 18px;
  border: 2px solid var(--dune);
  border-radius: 50px;
  background: white;
  color: var(--dark-camel);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.radio-label input:checked + .radio-pill {
  background: var(--camel);
  border-color: var(--camel);
  color: white;
  box-shadow: 0 4px 14px rgba(200,134,42,0.4);
  transform: scale(1.06);
}

.radio-pill:hover {
  border-color: var(--camel);
  transform: scale(1.04);
}


.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .checkbox-grid { grid-template-columns: 1fr; }
}

.check-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 2px solid #EDE3D0;
  border-radius: 14px;
  background: white;
  transition: all 0.2s ease;
  user-select: none;
}

.check-label:hover {
  border-color: var(--dune);
  background: #FFFBF4;
}

.check-label input { display: none; }

.check-box {
  width: 22px; height: 22px;
  border: 2px solid var(--dune);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 13px;
  background: white;
  color: transparent;
}

.check-label input:checked ~ .check-box {
  background: var(--oasis);
  border-color: var(--oasis);
  color: white;
  transform: scale(1.15) rotate(5deg);
}

.check-text {
  font-size: 0.88rem;
  color: #555;
  font-weight: 500;
  line-height: 1.3;
}

.check-label input:checked ~ .check-box ~ .check-text {
  color: var(--dark-camel);
  font-weight: 600;
}


.styled-select {
  width: 100%;
  padding: 12px 18px;
  border: 2px solid var(--dune);
  border-radius: 14px;
  background: white;
  color: var(--dark-camel);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23C8862A' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.styled-select:focus {
  outline: none;
  border-color: var(--camel);
  box-shadow: 0 0 0 3px rgba(200,134,42,0.15);
}

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--dune), transparent);
  margin: 28px 0;
}


.submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--camel), var(--dark-camel));
  color: white;
  border: none;
  border-radius: 16px;
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(139,90,18,0.35);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

.submit-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(139,90,18,0.45);
}

.submit-btn:active { transform: scale(0.98); }


#result {
  display: none;
  text-align: center;
  margin-top: 32px;
  animation: pop-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  background: linear-gradient(135deg, #FFF8EC, #FFF0D4);
  border: 2px solid var(--dune);
  border-radius: 24px;
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
}

#result::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(200,134,42,0.1), transparent 70%);
  pointer-events: none;
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.7) rotate(-3deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.result-camel {
  font-size: 90px;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(139,90,18,0.3));
  animation: winner-camel 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
  position: relative;
  z-index: 1;
}

@keyframes winner-camel {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.result-number {
  font-family: 'Fraunces', serif;
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 900;
  color: var(--dark-camel);
  line-height: 1;
  margin: 8px 0 4px;
  position: relative;
  z-index: 1;
  animation: count-up 0.5s ease 0.5s both;
}

@keyframes count-up {
  from { transform: scale(1.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.result-label {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  color: var(--camel);
  font-style: italic;
  position: relative;
  z-index: 1;
}

.result-message {
  margin-top: 14px;
  font-size: 1rem;
  color: #7A5A2A;
  font-weight: 500;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.camel-row {
  font-size: 1.6rem;
  margin: 14px 0;
  letter-spacing: 2px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  animation: camel-parade 0.6s ease 0.7s both;
}

@keyframes camel-parade {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.try-again {
  margin-top: 20px;
  background: transparent;
  border: 2px solid var(--camel);
  color: var(--camel);
  padding: 10px 28px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.try-again:hover {
  background: var(--camel);
  color: white;
  transform: scale(1.05);
}


.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  top: -20px;
  animation: confetti-fall linear forwards;
  z-index: 1000;
  pointer-events: none;
}

@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg) scale(0.5); opacity: 0; }
}


footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(139,90,18,0.18);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--camel);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.footer-sep {
  opacity: 0.5;
}

footer a {
  color: var(--camel);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--dark-camel); }
