/* ============================================
   AUTHENTICATION PAGES STYLES
   Login, Register, Forgot Password
   ============================================ */

.auth-section {
  padding: 80px 20px;
  position: relative;
  margin-top: 60px;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   DECORATIVE CHARACTERS
   ============================================ */

.login-decoration {
  position: absolute;
  width: 120px;
  height: 120px;
  opacity: 0.7;
  filter: drop-shadow(0 5px 15px rgba(106, 61, 232, 0.3));
  animation: float 3s ease-in-out infinite;
  z-index: 1000;
}

.decoration-char {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.decoration-flip {
  transform: scaleX(-1);
}

.login-decoration-top-left {
  top: -30px;
  left: -60px;
  animation-delay: 0.5s;
}

.login-decoration-top-right {
  top: -30px;
  right: -60px;
  animation-delay: 1s;
}

.login-decoration-bottom-left {
  bottom: -30px;
  left: -60px;
  animation-delay: 1.3s;
}

.login-decoration-bottom-right {
  bottom: -30px;
  right: -60px;
  animation-delay: 0.8s;
}

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

.login-decoration-bottom-left .decoration-flip {
  animation: floatReverse 3s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes floatReverse {
  0%,
  100% {
    transform: translateY(0px) scaleX(-1);
  }
  50% {
    transform: translateY(-20px) scaleX(-1);
  }
}

/* ============================================
   AUTH CONTAINER & FORM
   ============================================ */

.auth-container {
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.92),
    rgba(15, 15, 35, 0.92)
  );
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 80px rgba(106, 61, 232, 0.25);
  border: 1.5px solid rgba(106, 61, 232, 0.4);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(20px);
}

.auth-form-container {
  padding: 40px 38px;
}

.auth-header {
  margin-bottom: 32px;
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 2px solid rgba(106, 61, 232, 0.2);
}

.auth-header h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  background: linear-gradient(
    to right,
    var(--primary-light),
    var(--accent-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
}

.server-name-brand {
  display: inline-block;
  font-weight: 900;
  font-family: 'Trebuchet MS', 'Courier New', monospace;
  font-style: italic;
  font-size: 1.1rem;
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--accent-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.auth-form .form-group {
  margin-bottom: 16px;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon i {
  position: absolute;
  left: 18px;
  color: var(--primary-light);
  font-size: 1.15rem;
  z-index: 2;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"],
.auth-form input[type="date"],
.auth-form select {
  width: 100%;
  padding: 10px 15px 10px 43px;
  border: 1.5px solid rgba(106, 61, 232, 0.25);
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(25, 25, 45, 0.7),
    rgba(20, 20, 40, 0.7)
  );
  color: var(--text-color);
  font-size: 0.9rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.auth-form input[type="text"]::placeholder,
.auth-form input[type="password"]::placeholder {
  color: rgba(225, 225, 230, 0.35);
}

.auth-form input:focus,
.auth-form select:focus {
  outline: none;
  border-color: var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(30, 30, 55, 0.9),
    rgba(25, 25, 50, 0.9)
  );
  box-shadow: 0 0 0 4px rgba(106, 61, 232, 0.2),
    inset 0 0 0 1px rgba(106, 61, 232, 0.3);
}

/* ============================================
   FORM OPTIONS & BUTTONS
   ============================================ */

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 10px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.remember-me label {
  margin: 0;
  cursor: pointer;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: normal;
}

.forgot-password {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.forgot-password:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  margin-bottom: 22px;
  font-weight: 700;
  letter-spacing: 0.8px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  color: white;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px rgba(106, 61, 232, 0.35);
  position: relative;
  overflow: hidden;
}

.btn-block::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 ease;
}

.btn-block:hover::before {
  left: 100%;
}

.btn-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(106, 61, 232, 0.45);
}

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

/* ============================================
   AUTH FOOTER
   ============================================ */

.auth-footer {
  text-align: center;
  color: var(--text-muted);
  padding-top: 16px;
  border-top: 1px solid rgba(106, 61, 232, 0.15);
}

.auth-footer p {
  margin: 0;
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.auth-footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--primary-light),
    var(--accent-color)
  );
  transition: width 0.3s ease;
}

.auth-footer a:hover::after {
  width: 100%;
}

.auth-footer a:hover {
  color: var(--accent-color);
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  animation: slideDown 0.3s ease;
  font-size: 0.9rem;
}

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

.alert-danger {
  background-color: rgba(220, 53, 69, 0.2);
  border: 1.5px solid rgba(220, 53, 69, 0.4);
  color: #ff8787;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.2);
  border: 1.5px solid rgba(40, 167, 69, 0.4);
  color: #69db7c;
}

/* ============================================
   REGISTER PAGE BACKGROUND ANIMATIONS
   ============================================ */

@keyframes driftLeft {
  0%, 100% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(40px) translateY(-30px);
  }
  50% {
    transform: translateX(0) translateY(-60px);
  }
  75% {
    transform: translateX(-40px) translateY(-30px);
  }
}

@keyframes driftRight {
  0%, 100% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(-40px) translateY(-30px);
  }
  50% {
    transform: translateX(0) translateY(-60px);
  }
  75% {
    transform: translateX(40px) translateY(-30px);
  }
}

@keyframes rotateSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.15;
  }
  50% {
    transform: translateY(-100px) translateX(50px);
    opacity: 0.3;
  }
}

.register-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.bg-text {
  position: absolute;
  font-weight: 900;
  font-family: 'Trebuchet MS', 'Courier New', monospace;
  font-style: italic;
  user-select: none;
  white-space: nowrap;
  letter-spacing: -3px;
  background: linear-gradient(
    135deg,
    rgba(106, 61, 232, 1),
    rgba(147, 51, 234, 1)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(106, 61, 232, 0.4);
  filter: drop-shadow(0 0 20px rgba(106, 61, 232, 0.3));
}

.bg-text-1 {
  top: 10%;
  left: -8%;
  font-size: 200px;
  opacity: 0.18;
  animation: driftLeft 20s ease-in-out infinite;
}

.bg-text-2 {
  top: 65%;
  right: -12%;
  font-size: 160px;
  opacity: 0.22;
  animation: driftRight 20s ease-in-out infinite;
  animation-delay: -5s;
}

.bg-text-3 {
  bottom: 5%;
  left: -10%;
  font-size: 180px;
  opacity: 0.16;
  animation: driftLeft 25s ease-in-out infinite;
  animation-delay: -8s;
}

/* Partículas flutuantes */
.bg-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(106, 61, 232, 0.4),
    rgba(106, 61, 232, 0.1)
  );
  pointer-events: none;
}

.particle-1 {
  width: 8px;
  height: 8px;
  top: 15%;
  left: 10%;
  animation: particleFloat 18s ease-in-out infinite;
}

.particle-2 {
  width: 6px;
  height: 6px;
  top: 25%;
  right: 15%;
  animation: particleFloat 22s ease-in-out infinite;
  animation-delay: -3s;
}

.particle-3 {
  width: 10px;
  height: 10px;
  top: 40%;
  left: 5%;
  animation: particleFloat 20s ease-in-out infinite;
  animation-delay: -8s;
}

.particle-4 {
  width: 7px;
  height: 7px;
  bottom: 20%;
  right: 8%;
  animation: particleFloat 19s ease-in-out infinite;
  animation-delay: -5s;
}

.particle-5 {
  width: 9px;
  height: 9px;
  bottom: 15%;
  left: 12%;
  animation: particleFloat 21s ease-in-out infinite;
  animation-delay: -10s;
}

.particle-6 {
  width: 5px;
  height: 5px;
  top: 60%;
  right: 20%;
  animation: particleFloat 17s ease-in-out infinite;
  animation-delay: -2s;
}

.particle-7 {
  width: 12px;
  height: 12px;
  top: 70%;
  left: 15%;
  animation: particleFloat 23s ease-in-out infinite;
  animation-delay: -12s;
}

.particle-8 {
  width: 6px;
  height: 6px;
  top: 30%;
  left: 80%;
  animation: particleFloat 20s ease-in-out infinite;
  animation-delay: -7s;
}

.particle-9 {
  width: 8px;
  height: 8px;
  bottom: 30%;
  right: 25%;
  animation: particleFloat 18s ease-in-out infinite;
  animation-delay: -4s;
}

.particle-10 {
  width: 7px;
  height: 7px;
  top: 80%;
  left: 25%;
  animation: particleFloat 22s ease-in-out infinite;
  animation-delay: -9s;
}

/* ============================================
   REGISTER PAGE SPECIFIC STYLES
   ============================================ */

.register-wrapper {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  z-index: 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group.half {
  margin-bottom: 22px;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.terms-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.terms-check label {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.terms-check a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
}

.terms-check a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.g-recaptcha {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .auth-section {
    padding: 60px 15px;
    min-height: auto;
  }

  .login-wrapper {
    max-width: 100%;
  }

  .login-decoration {
    width: 90px;
    height: 90px;
  }

  .login-decoration-top-left {
    top: -30px;
    left: -40px;
  }

  .login-decoration-top-right {
    top: -20px;
    right: -40px;
  }

  .login-decoration-bottom-left {
    bottom: -15px;
    left: -30px;
  }

  .login-decoration-bottom-right {
    bottom: -30px;
    right: -50px;
  }

  .auth-form-container {
    padding: 40px 30px;
  }

  .auth-header h2 {
    font-size: 1.8rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .forgot-password {
    margin-top: 8px;
  }

  .register-wrapper {
    max-width: 100%;
  }

  .bg-text-1 {
    font-size: 140px;
    opacity: 0.16;
  }

  .bg-text-2 {
    font-size: 110px;
    opacity: 0.2;
  }

  .bg-text-3 {
    font-size: 150px;
    opacity: 0.12;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .auth-section {
    padding: 40px 12px;
  }

  .login-wrapper {
    max-width: 100%;
  }

  .login-decoration {
    width: 70px;
    height: 70px;
    opacity: 0.5;
  }

  .login-decoration-top-left {
    top: -15px;
    left: -25px;
  }

  .login-decoration-top-right {
    top: -10px;
    right: -30px;
  }

  .login-decoration-bottom-left {
    bottom: 0px;
    left: -20px;
  }

  .login-decoration-bottom-right {
    bottom: -15px;
    right: -35px;
  }

  .auth-form-container {
    padding: 30px 20px;
  }

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

  .auth-header p {
    font-size: 0.95rem;
  }

  .auth-form input[type="text"],
  .auth-form input[type="password"],
  .auth-form input[type="email"],
  .auth-form input[type="date"],
  .auth-form select {
    padding: 12px 12px 12px 40px;
    font-size: 16px;
  }

  .btn-block {
    padding: 13px;
    font-size: 1rem;
  }

  .register-wrapper {
    max-width: 100%;
  }

  .bg-text-1 {
    font-size: 80px;
    top: 5%;
    left: -15%;
    opacity: 0.2;
  }

  .bg-text-2 {
    font-size: 70px;
    bottom: 20%;
    right: -20%;
    opacity: 0.25;
  }

  .bg-text-3 {
    display: none;
  }

  .bg-particle {
    opacity: 0.6;
  }

  .particle-7,
  .particle-10 {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-group.half {
    margin-bottom: 22px;
  }
}
