:root {
    --gold: linear-gradient(135deg, #d4af37 0%, #f9f295 50%, #b8860b 100%);
    --dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.95);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: var(--dark);
    height: ;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* لمنع أي تمرير خارجي */
}

/* خلفية متدرجة فخمة */
.glass-background {
    width: 100%; height: 100%;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    background: var(--glass);
    width: 380px;
    height: 550px; /* ارتفاع ثابت يمنع التذبذب */
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* اللوجو */
.brand-section {
    text-align: center;
    margin-bottom: 30px;
}

.main-logo {
    font-size: 45px;
    background: var(--gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

h1 { font-size: 22px; color: var(--dark); letter-spacing: 1px; }

/* مدير التبديل */
.tab-manager {
    width: 100%;
    height: 50px;
    background: #e2e8f0;
    border-radius: 15px;
    position: relative;
    display: flex;
    margin-bottom: 40px;
}

.tab-btn {
    flex: 1;
    border: none;
    background: none;
    z-index: 2;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    transition: 0.4s;
}

.tab-btn.active { color: var(--dark); }

#active-bg {
    position: absolute;
    width: 50%; height: 80%;
    background: #fff;
    top: 10%; right: 5px;
    border-radius: 12px;
    transition: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* المنطقة المنزلقة */
.form-viewport {
    width: 100%;
    overflow: hidden; /* هذا يمنع ظهور النموذج الآخر */
    flex-grow: 1;
}

.forms-slider {
    display: flex;
    width: 200%; /* ضعف العرض ليحتوي النموذجين بجانب بعضهما */
    height: 100%;
    transition: 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.inner-form {
    width: 50%; /* كل نموذج يأخذ نصف عرض الحاوية الكبيرة (أي العرض الكامل للكارت) */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* الحقول */
.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    outline: none;
    background: #f8fafc;
    transition: 0.3s;
}

.input-wrapper i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: 0.3s;
}

.input-wrapper input:focus {
    border-color: #d4af37;
    background: #fff;
}

.input-wrapper input:focus + i { color: #d4af37; }

/* الزر الرئيسي */
.prime-btn {
    background: var(--dark);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.prime-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* استجابة الهاتف */
@media (max-width: 480px) {
    .auth-card {
        width: 100%;
        height: 100%;
        border-radius: 0;
        justify-content: center;
    }
}
