/*
 * Modernized, Responsive, and Unified login.css
 * This CSS file is designed to style both the login and registration forms
 * (index (9).php and index (10).php) with a consistent, modern, and responsive design.
 */

/* Universal Box-Sizing */
*,
*:before,
*:after {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Keyframes for the background zoom animation */
@keyframes zoomInOut {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Base Body and HTML */
body,
html {
    height: 100%;
}

body {
    /* Modern gradient overlay on the background image */
    background: linear-gradient(135deg, rgba(34, 14, 90, 0.9), rgba(13, 0, 50, 0.9));
    color: #f0f0f0;
    font-family: 'Poppins', sans-serif;
    padding: 20px;
    overflow-x: hidden;
    /* Prevents horizontal scrollbar */
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background image container for animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(../images/bg.jpeg) no-repeat center center/cover;
    z-index: -1;
    animation: zoomInOut 20s infinite ease-in-out;
}

/* Links within the body */
body a {
    text-decoration: none;
    font-weight: 500;
    color: #fff;
    transition: color 0.3s ease;
    text-shadow: none;
}

body a:hover {
    color: #00bcd4;
    font-variant: small-caps;
}

/* Alert box styles for both forms */
.alert {
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transition: opacity 0.6s ease;
    z-index: 10;
}

.alert.success {
    background-color: #4CAF50;
}

.alert.info {
    background-color: #03a9f4;
}

.alert.warning {
    background-color: #ff9800;
}

.alert .closebtn {
    margin-left: 15px;
    color: white;
    font-weight: bold;
    float: right;
    font-size: 22px;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
}

/* Paragraph styling for both forms */
p {
    margin-top: 10px;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    z-index: 10;
}

/* Main Form Container */
.form-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
}

/* Footer styles */
.footer {
    width: 100%;
    padding: 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    position: relative;
    margin-top: auto;
}

.footer a {
    color: #fff;
    font-weight: 400;
    text-shadow: none;
}

.footer a:hover {
    color: #00bcd4;
}

/* Login/Registration wrapper and school name */
.login-wrapper {
    max-width: 600px;
    width: 100%;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.schname {
    font-size: 2em;
    padding: 10px 0;
    width: 100%;
    margin: 1em auto;
    text-align: center;
    background: linear-gradient(90deg, #3d0c99, #1b074e);
    border-radius: 8px;
    color: #fff;
    text-shadow: none;
    letter-spacing: 1px;
}

/* Form Styles */
form {
    background: none;
    padding: 2em 0;
    width: 100%;
    overflow-y: auto;
    /* Enable vertical scrolling for long forms */
    max-height: 80vh;
    /* Set a max height to prevent overflow on small screens */
}

form label {
    color: #d0d0d0;
    margin: 0 0 0.25em;
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
}

form input,
form select {
    width: 100%;
    padding: 0.8em 1em;
    margin: 0 0 1.5em;
    font-size: 1em;
    border: 1px solid #555;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 5px;
}

form input:focus,
form select:focus {
    border-color: #00bcd4;
    box-shadow: 0 0 8px rgba(0, 188, 212, 0.5);
}

form button {
    width: 100%;
    margin: 2em 0 0;
    border: none;
    background: linear-gradient(45deg, #df7a07, #d15e00);
    padding: 0.8em 0;
    font-size: 1.1em;
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-variant: small-caps;
    font-weight: bold;
    color: white;
    text-shadow: none;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.login-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.login-buttons button {
    width: 48%;
    margin-top: 2em;
}

form button:focus,
form button:hover {
    background: linear-gradient(45deg, #262626, #444);
    color: #fff;
}

/* Specific button styles for SIS and HOME */
.header button {
    width: auto;
    padding: 10px 20px;
    margin: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header button a {
    color: #fff;
    text-shadow: none;
}

.header button:hover {
    background: #00bcd4;
}

/* Hide/Show Password button */
.hide-show {
    width: 100%;
    margin: -3.5em 0 1.5em;
    position: relative;
    z-index: 5;
    display: none;
}

.hide-show span {
    background: #27047a;
    font-size: 0.9em;
    padding: 0.5em 1em;
    float: right;
    border-radius: 5px;
    cursor: pointer;
}

/* Added to fix the spacing at the bottom of the form */
.form-break {
    height: 20px;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .form-container {
        padding: 10px;
        align-items: flex-start;
    }

    .login-wrapper {
        padding: 20px;
        max-width: 95%;
    }

    .schname {
        font-size: 1.5em;
    }

    form input,
    form select {
        font-size: 0.9em;
    }

    form button {
        width: 100%;
        margin: 1em 0;
    }

    .login-buttons {
        flex-direction: column;
        align-items: center;
    }

    .login-buttons button {
        width: 100%;
        margin: 5px 0;
    }

    .header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .header button {
        width: 100%;
        margin: 5px 0;
    }
}