/* إعدادات عامة */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #fff;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/background.jpeg') no-repeat center center fixed;
    background-size: cover;
    animation: zoomInOut 20s infinite alternate;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: -1;
}

@keyframes zoomInOut {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

/* شاشة التحميل */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 25px;
    height: 25px;
    background-color: #121212;
    color: #fff;
    text-align: center;
}

.loading-logo {
    width: 25px;
    height: 25px;
    justify-content: center;
    align-items: center;
}

/* شاشة تسجيل الدخول */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    text-align: center;
    width: 90%;
    max-width: 400px;
    padding: clamp(20px, 5vw, 40px);
    background: rgba(17, 25, 40, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease-out;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

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

/* تخصيص الشعار */
.logo {
    width: 130px;
    height: auto;
    margin-bottom: 35px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
}

/* تنسيق نموذج تسجيل الدخول */
.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.login-form > * {
    position: relative;
}

/* تنسيق حقول الإدخال */
.login-form .input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    margin: 12px 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.login-form .input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.login-form .input:focus {
    outline: none;
    border-color: #ff212c;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.2);
    transform: scale(1.02);
}

/* تنسيق زر تسجيل الدخول */
.login-form .btn {
    width: 100%;
    height: 50px;
    padding: 15px;
    margin-top: 20px;
    background: linear-gradient(45deg, #ff212c, #ee3762);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-form .btn:hover {
    background: linear-gradient(45deg, #ff212c, #ee3762);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(228, 42, 113, 0.651);
    transform: scale(1.02);
}

/* تحسين تصميم مربع إظهار كلمة المرور */
.checkbox-container {
    margin: 20px 0;
    text-align: left;
    position: relative;
    padding-left: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label .checkmark {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.checkbox-label .checkmark:before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    background: #fff;
    transition: all 0.3s ease;
}

.checkbox-label input:checked + .checkmark {
    background: #ff212c;
}

.checkbox-label input:checked + .checkmark:before {
    transform: translateX(20px);
}

.checkbox-label:hover .checkmark {
    background: rgba(255, 255, 255, 0.2);
}

/* رسالة الخطأ */
.error-message {
    color: #ff3333;
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
    background-color: rgba(255, 51, 51, 0.1);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgba(255, 51, 51, 0.3);
    display: none;
}

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

/* تحسين تنسيق النصوص */
h1, p {
    font-size: 20px;
    text-align: center;
}

/* تحسين التجاوب مع أحجام الشاشات المختلفة */
@media screen and (min-width: 1920px) {
    .login-container {
        max-width: 500px;
    }
    .logo {
        width: 150px;
    }
    .login-form .input,
    .login-form .btn {
        font-size: 18px;
    }
}

@media screen and (max-width: 768px) {
    .login-container {
        width: 85%;
        padding: 20px;
    }
    .logo {
        width: 100px;
    }
}

/* تحسين دعم التحكم عن بعد WebOS */
.login-form .input:focus,
.login-form .btn:focus,
.checkbox-label:focus-within {
    outline: 3px solid #ff212c;
    outline-offset: 2px;
    box-shadow: 0 0 20px rgba(228, 42, 113, 0.651);
    transform: scale(1.02);
}

/* تأثيرات التحكم عن بعد */
[data-focus-visible-added] {
    outline: 3px solid #ff212c !important;
    outline-offset: 2px !important;
    transition: outline-offset 0.1s ease;
}

.login-form .input,
.login-form .btn,
.checkbox-label {
    cursor: pointer;
}

.login-form .input:hover,
.login-form .btn:hover,
.checkbox-label:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* إضافة دعم للتنقل السريع باستخدام الأسهم */
.login-form *:focus {
    z-index: 1;
}

/* أنماط التحميل */
#loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ff212c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* التخلص من العناصر المخفية */
.hidden {
    display: none;
}

/* تنسيق نافذة تأكيد الخروج */
.exit-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #ff212c;
    box-shadow: 0 0 20px rgba(240, 41, 86, 0.3);
    text-align: center;
    z-index: 1000;
    min-width: 300px;
    display: block !important;
}

.exit-dialog p {
    color: white !important;
    font-size: 24px;
    margin-bottom: 30px;
    font-family: 'Cairo', sans-serif;
}

.exit-dialog .buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.exit-dialog button {
    padding: 15px 40px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    min-width: 100px;
}

.exit-dialog button.confirm {
    background: #ff212c;
    color: white;
}

.exit-dialog button.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.exit-dialog button.focused {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(240, 41, 86, 0.7);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    display: block !important;
}
.footer {
    color: white;
    font-size: calc(1.5vw + 5px);
} 