:root {
    --primary: #5670b8;
    --primary-dark: #27ae60;
    --primary-light: #818CF8;
    --success: #10B981;
    --danger: #EF4444;
    --dark: #1F2937;
    --light: #F9FAFB;
    --gray: #6B7280;
    --gray-light: #E5E7EB;

    --gradient-1: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 140%);
    position: relative;
    overflow: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    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%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-50px, 50px) rotate(5deg);
    }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.logo-icon i {
    font-size: 2.5rem;
    color: white;
}

.logo-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.logo-subtitle {
    color: var(--gray);
    font-size: 0.95rem;
    font-weight: 500;
}

.form-floating>.form-control {
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.form-floating>.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.1);
    background: white;
}

.form-floating>label {
    padding: 1rem 0.75rem;
    color: var(--gray);
    font-weight: 500;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    z-index: 5;
}

.password-toggle {
    cursor: pointer;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary);
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--gray-light);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    color: var(--dark);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.btn-login {
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    margin-right: 0.5rem;
}

.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-light);
}

.divider span {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    color: var(--gray);
    font-size: 0.875rem;
    font-weight: 500;
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    flex: 1;
    padding: 0.875rem;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    background: white;
    color: var(--dark);
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-social:hover {
    border-color: var(--primary);
    background: var(--light);
    transform: translateY(-2px);
}

.btn-social i {
    font-size: 1.25rem;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
    color: var(--gray);
    font-size: 0.9rem;
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.register-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.9rem;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.show {
    display: block;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.loading-spinner {
    display: none;
}

.loading-spinner.show {
    display: inline-block;
}

/* Responsive */
@media (max-width: 576px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .logo-title {
        font-size: 1.75rem;
    }

    .social-login {
        flex-direction: column;
    }
}