* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Tajawal', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f472b6;
    --light: #ffffff;
    --light-gray: #f8fafc;
    --gray: #64748b;
    --dark-gray: #334155;
    --success: #10b981;
    --shadow: rgba(0, 0, 0, 0.06);
    --gradient-1: linear-gradient(135deg, #4f46e5, #06b6d4);
    --gradient-2: linear-gradient(135deg, #818cf8, #38bdf8);
    --gradient-3: linear-gradient(135deg, #f472b6, #fb7185);
}

body {
    min-height: 100vh;
    background: var(--light-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.background {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.1) 0%, transparent 50%),
        var(--light-gray);
    z-index: -1;
}

.shape {
    position: absolute;
    background: var(--gradient-1);
    animation: float 8s ease-in-out infinite;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(40px);
    opacity: 0.2;
}

.shape:nth-child(1) {
    width: 600px;
    height: 600px;
    top: -300px;
    left: -300px;
    animation-delay: 0s;
}

.shape:nth-child(2) {
   
    background: var(--gradient-2);
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(10px, 10px) rotate(5deg) scale(1.05);
    }
    50% {
        transform: translate(0, 20px) rotate(0deg) scale(1);
    }
    75% {
        transform: translate(-10px, 10px) rotate(-5deg) scale(0.95);
    }
}

.container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 15px 35px var(--shadow),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 0 0 4px rgba(79, 70, 229, 0.05);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px var(--shadow),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 0 0 4px rgba(79, 70, 229, 0.1);
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    background-size: 200% 100%;
    animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.logo {
    text-align: center;
    margin-bottom: 25px;
}

.logo i {
    font-size: 3.2em;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 
        0 0 20px rgba(79, 70, 229, 0.3),
        0 0 40px rgba(79, 70, 229, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    font-size: 2.2em;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-header p {
    color: var(--gray);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group i {
    position: absolute;
    right: 15px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.2em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group input {
    width: 100%;
    padding: 16px 45px 16px 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: var(--light);
    border-radius: 16px;
    color: var(--dark-gray);
    font-size: 1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: right;
}

.input-group input:focus {
    background: var(--light);
    outline: none;
    border-color: var(--primary);
    box-shadow: 
        0 0 0 4px rgba(79, 70, 229, 0.1),
        0 0 20px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.input-group input:focus + i {
    color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.input-group input::placeholder {
    color: var(--gray);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: var(--gray);
    font-size: 0.9em;
}

.remember-forgot label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.remember-forgot label:hover {
    color: var(--primary);
}

.remember-forgot input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.remember-forgot a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.remember-forgot a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.remember-forgot a:hover::after {
    width: 100%;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-1);
    border: none;
    border-radius: 16px;
    color: var(--light);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 5px 15px rgba(79, 70, 229, 0.3),
        0 0 0 4px rgba(79, 70, 229, 0.1);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn i {
    margin-right: 8px;
    margin-left: 0;
}

.security-info {
    text-align: center;
    margin-top: 25px;
    color: var(--gray);
    font-size: 0.85em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.security-info:hover {
    color: var(--success);
}

.security-info i {
    color: var(--success);
    font-size: 1em;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

.error-message {
    background-color: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #fecaca;
    font-size: 0.9em;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #c3e6cb;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #333;
}

.back-link i {
    margin-right: 5px;
}

.password-requirements {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.password-requirements h6 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    color: #6c757d;
    font-size: 0.85em;
    margin-bottom: 5px;
    padding-right: 20px;
    position: relative;
}

.password-requirements li:before {
    content: "•";
    position: absolute;
    right: 0;
    color: #6c757d;
}

.forgot-password-link {
    text-align: center;
    margin: 15px 0;
}

.forgot-password-link a {
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    font-size: 0.9em;
}

.forgot-password-link a:hover {
    color: #333;
}

.forgot-password-link i {
    margin-left: 5px;
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .login-header h2 {
        font-size: 1.8em;
    }
    
    .shape {
        filter: blur(30px);
    }
    
    .input-group input {
        padding: 14px 14px 14px 40px;
    }
    
    .login-btn {
        padding: 14px;
    }
} 