@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* 🔧 RESET + BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* 🌌 Enhanced Velox Aurora Background */
body {
  height: 100vh;
  color: #fff;
  margin: 0;
  background: linear-gradient(135deg, #0d1b2a, #1b263b, #415a77, #778da9, #1b263b);
  background-size: 400% 400%;
  animation: auroraShift 25s ease-in-out infinite;
  overflow-x: hidden;
  position: relative;
}

/* ✨ Brighter glow overlay */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(0,255,200,0.2), transparent 60%),
              radial-gradient(circle at 80% 70%, rgba(108, 187, 243, 0.705), transparent 60%);
  mix-blend-mode: screen;
  animation: auroraDrift 18s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes auroraShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes auroraDrift {
  0% { transform: translateX(-5%) translateY(-5%); }
  50% { transform: translateX(5%) translateY(5%); }
  100% { transform: translateX(-5%) translateY(-5%); }
}

/* 🪟 Keep content above background */
.page-wrapper, .form-section, .hero-section, main {
  position: relative;
  z-index: 1;
}

/* 🌐 MAIN LAYOUT WRAPPER */
.page-wrapper {
  display: flex;
  width: 100%;
  max-width: 1200px;
  height: 90vh;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  background: rgba(255, 255, 255, 0.05);
}

/* 🖼️ LEFT HERO SECTION */
.hero-section {
  flex: 1;
  background: url('Logo.png') center/cover no-repeat;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}
.hero-section .overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 38, 71, 0.75);
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
}
.hero-logo {
  display: block;
  width: 120px;
  height: auto;
  margin: 0 auto 15px;
  filter: drop-shadow(0 0 6px rgba(0, 255, 174, 0.8));
}
.hero-content h1 {
  font-size: 2rem;
  font-weight: 700;
}
.tagline {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* 🧾 FORM SECTION */
.form-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.form-container {
  width: 100%;
  max-width: 400px;
  text-align: center;
  color: #fff;
  transition: all 0.5s ease;
  display: none;
}
.form-container.active {
  display: block;
}

/* 🌙 THEME TOGGLE */
.theme-toggle {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.theme-toggle:hover {
  transform: scale(1.1);
}

/* ✏️ INPUTS + BUTTONS */
input {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}
input:focus {
  background: rgba(255, 255, 255, 0.25);
  outline: none;
  box-shadow: 0 0 10px #00b4d8;
}

.btn {
  width: 100%;
  background: #00b4d8;
  color: #fff;
  border: none;
  padding: 12px;
  margin-top: 10px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
.btn:hover {
  background: #0096c7;
  transform: scale(1.03);
}

/* 💬 LINKS + TEXT */
p {
  margin-top: 15px;
  font-size: 14px;
  color: #ccc;
}
a {
  color: #00b4d8;
  text-decoration: none;
  font-weight: 600;
}
a:hover {
  text-decoration: underline;
}

/* 💌 MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.modal.show {
  opacity: 1;
  pointer-events: all;
}
.modal-content {
  background: rgba(255, 255, 255, 0.15);
  padding: 25px;
  border-radius: 15px;
  width: 90%;
  max-width: 350px;
  text-align: center;
  color: white;
}

/* 🪄 TOASTS */
#toastContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}
.toast {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 15px;
  font-weight: 500;
  border-left: 5px solid transparent;
  transition: all 0.5s ease;
}
.toast.success { border-left-color: #2ecc71; }
.toast.error { border-left-color: #e74c3c; }
.toast.info { border-left-color: #3498db; }
.toast.hide {
  opacity: 0;
  transform: translateY(50px);
}

/* ☀️ LIGHT MODE THEME */
body.light-mode {
  background: linear-gradient(135deg, #e8eef5, #dbe4ee, #f8f9fa);
  color: #111;
}
body.light-mode .form-section {
  background: rgba(255, 255, 255, 0.9);
  color: #111;
}
body.light-mode input {
  background: rgba(0, 0, 0, 0.05);
  color: #111;
}
body.light-mode .btn {
  background: #0077b6;
}
body.light-mode .btn:hover {
  background: #0096c7;
}
body.light-mode a {
  color: #0077b6;
}
body.light-mode .toast {
  background: rgba(255,255,255,0.9);
  color: #111;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* 📱 MOBILE OPTIMIZATION */
@media (max-width: 900px) {
  body {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    padding: 20px 0;
  }

  .page-wrapper {
    flex-direction: column;
    width: 95%;
    height: auto;
    border-radius: 14px;
    overflow: visible;
    background: rgba(255, 255, 255, 0.07);
  }

  .hero-section {
    width: 100%;
    height: 220px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    border-radius: 14px 14px 0 0;
  }

  .hero-logo {
    width: 100px;
    margin-bottom: 10px;
  }

  .hero-content h1 {
    font-size: 1.6rem;
    margin-bottom: 5px;
  }

  .tagline {
    font-size: 1rem;
    line-height: 1.4;
  }

  .form-section {
    width: 100%;
    flex: none;
    padding: 25px 20px 40px;
    justify-content: center;
    align-items: flex-start;
  }

  .form-container {
    width: 90%;
    max-width: 400px; /* ✅ fixed */
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    margin: 0 auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
  }

  .form-container h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.3;
    word-wrap: break-word;
  }

  input,
  .btn {
    font-size: 0.95rem;
    padding: 12px;
    width: 100%;
    margin-top: 8px;
  }

  p {
    font-size: 13px;
    margin-top: 10px;
  }

  .theme-toggle {
    top: 10px;
    right: 15px;
    font-size: 1.3rem;
  }

  #toastContainer {
    bottom: 15px;
    left: 10px;
    right: 10px;
  }
}


/* ✅ KEEP HERO LOGO ON VERY SMALL PHONES */
@media (max-width: 600px) {
  .hero-section {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: linear-gradient(135deg, #0a2647, #205295);
  }

  .hero-section .overlay {
    background: rgba(0, 0, 0, 0.5);
  }

  .hero-content h1 {
    font-size: 1.3rem;
  }

  .tagline {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  table {
    font-size: 13px;
    width: 100%;
    overflow-x: auto;
    display: block;
  }
  th, td {
    padding: 6px;
    white-space: nowrap;
  }
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 120px 120px;
  animation: stars 40s linear infinite;
  opacity: 0.3;
  pointer-events: none;
}
@keyframes stars {
  from { background-position: 0 0; }
  to { background-position: 300px 300px; }
}

/* 📱 Fix Forgot Password Modal layering on mobile */
@media (max-width: 900px) {
  .modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999 !important; /* 🔥 forces modal above all */
  }

  .modal-content {
    z-index: 100000 !important;
    position: relative;
  }

  /* Disable stacking context caused by blur sections */
  .page-wrapper,
  .form-section,
  .form-container {
    transform: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    z-index: auto !important;
  }
}

/* 🌟 Pulsating Velox Logo Animation */
.pulse-logo {
  width: 110px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px #00b4d8);
  animation: pulseGlow 2.5s infinite ease-in-out, floatLogo 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px #00b4d8);
  }
  50% {
    transform: scale(1.07);
    filter: drop-shadow(0 0 18px #00b4d8);
  }
}

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

/* 💡 Optional glowing Velox text */
.glow-text {
  color: #00b4d8;
  text-shadow: 0 0 8px rgba(0, 180, 216, 0.8), 0 0 20px rgba(0, 180, 216, 0.4);
  letter-spacing: 1px;
  font-weight: 600;
}

