/* استدعاء الخطوط */
@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);
    --glow: 0 0 20px rgba(251, 191, 36, 0.3);
}

* {
    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: 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: 40px;
}

.logo {
    font-size: 38px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: var(--glow);
    margin-bottom: 5px;
}

.logo span {
    color: #fff;
    font-size: 16px;
    background: var(--gold-dim);
    padding: 3px 10px;
    border-radius: 6px;
    vertical-align: middle;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 15px;
}

.auth-header p {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 5px;
}

/* الكارت الزجاجي (Login Card) */
.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: 40px 25px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

/* تنسيق الحقول */
.input-group {
    margin-bottom: 25px;
}

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

.input-group input {
    width: 100%;
    padding: 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: 16px;
    transition: all 0.3s ease;
}

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

/* زر الدخول */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, 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: 12px;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    margin-top: 10px;
}

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

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

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

.auth-footer a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
    border-bottom: 1px solid var(--gold);
}

/* أنيميشن العناصر المتساقطة */
@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);
    pointer-events: none;
    animation: fall linear infinite;
    z-index: 1;
}
