/* ==================== AUTHENTICATION PAGE (LOGIN / REGISTER) ==================== */
#authPage {
    display: none; /* مخفي افتراضياً */
    align-items: center;
    justify-content: center;
    background: #050505; /* خلفية داكنة جداً تبرز الإضاءة */
    width: 100%;
    min-height: calc(100vh - 80px); /* يطرح مساحة شريط التنقل السفلي */
    padding: 20px;
    padding-bottom: 90px; /* لكي لا يغطي الشريط محتوى الصفحة */
}

/* عندما يتفعل الكلاس active يظهر كـ flex ليتوسط المحتوى */
#authPage.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    position: relative;
}

/* تأثير الإضاءة الخلفية (Glowing Effect) */
.auth-container::before, .auth-container::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.5;
    animation: floatGlow 6s infinite alternate;
}

.auth-container::before {
    background: #D4AF37; /* ذهبي */
    top: -30px;
    right: -30px;
}

.auth-container::after {
    background: #E84A68; /* وردي */
    bottom: -30px;
    left: -30px;
    animation-delay: -3s;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, 20px) scale(1.2); }
}

.auth-box {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 2px 15px rgba(255,255,255,0.02);
    text-align: center;
    overflow: hidden;
}

.auth-logo {
    margin-bottom: 30px;
}

.auth-form-container {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.auth-form-container.active {
    display: block;
}

.auth-form-container h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #ffffff;
}

.auth-input-group {
    position: relative;
    margin-bottom: 20px;
}

.auth-input-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.4);
    font-size: 18px;
    transition: color 0.3s ease;
}

.auth-input {
    width: 100%;
    padding: 16px 45px 16px 15px; /* مسافة للأيقونة على اليمين */
    background: rgba(0,0,0,0.3);
    border: 2px solid transparent;
    border-radius: 15px;
    color: #ffffff;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.auth-input::placeholder {
    color: rgba(255,255,255,0.3);
}

.auth-input:focus {
    border-color: #D4AF37;
    background: rgba(0,0,0,0.5);
}

.auth-input:focus + i, .auth-input-group:focus-within i {
    color: #D4AF37;
}

.auth-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #D4AF37 0%, #E84A68 100%);
    color: #ffffff;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(232, 74, 104, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-btn:active {
    transform: scale(0.96);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.auth-links.center {
    justify-content: center;
}

.auth-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #D4AF37;
}

.auth-links .highlight {
    color: #E84A68;
    font-weight: 600;
}
