:root {
    --primary-gradient: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
    --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --dark-blue: #1e293b;
    --light-gray: #f8fafc;
    --border-radius: 20px;
    --box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    --medical-blue: #0369a1;
    --medical-teal: #0d9488;
    --medical-green: #16a34a;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    background: /*linear-gradient(135deg, rgba(2, 132, 199, 0.85) 0%, rgba(8, 145, 178, 0.75) 50%, rgba(13, 148, 136, 0.85) 100%),*/
                url('../images/logingbackgroundimage.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* Add a subtle overlay for better readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                rgba(2, 62, 138, 0.6) 0%, 
                rgba(6, 95, 70, 0.5) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Animated Background Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: float 6s infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Add medical cross symbols as floating elements */
.particle:nth-child(even) {
    border-radius: 2px;
    transform: rotate(45deg);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    animation: slideUp 0.6s ease-out;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-card:hover {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    transform: translateY(-5px);
}

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

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

.login-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
    animation: pulse 2s infinite;
    border: 3px solid white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(14, 165, 233, 0.6);
    }
}

.login-avatar i {
    font-size: 40px;
    color: white;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.login-subtitle {
    font-size: 13px;
    color: #64748b;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Error Message */
.error-message {
    background: var(--danger-gradient);
    color: white;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    animation: shake 0.5s;
    border-left: 4px solid #dc2626;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-message i {
    margin-right: 10px;
    font-size: 18px;
}

/* Success Message */
.success-message {
    background: var(--success-gradient);
    color: white;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    animation: slideDown 0.5s;
    border-left: 4px solid #059669;
}

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

.success-message i {
    margin-right: 10px;
    font-size: 18px;
}

/* Form Styles */
.login-form {
    margin-bottom: 20px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group .input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: all 0.3s ease;
    z-index: 2;
}

.form-control {
    height: 50px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    padding: 10px 15px 10px 50px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-control:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background: white;
    outline: none;
}

.form-control:focus + .input-icon,
.form-group:focus-within .input-icon {
    color: #0ea5e9;
}

.toggle-password {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.3s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: #0ea5e9;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 5px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #0ea5e9;
}

.forgot-link {
    font-size: 14px;
    color: #0ea5e9;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.forgot-link:hover {
    color: #0369a1;
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    width: 100%;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    font-size: 18px;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Recover Button */
.btn-recover {
    background: var(--success-gradient);
}

.btn-recover:hover {
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

/* Back Button */
.btn-back {
    width: 100%;
    height: 45px;
    background: transparent;
    color: #0ea5e9;
    border: 2px solid #0ea5e9;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.btn-back:hover {
    background: #0ea5e9;
    color: white;
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}

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

.login-footer p {
    font-size: 12px;
    color: #94a3b8;
    letter-spacing: 1px;
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-avatar {
        width: 80px;
        height: 80px;
    }

    .login-avatar i {
        font-size: 32px;
    }

    .form-options {
        flex-direction: column;
        gap: 10px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(15, 23, 42, 0.95);
    }

    .login-title {
        color: #e2e8f0;
    }

    .login-subtitle {
        color: #94a3b8;
    }

    .form-control {
        background: #1e293b;
        border-color: #334155;
        color: #e2e8f0;
    }

    .form-control:focus {
        background: #334155;
        border-color: #0ea5e9;
    }

    .remember-me {
        color: #cbd5e1;
    }

    .login-footer {
        border-top-color: #334155;
    }

    .login-footer p {
        color: #64748b;
    }
}