:root {
  --primary-color: #f39c12;
  --secondary-color: #a855f7;
  --text-color: #e5e5e5;
  --font-family: "Poppins", sans-serif;
}

body {
  background-color: #000;
  font-family: var(--font-family);
}

.starfield-container {
  position: fixed;
  overflow: hidden;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.star {
  position: absolute;
  background-color: white;
  border-radius: 50%;
  animation: twinkle 1.5s infinite ease-in-out alternate;
}

@keyframes twinkle {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}

/* --- Estilos del Formulario y Contenedor --- */
.glitch-form-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
}

.glitch-card {
  background-color: rgba(13, 13, 13, 0.164);
  backdrop-filter: blur(1.5px);
  width: 100%;
  max-width: 60%;
  border: 1px solid rgba(248, 248, 248, 0.2);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1),
    inset 0 0 10px rgba(0, 0, 0, 0.164);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.card-watermark {
  position: absolute;
  width: 200px;
  height: 200px;
  top: 45%;
  right: 10px;
  z-index: 0;
  opacity: 0.7;
  animation: float 8s ease-in-out infinite;
}

.card-header {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.158);
  padding: 0.5em 1em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.card-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(to right, #f39c12, #87ceeb);
  -webkit-background-clip: text;
  color: transparent;
}

.card-body {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.input-icon-group {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.input-icon {
  width: 28px;
  height: 28px;
  margin-right: 1rem;
  stroke: var(--text-color);
  opacity: 0.8;
}

.input-group {
  position: relative;
  width: 100%;
}

.input {
  border: 1.5px solid #ffffff33;
  border-radius: 1rem;
  background: none;
  padding: 1rem;
  width: 100%;
  font-size: 1rem;
  color: #f5f5f5;
  transition: border 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.user-label {
  position: absolute;
  left: 15px;
  color: #e8e8e8;
  pointer-events: none;
  transform: translateY(1rem);
  transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.input:focus ~ .user-label,
.input:valid ~ .user-label {
  transform: translateY(-50%) scale(0.8);
  background-color: #1a1a1a;
  padding: 0 0.2em;
  color: var(--primary-color);
}

.form-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.form-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-color);
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.form-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.form-link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* --- Estilos del Botón (Corregidos con animación) --- */
.submit-btn {
  width: 100%;
  padding: 0.8em;
  margin-top: 1rem;
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
  overflow: hidden;
  border-radius: 21px;
}

.submit-btn .btn-text {
  position: relative;
  z-index: 1;
  transition: opacity 0.2s ease;
}

.submit-btn:hover {
  background-color: var(--primary-color);
  color: #000;
  box-shadow: 0 0 25px var(--primary-color);
}

.submit-btn:hover .btn-text {
  opacity: 0;
}

.submit-btn::before,
.submit-btn::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background-color: var(--primary-color);
  transition: opacity 0.2s ease;
}

.submit-btn:hover::before {
  opacity: 1;
  color: var(--secondary-color);
  animation: glitch-anim 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.submit-btn:hover::after {
  opacity: 1;
  color: #000;
  animation: glitch-anim 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both;
}

/* --- Estilos del Modal (Corregidos) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #1a1a1a;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--primary-color);
  text-align: center;
  max-width: 500px;
  width: 90%;
  color: var(--text-color);
  position: relative;
}

.close-modal-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal-btn:hover {
  color: var(--primary-color);
}

.modal-content h2 {
  margin-bottom: 1rem;
  background: linear-gradient(to right, #f39c12, #87ceeb);
  -webkit-background-clip: text;
  color: transparent;
}

.modal-content p {
  margin-bottom: 1rem;
}

.modal-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.modal-logo {
  width: 100px;
  margin: 1rem auto;
  display: block;
}

/* --- Estilos del Footer --- */
.main-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  z-index: 500;
}

.footer-link {
  color: #e5e5e5;
  text-decoration: none;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes glitch-anim {
  0% {
    transform: translate(0);
    clip-path: inset(0 0 0 0);
  }
  20% {
    transform: translate(-5px, 3px);
    clip-path: inset(50% 0 20% 0);
  }
  40% {
    transform: translate(3px, -2px);
    clip-path: inset(20% 0 60% 0);
  }
  60% {
    transform: translate(-4px, 2px);
    clip-path: inset(80% 0 5% 0);
  }
  80% {
    transform: translate(4px, -3px);
    clip-path: inset(30% 0 45% 0);
  }
  100% {
    transform: translate(0);
    clip-path: inset(0 0 0 0);
  }
}

@media (max-width: 768px) {
  .card-watermark {
    position: absolute;
    width: 150px;
    height: 150px;
    top: 30%;
    right: 10px;
    z-index: 0;
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
  }
  .glitch-card {
    max-width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    height: 100vh;
  }
  .main-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  .main-footer {
    padding: 0.75rem 1rem;
  }

  .footer-link {
    font-size: 0.7rem;
    top: 20% !important;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.322);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: #1a1a1a34;
  backdrop-filter: blur(2.5px);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--primary-color);
  text-align: center;
  max-width: 500px;
  width: 90%;
  color: var(--text-color);
  position: relative;
}

.close-modal-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-color);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal-btn:hover {
  color: var(--primary-color);
}

.modal-content h2 {
  margin-bottom: 1rem;
  background: linear-gradient(to right, #f39c12, #87ceeb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
