:root {
  --violet-deep: #28136e;
  --violet-corner: #4021a8;
  --near-black: #080b2b;
  --void: #030515;
}

/* Apply flexbox to the body for full-height layout */
body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  min-height: 100vh;
  margin: 0;

  background:
    radial-gradient(
      circle at top right,
      var(--violet-corner) 0%,
      transparent 35%
    ),
    radial-gradient(
      circle at center,
      var(--violet-deep) 0%,
      var(--near-black) 55%,
      var(--void) 100%
    );
  background-attachment: fixed;
  color: var(--text);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  min-height: 100vh;
  margin: 0; /* keep this — without it the browser's default body margin leaves a blank strip around the edge, outside the gradient */
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

img,
video {
  max-width: 100%;
  height: auto;
}

.flex-child {
  max-width: 100%;
}

/* general/universal logos */
#logo {
  width: 280px;
  height: auto;
  margin-top: 26px;
  margin-bottom: 18px;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.55));
}

/* Ensure the wrapper takes up the remaining space between header and footer */
.wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  padding: 20px 16px 36px;
  color: rgb(255, 255, 255);
}

/* Footer styles */
footer {
  width: 100%;
  text-align: center;
  padding: 12px 10px;
  background-color: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Card */
#login_box {
  width: 100%;
  max-width: 420px;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(0, 0, 0, 0.42);

  color: rgba(255, 255, 255, 0.92);
  padding: 26px 26px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);

  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  text-align: left;
  position: relative;
  overflow: hidden;
  transition: 200ms ease;
}

#login_box::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    rgba(246, 84, 174, 0.35),
    rgba(139, 92, 246, 0.35),
    rgba(2, 40, 111, 0.25)
  );
  filter: blur(18px);
  opacity: 0.55;
  z-index: 0;
}

#login_box > * {
  position: relative;
  z-index: 1;
}

#login_box:hover {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(246, 84, 174, 0.22),
    0 0 30px rgba(139, 92, 246, 0.25);
  transform: translateY(-1px);
}

/* Heading */
#login_box h1 {
  font-size: 22px;
  letter-spacing: 0.3px;
  margin: 0 0 14px;
  text-align: center;

  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.75));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================
   ICONS INSIDE INPUTS
   ========================= */
.input-group-qf {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.input-group-qf .input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  pointer-events: none;

  color: rgba(255, 255, 255, 0.65);
  font-size: 16px;
  z-index: 2;
}

/* general/universal text boxes */
.qf_gen_text_input {
  width: 100%;

  font-size: 15px;
  line-height: 1.2;
  padding: 12px 14px;
  padding-left: 44px; /* <-- makes room for icon */

  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);

  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.35);

  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.qf_gen_text_input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.qf_gen_text_input:hover {
  border-color: rgba(139, 92, 246, 0.35);
}

.qf_gen_text_input:focus {
  border-color: rgba(246, 84, 174, 0.55);
  box-shadow:
    0 0 0 3px rgba(246, 84, 174, 0.18),
    0 0 0 1px rgba(139, 92, 246, 0.12);
  transform: translateY(-1px);
}

/* Icon glow when focusing field */
.input-group-qf:focus-within .input-icon {
  color: rgba(246, 84, 174, 0.95);
  filter: drop-shadow(0 0 6px rgba(246, 84, 174, 0.45));
}

/* Submit button */
.qf_gen_submit_button {
  width: 100%;
  margin-top: 8px;

  display: inline-block;
  outline: 0;
  border: 0;
  cursor: pointer;

  color: #0b0b10;
  background: linear-gradient(
    135deg,
    rgba(246, 84, 174, 0.95),
    rgba(139, 92, 246, 0.95)
  );
  line-height: 30px;

  border-radius: 999px;
  padding: 12px 18px;

  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(49, 16, 181, 0.25),
    0 0 0 6px rgba(246, 84, 174, 0.12);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.qf_gen_submit_button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(246, 84, 174, 0.22),
    0 0 24px rgba(139, 92, 246, 0.25);
  filter: brightness(1.05);
}

.qf_gen_submit_button:active {
  transform: translateY(0px);
  filter: brightness(0.98);
}

/* Divider + links */
#login_box hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.24),
    transparent
  );
  margin: 18px 0 12px;
}

#login_box a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(246, 84, 174, 0.35);
  padding-bottom: 2px;
  transition: 160ms ease;
}

#login_box a:hover {
  color: #fff;
  border-bottom-color: rgba(139, 92, 246, 0.55);
  text-shadow: 0 0 12px rgba(246, 84, 174, 0.18);
}

/* Modal polish (optional) */
.modal-content {
  background: rgba(10, 10, 20, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.92);
}

.modal-header,
.modal-footer {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    rgba(246, 84, 174, 0.95),
    rgba(139, 92, 246, 0.95)
  ) !important;
  border: 0 !important;
  border-radius: 999px !important;
}

.turnstile-wrapper {
  display: flex;
  justify-content: center;
  margin: 12px 0 14px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 2;
}

.password-toggle i {
  color: var(--qh-violet);
  font-size: 18px;
  text-shadow:
    0 0 4px rgba(181, 107, 255, 0.6),
    0 0 8px rgba(213, 12, 213, 0.35);
  transition: all 0.25s ease;
}

.password-toggle:hover i {
  color: #e6c8ff;
  text-shadow:
    0 0 6px rgba(213, 12, 213, 0.8),
    0 0 12px rgba(181, 107, 255, 0.6);
}

.qf_gen_text_input {
  padding-right: 44px;
}

/* ~~~~~~~~~~~~~ Responsive adjustments for smaller screens ~~~~~~~~~~~~~ */
@media (max-width: 480px) {
  #logo {
    width: 220px;
    margin-top: 18px;
    margin-bottom: 10px;
  }

  .wrapper {
    padding: 14px 12px 26px;
  }

  #login_box {
    padding: 22px 18px 18px;
    border-radius: 16px;
  }

  #login_box h1 {
    font-size: 20px;
  }

  .qf_gen_text_input {
    font-size: 16px;
    padding: 12px 14px;
    padding-left: 44px;
  }

  .input-group-qf .input-icon {
    left: 12px;
    font-size: 16px;
  }

  .qf_gen_submit_button {
    font-size: 16px;
    padding: 12px 16px;
  }
}
