* {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

.flash-messages {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 80%;
    max-width: 400px;
}

.alert {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    position: relative;
    animation: slideDown 0.5s ease-out;
}

.alert-message {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.close-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero {
    height: 100vh;
    width: 100%;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('/static/banner.jpg');
    background-position: center;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-box {
    width: 380px;
    height: 480px;
    position: relative;
    background: #fff;
    padding: 5px;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.button-box {
    width: 220px;
    margin: 35px auto;
    position: relative;
    box-shadow: 0 0 20px 9px #ff61241f;
    border-radius: 30px;
    display: flex;
    justify-content: space-between; 
}

.toggle-btn {
    padding: 10px 30px;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

#btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 110px;
    height: 100%;
    background: linear-gradient(to right, #ff105f, #ffad06);
    border-radius: 30px;
    transition: 0.5s;
    z-index: 1;
}

.hidden {
    display: none;
}

.input-group {
    position: absolute;
    top: 130px;
    width: 280px;
    transition: left 0.3s ease;          
}

.input-field {
    width: 100%;
    padding: 10px 0;
    margin: 5px 0;
    border: none;
    border-bottom: 1px solid #999;
    outline: none;
    background: transparent;
}

.submit-btn {
    width: 85%;
    padding: 10px 30px;
    cursor: pointer;
    display: block;
    margin: auto;
    background: linear-gradient(to right, #ff105f, #ffad06);
    border: none;
    outline: none;
    border-radius: 30px;
    color: #fff;
    font-weight: bold;
}


#email-login .submit-btn {
    width: 85%;
    margin-top: 20px;
    margin-bottom: auto;
    padding: 10px 20px;
    cursor: pointer;
    display: block;
    background: linear-gradient(to right, #ff105f, #ffad06);
    border: none;
    outline: none;
    border-radius: 30px;
    color: #fff;
    font-weight: bold;
}


#email-login .submit-btn:hover {
    background-color: #0056b3; 
}


.check-box {
    display: flex;
    align-items: center;    
    justify-content: space-between; 
    margin: 20px 14px 20px 0;     
}

.forgot-text {
    font-size: 14px;
    margin: 0;              
    color: rgb(228, 96, 14); 
    cursor: pointer;        
}

.span {
    color: #777;
    font-size: 12px;
    position: absolute;
    bottom: 68px;
    margin-left: 20px;
}

.register-page {
    color: #555;
    background-color: transparent;
    margin-top: 20px;
    font-size: 14px;
    text-align: center;
    margin: 15px 0;
}

.register-page a {
    color: rgb(210, 84, 5); 
    text-decoration: none;
    font-weight: 500;
}

.register-page p {
    margin: 0; 
    color: inherit;
}

.register-page p a {
    color: rgb(210, 84, 5); 
    text-decoration: none;
    font-weight: 500;
}

.register-page p a:hover {
    text-decoration: underline;
}

.email-login {
    margin-top: 50px;
    font-size: 14px;
    color: #555;
    text-align:center;
}


.email-icon a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: #000000;
    border: 1px solid #777;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    margin: 15px 6px 0;
    transition: .3s;
}

.email-icon a:hover {
    background: #777;

}

.email-icon a i {
    color: #fff;
    font-size: 14px;
    transition: .3s;
}

.email-icon a:hover i {
    color: rgba(0, 0, 0, 0.3);
}

#login {
    left: 50px;
}

#register {
    left: 450px;
}

#email-login {
    left: 50px; 
}

/* Media Queries for Responsive Design */

/* Large Screens (Desktops) */
@media screen and (max-width: 1200px) {
    .flash-messages {
        width: 70%;
    }
}

/* Medium Screens (Tablets & Smaller Laptops) */
@media screen and (max-width: 992px) {
    .hero {
        padding: 20px;
    }

    .flash-messages {
        width: 75%;
        top: 15px;
    }

    .alert {
        padding: 12px;
    }
}

/* Small Screens (Tablets & Large Phones) */
@media screen and (max-width: 768px) {
    .form-box {
        width: 340px;
        height: 460px;
    }

    .button-box {
        width: 200px;
        margin: 30px auto;
    }

    .toggle-btn {
        padding: 10px 25px;
        font-size: 14px;
    }

    #btn {
        width: 100px;
    }

    .input-group {
        width: 260px;
        top: 120px;
    }

    .flash-messages {
        width: 85%;
        max-width: 350px;
    }

    .submit-btn {
        width: 90%;
        padding: 10px 20px;
    }

    .check-box {
        margin: 15px 10px 15px 0;
    }

    .forgot-text {
        font-size: 13px;
    }

    .email-login {
        margin-top: 40px;
    }

    .email-icon a {
        width: 32px;
        height: 32px;
        line-height: 32px;
    }
}

/* Extra Small Screens (Mobile Phones) */
@media screen and (max-width: 576px) {
    .hero {
        padding: 15px;
    }

    .form-box {
        width: 300px;
        height: 440px;
        padding: 3px;
    }

    .button-box {
        width: 180px;
        margin: 25px auto;
    }

    .toggle-btn {
        padding: 8px 20px;
        font-size: 13px;
    }

    #btn {
        width: 90px;
    }

    .input-group {
        width: 240px;
        top: 110px;
    }

    .input-field {
        padding: 8px 0;
        margin: 4px 0;
    }

    .flash-messages {
        width: 90%;
        max-width: 300px;
        top: 10px;
    }

    .alert {
        padding: 10px;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .close-btn {
        font-size: 16px;
    }

    .submit-btn {
        width: 95%;
        padding: 8px 15px;
        font-size: 14px;
    }

    .check-box {
        margin: 12px 8px 12px 0;
    }

    .forgot-text {
        font-size: 12px;
    }

    .span {
        font-size: 11px;
        bottom: 60px;
        margin-left: 15px;
    }

    .register-page {
        font-size: 13px;
        margin: 12px 0;
    }

    .email-login {
        margin-top: 35px;
        font-size: 13px;
    }

    .email-icon a {
        width: 30px;
        height: 30px;
        line-height: 30px;
        margin: 12px 5px 0;
    }

    .email-icon a i {
        font-size: 13px;
    }
}

/* Height-based Media Queries */
@media screen and (max-height: 700px) {
    .form-box {
        height: 420px;
    }

    .input-group {
        top: 100px;
    }

    .email-login {
        margin-top: 30px;
    }
}

/* Extra Small Height */
@media screen and (max-height: 500px) {
    .hero {
        height: auto;
        min-height: 100vh;
    }

    .form-box {
        height: 400px;
        margin: 20px 0;
    }
}

/* Print Media Query */
@media print {
    .hero {
        background-image: none;
        height: auto;
    }

    .form-box {
        box-shadow: none;
        border: 1px solid #999;
    }

    .flash-messages,
    .submit-btn,
    .email-icon {
        display: none;
    }
}