/* BASIC SETUP */
html {
    background-color: #56baed;
}

body {
    font-family: "Poppins", sans-serif;
    height: 100vh;
    margin: 0;
}

/* STRUCTURE */
.wrapper {
    display: flex;
    align-items: center;
    flex-direction: column; 
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding: 20px;
}

#formContent {
    border-radius: 10px;
    background: #fff;
    width: 90%;
    max-width: 450px;
    position: relative;
    padding: 0px;
    box-shadow: 0 30px 60px 0 rgba(0,0,0,0.3);
    text-align: center;
}

#formFooter {
    background-color: #f6f6f6;
    border-top: 1px solid #dce8f1;
    padding: 25px;
    text-align: center;
    border-radius: 0 0 10px 10px;
}

/* TYPOGRAPHY & LINKS */
h2 {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 30px 8px 10px 8px; 
    color: #39ace7;
    display: inline-block;
}

h1 { color: #60a0ff; }

a {
    color: #92badd;
    display: inline-block;
    text-decoration: none;
    font-weight: 400;
}

/* INPUT CONTAINERS (The Secret to Alignment) */
/* Apply this class to the div surrounding your text and password inputs */
.input-wrapper {
    position: relative;
    width: 85%;
    margin: 5px auto; /* Centers the fields and gives them vertical spacing */
}

/* INPUT FIELDS */
input[type=text], 
input[type=password] {
    background-color: #f6f6f6;
    border: 2px solid #f6f6f6;
    color: #0d0d0d;
    padding: 15px 32px;
    text-align: center;
    width: 100%; /* Fills the 85% container */
    box-sizing: border-box; /* Includes padding in width so it doesn't break alignment */
    display: inline-block;
    font-size: 16px;
    transition: all 0.5s ease-in-out;
    border-radius: 5px;
}

/* Add space on the right of the password so text doesn't overlap the icon */
.input-wrapper input[type=password] {
    padding-right: 45px;
}

input:focus {
    background-color: #fff;
    border-bottom: 2px solid #5fbae9;
    outline: none;
}

/* THE TOGGLE ICON */
#togglePassword {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #cccccc;
    z-index: 10;
    transition: color 0.3s;
}

#togglePassword:hover {
    color: #5fbae9;
}

/* BUTTONS */
input[type=submit], input[type=button] {
    background-color: #56baed;
    border: none;
    color: white;
    padding: 15px 80px;
    text-align: center;
    text-transform: uppercase;
    font-size: 13px;
    box-shadow: 0 10px 30px 0 rgba(95,186,233,0.4);
    border-radius: 5px;
    margin: 20px 0 40px 0;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

input[type=submit]:hover { background-color: #39ace7; }
input[type=submit]:active { transform: scale(0.95); }

/* ANIMATIONS */
.fadeInDown {
    animation: fadeInDown 1s both;
}

@keyframes fadeInDown {
    0% { opacity: 0; transform: translate3d(0, -100%, 0); }
    100% { opacity: 1; transform: none; }
}

.fadeIn {
    opacity: 0;
    animation: fadeIn ease-in 1 forwards;
    animation-duration: 1s;
}

.fadeIn.first { animation-delay: 0.4s; }
.fadeIn.second { animation-delay: 0.6s; }
.fadeIn.third { animation-delay: 0.8s; }
.fadeIn.fourth { animation-delay: 1s; }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* HELPERS */
.underlineHover:after {
    display: block;
    left: 0;
    bottom: -10px;
    width: 0;
    height: 2px;
    background-color: #56baed;
    content: "";
    transition: width 0.2s;
}

.underlineHover:hover { color: #0d0d0d; }
.underlineHover:hover:after{ width: 100%; }

#icon { width: 30%; margin-top: 20px; }

/* This must be the parent of BOTH the input and the icon */
.password-wrapper {
    position: relative !important; /* This creates the 'anchor' */
    width: 85% !important;        /* Matches your username width */
    margin: 10px auto !important; /* Centers it and adds spacing */
    display: block !important;
}

/* The input field inside the wrapper */
.password-wrapper input {
    width: 100% !important;       /* Fills the wrapper completely */
    padding-right: 45px !important; /* Leaves room for the eye on the right */
    box-sizing: border-box !important; /* Prevents padding from pushing the box wider */
    margin: 0 !important;         /* Removes margins that cause misalignment */
}

/* The Icon - Pinned inside the input */
#togglePassword {
    position: absolute !important;
    right: 15px !important;       /* 15px from the right inner edge */
    top: 50% !important;          /* Centered vertically */
    transform: translateY(-50%) !important;
    cursor: pointer;
    z-index: 999;                 /* Ensures it stays on top of everything */
    color: #cccccc;
}
/* Ensure the form content is a column but starts from the top */
#formContent {
    display: flex;
    flex-direction: column;
    padding-top: 30px; /* Space at the very top */
}

/* Logo container styling */
.header-container {
    margin-bottom: 20px;
    width: 100%;
}

#icon {
    width: 30%;
    margin: 0 auto 10px auto;
    display: block; /* Ensures it stays centered */
}

h2 {
    margin-top: 10px;
    display: block; /* Keeps text under the logo */
}

/* Fix the form margins so they don't overlap the header */
form {
    width: 100%;
}