/* =========================================
   ألوان الفرفشة الداكنة (Neon Night Theme)
   ========================================= */
:root {
    --bg-dark: #0f172a;       /* كحلي غامق جداً */
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    
    --neon-pink: #f472b6;     /* وردي فاقع */
    --neon-blue: #38bdf8;     /* سماوي مشع */
    --neon-purple: #a855f7;   /* بنفسجي */
    
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'El Messiri', sans-serif;
    --font-body: 'Tajawal', sans-serif;
    --font-code: 'Fira Code', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; list-style: none; }

body {
    background: var(--bg-gradient);
    color: #fff;
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

/* فقاعات الخلفية */
.bubbles-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: rise 15s infinite ease-in;
}
@keyframes rise {
    0% { bottom: -100px; transform: translateX(0); }
    50% { transform: translateX(100px); }
    100% { bottom: 100%; transform: translateX(-100px); }
}

/* القائمة الزجاجية */
header {
    position: fixed;
    top: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1200px;
    z-index: 1000;
}

.glass-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(15px);
    padding: 15px 30px;
    border-radius: 50px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-links { display: flex; gap: 20px; }
.nav-links a {
    color: #cbd5e1;
    transition: 0.3s;
    font-weight: 500;
}
.nav-links a:hover { color: var(--neon-pink); text-shadow: 0 0 10px var(--neon-pink); }

/* الهيرو */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    margin-top: 50px; /* مسافة للقائمة */
}

.badge-glow {
    background: rgba(168, 85, 247, 0.2);
    color: var(--neon-purple);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    font-size: 0.9rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(to right, var(--neon-pink), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.type-effect {
    font-size: 1.5rem;
    color: #94a3b8;
    margin-bottom: 40px;
    min-height: 30px;
}

.buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

.btn {
    padding: 15px 35px;
    border-radius: 12px;
    font-weight: bold;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(45deg, var(--neon-purple), var(--neon-pink));
    color: #fff;
    box-shadow: 0 0 20px rgba(244, 114, 182, 0.4);
}

.btn-primary:hover { transform: translateY(-5px); box-shadow: 0 0 40px rgba(244, 114, 182, 0.6); }

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.1);
    color: #fff;
}
.btn-secondary:hover { border-color: var(--neon-blue); color: var(--neon-blue); }

/* البطاقات */
.section { padding: 100px 5%; }
.section-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #fff;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--glass);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.1s; /* JS Tilt */
    transform-style: preserve-3d;
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card h3 { font-family: var(--font-heading); margin-bottom: 15px; font-size: 1.4rem; }
.card p { color: #94a3b8; }

/* API Section */
.api-wrapper { max-width: 800px; margin: 0 auto; }
.api-card {
    background: #000;
    border-radius: 15px;
    border: 1px solid #333;
    padding: 25px;
    position: relative;
}
/* خط نيون جانبي */
.api-card::before {
    content: ''; position: absolute; top: 10%; right: 0;
    width: 4px; height: 80%;
    background: var(--neon-pink);
    border-radius: 4px 0 0 4px;
    box-shadow: 0 0 10px var(--neon-pink);
}

.api-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; flex-wrap: wrap; }
.method { background: var(--neon-blue); color: #000; padding: 4px 10px; border-radius: 5px; font-weight: bold; font-size: 0.8rem; }
.url { font-family: var(--font-code); color: #fff; direction: ltr; }

.code-box {
    background: #111;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    border: 1px solid #222;
    direction: ltr;
}

.code-box code {
    color: var(--neon-pink);
    font-family: var(--font-code);
    overflow-x: auto;
    white-space: nowrap;
    margin-right: 15px;
    scrollbar-width: none;
}

.copy-btn { background: transparent; border: none; color: #666; cursor: pointer; font-size: 1.2rem; }
.copy-btn:hover { color: var(--neon-blue); }

/* المطور */
.dev-card {
    text-align: center;
    background: linear-gradient(145deg, #1e1b4b, #0f172a);
    padding: 50px;
    border-radius: 30px;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border);
}

.profile-glow {
    width: 100px; height: 100px;
    margin: 0 auto 20px;
    background: #000;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 2.5rem; color: var(--neon-purple);
    border: 2px solid var(--neon-purple);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.socials { margin-top: 20px; display: flex; justify-content: center; gap: 15px; }
.socials a {
    width: 45px; height: 45px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: #fff; transition: 0.3s;
}
.socials a:hover { background: var(--neon-pink); transform: scale(1.1); }

/* Animations Classes */
/* مهم: نجعل العنصر شفافاً في البداية */
.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: 1s all ease; 
}

/* عندما نضيف كلاس active يظهر العنصر */
.reveal.active { 
    opacity: 1; 
    transform: translateY(0); 
}

.pulse { animation: pulse 1.5s infinite; color: var(--neon-pink); }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* =========================================
   تعديلات الجوال (Mobile Responsiveness)
   ========================================= */
@media (max-width: 768px) {
    /* تصغير عرض القائمة لتناسب الشاشة */
    header { 
        width: 100%; 
        top: 0; 
        padding: 10px; 
    }

    .glass-nav {
        width: 100%;
        border-radius: 0 0 20px 20px; /* جعلها مستطيلة من الأعلى */
        padding: 10px 15px;
        flex-direction: column; /* ترتيب الشعار والروابط فوق بعض */
        gap: 10px;
    }

    /* هذا السطر كان يخفي الروابط، الآن نجعلها تظهر */
    .nav-links { 
        display: flex !important; 
        gap: 15px; 
        justify-content: center;
        width: 100%;
    }

    /* تصغير الخط قليلاً للجوال */
    .nav-links a {
        font-size: 0.9rem;
        padding: 5px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .hero {
        margin-top: 100px; /* زيادة المسافة لأن القائمة أصبحت أطول */
    }

    .hero h1 { 
        font-size: 2.8rem; 
    }
}
