/* CAT CAPTCHA STYLES 🐱🔒 */

.cat-captcha-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cat-captcha-overlay.active {
  opacity: 1;
}

.cat-captcha-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 25px;
  padding: 35px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
  max-width: 500px;
  width: 90%;
  animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}

.cat-captcha-header {
  text-align: center;
  margin-bottom: 25px;
}

.cat-captcha-header h2 {
  color: white;
  font-size: 2rem;
  margin: 0 0 15px 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  animation: rainbow 3s linear infinite;
}

.cat-captcha-instruction {
  color: white;
  font-size: 1.1rem;
  margin: 0;
  padding: 15px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.cat-captcha-instruction strong {
  color: #ffd700;
  font-size: 1.2rem;
}

/* Grid Layout */
.cat-captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 25px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

/* Individual Tiles */
.cat-captcha-tile {
  aspect-ratio: 1;
  background: white;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 3px solid transparent;
}

.cat-captcha-tile:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 215, 0, 0.5);
}

.cat-captcha-tile:active {
  transform: translateY(-2px) scale(1.02);
}

/* Selected state */
.cat-captcha-tile.selected {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-color: #ffd700;
  box-shadow:
    0 8px 25px rgba(245, 87, 108, 0.5),
    0 0 20px rgba(255, 215, 0, 0.5);
}

.cat-captcha-tile.selected .tile-emoji {
  transform: scale(1.2);
}

.tile-emoji {
  font-size: 3rem;
  transition: transform 0.3s ease;
  user-select: none;
}

/* Checkmark */
.tile-checkmark {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #ffd700;
  color: white;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  font-weight: bold;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cat-captcha-tile.selected .tile-checkmark {
  opacity: 1;
  transform: scale(1);
}

/* Footer Buttons */
.cat-captcha-footer {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.cat-captcha-btn {
  flex: 1;
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.verify-btn {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
}

.verify-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(67, 233, 123, 0.5);
}

.refresh-btn {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: white;
}

.refresh-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(250, 112, 154, 0.5);
}

.cat-captcha-btn:active {
  transform: translateY(-1px);
}

/* Message */
.cat-captcha-message {
  margin-top: 20px;
  padding: 15px;
  border-radius: 15px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-captcha-message.success {
  background: rgba(67, 233, 123, 0.3);
  color: white;
  border: 2px solid #43e97b;
  animation: successPulse 0.5s ease;
}

.cat-captcha-message.error {
  background: rgba(245, 87, 108, 0.3);
  color: white;
  border: 2px solid #f5576c;
  animation: errorShake 0.5s ease;
}

/* Confetti */
.cat-captcha-confetti {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rainbow {
  0% {
    filter: hue-rotate(0deg);
  }

  100% {
    filter: hue-rotate(360deg);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-10px);
  }

  75% {
    transform: translateX(10px);
  }
}

.cat-captcha-container.shake {
  animation: shake 0.5s ease;
}

@keyframes successPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes errorShake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

@keyframes confettiFall {
  0% {
    transform: translate(0, -20px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translate(var(--end-x), var(--end-y)) rotate(720deg);
    opacity: 0;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .cat-captcha-container {
    padding: 25px;
    width: 95%;
  }

  .cat-captcha-header h2 {
    font-size: 1.5rem;
  }

  .cat-captcha-instruction {
    font-size: 1rem;
    padding: 12px;
  }

  .cat-captcha-grid {
    gap: 8px;
    padding: 15px;
  }

  .tile-emoji {
    font-size: 2.5rem;
  }

  .cat-captcha-btn {
    font-size: 1rem;
    padding: 12px 20px;
  }

  .cat-captcha-message {
    font-size: 1rem;
    padding: 12px;
  }

  .tile-checkmark {
    width: 20px;
    height: 20px;
    font-size: 0.9rem;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .cat-captcha-header h2 {
    font-size: 1.3rem;
  }

  .cat-captcha-instruction {
    font-size: 0.9rem;
  }

  .tile-emoji {
    font-size: 2rem;
  }

  .cat-captcha-footer {
    flex-direction: column;
    gap: 10px;
  }

  .cat-captcha-btn {
    width: 100%;
  }
}
