/* Login Page Styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  padding-top: 100px;
  /* Add padding to account for navbar */
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  position: relative;
  overflow: hidden;
}

.login-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeIn 0.5s ease-out;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: #a0a0a0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  color: #ffffff;
  font-size: 0.9rem;
}

.password-label-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-password {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password svg {
  fill: #a0a0a0;
  transition: fill 0.3s ease;
}

.toggle-password:hover svg {
  fill: #ffffff;
}

.toggle-password.show svg {
  fill: #4ecdc4;
}

.form-group input {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #4ecdc4;
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.2);
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #a0a0a0;
}

.remember-me input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #a0a0a0;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: all 0.3s ease;
}

.remember-me input:checked+.checkmark {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-color: transparent;
}

.remember-me input:checked+.checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
}

.forgot-password {
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.forgot-password:hover {
  opacity: 0.8;
}

.login-button {
  padding: 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

.signup-prompt {
  text-align: center;
  margin-top: 2rem;
  color: #a0a0a0;
}

.signup-prompt a {
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.signup-prompt a:hover {
  opacity: 0.8;
}

.login-decoration {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  pointer-events: none;
}

.floating-card {
  position: absolute;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: float 6s ease-in-out infinite;
}

.floating-card.card-1 {
  width: 200px;
  height: 300px;
  top: 20%;
  right: 20%;
  animation-delay: 0s;
  background: linear-gradient(45deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
}

.floating-card.card-2 {
  width: 150px;
  height: 250px;
  top: 40%;
  right: 40%;
  animation-delay: -2s;
  background: linear-gradient(45deg, rgba(78, 205, 196, 0.1), rgba(255, 107, 107, 0.1));
}

.floating-card.card-3 {
  width: 180px;
  height: 280px;
  top: 60%;
  right: 25%;
  animation-delay: -4s;
  background: linear-gradient(45deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
}

/* Success Modal Styles */
.success-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.success-modal.active {
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #1a1a2e;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.success-modal.active .modal-content {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(45deg, #4ecdc4, #2eaf7d);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon svg {
  fill: white;
}

.modal-title {
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1rem;
}

.modal-text {
  color: #a0a0a0;
  margin-bottom: 1.5rem;
}

.modal-close {
  padding: 0.75rem 2rem;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

/* Error Modal Styles */
.error-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error-modal.active {
  opacity: 1;
}

.error-modal .modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  background: #1a1a2e;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  border: 1px solid rgba(255, 107, 107, 0.2);
  animation: shake 0.5s ease-in-out;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: all 0.3s ease;
}

.error-modal.active .modal-content {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
@keyframes shake {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translate(-52%, -50%) scale(1);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translate(-48%, -50%) scale(1);
  }
}

.error-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.error-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 4px solid #ff6b6b;
  border-radius: 50%;
  animation: errorCircle 1.5s ease infinite;
}

.error-x {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
}

.error-x::before,
.error-x::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 4px;
  background: #ff6b6b;
  border-radius: 2px;
}

.error-x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.error-x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes errorCircle {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

.error-title {
  color: #ff6b6b;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.error-message {
  color: #a0a0a0;
  margin-bottom: 1.5rem;
}

.error-close {
  background: rgba(255, 107, 107, 0.2);
  border: none;
  border-radius: 8px;
  color: #ff6b6b;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.error-close:hover {
  background: rgba(255, 107, 107, 0.3);
  transform: translateY(-2px);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes popIn {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .login-container {
    padding: 0.5rem;
    padding-top: 70px;
    min-height: calc(100vh - 70px);
    align-items: flex-start;
  }

  .login-card {
    padding: 1.5rem;
    margin: 1rem auto;
    max-width: calc(100% - 2rem);
    backdrop-filter: blur(8px);
  }

  .login-decoration {
    display: none;
  }

  .login-header h1 {
    font-size: 1.75rem;
  }

  .login-header p {
    font-size: 0.9rem;
  }

  .form-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .modal-content {
    width: calc(100% - 2rem);
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    margin: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .form-group input {
    font-size: 16px;
    /* Previene zoom en iOS */
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 0.5rem;
    padding-top: 60px;
  }

  .login-card {
    padding: 1.25rem;
    border-radius: 12px;
    margin: 0.5rem auto;
  }

  .login-header h1 {
    font-size: 1.5rem;
  }

  .login-header p {
    font-size: 0.875rem;
  }

  .form-group label {
    font-size: 0.875rem;
  }

  .form-group input {
    padding: 0.875rem;
  }

  .login-button {
    padding: 0.875rem;
    font-size: 0.9rem;
  }

  .modal-content {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .remember-me {
    font-size: 0.875rem;
  }

  .signup-prompt {
    font-size: 0.875rem;
    margin-top: 1.5rem;
  }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
  .login-card {
    background: rgba(15, 15, 26, 0.9);
  }

  .modal-content {
    background: rgba(15, 15, 26, 0.95);
  }
}

/* Spinner Styles */
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

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

/* Error Message Styles */
.error-message {
  color: #ff6b6b;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.error-message.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* reCAPTCHA Badge Adjustments */
.grecaptcha-badge {
  position: fixed !important;
  bottom: 20px !important;
  z-index: 2 !important;
  visibility: visible !important;
  opacity: 0.8 !important;
  transform: scale(0.9) !important;
  transition: opacity 0.3s ease !important;
}

.grecaptcha-badge:hover {
  opacity: 1 !important;
}

/* Gradient Text Effect */
.gradient-text {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ff6b6b;
  /* Fallback */
  position: relative;
  z-index: 1;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .login-card,
  .floating-card,
  .success-icon,
  .modal-content,
  .error-circle,
  .error-message {
    animation: none !important;
    transition: none !important;
  }

  .login-button:hover,
  .modal-close:hover,
  .error-close:hover {
    transform: none !important;
  }
}

/* Focus Visible Styles */
:focus-visible {
  outline: 2px solid #4ecdc4;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Touch Device Optimizations */
@media (hover: none) {

  .login-button:hover,
  .modal-close:hover,
  .error-close:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Selection Styles */
::selection {
  background: rgba(78, 205, 196, 0.3);
  color: white;
  text-shadow: none;
}