/* ============================================================
   PREMIUM CONSOLIDATED CSS: LOGIN & REGISTER
   ============================================================ */

/* 1. VARIABLES - Synced with your Navy/Blue Logo */
:root {
  --primary-color: #06022d; /* Deep Navy */
  --accent-blue: #1f0bdb; /* Vibrant Logo Blue */
  --secondary-color: #64748b; /* Slate Gray for text */
  --background-color: #f1f5f9; /* Modern light background */
  --white-color: #ffffff;
  --black-color: #0f172a;
  --input-border-color: #e2e8f0;
  --shadow-premium:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition-3s: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. GLOBAL RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Poppins", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--background-color);
  overflow-x: hidden;
}

/* 3. MAIN CONTAINER (Managed by JS) */
#login-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 440px;
  position: relative;
  opacity: 0; /* Start hidden for splash transition */
  transform: translateY(40px) scale(0.98);
  transition: all 0.8s var(--transition-3s);
  padding: 20px;
}

/* 4. APP TITLE - Top bar */
.app-title {
  text-align: center;
  font-weight: 700;
  font-size: 24px;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 20px 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  letter-spacing: 1px;
}

/* 5. THE WRAPPER CARD */
.wrapper {
  position: relative;
  width: 100%;
  height: 520px; /* Animated height via JS */
  background-color: var(--white-color);
  border-radius: 0 0 20px 20px;
  padding: 100px 35px 50px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-premium);
  transition: height 0.6s var(--transition-3s);
  overflow: hidden;
  margin: 0 auto;
}

/* 6. FORM HEADER TAB (The curved navy block) */
.form-header {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 65px;
  background-color: var(--primary-color);
  border-radius: 0 0 25px 25px;
  z-index: 10;
}

/* Your clever inverted curves */
.form-header::before,
.form-header::after {
  content: "";
  position: absolute;
  top: 0;
  width: 30px;
  height: 30px;
}
.form-header::before {
  left: -30px;
  border-top-right-radius: 50%;
  box-shadow: 15px 0 0 var(--primary-color);
}
.form-header::after {
  right: -30px;
  border-top-left-radius: 50%;
  box-shadow: -15px 0 0 var(--primary-color);
}

/* TITLES */
.titles {
  position: relative;
}
.title-login,
.title-register {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white-color);
  font-size: 24px;
  transition: var(--transition-3s);
}
.title-register {
  top: 50px;
}
/* 7. SLIDING FORMS */
.login-form,
.register-form {
  position: absolute;
  width: 85%;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.6s var(--transition-3s);
}

.register-form {
  left: 150%;
  opacity: 0;
}

/* 8. INPUT FIELDS */
.input-box {
  position: relative;
  margin: 25px 0;
}

.input-field {
  width: 100%;
  height: 55px;
  font-size: 15px;
  background: #f8fafc;
  color: var(--black-color);
  padding: 0 20px;
  border: 1px solid var(--input-border-color);
  border-radius: 12px;
  outline: none;
  transition: 0.3s;
}

.input-field:focus {
  border-color: var(--accent-blue);
  background: var(--white-color);
  box-shadow: 0 0 0 4px rgba(31, 11, 219, 0.1);
}

.label {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: var(--secondary-color);
  transition: 0.3s;
  pointer-events: none;
}

.input-field:focus ~ .label,
.input-field:valid ~ .label {
  top: -10px;
  left: 12px;
  font-size: 12px;
  font-weight: 700;
  background-color: var(--white-color);
  color: var(--accent-blue);
  padding: 0 6px;
}

.icon {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--secondary-color);
}

.form-cols {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.col-1 {
  display: flex;
  align-items: center;
  gap: 6px;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 9. SUBMIT BUTTON */
.btn-submit {
  width: 100%;
  height: 55px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
  color: var(--white-color);
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 15px -3px rgba(31, 11, 219, 0.2);
  transition: var(--transition-3s);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(31, 11, 219, 0.3);
}

/* 10. ERROR BOX */
#error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  padding: 12px;
  border-radius: 10px;
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #991b1b;
  font-size: 13px;
}

/* 11. RESPONSIVE */
@media (max-width: 480px) {
  #login-container {
    padding: 15px;
  }
  .app-title {
    font-size: 20px;
  }
  .wrapper {
    padding: 80px 25px 40px;
  }
}
