:root {
    --primary: #25D366;
    --primary-dark: #128C7E;
    --bg-dark: #0B1120;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



/* --- إعدادات زر القائمة (Hamburger) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001; /* ليبقى فوق القائمة الزجاجية */
}

.menu-toggle .bar {
    width: 28px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 5px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* حركة ارتدادية 3D */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}




body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 15% 50%, rgba(37, 211, 102, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(37, 211, 102, 0.05), transparent 25%);
    color: var(--text-main);
    font-family: 'Cairo', sans-serif;
    /* الخط الجديد والممتاز */
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 900;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.gradient-text {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* --- BUTTONS (The Fix) --- */
.btn-3d {
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-3d.primary {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 6px 0 #0d6b5e, 0 15px 20px rgba(37, 211, 102, 0.3);
}

.btn-3d.primary:active {
    transform: translateY(6px);
    box-shadow: 0 0px 0 #0d6b5e, 0 5px 10px rgba(37, 211, 102, 0.3);
}

.btn-3d.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.btn-3d.secondary:active {
    transform: translateY(6px);
    box-shadow: 0 0px 0 rgba(0, 0, 0, 0.3);
}

.btn-3d-small {
    font-family: 'Cairo', sans-serif;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 0 #0d6b5e;
    transition: all 0.15s;
}

.btn-3d-small:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #0d6b5e;
}

.btn-3d-outline {
    font-family: 'Cairo', sans-serif;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
}

.btn-3d-outline:hover {
    background: var(--primary);
    color: #fff;
}

.w-100 {
    width: 100%;
    justify-content: center;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5rem 5%;
    min-height: 80vh;
}

.hero-content {
    max-width: 50%;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 1.5rem 0 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

/* 3D Glass Sphere */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.glass-sphere {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.4), rgba(18, 140, 126, 0.1));
    border-radius: 50%;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 10px 10px 30px rgba(255, 255, 255, 0.2), 0 20px 50px rgba(37, 211, 102, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 100px;
    color: #fff;
    animation: floatSphere 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes floatSphere {

    0%,
    100% {
        transform: translateY(0) rotateX(10deg) rotateY(10deg);
    }

    50% {
        transform: translateY(-30px) rotateX(-10deg) rotateY(-10deg);
    }
}




/* 1. تحديث على كود الكرة الحالي للسماح بالعمق الداخلي */
.glass-sphere {
    /* ... احتفظ بكل الكود السابق الخاص بك هنا ... */
    /* أضف هذا السطر فقط لتفعيل البعد الثالث للعناصر الداخلية */
    transform-style: preserve-3d;
}

/* 2. الشفرة الجديدة كلياً للنص الحي */
.holo-text {
    /* هندسة الخط: خط عريض، زوايا واضحة، وحروف بارزة */
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #ffffff; /* القلب الأبيض الساطع */
    /* الدفع في الفضاء: هذا ما يجعل النص يطفو أمام الزجاج */
    transform: translateZ(50px);
    /* نحت البعد الثالث والوهج (Liquid Metal Edge) */
    text-shadow: 0px 1px 0px #1ebe5a, 0px 2px 0px #19a04b, 0px 3px 0px #14803c, 0px 4px 0px #0f602d, 0px 5px 15px rgba(37, 211, 102, 0.8), /* الوهج المحيط */
    0px 0px 30px rgba(255, 255, 255, 0.5); /* انعكاس الضوء */
    /* حركة النبض البصري الذاتي */
    animation: textPulse 3s infinite alternate;
}

/* 3. تنفس الكيان (النبض) */
@keyframes textPulse {
    0% {
        filter: brightness(1);
    }

    100% {
        filter: brightness(1.2);
        text-shadow: 0px 1px 0px #1ebe5a, 0px 2px 0px #19a04b, 0px 3px 0px #14803c, 0px 4px 0px #0f602d, 0px 10px 25px rgba(37, 211, 102, 1), 0px 0px 40px rgba(255, 255, 255, 0.8);
    }
}












/* Marketing Grid (The Fix) */
.marketing {
    padding: 5rem 5%;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.market-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.market-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(37, 211, 102, 0.1);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(37, 211, 102, 0.1);
    color: var(--primary);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.market-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.market-card p {
    color: var(--text-muted);
}

/* Pricing Plans */
.pricing {
    padding: 5rem 5%;
    background: rgba(0, 0, 0, 0.2);
}

.plans-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.plan-card {
    background: var(--bg-card);
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.plan-card h3 {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.price {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 1.5rem 0;
    color: #fff;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.plan-card ul {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.plan-card ul li {
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-card ul li i {
    color: var(--primary);
}

.plan-card.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(180deg, rgba(37, 211, 102, 0.05) 0%, rgba(30, 41, 59, 0.9) 100%);
    transform: translateY(-15px);
}

.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Footer (The Fix) */
.footer {
    background: #060913;
    padding: 4rem 5% 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul a:hover {
    color: var(--primary);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    text-decoration: none;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}


/*============================================Login page============================================== */
/* --- إعداد مسرح الـ 3D --- */
.auth-scene {
    /* أضفنا مساحات علوية وسفلية تمنع الاصطدام بالفوتر والهيدر */
    padding: 5rem 1rem;
    min-height: calc(100vh - 100px); /* نأخذ مساحة الشاشة ناقص ارتفاع الفوتر تقريباً */
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    position: relative;
    overflow: hidden;
}

/* كرة سحرية عائمة في الخلفية لزيادة العمق */
.auth-magic-sphere {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.3), transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: floatBg 6s infinite alternate;
    z-index: 0;
}

@keyframes floatBg {
    0% {
        transform: translate(-50px, -50px) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.2);
    }
}

/* --- البطاقة ذات الوجهين --- */
.auth-card-3d {
    width: 100%;
    max-width: 420px;
    /* السر هنا: إجبار البطاقة على أخذ ارتفاع يغطي أطول نموذج (وهو نموذج التسجيل) */
    min-height: 650px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

    .auth-card-3d.flipped {
        transform: rotateY(180deg);
    }

.auth-face {
    width: 100%;
    /* نجعل الوجه يأخذ الارتفاع الكامل للأب */
/*    height: 100%;*/
    backface-visibility: hidden;
    position: absolute;
    top: -2em;
    left: 0;
    padding: 2.5rem;
    border-radius: 25px;
    /* إذا كانت الشاشة صغيرة جداً، نسمح بالتمرير الداخلي الخفي */
    overflow-y: auto;
    /* إخفاء شريط التمرير بشياكة */
    scrollbar-width: none;
}


.auth-face::-webkit-scrollbar {
        display: none;
    }

/* الوجه الأمامي مرئي افتراضياً */
.auth-front {
    position: relative;
    z-index: 2;
    transform: rotateY(0deg);
}

/* الوجه الخلفي مقلوب افتراضياً */
.auth-back {
    transform: rotateY(180deg);
}

/* --- تصميم الزجاج (Glassmorphism) --- */
.glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.02);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .auth-header h2 {
        font-size: 2rem;
        color: #fff;
        margin-bottom: 0.5rem;
    }

    .auth-header p {
        color: var(--text-muted);
        font-size: 0.9rem;
    }

/* --- زر جوجل السحري --- */
.btn-google-3d {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}

    .btn-google-3d i {
        color: #ea4335;
        font-size: 1.2rem;
    }

    .btn-google-3d:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(234, 67, 53, 0.2), 0 6px 0 rgba(0,0,0,0.2);
    }

    .btn-google-3d:active {
        transform: translateY(4px);
        box-shadow: 0 0 0 rgba(0,0,0,0.2);
    }

/* --- الفاصل --- */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

    .auth-divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: rgba(255,255,255,0.1);
        z-index: 1;
    }

    .auth-divider span {
        position: relative;
        z-index: 2;
        background: #0b1120;
        padding: 0 15px;
        color: var(--text-muted);
        font-size: 0.85rem;
        border-radius: 10px;
    }

/* --- حقول الإدخال المحفورة (Neumorphism 3D Inset) --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group-3d {
    position: relative;
}

    .input-group-3d .icon {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--primary);
        z-index: 2;
    }

    .input-group-3d input {
        width: 100%;
        padding: 14px 45px 14px 15px; /* مساحة للأيقونة على اليمين */
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid transparent;
        border-radius: 12px;
        color: #fff;
        font-family: 'Cairo', sans-serif;
        font-size: 1rem;
        transition: all 0.3s;
        /* الظل الداخلي يعطي إحساس الحفر */
        box-shadow: inset 4px 4px 10px rgba(0,0,0,0.5), inset -4px -4px 10px rgba(255,255,255,0.02);
    }

        .input-group-3d input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: inset 4px 4px 10px rgba(0,0,0,0.5), 0 0 15px rgba(37, 211, 102, 0.2);
        }

/* خيارات إضافية (تذكرني ونسيت كلمة المرور) */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

    .forgot-link:hover {
        text-shadow: 0 0 10px rgba(37, 211, 102, 0.5);
    }

/* زر التبديل بين الدخول والتسجيل */
.switch-text {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.switch-btn {
    color: var(--primary);
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    transition: 0.3s;
}

    .switch-btn:hover {
        color: #fff;
    }



/* --- تنسيق أخطاء الـ Validation (نيون أحمر) --- */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.error-glow {
    color: #ff4d4d;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 10px;
    text-shadow: 0 0 8px rgba(255, 77, 77, 0.6);
    animation: fadeInError 0.3s ease-in-out;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تنسيق حقل التذكر (Checkbox) */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
}

    .custom-checkbox input[type="checkbox"] {
        accent-color: var(--primary); /* سحر بسيط لتغيير لون الشيك بوكس الافتراضي */
        width: 16px;
        height: 16px;
        cursor: pointer;
    }


/*============================================End of Login page============================================== */



/* --- التصميم المتجاوب الاحترافي (Responsive Fixes) --- */

/* الشاشات المتوسطة (التابلت) */
@media (max-width: 1024px) {
    .plans-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .hero {
        padding: 4rem 5%;
    }

    .gradient-text {
        font-size: 2.8rem;
    }
}

/* الشاشات الصغيرة (الجوالات) */
@media (max-width: 768px) {

    /* تصغير الخطوط لتناسب الشاشة */
    .gradient-text {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin: 1rem 0 1.5rem;
    }

    /* إعادة هيكلة الهيدر */
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 5%;
        min-height: auto;
        gap: 2.5rem;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 0;
    }

    /* جعل الأزرار بعرض الشاشة وتسهيل النقر */
    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .btn-3d {
        width: 100%;
        justify-content: center;
        padding: 15px 20px;
        /* مساحة أكبر للإصبع */
    }

    /* الناف بار (مؤقتاً يتم ترتيبه عمودياً حتى نضيف زر القائمة) */
    .navbar {
        flex-direction: column;
        padding: 1rem;
        gap: 1.2rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .btn-3d-small {
        width: 100%;
    }

    /* الباقات (عمود واحد) */
    .plans-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    .plan-card.featured {
        transform: translateY(0);
        /* إلغاء البروز في الجوال لتوفير المساحة */
        border-width: 1px;
    }

    .badge {
        top: -12px;
        font-size: 0.8rem;
    }

    /* تقليل مسافات الأقسام */
    .marketing,
    .pricing,
    .footer {
        padding: 3rem 5%;
    }

    /* الفوتر (توسيط كامل) */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-brand {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .social-icons {
        justify-content: center;
    }
}





@media (max-width: 768px) {
    .navbar {
        flex-direction: row; /* إبقاء اللوجو والزر على نفس الخط */
        justify-content: space-between;
        padding: 1rem 5%;
    }
    
    .menu-toggle {
        display: flex;
    }

    /* إخفاء القائمة بأسلوب سحري عبر Clip-path */
    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        background: rgba(11, 17, 32, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); /* مخفية للأعلى */
        transition: clip-path 0.5s ease-in-out;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 20px 40px rgba(0,0,0,0.6);
        gap: 2rem;
    }

    /* كلاس التفعيل الذي سيضيفه الـ JS */
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); /* كشف القائمة بالكامل */
    }

    .btn-3d-small { width: 100%; padding: 12px; }

    /* --- حركة تحول زر الهمبرجر إلى (X) --- */
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        background-color: var(--primary);
    }
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
        background-color: var(--primary);
    }
}







/* الشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .gradient-text {
        font-size: 1.8rem;
    }

    /* تصغير الشكل السحري */
    .glass-sphere {
        width: 180px;
        height: 180px;
        font-size: 70px;
    }
}