/* ===============================
   FONT & COLORS
=============================== */
@font-face {
    font-family: 'Belleza';
    src: url('fonts/Belleza-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Belleza', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #111;
}

::placeholder {
    color: #666;
    font-style: italic;
    opacity: 1;
}

/* ===============================
   BODY LAYOUT
=============================== */
body.login-page, body.register-page, body.forgot-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f4f6f8;
}

.register-page::before,
.login-page::before,
.forgot-page::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url("images/LoginPic.png") center center no-repeat;
    background-size: cover;
    z-index: -1;
}

/* ===============================
   CONTAINERS - LOGIN & REGISTER
=============================== */
.main-content {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    height: 100vh;
    overflow-y: auto;
}

.login-header {
    width: 50%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    order: 2;
}

.login-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===============================
   LOGIN & REGISTER BOX
=============================== */
.login-box, .box {
    background: white;
    padding: 40px 35px;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
    box-sizing: border-box;
    margin: 30px auto; /* ✅ unified top & bottom margin */
}

/* ===============================
   LOGO
=============================== */
.logo-container {
    text-align: center;
    margin: 0 0 -15px 0;
}

.logo-container img {
    width: 120px;
    height: auto;
}

/* ===============================
   HEADINGS
=============================== */
h2 {
    color: #002dc0;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

/* ===============================
   INPUTS
=============================== */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    height: 42px;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: 'Belleza', sans-serif;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #111;
    background-color: #fff;
    box-sizing: border-box;
    display: block;
}

input:focus {
    outline: none;
    border-color: #002dc0;
    box-shadow: 0 0 4px rgba(0, 45, 192, 0.3);
}

input:focus::placeholder {
    color: #000;
    opacity: 0.8;
}

/* ===============================
   GENDER SELECT ONLY
=============================== */
.gender-select {
    width: 100%;
    height: 42px;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: 'Belleza', sans-serif;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #111;       /* ✅ force black text */
    background-color: #fff;        /* ✅ white dropdown */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    padding-right: 35px;
    background: #fff url("data:image/svg+xml;utf8,<svg fill='%23111' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 10px center;
    background-size: 16px 16px;
}

.gender-select:focus {
    outline: none;
    border-color: #002dc0;
    box-shadow: 0 0 4px rgba(0, 45, 192, 0.3);
}

/* ===============================
   PASSWORD TOGGLE
=============================== */
.password-container {
    position: relative;
}

.password-container input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 0;
    width: 42px;
    height: 42px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transform: translateY(-50%);
}

.toggle-password i {
    font-size: 18px;
    pointer-events: none;
}

/* ===============================
   BUTTONS
=============================== */
button[type="submit"], .btn {
    width: 100%;
    padding: 12px 14px;
    background-color: #002dc0;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background: #1976d2;
}

.btn-primary:hover, button[type="submit"]:hover {
    background: #125aa0;
    transform: scale(1.02);
}

button:focus-visible {
    outline: 2px solid #002dc0;
    outline-offset: 2px;
}

/* ===============================
   LINKS & CHECKBOXES
=============================== */
.bottom-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    margin-top: 10px;
}

.bottom-links a {
    color: #002dc0;
    text-decoration: none;
}

.bottom-links a:hover {
    text-decoration: underline;
}

.checkbox {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.checkbox input {
    margin-right: 5px;
}

.checkbox label {
    color: #111;
}

/* ===============================
   ERRORS
=============================== */
.error-text {
    color: red;
    font-size: 0.85rem;
    margin: -15px 0 5px 0;   /* top:10px, right/left:0, bottom:14px */
    text-align: left;
    display: block;
    width: 100%;
    font-weight: bold;
}
/* ===============================
   PASSWORD STRENGTH BAR
=============================== */
.strength-bar {
    width: 100%;      /* ✅ full responsive width */
    height: 6px;
    background: #ddd;
    border-radius: 4px;
    margin-top: -10px;
    margin-bottom: 8px;
    overflow: hidden;
}

#strength {
    height: 100%;
    width: 0%;
    background: red;
    transition: width 0.3s ease, background 0.3s ease;
}

#strength-text {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 6px;
    min-height: 18px;
    text-align: left;
}

/* ===============================
   BACK BUTTON
=============================== */
.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #1976d2;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: bold;   /* ✅ make text bold */
    text-decoration: none;
    z-index: 10;
    transition: background 0.3s, transform 0.2s;
}

.back-btn:hover {
    background: #125aa0;
    transform: scale(1.05);
}

/* ===============================
   ANIMATIONS
=============================== */
@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.95);}
    to {opacity: 1; transform: scale(1);}
}

/* ===============================
   EXTRA LARGE DESKTOP BACKGROUND
=============================== */
@media (min-width: 1200px) {
    .register-page::before,
    .login-page::before {
        width: 60%; /* ✅ take more space on very wide screens */
        background-size: cover; 
    }

    .main-content {
        width: 40%; /* ✅ shrink the form area proportionally */
    }

    .login-box, .box {
        max-width: 480px;
        margin: 50px auto; /* ✅ more spacing */
    }

    h2 {
        font-size: 1.6rem;
    }
}

/* ===============================
   RESPONSIVE
=============================== */
@media (max-width: 768px) {
    body.login-page, body.register-page, body.forgot-page {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 20px 0;
        overflow-y: auto;
    }

    .main-content, .login-header {
        width: 100%;
        height: auto;
        order: unset;
    }

    .login-header {
        display: none;
    }

    .register-page::before,
    .login-page::before,
    .forgot-page::before {
        display: none;
    }

    .login-box, .box {
        width: 90%;
        max-width: 380px;
        margin: 30px auto;
        padding: 30px 25px;
    }

    h2 {
        font-size: 1.3rem;
    }

    .strength-bar {
        height: 5px;
        margin-top: -6px;
        margin-bottom: 8px;
    }

    #strength-text {
        font-size: 12px;
        margin-bottom: 8px;
        text-align: center;
    }

    .bottom-links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        font-size: 0.9rem;
    }

    .back-btn {
        top: 10px;
        left: 10px;
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .login-box, .box {
        width: 95%;
        margin: 20px auto;
        padding: 25px 20px;
    }

    h2 {
        font-size: 1.2rem;
    }

    .strength-bar {
        height: 4px;
        margin-top: -4px;
        margin-bottom: 6px;
    }

    #strength-text {
        font-size: 11px;
        text-align: center;
    }
}
