/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #b3cad7 0%, #667eea 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Main Container */
.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    position: relative;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header .logo {
    height: 60px;
    margin-bottom: 20px;
}

.login-header h1 {
    color: #333;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Form */
.login-form {
    position: relative;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background-color: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:invalid {
    border-color: #dc3545;
}

/* Error Message */
.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 10px;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 30px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.login-footer p:last-child {
    margin-bottom: 0;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

.legacy-link {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.legacy-link a {
    color: #999;
    font-weight: 400;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.modal-content p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Animation */
.login-form {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Focus Animation */
.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    transform: translateY(-25px) scale(0.9);
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .login-container {
        padding: 30px 20px;
        border-radius: 15px;
        max-width: 100%;
    }
    
    .login-header h1 {
        font-size: 1.8rem;
    }
    
    .login-header .logo {
        height: 50px;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 30px 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .login-header h1 {
        font-size: 1.6rem;
    }
    
    .login-header p {
        font-size: 1rem;
    }
}

/* Hover Effects */
.login-container {
    transition: transform 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
}

/* Input Error States */
.form-input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Success States */
.form-input.success {
    border-color: #28a745;
    background-color: #f8fff9;
}
