:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --light-text: #777;
    --white: #fff;
    --input-bg: #f9f9f9;
    --transition-speed: 0.4s;
    --error-color: #ff4444;
    --success-color: #00C851;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Amiri', serif;
}

body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    padding: 1px;
}


.particles-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.login-wrapper {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-container {
    background-color: rgba(255, 255, 255, 0.97);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    transform: translateY(0);
    opacity: 1;
    backdrop-filter: blur(5px);
}

.login-container.hide {
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
}

.logo-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    margin: 0 auto 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 30px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.logo-circle:hover {
    transform: scale(1.05);
}

.pulse-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0.7;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    70% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

h1 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.8rem;
}

.intro-text {
    margin-bottom: 25px;
    color: var(--light-text);
    font-size: 1rem;
}

.input-group {
    position: relative;
    margin-bottom: 17px;
    text-align: right;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
    transition: all 0.3s ease;
}

input {
    width: 100%;
    padding: 15px 15px 15px 4px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--input-bg);
    color: var(--text-color);
}

input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.input-group.floating label {
    position: absolute;
    right: 45px;
    top: 15px;
    color: var(--light-text);
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 1rem;
    background: transparent;
    padding: 0;
}

.input-group.floating input:focus ~ label,
.input-group.floating input:not(:placeholder-shown) ~ label {
    top: -10px;
    right: 15px;
    font-size: 0.8rem;
    background-color: var(--white);
    padding: 0 5px;
    color: var(--primary-color);
}

.input-group.floating input::placeholder {
    color: transparent;
}

.show-password {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
}

.show-password:hover {
    color: var(--primary-color);
}

.remember-me-container {
    margin: 25px 0;
    display: flex;
    justify-content: flex-end;
}

.remember-me {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    padding-right: 30px;
}

.remember-me input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.remember-me .checkmark {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 5px;
    transition: all 0.3s;
}

.remember-me:hover input ~ .checkmark {
    background-color: #ddd;
}

.remember-me input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.remember-me .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.remember-me input:checked ~ .checkmark:after {
    display: block;
}

.remember-me .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-text {
    margin-right: 8px;
    color: var(--light-text);
    font-size: 0.9rem;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.forgot-link {
    text-align: center;
}

.forgot-link a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.forgot-link a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    overflow: hidden;
    position: relative;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(102, 126, 234, 0.6);
}

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

.login-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.login-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.success-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
    z-index: 10;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.success-message.show {
    opacity: 1;
    pointer-events: auto;
}

.checkmark-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 4;
    stroke: var(--white);
    stroke-miterlimit: 10;
    box-shadow: inset 0 0 0 rgba(255, 255, 255, 0.1);
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 4;
    stroke-miterlimit: 10;
    stroke: var(--white);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.1);
    }
}

.progress-bar {
    width: 80%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-top: 20px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0;
    background-color: var(--white);
    border-radius: 3px;
    animation: progress 2.5s linear forwards;
}

@keyframes progress {
    0% { width: 0; }
    100% { width: 100%; }
}

.error-message {
    position: relative;
    background-color: #ffebee;
    color: var(--error-color);
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-left: 4px solid var(--error-color);
    animation: fadeIn 0.3s forwards;
}

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

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 15px;
    }
    
    .login-container {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .logo-circle {
        width: 80px;
        height: 80px;
        font-size: 30px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .intro-text {
        font-size: 1.2rem;
    }
    
    input {
        padding: 12px 12px 12px 40px;
        font-size: 0.9rem;
    }
    
    .login-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .remember-me-container {
        margin: 20px 0;
    }
    
    .remember-text {
        font-size: 0.8rem;
    }
    
    .form-actions {
        margin-top: 25px;
    }
    
    .input-group.floating label {
        font-size: 0.9rem;
    }
    
    .input-group.floating input:focus ~ label,
    .input-group.floating input:not(:placeholder-shown) ~ label {
        font-size: 0.7rem;
    }
}

@media (max-width: 350px) {
    .login-container {
        padding: 20px 15px;
    }
    
    .logo-circle {
        width: 70px;
        height: 70px;
    }
    
    input {
        padding: 10px 10px 10px 35px;
    }
    
    .input-group i {
        left: 10px;
        font-size: 0.9rem;
    }
    
    .show-password {
        left: 10px;
    }
    
    .remember-me .checkmark {
        height: 18px;
        width: 18px;
    }
    
    .remember-me .checkmark:after {
        left: 6px;
        top: 2px;
        width: 4px;
        height: 8px;
    }
}








/* Loading Spinner Styles */
.loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.loading-spinner.show {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: var(--text-color);
    font-size: 1rem;
    margin-top: 15px;
}

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






/* أنماط زر تسجيل الخروج المعدلة */
.logout-btn {
    background: transparent;
    color: #ff4444;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: fixed;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logout-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    color: #cc0000;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.logout-btn .tooltip {
    visibility: hidden;
    width: 80px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 120%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}

.logout-btn:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* تأثير النقر */
@keyframes click-effect {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.logout-btn:active {
    animation: click-effect 0.3s ease;
}












/* أنماط العنوان المتحرك */
.animated-title {
    color: #3498db; /* لون أزرق جذاب */
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0px 0px rgba(0, 0, 0, 0.1);
    animation: titleEntrance 1.2s ease-out forwards;
    opacity: 0;
    transform: translateY(-30px);
}

/* تأثير دخول العنوان */
@keyframes titleEntrance {
    0% {
        opacity: 0;
        transform: translateY(-40px) rotate(-5deg);
    }
    60% {
        opacity: 1;
        transform: translateY(20px) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

/* تأثير التحويم */
.animated-title:hover {
    animation: titleHover 1.5s infinite alternate;
    color: #2980b9; /* لون أزرق أغمق عند التحويم */
}

@keyframes titleHover {
    0% {
        transform: scale(1);
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    100% {
        transform: scale(2.05);
        text-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    }
}




.top-error-message {
    width: 100%;
    margin-bottom: 15px;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 4px solid #c62828;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}