* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #4a90e2;
    --secondary-blue: #357abd;
    --light-blue: #f5f9ff;
    --dark-blue: #2c3e50;
    --white: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-blue);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.wave-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg"><path d="M0 0v46.29c47.79 22.2 103.59 32.17 158 28 70.36-5.37 136.33-33.31 206.8-37.5 73.84-4.36 147.54 16.88 218.2 35.26 69.27 18 138.3 24.88 209.4 13.08 36.15-6 69.85-17.84 104.45-29.34C989.49 25 1113-14.29 1200 52.47V0z" fill="%234a90e2" opacity=".25"/></svg>') repeat-x;
    animation: wave 15s linear infinite;
}

.wave:nth-child(2) {
    bottom: 10px;
    opacity: 0.5;
    animation: wave 7s linear infinite;
}

.wave:nth-child(3) {
    bottom: 15px;
    opacity: 0.2;
    animation: wave 4s linear infinite;
}

@keyframes wave {
    0% { background-position-x: 0; }
    100% { background-position-x: 1200px; }
}

.login-container {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    min-height: 600px;
}

.brand-section {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.login-section {
    flex: 1;
    padding: 60px;
    background: var(--white);
}

.logo-container {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.logo {
    max-width: 200px;
    height: auto;
}

.welcome-text h1 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 600;
    background: linear-gradient(to right, #ffffff 20%, #f8f9ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    animation: glowText 2s ease-in-out infinite alternate;
}

@keyframes glowText {
    from {
        filter: brightness(1);
    }
    to {
        filter: brightness(1.2);
    }
}

.welcome-text h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.95), transparent);
}

.welcome-text p {
    font-size: 16px;
    opacity: 0.9;
    font-style: italic;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-blue);
    font-size: 14px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 40px;
    border: 2px solid #e8f0fe;
    border-radius: 10px;
    font-size: 15px;
    color: var(--dark-blue);
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
    outline: none;
}

.input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
}

.toggle-password {
    left: auto !important;
    right: 12px;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
}

.forgot-link {
    background: none;
    border: none;
    color: var(--primary-blue);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
    margin-top: 20px;
    display: block;
    width: 100%;
    text-align: center;
}

#forgotPasswordMessage {
    margin-top: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.forgot-link:hover {
    text-decoration: underline;
}

.login-title {
    color: var(--dark-blue);
    font-size: 28px;
    margin-bottom: 35px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
}

.title-icon {
    color: var(--primary-blue);
    font-size: 32px;
    animation: iconFloat 2s ease-in-out infinite;
}

.title-underline {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 2px;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.scroll-indicator {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.quote {
    font-size: 16px;
    opacity: 0.9;
    font-style: italic;
    position: relative;
    padding: 0 25px;
    margin: 10px 0;
}

.quote-icon {
    font-size: 14px;
    opacity: 0.7;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.quote-icon.left {
    left: 0;
}

.quote-icon.right {
    right: 0;
}

.error-message {
    background-color: #ffe6e6;
    color: #dc3545;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    border: 1px solid #dc3545;
}

.error-message i {
    margin-right: 8px;
}

@media (max-width: 900px) {
    body {
        align-items: flex-start;
        padding: 20px 0;
        overflow-y: auto;
    }

    .login-container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 10px;
    }

    .login-card {
        flex-direction: column;
        min-height: auto;
        width: 100%;
        margin: 0 auto;
        max-width: 500px;
        scroll-behavior: smooth;
    }
    
    .brand-section {
        padding: 30px;
        position: relative;
    }
    
    .login-section {
        padding: 40px 30px;
    }

    .welcome-text h1 {
        font-size: 28px;
    }

    .welcome-text p {
        font-size: 14px;
    }

    .login-title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .scroll-indicator {
        display: block;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
        height: 100vh;
        background: var(--white);
    }

    .login-container {
        padding: 0;
        height: 100vh;
        display: flex;
    }
    
    .login-card {
        border-radius: 0;
        box-shadow: none;
        height: 100%;
        min-height: 100%;
        max-width: none;
    }

    .brand-section {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .login-section {
        padding: 20px 15px;
    }
    
    .logo-container {
        padding: 15px;
        margin-bottom: 20px;
    }

    .logo {
        max-width: 140px;
    }

    .input-group {
        margin-bottom: 20px;
    }

    .input-wrapper input {
        padding: 10px 35px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .login-btn {
        padding: 12px;
        font-size: 15px;
    }

    .title-icon {
        font-size: 28px;
    }

    .wave-container {
        display: none;
    }

    .quote {
        padding: 0 20px;
    }
    
    .quote-icon {
        font-size: 12px;
    }
}

@media (max-height: 700px) {
    .login-card {
        min-height: auto;
    }
    
    .brand-section {
        padding: 20px;
    }
    
    .logo {
        max-width: 120px;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    body {
        align-items: flex-start;
        padding: 10px;
    }

    .login-card {
        flex-direction: row;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .brand-section {
        padding: 20px;
        max-width: 40%;
        overflow-y: auto;
    }
    
    .login-section {
        padding: 20px;
        overflow-y: auto;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
    
    .welcome-text h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }
}

@media (max-width: 350px) {
    .login-title {
        font-size: 20px;
    }

    .input-wrapper input {
        padding: 10px 30px;
    }

    .logo-container {
        padding: 10px;
    }

    .logo {
        max-width: 120px;
    }
}
