/* ==========================
   LearnLoop Auth Page (Login + Register)
========================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg,#0f2027,#203a43,#2c5364);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ==========================
   Container
========================== */

.auth-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-wrapper {
    display: flex;
    width: 95%;
    max-width: 1000px;
    min-height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    transition: 0.6s ease;
    backdrop-filter: blur(15px);
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.3);
}

.auth-wrapper.register-active {
    flex-direction: row-reverse;
}

@media(max-width: 900px) {
    .auth-wrapper {
        flex-direction: column !important;
        height: auto;
    }
}

/* ==========================
   Illustration
========================== */

.auth-illustration {
    flex: 1;
    background: linear-gradient(135deg, #007bff, #00c6ff);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 50px 30px;
    position: relative;
    overflow: hidden;
}

.auth-illustration::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: rgba(255,255,255,0.05);
    top: -25%;
    left: -25%;
    transform: rotate(45deg);
}

.auth-illustration img {
    max-width: 30%;
    margin-bottom: 25px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.auth-illustration img:hover {
    transform: scale(1.05);
}

@keyframes float{
  0%{ transform:translateY(0)}
  50%{ transform:translateY(-10px)}
  100%{ transform:translateY(0)}
}

.auth-illustration h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.auth-illustration p {
    font-size: 18px;
}

/* ==========================
   Form Wrapper
========================== */

.auth-form-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
}

/* ==========================
   Forms (Overlay Clean System)
========================== */

.auth-form-wrapper form {
    position: absolute;
    width: 100%;
    max-width: 350px;
    transition: 0.4s ease;
    transform: translateX(50px);
    opacity: 0;
    pointer-events: none;
}

.auth-form-wrapper form.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    transform: translateX(0);
}

/* Register Scroll */
#registerForm {
    max-height: 420px;       /* Max height fix */
    overflow-y: auto;        /* scroll enable */
    padding-right: 0; 
}

/* Hide scrollbar for Chrome, Safari and Opera */
#registerForm::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Hide scrollbar for IE, Edge and Firefox */
#registerForm {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

/* ==========================
   Form Title
========================== */

form h2 {
    text-align: center;
    color: #007bff;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 26px;
}

/* ==========================
   Input Group
========================== */

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group label{
  position:absolute;
  top:50%;
  left:12px;
  transform:translateY(-50%);
  color:#777;
  pointer-events:none;
  transition:0.3s;
}

.input-group input:focus + label,
.input-group input:valid + label{
  top:-8px;
  font-size:12px;
  background:white;
  padding:0 4px;
}

.input-group i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #007bff;
    font-size: 16px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    transition: 0.3s;
    background: #fff;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 8px rgba(0,123,255,0.2);
}
.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #777;
}

.toggle-password:hover {
    color: #000;
}
/* ==========================
   Buttons
========================== */

button {
    width: 100%;
    padding: 14px;
    color: #fff;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
    background: linear-gradient(45deg,#007bff,#00c6ff);
    background-size:200%;
    transition:0.4s;
}

button:hover {
    background: #0056b3;
    background-position:right;
}
.social-login {
    text-align: center;
    margin: 15px 0;
}

.social-text {
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ccc;
    color: #555;
    font-size: 18px;
    transition: 0.3s;
    text-decoration: none;
}

.social-btn.google { color: #db4437; border-color: #db4437; }
.social-btn.facebook { color: #4267B2; border-color: #4267B2; }
.social-btn.github { color: #333; border-color: #333; }

.social-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}
.modal-overlay {
  position: fixed;
  top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  padding: 30px 25px;
  border-radius: 12px;
  width: 350px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content h3 {
  margin-bottom: 10px;
  color: #007bff;
}

.modal-content p {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.modal-content button {
  padding: 12px;
  width: 100%;
  border:none;
  border-radius:8px;
  background: linear-gradient(45deg,#007bff,#00c6ff);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
}

/* ==========================
   Footer
========================== */

.forgot-text, .login-footer-text,
.register-footer-text {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.switch-btn {
    color: #007bff;
    cursor: pointer;
    font-weight: 500;
}

.error-msg {
    color: #ff4d4f;
    text-align: center;
    margin-top: 10px;
    font-weight: 500;
}

/* ==========================
   Responsive
========================== */

@media(max-width: 480px){
    .auth-illustration h1 { font-size: 24px; }
    .auth-illustration p { font-size: 14px; }
    form h2 { font-size: 22px; }
    .input-group input,
    .input-group select { font-size: 14px; }
    button { font-size: 14px; }
}

/* Loading Overlay */
.loading-overlay{
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.6);
  display:none;
  justify-content:center;
  align-items:center;
  flex-direction:column;
  z-index:9999;
}

.spinner{
  width:50px;
  height:50px;
  border:5px solid #fff;
  border-top:5px solid #00ffcc;
  border-radius:50%;
  animation: spin 1s linear infinite;
}

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

.loading-overlay p{
  color:white;
  margin-top:10px;
}

/* Toast */
.toast{
  position:fixed;
  bottom:30px;
  right:30px;
  color:white;
  padding:12px 20px;
  border-radius:5px;
  opacity:0;
  transition:0.4s;
  background:#1e1e1e;
  border-left:4px solid #00c851;
  box-shadow:0 10px 30px rgba(0,0,0,0.2);
}

.toast.show{
  opacity:1;
}

/* ================= Inline Forgot Password ================= */
#forgotPasswordWrapper {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
    justify-content: flex-start;
}

#forgotPasswordWrapper input[type="email"] {
    flex: 1; 
    padding: 12px 12px;       
    border: 1px solid #ccc;
    border-radius: 8px;       
    font-size: 16px;          
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    height: 44px;  
    width: 100%;          
    background: #fff;
    margin-bottom: 10px;
}

#forgotPasswordWrapper input[type="email"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0,123,255,0.2);
}

#forgotPasswordWrapper button {
    padding: 12px 16px;       /* input height match করতে padding adjust */
    background-color: #007bff;
    color: #fff;
    font-size: 16px;          /* match button font-size with normal button */
    border: none;
    border-radius: 8px;       /* match other buttons */
    cursor: pointer;
    transition: background-color 0.3s;
    height: 44px;             /* same height as input */
}

#forgotPasswordWrapper button:hover {
    background-color: #0056b3;
}

/* responsive */
@media (max-width: 480px) {
    #forgotPasswordWrapper {
        flex-direction: column;
        align-items: stretch;
    }

    #forgotPasswordWrapper button {
        width: 100%;
    }
}