/* استدعاء الخط العربي */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&display=swap');

:root {
    --main-bg: #0f172a; /* كحلي ليلي عميق */
    --card-bg: rgba(30, 41, 59, 0.7); /* خلفية الكارت شفافة */
    --gold: #fbbf24; /* ذهبي متوهج */
    --gold-dim: #b45309;
    --text: #f8fafc;
    --input-bg: rgba(15, 23, 42, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--main-bg);
    background-image: url("https://www.transparenttextures.com/patterns/islamic-exercise.png");
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    direction: rtl;
}

/* تأثير العناصر المتساقطة (نجوم وهلال) */
.falling-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* حاوية المحتوى الرئيسية */
.auth-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* الهيدر واللوجو */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 32px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
    margin-bottom: 10px;
}

.logo span {
    color: #fff;
    font-size: 18px;
    background: var(--gold-dim);
    padding: 2px 8px;
    border-radius: 5px;
    margin-right: 5px;
}

.auth-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 13px;
    color: #94a3b8;
}

/* الكارت الزجاجي */
.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px); /* تأثير التغبيش الزجاجي */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 30px;
    padding: 30px 25px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

/* مجموعات الإدخال */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gold);
}

.input-group input {
    width: 100%;
    padding: 14px 15px;
    background: var(--input-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    transition: 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

/* الكابتشا */
.captcha-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.captcha-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.3);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px dashed var(--gold);
}

#captchaText {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 8px;
    color: var(--gold);
    font-family: 'monospace';
}

.reload-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
}

/* زر التقديم */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(45deg, var(--gold-dim), var(--gold));
    border: none;
    border-radius: 15px;
    color: var(--main-bg);
    font-size: 18px;
    font-weight: 900;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(180, 83, 9, 0.3);
}

.btn-submit:active {
    transform: scale(0.97);
}

/* رسائل الحالة */
.status-message {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    font-weight: 700;
}

/* الفوتر */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #94a3b8;
}

.auth-footer a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    margin-right: 5px;
}

/* أنيميشن تساقط العناصر */
@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.star-element {
    position: absolute;
    color: var(--gold);
    font-size: 14px;
    animation: fall linear infinite;
}
