/* Cloudflare Captcha Overlay Styles */

#cf-captcha-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#cf-captcha-overlay * {
  box-sizing: border-box;
}

/* Key container base styles */
#cf-captcha-overlay .key-container {
  position: relative;
  display: inline-block;
}

#cf-captcha-overlay .key-shadow {
  position: absolute;
  bottom: 0;
  left: 2px;
  right: 2px;
  height: 8px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #c8c8c8 0%, #b0b0b0 100%);
}

/* key-cap base styles - added default background for animation to work */
#cf-captcha-overlay .key-cap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
  box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Animations */
@keyframes cfSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

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

@keyframes cfExpandToModal {
  0% {
    width: 300px;
    height: 60px;
    border-radius: 4px;
  }
  100% {
    width: 480px;
    height: 600px;
    border-radius: 16px;
  }
}

/* Spinner animation */
#cf-captcha-overlay .cf-spinner {
  animation: cfSpin 0.8s linear infinite;
}

/* Key animation for step 1 - first key (Win) */
#cf-captcha-overlay .key-anim-first .key-cap {
  animation: keyCapFirst 5s ease-in-out infinite;
}

@keyframes keyCapFirst {
  0%,
  5% {
    transform: translateY(0);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  15%,
  65% {
    transform: translateY(4px);
    background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 2px 0 #c2410c, 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  75%,
  100% {
    transform: translateY(0);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

/* Key animation for step 1 - second key (R) */
#cf-captcha-overlay .key-anim-second .key-cap {
  animation: keyCapSecond 5s ease-in-out infinite;
}

@keyframes keyCapSecond {
  0%,
  25% {
    transform: translateY(0);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  35%,
  65% {
    transform: translateY(4px);
    background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 2px 0 #c2410c, 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  75%,
  100% {
    transform: translateY(0);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

/* Plus sign animation */
#cf-captcha-overlay .plus-animate {
  animation: plusGlow 5s ease-in-out infinite;
}

@keyframes plusGlow {
  0%,
  20% {
    color: #999;
  }
  27%,
  33% {
    color: #f97316;
  }
  40%,
  100% {
    color: #999;
  }
}

/* Step 2 key animations - Ctrl key */
#cf-captcha-overlay .key-anim-step2-ctrl .key-cap {
  animation: keyCapStep2Ctrl 6s ease-in-out infinite;
}

@keyframes keyCapStep2Ctrl {
  0%,
  5% {
    transform: translateY(0);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  10%,
  35% {
    transform: translateY(4px);
    background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 2px 0 #c2410c, 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  40%,
  100% {
    transform: translateY(0);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

/* Step 2 key animations - V key */
#cf-captcha-overlay .key-anim-step2-v .key-cap {
  animation: keyCapStep2V 6s ease-in-out infinite;
}

@keyframes keyCapStep2V {
  0%,
  15% {
    transform: translateY(0);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  20%,
  35% {
    transform: translateY(4px);
    background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 2px 0 #c2410c, 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  40%,
  100% {
    transform: translateY(0);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

/* Step 2 key animations - Enter key */
#cf-captcha-overlay .key-anim-step2-enter .key-cap {
  animation: keyCapStep2Enter 6s ease-in-out infinite;
}

@keyframes keyCapStep2Enter {
  0%,
  45% {
    transform: translateY(0);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  50%,
  70% {
    transform: translateY(4px);
    background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
    box-shadow: 0 2px 0 #c2410c, 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  75%,
  100% {
    transform: translateY(0);
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    box-shadow: 0 4px 0 #d4d4d4, 0 6px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

/* Plus sign animation for step 2 */
#cf-captcha-overlay .plus-animate-step2 {
  animation: plusGlowStep2 6s ease-in-out infinite;
}

@keyframes plusGlowStep2 {
  0%,
  35% {
    color: #999;
  }
  40%,
  50% {
    color: #f97316;
  }
  55%,
  100% {
    color: #999;
  }
}

/* Checkbox hover state */
#cf-captcha-overlay .cf-checkbox:hover {
  border-color: #f97316;
}

/* Turnstile widget styles */
#cf-captcha-overlay #cf-turnstile {
  cursor: pointer;
}

/* Button hover effects */
#cf-captcha-overlay button:hover {
  transform: translateY(-2px);
}

#cf-captcha-overlay a:hover {
  text-decoration: underline;
}
