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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #0f0c29;
  background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
  overflow: hidden;
  user-select: none; /* Disable right-click text selection */
}

/* ================= HEADER (Left Aligned) ================= */
.main-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid #00e5ff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 30px;
  gap: 15px;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0, 229, 255, 0.2);
}

.logo-ring {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: conic-gradient(#ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  animation: spinRing 3s linear infinite;
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes spinRing { 100% { transform: rotate(360deg); } }

.logo-container {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #000;
  overflow: hidden;
  animation: spinRingReverse 3s linear infinite;
}

@keyframes spinRingReverse { 100% { transform: rotate(-360deg); } }

.logo-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.brand-name {
  color: #fff;
  font-size: 1.5rem;
  letter-spacing: 3px;
  text-shadow: 0 0 10px #00e5ff;
}

/* ================= TOAST NOTIFICATION ================= */
.status-message {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 25px;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  z-index: 2000;
  display: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from { top: 60px; opacity: 0; }
  to { top: 90px; opacity: 1; }
}

.status-message.success { background: rgba(0, 200, 80, 0.9); border: 1px solid #00ff00; }
.status-message.error { background: rgba(220, 20, 60, 0.9); border: 1px solid #ff0000; }

/* ================= AUTH CONTAINER ================= */
.auth-container {
  position: relative;
  width: 450px;
  height: 600px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  margin-top: 50px;
}

.form-box {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.login-box { transform: translateX(0); }
.signup-box { transform: translateX(100%); }
.auth-container.active .login-box { transform: translateX(-100%); }
.auth-container.active .signup-box { transform: translateX(0); }

.title {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 25px;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* ================= INPUTS & GLOW EFFECT ================= */
.input-group {
  position: relative;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
}

.input-group i {
  position: absolute;
  left: 15px;
  color: #00e5ff;
  font-size: 1.2rem;
  transition: 0.3s;
  z-index: 10;
}

.input-group input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  background: rgba(0,0,0,0.2);
  border: 1px solid transparent;
  outline: none;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  transition: 0.3s;
  position: relative;
}

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

/* Box turns fully cyan when typing */
.input-group input:focus {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid #00e5ff;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}
.input-group input:focus + i { color: #fff; text-shadow: 0 0 5px #fff; }

input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.otp-btn {
  position: absolute;
  right: 10px;
  background: linear-gradient(45deg, #00e5ff, #0077ff);
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
  z-index: 5;
}

/* ================= FINGERPRINT SCANNER ================= */
.fingerprint-wrapper { text-align: center; margin: 15px 0 25px 0; }
.fingerprint-btn {
  position: relative; background: rgba(0,0,0,0.3); border: 2px solid transparent;
  color: rgba(255, 255, 255, 0.6); font-size: 3.5rem; cursor: pointer; outline: none;
  transition: 0.3s; overflow: hidden; width: 90px; height: 90px; border-radius: 50%;
  display: flex; justify-content: center; align-items: center; margin: 0 auto;
}
.rgb-glow { animation: glowing 3s infinite alternate; }
@keyframes glowing {
  0% { box-shadow: 0 0 10px #ff0000, inset 0 0 10px #ff0000; border-color: #ff0000; color: #ff0000; }
  33% { box-shadow: 0 0 15px #00ff00, inset 0 0 15px #00ff00; border-color: #00ff00; color: #00ff00; }
  66% { box-shadow: 0 0 15px #0000ff, inset 0 0 15px #0000ff; border-color: #0000ff; color: #0000ff; }
  100% { box-shadow: 0 0 20px #00e5ff, inset 0 0 20px #00e5ff; border-color: #00e5ff; color: #00e5ff; }
}
.scan-line { position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: #fff; box-shadow: 0 0 10px #fff; opacity: 0; }
.fingerprint-btn.scanning .scan-line { opacity: 1; animation: scanAnim 1s infinite linear; }
@keyframes scanAnim { 0% { top: 0; } 50% { top: 100%; } 100% { top: 0; } }
.fingerprint-wrapper p { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-top: 10px; }

/* ================= ON-SCREEN PIN FALLBACK ================= */
.pin-wrapper {
  text-align: center;
  margin: 10px 0 20px 0;
  animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.pin-text {
  color: #ffcc00;
  font-size: 0.85rem;
  margin-bottom: 10px;
  text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}
.pin-submit-btn {
  background: linear-gradient(45deg, #00e5ff, #0077ff);
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  box-shadow: 0 0 10px rgba(0, 119, 255, 0.4);
  width: 100%;
  margin-bottom: 10px;
}
.pin-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 0 15px rgba(0, 119, 255, 0.6); }

/* ================= BUTTONS & LINKS ================= */
.submit-btn { width: 100%; padding: 15px; background: linear-gradient(45deg, #ff007f, #7928ca); border: none; border-radius: 12px; color: white; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: 0.3s; }
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(121, 40, 202, 0.4); }
.toggle-text { text-align: center; color: rgba(255,255,255,0.7); margin-top: 20px; font-size: 0.9rem; }
.toggle-link { color: #00e5ff; cursor: pointer; font-weight: 600; }
.toggle-link:hover { text-decoration: underline; text-shadow: 0 0 8px rgba(0, 229, 255, 0.5); }