﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

    /* Animated Background */
    body::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        animation: backgroundMove 15s ease-in-out infinite;
    }

@keyframes backgroundMove {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Floating Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -50px;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px 45px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

    .login-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 5px;
        background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
        background-size: 200% 100%;
        animation: shimmer 3s linear infinite;
    }

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 35px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.logo-icon i {
    font-size: 40px;
    color: white;
}

.logo-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Welcome Text */
.welcome-text {
    text-align: center;
    margin-bottom: 35px;
}

    .welcome-text h1 {
        font-size: 24px;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 8px;
    }

    .welcome-text p {
        font-size: 14px;
        color: #64748b;
    }

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 14px 18px 14px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.3s ease;
    background: #f8fafc;
}

    .form-control:focus {
        outline: none;
        border-color: #667eea;
        background: white;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    }

.form-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
    transition: color 0.3s ease;
}

.form-control:focus + .form-icon {
    color: #667eea;
}

/* Button */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    margin-top: 10px;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
    }

    .btn-login:active {
        transform: translateY(0);
    }

/* Alert */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 14px;
    border: none;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.footer-text {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.footer-brand {
    font-weight: 700;
    color: #667eea;
}

.footer-links {
    margin-top: 15px;
}

.footer-link {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    margin: 0 10px;
    transition: color 0.3s ease;
}

    .footer-link:hover {
        color: #764ba2;
        text-decoration: none;
    }

/* Responsive */
@media (max-width: 576px) {
    .login-card {
        padding: 40px 30px;
        border-radius: 20px;
    }

    .logo-title {
        font-size: 24px;
    }

    .welcome-text h1 {
        font-size: 20px;
    }

    .form-control {
        padding: 12px 16px 12px 45px;
    }

    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}

/* Loading Spinner */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

    .btn-login.loading::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        top: 50%;
        left: 50%;
        margin-left: -8px;
        margin-top: -8px;
        border: 2px solid transparent;
        border-top-color: white;
        border-radius: 50%;
        animation: spinner 0.8s linear infinite;
    }

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}


/* Add to login page styles */
@media (max-width: 576px) {
    body {
        padding: 15px;
    }

    .shape {
        display: none; /* Hide floating shapes on mobile for performance */
    }

    .login-card {
        padding: 35px 25px;
        border-radius: 20px;
    }

    .logo-icon {
        width: 70px;
        height: 70px;
    }

        .logo-icon i {
            font-size: 36px;
        }

    .logo-title {
        font-size: 22px;
    }

    .logo-subtitle {
        font-size: 12px;
    }

    .welcome-text h1 {
        font-size: 20px;
    }

    .welcome-text p {
        font-size: 13px;
    }

    .form-control {
        padding: 12px 16px 12px 45px;
        font-size: 14px;
    }

    .form-icon {
        left: 15px;
        font-size: 16px;
    }

    .btn-login {
        padding: 14px;
        font-size: 14px;
    }

    .footer-text {
        font-size: 12px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-link {
        display: block;
        margin: 5px 0;
    }
}

/* Landscape mobile orientation */
@media (max-width: 991px) and (orientation: landscape) {
    .login-card {
        max-width: 600px;
        padding: 30px 40px;
    }

    .logo-section {
        margin-bottom: 20px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .welcome-text {
        margin-bottom: 25px;
    }

    .form-group {
        margin-bottom: 15px;
    }
}
