/* =============================================
   ARC ACADEMIA - Login Moderno
   Sistema de autenticación con diseño elegante
   ============================================= */

/* ===== VARIABLES CSS ===== */
:root {
  /* Colores Principales de ARC ACADEMIA */
  --primary-color: #667eea;
  --primary-dark: #5a67d8;
  --secondary-color: #764ba2;
  --accent-color: #10b981;
  --accent-hover: #059669;
  
  /* Colores de Texto */
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-light: #a0aec0;
  --text-white: #ffffff;
  
  /* Colores de Fondo */
  --bg-primary: #f7fafc;
  --bg-secondary: #edf2f7;
  --bg-dark: #2d3748;
  --bg-darker: #1a202c;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  
  /* Sombras */
  --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 16px 64px rgba(0, 0, 0, 0.15);
  --shadow-dark: 0 24px 80px rgba(0, 0, 0, 0.25);
  
  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Bordes */
  --border-radius: 16px;
  --border-radius-small: 8px;
}

/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--gradient-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

/* ===== FONDO ANIMADO ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  z-index: -1;
}

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

/* ===== CONTENEDOR PRINCIPAL ===== */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px;
  min-height: 100vh;
}

/* ===== CAJA DE LOGIN ===== */
.login-box {
  background: var(--gradient-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  padding: 40px;
  max-width: 450px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-dark);
  position: relative;
  transition: all var(--transition-normal);
  animation: slideUp 0.8s ease-out;
}

.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glass);
  border-radius: var(--border-radius);
  z-index: -1;
}

.login-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-dark), 0 0 40px rgba(102, 126, 234, 0.3);
}

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

/* ===== TÍTULO ===== */
h1 {
  color: var(--text-white);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInDown 1s ease-out 0.2s both;
}

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

/* ===== GRUPOS DE INPUT ===== */
.input-group {
  margin-bottom: 20px;
  position: relative;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.input-group:nth-child(odd) {
  animation-delay: 0.5s;
}

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

/* ===== INPUTS ===== */
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-small);
  font-size: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  transition: all var(--transition-normal);
  outline: none;
  font-weight: 500;
}

input[type="email"]::placeholder,
input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

/* ===== CHECKBOX GROUP ===== */
.checkbox-group {
  display: flex;
  align-items: center;
  margin: 20px 0;
  text-align: left;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.checkbox-group label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

/* ===== FORGOT PASSWORD ===== */
.forgot-password {
  display: inline-block;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 25px;
  transition: all var(--transition-fast);
  animation: fadeInUp 1s ease-out 0.7s both;
}

.forgot-password:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

/* ===== BOTÓN DE LOGIN ===== */
.login-button {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  color: var(--text-white);
  padding: 16px 24px;
  border: none;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  width: 100%;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.8s both;
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.login-button:hover::before {
  left: 100%;
}

.login-button:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-color) 100%);
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium), 0 0 30px rgba(16, 185, 129, 0.4);
}

.login-button:active {
  transform: translateY(-1px);
}

/* ===== SIGNUP LINK ===== */
.signup {
  margin-top: 25px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  animation: fadeInUp 1s ease-out 0.9s both;
}

.signup a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.signup a:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* ===== ERROR MESSAGES ===== */
.error-message {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 8px;
  display: block;
  text-align: left;
  background: rgba(255, 107, 107, 0.1);
  padding: 8px 12px;
  border-radius: var(--border-radius-small);
  border-left: 3px solid #ff6b6b;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ===== BOTÓN INICIO ===== */
.inicio-button {
  position: fixed;
  top: 25px;
  left: 25px;
  color: var(--text-white);
  font-size: 16px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all var(--transition-normal);
  z-index: 1000;
  animation: fadeInLeft 1s ease-out;
}

.inicio-button i {
  margin-right: 8px;
  font-size: 18px;
}

.inicio-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--accent-color);
  transform: translateX(5px);
  box-shadow: var(--shadow-light);
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== SUCCESS MESSAGE ===== */
.success-message {
  color: var(--accent-color);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 16px;
  border-radius: var(--border-radius-small);
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
  backdrop-filter: blur(10px);
  animation: slideDown 0.5s ease-out;
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .login-box {
    margin: 20px;
    padding: 30px 25px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  .inicio-button {
    top: 15px;
    left: 15px;
    padding: 10px 16px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .login-box {
    padding: 25px 20px;
    margin: 15px;
  }
  
  h1 {
    font-size: 1.5rem;
    margin-bottom: 25px;
  }
  
  input[type="email"],
  input[type="password"] {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .login-button {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  .inicio-button {
    top: 10px;
    left: 10px;
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .inicio-button i {
    font-size: 16px;
  }
}

/* ===== MODAL DE BAN ===== */
.ban-modal {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(26, 32, 44, 0.95);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.ban-modal-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 107, 107, 0.3);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-dark);
  text-align: center;
  width: 90%;
  max-width: 450px;
  position: relative;
  animation: modalSlideIn 0.4s ease-out;
}

.ban-title {
  margin: 0 0 20px 0;
  color: #ff6b6b;
  font-weight: 700;
  font-size: 1.8rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ban-modal-content p {
  color: var(--text-white);
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.6;
}

.ban-modal-content strong {
  color: var(--accent-color);
  font-weight: 600;
}

.ban-close {
  color: rgba(255, 255, 255, 0.6);
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.ban-close:hover,
.ban-close:focus {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  transform: scale(1.1);
}

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

@keyframes modalSlideIn {
  from { 
    opacity: 0; 
    transform: scale(0.8) translateY(-50px); 
  }
  to { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

.ban-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ban-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 90%;
    max-width: 450px;
    animation: fadeIn 0.3s ease;
}

.ban-title {
    margin-top: 0;
    color: #c0392b;
    font-weight: bold;
    font-size: 1.5em;
}

.ban-close {
    color: #aaa;
    float: right;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 30px;
}

.ban-close:hover,
.ban-close:focus {
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}