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

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;

  /* GOAL-MATCHING BACKGROUND */
  background:
    radial-gradient(900px 700px at 20% 30%, rgba(138, 43, 226, 0.28), transparent 60%),
    radial-gradient(700px 600px at 80% 25%, rgba(236, 72, 153, 0.25), transparent 65%),
    radial-gradient(800px 650px at 10% 80%, rgba(249, 115, 22, 0.18), transparent 65%),
    radial-gradient(700px 600px at 90% 70%, rgba(147, 51, 234, 0.22), transparent 65%),
    linear-gradient(180deg, #160a2f 0%, #0e071a 100%);

  display: flex;
  align-items: center;
  justify-content: center;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* VIGNETTE FOR CENTER FOCUS (VERY IMPORTANT) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}

/* =========================
   LAYOUT
========================= */
.login-container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 48px;
}

/* =========================
   ENTRANCE ANIMATIONS
========================= */
@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* ✅ FIXED: Clean sequential 0.2s step timing */

/* Step 1 — Logo */
.entrance-from-top {
  animation: slideInFromTop 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  animation-delay: 0s;
}

/* Step 2 — Tagline */
.entrance-from-top.entrance-delay-1 {
  animation-delay: 0.3s;
}

/* Step 3 — Welcome heading */
.entrance-from-bottom {
  animation: slideInFromBottom 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  animation-delay: 0.5s;
}

/* Step 4 — Subheading */
.entrance-from-bottom.entrance-delay-1 {
  animation-delay: 0.7s;
}

/* Step 5 — Form Box */
.entrance-from-left {
  animation: slideInFromBottom 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  animation-delay: 0.9s;
}

/* Step 6 — Form Content (slightly after box so they don't collide) */
.form-content-entrance {
  animation: slideInFromLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  animation-delay: 0.10s;
}

/* =========================
   LOGO (AUTO-FIT LIKE GOAL)
========================= */
.logo-container {
  background: linear-gradient(180deg, #0b0b0b, #050505);
  padding: 14px 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
}

.logo-img {
  height: 56px;
  width: auto;
}

/* =========================
   TAGLINE
========================= */
.tagline {
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 48px;
  font-weight: 500;
  background: linear-gradient(90deg, #ff0000 0%, #ec4899 25%, #ff69b4 50%, #a855f7 75%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================
   HEADINGS
========================= */
.welcome-heading {
  color: #ffffff;
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.subheading {
  color: #b6a9cf;
  font-size: 14.5px;
  font-weight: 300;
  margin-bottom: 34px;
}

/* =========================
   FORM CARD
========================= */
.form-container {
  width: 420px;
  padding: 40px 50px;
  border-radius: 18px;

  background: linear-gradient(
    180deg,
    rgba(40, 28, 70, 0.65),
    rgba(25, 18, 45, 0.65)
  );

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* =========================
   FORM ELEMENTS
========================= */
.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 15px;
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  color: #ffffff;
  background: rgba(39, 29, 61, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  outline: none;
  transform: scale(1);
  transform-origin: center;
  transition: all 0.35s ease;
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Hover: subtle glow and border lift */
.input-group input:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.2);
}

/* Focus: subtle glow for password */
.input-group input:focus {
  transform: scale(1);
  background: rgba(55, 42, 88, 0.98);
  border-color: #c084fc;
  box-shadow:
    0 0 0 2px rgba(168, 85, 247, 0.35),
    0 0 12px rgba(168, 85, 247, 0.2);
}

/* Email only: larger + lift from all sides */
#username.input-email:focus,
.input-group input.input-email:focus {
  transform: translateY(-8px) scale(1.06);
  border-color: #c084fc;
  background: rgba(55, 42, 88, 0.98);
  box-shadow:
    0 0 0 2px rgba(168, 85, 247, 0.35),
    0 0 12px rgba(168, 85, 247, 0.2),
    0 10px 28px rgba(0, 0, 0, 0.35),
    0 -10px 28px rgba(0, 0, 0, 0.35),
    10px 0 28px rgba(0, 0, 0, 0.35),
    -10px 0 28px rgba(0, 0, 0, 0.35);
}

/* =========================
   PASSWORD TOGGLE
========================= */
.password-container {
  position: relative;
}

.password-container input {
  padding-right: 46px;
}

.toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #b9a8d4;
  cursor: pointer;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: #ffffff;
}

/* =========================
   CHECKBOX
========================= */
.checkbox-container {
  display: flex;
  align-items: center;
  margin-top: 18px;
  margin-bottom: 24px;
}

.checkbox-container input {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  accent-color: #a855f7;
}

.checkbox-container label {
  font-size: 13.5px;
  color: #ffffff;
}

/* =========================
   BUTTON (PINK → PURPLE) + RIPPLE
========================= */
.login-button {
  position: relative;
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;

  background: linear-gradient(90deg, #ec4899 0%, #8b5cf6 100%);
  color: #ffffff;

  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;

  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px rgba(236, 72, 153, 0.45);
}

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

/* Ripple effect */
.login-button .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: rippleExpand 0.55s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleExpand {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* =========================
   ERROR
========================= */
.error-message {
  margin-bottom: 16px;
  padding: 10px;
  font-size: 13px;
  text-align: center;
  border-radius: 8px;
  background: rgba(255, 99, 99, 0.15);
  border: 1px solid rgba(255, 99, 99, 0.35);
  color: #ff6b6b;
}