/* ---------------------------------------------
   FONT IMPORTS
--------------------------------------------- */
@font-face {
    font-family: "Riri";
    src: url("/assets/Fonts/Vistera.otf");
}

@font-face {
    font-family: "Roboto";
    src: url("/assets/Fonts/Roboto.ttf");
}

/* ---------------------------------------------
   GLOBAL STYLES AND RESET
--------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

/* Full-page centered layout with background gradient */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(90deg, #e2e2e2, #c9d6ff);
}

/* ---------------------------------------------
   CONTAINER STYLING
--------------------------------------------- */
.container {
    position: relative;
    width: 950px;
    height: 550px;
    background: #fff;
    margin: 20px;
    border-radius: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .2);
    overflow: hidden;
}

/* Main headings inside forms */
.container h1 {
    color: #202240;
    font-size: 36px;
    margin: -10px 0;
    font-family: 'Roboto';
    text-transform: uppercase;
}

/* Social text line */
.social-text {
    font-family: 'Roboto';
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    margin: 15px 0;
}

/* Prevent forms from exceeding their container */
form {
    width: 100%;
}

/* ---------------------------------------------
   FORM BOXES (LOGIN + REGISTER)
--------------------------------------------- */
.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    color: #333;
    text-align: center;
    padding: 40px;
    z-index: 1;
    transition: .6s ease-in-out 1.2s, visibility 0s 1s;
}

/* Slide effect when container has 'active' class */
.container.active .form-box {
    right: 50%;
}

/* Hide registration form initially */
.form-box.register {
    visibility: hidden;
}

/* Show registration form on 'active' state */
.container.active .form-box.register {
    visibility: visible;
}

/* ---------------------------------------------
   INPUT STYLING
--------------------------------------------- */
.input-box {
    position: relative;
    margin: 25px 0;
}

.input-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(92, 95, 149, 0.5) 100%);
    border-radius: 0 2rem 2rem 0;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* Placeholder styling inside inputs */
.input-box input::placeholder {
    font-size: 14px;
    color: #202240;
    font-weight: 500;
    font-family: 'Roboto';
    text-transform: uppercase;
    border: 1px solid white;
    border-radius: 3rem;
    padding: 0.65rem 1.2rem;
}

/* Input icon inside input box */
.input-icon {
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(235deg, rgba(74, 78, 132, 1) 0%, rgba(0, 0, 0, 1) 100%);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 51px;
    height: 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.form-step {
    display: none;
    flex-direction: column;
    transition: all 0.5s ease;
}

.form-step.active {
    display: flex;
}

.password-info p {
    font-size: 12px;
    color: #555;
    margin: 5px 0;
}

.password-info {
    text-align: left;
}

.otp-section {
    margin-top: 15px;
}

.otp-box {
    position: relative;
}

.otp-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
}

#otp-status {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: gray;
}

.otp-timer {
    text-align: right;
    margin-bottom: 10px;
    font-weight: 600;
    color: #202240;
}

/* Toast styling */
.toast {
    visibility: hidden;
    min-width: 250px;
    margin: 0 auto;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 12px;
    border-radius: 5px;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.5s, visibility 0.5s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
}


/* ---------------------------------------------
   FORGOT PASSWORD LINK
--------------------------------------------- */
.forgot-link {
    margin: -15px 0 15px;
}

.forgot-link a {
    font-family: 'Roboto';
    font-size: 14px;
    color: #202240;
    font-weight: 500;
    text-transform: uppercase;
}

/* ---------------------------------------------
   BUTTON STYLING
--------------------------------------------- */
.btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, rgba(224, 224, 235, 1) 0%, rgba(255, 255, 255, 1) 100%);
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    font-family: 'Roboto';
    text-transform: uppercase;
    color: #202240;
    font-weight: 700;
}

/* ---------------------------------------------
   SOCIAL ICONS
--------------------------------------------- */
.social-icons {
    display: flex;
    justify-content: center;
}

.social-icons a {
    display: inline-flex;
    padding: 10px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 8px;
}

/* ---------------------------------------------
   CHECKBOX SECTION
--------------------------------------------- */
.checkbox-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px 0;
    font-size: 12px;
    text-transform: uppercase;
    color: #202240;
    font-family: 'Roboto';
}

.checkbox-wrapper input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.checkbox-wrapper a {
    color: #5c5f95;
    text-decoration: underline;
}

/* ---------------------------------------------
   TOGGLE PANEL STYLING
--------------------------------------------- */
.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Overlay animation */
.toggle-box::before {
    content: '';
    position: absolute;
    left: -250%;
    width: 300%;
    height: 100%;
    border-radius: 2rem;
    z-index: 2;
    transition: 1.8s ease-in-out;
    /* background color is set via gradient in .welcome-box */
}

.container.active .toggle-box::before {
    left: 50%;
}

/* Individual toggle panels */
.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    padding: 1rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: .6s ease-in-out;
}

/* Left panel positioning */
.toggle-panel.toggle-left {
    left: 0;
    transition-delay: 1.2s;
}

.container.active .toggle-panel.toggle-left {
    left: -50%;
    transition-delay: .6s;
}

/* Right panel positioning */
.toggle-panel.toggle-right {
    right: -50%;
    transition-delay: .6s;
}

.container.active .toggle-panel.toggle-right {
    right: 0;
    transition-delay: 1.2s;
}

/* Button inside toggle panels */
.toggle-panel .btn {
    width: 160px;
    height: 46px;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
}

/* ---------------------------------------------
   WELCOME PANEL CONTENT
--------------------------------------------- */
.welcome-box {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 1) 0%, rgba(74, 78, 132, 1) 100%);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Welcome text content layout */
.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 2rem;
    height: 100%;
}

/* Logo wrapper */
.logo-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Brand logo image */
.brand-logo {
    width: 100%;
    max-width: 250px;
    height: auto;
    object-fit: contain;
}

/* Brand name text */
.brand-name {
    font-family: 'Riri', serif;
    font-size: 85px;
    font-weight: 400;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
    line-height: 1;
}

/* Greeting text */
.greeting {
    font-size: 2rem !important;
    font-weight: 500;
    font-family: 'Roboto';
    text-transform: uppercase;
    color: #ffffff;
}

/* Subtext message */
.sub-text {
    padding: 0.5rem 0;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Roboto';
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0.9;
    margin-bottom: 8px;
}

/* Buttons in welcome content */
.welcome-content .btn.register-btn,
.welcome-content .btn.login-btn {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    border: 1.5px solid #fff;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.welcome-content .btn.register-btn:hover,
.welcome-content .btn.login-btn:hover {
    background: #fff;
    color: #202240;
}

/* ---------------------------------------------
   RESPONSIVE DESIGN - TABLET & MOBILE
--------------------------------------------- */
@media screen and (max-width: 650px) {
    .container {
        height: calc(100vh - 40px);
    }

    .container h1{
        font-size: 2rem;
    }

    .form-box {
        bottom: 0;
        width: 100%;
        height: 60%;
        padding: 20px;
    }

    .container.active .form-box {
        right: 0;
        top: 0%;
    }

    .toggle-box::before {
        left: 0;
        top: -270%;
        width: 100%;
        height: 300%;
        border-radius: 20vw;
    }

    .container.active .toggle-box::before {
        left: 0;
        top: 70%;
    }

    .toggle-panel {
        width: 100%;
        height: 30%;
    }

    .toggle-panel.toggle-left {
        top: 0;
        left: 0;
    }

    .container.active .toggle-panel.toggle-left {
        top: 0;
        left: 0;
        display: none !important;
    }

    .toggle-panel.toggle-right {
        right: 0;
        bottom: -30%;
    }

    .container.active .toggle-panel.toggle-right {
        bottom: 12%;
    }

    .brand-logo {
        max-width: 140px;
    }

    .brand-name {
        font-size: 65px;
    }

    .greeting {
        font-size: 1.2rem;
    }

    .sub-text {
        font-size: 10px;
    }

    .welcome-content .btn.register-btn,
    .welcome-content .btn.login-btn {
        font-size: 14px;
        max-width: 160px;
        padding: 8px 16px;
    }

    .welcome-box {
        min-height: 37vh;
        padding: 1rem 0;
    }

    .toggle-panel {
        flex-direction: column;
        justify-content: flex-start;
    }

    .welcome-content {
        padding: 1rem;
    }
}

.registration-heading {
    margin: 1rem 0 0.5rem !important;
}

.check {
    width: 100% !important;
    padding: 0.5rem 0 !important;
}

.check-step2 {
    margin: 10px 0;
}

.next-button-1step {
    margin-top: 1rem;
}

.registration-para {
    background: linear-gradient(-45deg, #202240, #7070B0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Roboto';
    font-weight: 500;
    line-height: 1.6;
    font-size: 1rem;
    text-transform: uppercase;
    margin: 0.5rem 0 0.2rem;
}

.step2-back-btn,
.step3-back-btn {
    border: none;
    cursor: pointer;
    background: linear-gradient(-45deg, #202240, #7070B0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Roboto';
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
}

.step3-back-btn{
    margin:1rem 0 !important;
}

.setup-heading {
    font-size: 2.2rem !important;
    margin: 1rem 0 0 !important;
}

.setup-para {
    background: linear-gradient(-45deg, #202240, #7070B0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Roboto';
    font-weight: 500;
    line-height: 1.4;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin: 0.5rem 0;
}

#pwd-validation li {
    list-style: none;
    margin: 5px 0;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Roboto';
    text-transform: uppercase;
    color: #7f7fafd5;
}

#pwd-validation li i {
    margin-right: 8px;
    color: red;
    font-weight: 900;
}

#pwd-validation li.valid i {
    color: green;
}

#pwd-validation li.valid span {
    background: linear-gradient(23deg, #202240, #7070B0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.generate-button-2step {
    margin: 0.5rem 0;
}

.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 1rem 0;
}

.otp-box {
    width: 40px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: 0.2s;
}

.otp-box:focus {
    border-color: #7070B0;
    box-shadow: 0 0 5px rgba(112, 112, 176, 0.5);
}

.otp-container {
    background: linear-gradient(45deg, #202240, #7070B0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    line-height: 1.4;
    font-family: 'Roboto';
    font-size: 1.15rem;
    text-transform: uppercase;
    margin: 0.5rem 0 0.2rem;
}

.otp-timer {
    margin: 0.5rem 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(178, 179, 204, 1) 50%, rgba(255, 255, 255, 0) 100%);
    padding: 0.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-family: 'Roboto';
    color: #202240;
}

.otp-toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.4;
  transition: all 0.5s ease;
}

.otp-toast i {
  color: red; 
}

.otp-toast span {
  color: #7f7fafd5; 
}

.otp-toast.success i {
  color: green; 
}

.otp-toast.success span {
  background: linear-gradient(45deg, #202240, #7070B0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}


/* OTP Modal Styling */
.otp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.otp-modal-content {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.otp-modal-content p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

#otp-modal-btn {
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #202240, #7070B0);
    color: #fff;
}

.resend-otp-redirect{
    background: linear-gradient(45deg, #202240, #7070B0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    line-height: 1.4;
    font-family: 'Roboto';
    font-size: 1.15rem;
    text-transform: capitalize;    
}

.verify-btn{
    margin:0.5rem 0 0;
}
/* ===== GLOBAL API LOADER ===== */
.api-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.api-loader.hidden {
  display: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #e0e0e0;
  border-top: 5px solid #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
