* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f2f2f2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: Arial, sans-serif;
}

.container {
    position: relative;
    width: 900px;
    max-width: 100%;
    min-height: 650px;   /* increase height */
    background: #fff;
    border-radius: 25px;
    overflow: hidden;    /* MUST stay */
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}


/* FORM CONTAINERS */
.form-container {
    position: absolute;
    background: #fff;
    top: 0;
    height: 100%;
    width: 50%;
    transition: all 0.6s ease-in-out;
}

.login-container {
    left: 0;
    z-index: 2;
}

.register-container {
    left: 0;
    opacity: 0;
    z-index: 1;
    overflow-y: auto;   /* ADD THIS */
    padding-right: 10px; /* prevents scrollbar overlap */
}

/* SLIDE EFFECT */
.container.right-panel-active .login-container {
    transform: translateX(100%);
}

.container.right-panel-active .register-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
}

/* OVERLAY */
.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    border-radius: 0 25px 25px 0;
    z-index: 100;
    transition: transform 0.6s ease-in-out;
}

.overlay {
    background: linear-gradient(135deg, #145c32, #0f3f22);
    position: relative;
    left: -100%;
    width: 200%;
    height: 100%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.container.right-panel-active .overlay {
    transform: translateX(50%);
}

/* OVERLAY PANELS */
.overlay-panel {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    width: 50%;
    height: 100%;
    color: white;
}

.overlay-left {
    transform: translateX(-20%);
}

.overlay-right {
    right: 0;
}

/* FORM STYLE */
form {
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: 40px 50px;
    height: 100%;
    justify-content: flex-start;   /* changed */
    align-items: stretch;          /* changed */
    text-align: left;              /* better for labels */
}

input {
    background: #f0f0f0;
    border: none;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
    border-radius: 8px;
}
input, select {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px 12px;
    margin: 6px 0 14px 0;
    width: 100%;
    border-radius: 8px;
    font-size: 14px;
}

input:focus, select:focus {
    outline: none;
    border-color: #145c32;
    box-shadow: 0 0 0 2px rgba(20,92,50,0.15);
}

button {
    border-radius: 20px;
    border: none;
    padding: 12px 45px;
    background: #145c32;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

button.ghost {
    background: transparent;
    border: 2px solid #fff;
}

.logo {
    width: 80px;
    margin-bottom: 15px;
}
/* Password Strength Container */
#passwordStrengthMessage {
    width: 100%;
    margin-top: -5px;
    margin-bottom: 12px;
}

/* Strength Text */
#strengthText {
    font-size: 12px;
    margin-bottom: 6px;
}

/* Strength Bar Background */
#strengthBar {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background-color: #e0e0e0;
    overflow: hidden;
    position: relative;
}

/* Inner Strength Fill */
#strengthBar::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background-color: #145c32;
    transition: width 0.3s ease;
}
.error-msg {
    background: #ffe5e5;
    color: #c0392b;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.success-msg {
    background: #e8f8f0;
    color: #1e8449;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

