/* 1. الإعدادات العامة - منع التعارض */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    background-color: #000;
    font-family: 'Times New Roman', Times, serif;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    overflow-x: hidden; /* منع التمرير العرضي */
}

/* 2. الخلفية الفخمة */
.luxury-bg-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background-image: url('../img/black-fabric.jpg'); 
    background-size: cover;
    background-position: center;
}

.glass-overlay {
    position: absolute;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.85) 100%);
}

/* 3. صندوق التسجيل الزجاجي */
.login-box-glass {
    width: 450px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    margin: auto;
    z-index: 10;
}

.brand-header { text-align: center; margin-bottom: 25px; }
.brand-logo-ar { max-width: 140px; height: auto; }

/* 4. الحقول والمدخلات */
.input-container {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: 0.3s;
}

.input-container:focus-within { border-bottom-color: #fff; }

.input-container label {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-bottom: 2px;
    text-align: right;
}

.input-container input {
    width: 100%;
    background: transparent;
    border: none; outline: none;
    color: #fff;
    padding: 8px 0;
    font-size: 1rem;
    text-align: right;
}

/* صف كلمة السر (الخانتين بجانب بعض) */
.password-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}
.password-row .input-container { flex: 1; margin-bottom: 0; }

/* 5. منطقة الشروط والأحكام - تم توحيدها لمنع التعارض */
.terms-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 25px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    cursor: pointer;
}

.terms-container input[type="checkbox"] {
    accent-color: #b00000;
    width: 18px; height: 18px;
    cursor: pointer;
}

.terms-container label {
    color: #eee;
    font-size: 0.85rem;
    cursor: pointer;
}

.terms-container label a {
    color: #b00000;
    text-decoration: underline;
    font-weight: bold;
}

/* 6. الأزرار */
.login-btn-burgundy {
    width: 100%;
    padding: 14px;
    background-color: #800000;
    color: #fff;
    border: none; border-radius: 4px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: 0.4s ease;
}

.login-btn-burgundy:hover {
    background-color: #a00000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(128, 0, 0, 0.4);
}

/* زر العودة والتحكم في الـ Auth */
.back-home-btn {
    position: fixed;
    top: 30px; right: 40px;
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem; padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    z-index: 100;
}

/* أزرار الهيدر الجديدة (حسابي / خروج) */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-minimal {
    background: transparent;
    border: 1px solid #800000;
    color: #800000;
    padding: 4px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.3s;
}

.logout-minimal:hover {
    background: #800000;
    color: #fff;
}

.divider { color: rgba(255,255,255,0.2); }

/* الاستجابة للموبايل */
@media (max-width: 500px) {
    .login-box-glass { width: 92%; padding: 25px; }
    .password-row { flex-direction: column; gap: 10px; }
    .back-home-btn { top: 15px; right: 15px; padding: 8px 15px; font-size: 0.8rem; }
}