/* Ho.fi - Simple and Clean Styling */

/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(-45deg, #667eea, #764ba2, #6b8dd6, #8e37d7);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 25px;
  animation: logoEntrance 0.8s ease-out;
}

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

.logo-icon {
  font-size: 3rem;
  filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.logo-text {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  animation: gradientShift 4s ease infinite;
  filter: drop-shadow(0 2px 4px rgba(118, 75, 162, 0.2));
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.tagline {
  color: #666;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

input[type='text'],
input[type='number'] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

input[type='text']:focus,
input[type='number']:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.captcha-challenge {
  background: #f8f9fa;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  width: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.result {
  margin-top: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  display: none;
}

.result.show {
  display: block;
}

.short-url {
  font-family: monospace;
  font-size: 18px;
  color: #667eea;
  font-weight: bold;
  word-break: break-all;
  margin: 10px 0;
}

.copy-btn {
  background: #28a745;
  padding: 8px 16px;
  font-size: 14px;
  margin-top: 10px;
  width: auto;
}

.copy-btn:hover {
  background: #218838;
}

.error {
  color: #dc3545;
  background: #f8d7da;
  border-left-color: #dc3545;
}

.loading {
  opacity: 0.7;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

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

/* reCAPTCHA styling */
.g-recaptcha {
  margin: 16px 0;
  display: flex;
  justify-content: center;
}

.error-message {
  color: #dc3545;
  font-size: 14px;
  margin-top: 8px;
  text-align: center;
  font-weight: 500;
}

.form-group .error-message {
  margin-top: 8px;
  margin-bottom: 0;
}

/* CAPTCHA Status Styling */
.captcha-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  color: #666;
}

.captcha-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .container {
    padding: 30px 20px;
    margin: 10px;
  }

  .logo {
    font-size: 2rem;
  }

  input[type='text'] {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Statistics Section */
.stats-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e1e5e9;
  text-align: left;
}

.stats-section h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.2rem;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e1e5e9;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
}

.stats-footer {
  text-align: center;
  font-size: 0.8rem;
  color: #999;
  margin-top: 15px;
}
