/* --- Cyberpunk Glitch Form Styling for Admin Login --- */
.glitch-form-wrapper {
  --bg-color: #121212;
  --primary-color: #d90429;
  --secondary-color: #ffffff;
  --text-color: #e5e5e5;
  --font-family: "Fira Code", Consolas, "Courier New", Courier, monospace;
  --glitch-anim-duration: 0.5s;
}

/* --- Card Structure --- */
.glitch-card {
  background-color: var(--bg-color);
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(217, 4, 41, 0.3);
  border-radius: 12px;
  box-shadow:
    0 0 30px rgba(217, 4, 41, 0.25),
    inset 0 0 15px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 0.75em 1.25em;
  border-bottom: 1px solid rgba(217, 4, 41, 0.25);
}

.card-title {
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-family);
}

.card-title svg {
  width: 1.2em;
  height: 1.2em;
  stroke: var(--primary-color);
}

.card-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #333;
  margin-left: 5px;
}

.card-body {
  padding: 2rem;
}

/* --- Form Elements --- */
.form-group {
  position: relative;
  margin-bottom: 2rem;
}

.form-label {
  position: absolute;
  top: 0.75em;
  left: 0;
  font-size: 0.95rem;
  color: var(--primary-color);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none;
  transition: all 0.3s ease;
  font-family: var(--font-family);
}

.form-group input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(217, 4, 41, 0.3);
  padding: 0.75em 0;
  font-size: 1rem;
  color: var(--text-color);
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  border-color: var(--primary-color);
}

.form-group input:focus + .form-label,
.form-group input:not(:placeholder-shown) + .form-label {
  top: -1.3em;
  font-size: 0.75rem;
  opacity: 1;
}

.form-group input:focus + .form-label::before,
.form-group input:focus + .form-label::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
}

.form-group input:focus + .form-label::before {
  color: var(--secondary-color);
  animation: glitch-anim var(--glitch-anim-duration)
    cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.form-group input:focus + .form-label::after {
  color: var(--primary-color);
  animation: glitch-anim var(--glitch-anim-duration)
    cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both;
}

@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);
  }
}

/* --- Button Styling --- */
.submit-btn {
  width: 100%;
  padding: 0.9em;
  margin-top: 1rem;
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
  overflow: hidden;
  border-radius: 8px;
}

.submit-btn:hover,
.submit-btn:focus {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 0 25px var(--primary-color);
  outline: none;
}

.submit-btn:active {
  transform: scale(0.97);
}

/* --- Glitch Effect for Button --- */
.submit-btn .btn-text {
  position: relative;
  z-index: 1;
  transition: opacity 0.2s ease;
}

.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,
.submit-btn:focus::before {
  opacity: 1;
  color: var(--secondary-color);
  animation: glitch-anim var(--glitch-anim-duration)
    cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.submit-btn:hover::after,
.submit-btn:focus::after {
  opacity: 1;
  color: #ffffff;
  animation: glitch-anim var(--glitch-anim-duration)
    cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both;
}
