/* ==========================================================================
   الألوان الأساسية الأصلية
   ========================================================================== */
:root {
    --primary-purple: #745688; 
    --gold-acc: #d9c48b;
    --dark-gray: #333333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    color: var(--dark-gray);
    /* الخلفية المتدرجة المتحركة بنفس الألوان الأصلية */
    background: linear-gradient(135deg, #5c416d, var(--primary-purple), var(--gold-acc), var(--primary-purple));
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
    overflow-x: hidden;
}

.main-wrapper {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   قسم الهوية (Profile Section)
   ========================================================================== */
.profile-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-circle {
    width: 125px;
    height: 125px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    overflow: hidden;
    border: 2.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 12px 28px rgba(0, 0, 0, 0.22),
        0 0 0 4px rgba(255, 255, 255, 0.2);
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

h1 {
    font-family: 'Cairo', sans-serif;
    font-size: 27px;
    font-weight: 700;
    margin: 10px 0 14px;
    color: #ffffff;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* شريط العنوان بتأثير كبسولة زجاجية */
.contact-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 10px 26px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.12),
        inset 0 2px 5px rgba(255, 255, 255, 0.7);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    font-weight: 700;
    font-size: 16px;
}

.contact-line i {
    color: var(--gold-acc);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* ==========================================================================
   شبكة الأيقونات: 3 أيقونات في كل سطر
   ========================================================================== */
.links-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 20px;
    justify-items: center;
}

.link-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    group: link;
}

/* ==========================================================================
   الأيقونة الزجاجية المطابقة للصورة المرفقة (3D Glass Squircle)
   ========================================================================== */
.glass-squircle {
    width: 110px;
    height: 110px;
    border-radius: 32px; /* نفس انحناء Squircle في الصورة */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* تدرج الزجاج المائل من الأعلى لليمين كما في الصورة */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.36) 0%,
        rgba(255, 255, 255, 0.12) 45%,
        rgba(116, 86, 136, 0.18) 80%,
        rgba(255, 255, 255, 0.28) 100%
    );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    
    /* الإطار الأبيض اللامع المحيط بالأيقونة */
    border: 1.8px solid rgba(255, 255, 255, 0.75);
    
    /* الظلال الداخلية والخارجية لتشكيل سماكة الزجاج الثلاثي الأبعاد */
    box-shadow: 
        /* ظل خارجي ناعم تحت الأيقونة */
        0 14px 28px rgba(35, 20, 48, 0.28),
        /* حلقة داخلية مضيئة تعطي سماكة الحافة الزجاجية */
        inset 0 0 0 3px rgba(255, 255, 255, 0.15),
        /* إضاءة داخلية قوية من الأعلى واليسار */
        inset 4px 6px 14px rgba(255, 255, 255, 0.65),
        /* انعكاس داخلي سفلي عميق */
        inset -4px -8px 16px rgba(65, 42, 82, 0.35),
        /* توهج داخلي عند القاع */
        inset 0 -4px 12px rgba(255, 255, 255, 0.55);
        
    transition: all 0.35s cubic-bezier(0.2, 0.85, 0.4, 1.275);
}

/* لمعة الانعكاس القطرية داخل الزجاج */
.glass-squircle::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 26px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 255, 255, 0.05) 45%,
        transparent 60%
    );
    pointer-events: none;
}

/* بؤرة الضوء المتوهجة في أسفل منتصف الأيقونة (مطابقة للصورة تماماً) */
.glass-squircle::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 48%;
    height: 7px;
    background: radial-gradient(
        ellipse at center,
        #ffffff 0%,
        rgba(255, 255, 255, 0.85) 35%,
        transparent 75%
    );
    filter: blur(1px);
    box-shadow: 0 0 14px 3px rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    pointer-events: none;
    transition: all 0.35s ease;
}

/* شكل الأيقونة بداخل المربع الزجاجي */
.glass-squircle i {
    font-size: 40px;
    color: #ffffff;
    filter: drop-shadow(0 4px 10px rgba(65, 42, 82, 0.45));
    z-index: 2;
    transition: all 0.35s ease;
}

/* اسم الرابط أسفل كل أيقونة زجاجية */
.link-label {
    color: #ffffff;
    font-weight: 700;
    font-size: 14.5px;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: color 0.3s ease, transform 0.3s ease;
}

/* ==========================================================================
   تأثيرات التمرير (Hover Effects)
   ========================================================================== */
.link-item:hover .glass-squircle {
    transform: translateY(-8px) scale(1.04);
    border-color: #ffffff;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(217, 196, 139, 0.25) 50%,
        rgba(116, 86, 136, 0.3) 100%
    );
    box-shadow: 
        0 20px 35px rgba(35, 20, 48, 0.38),
        0 0 20px rgba(255, 255, 255, 0.35),
        inset 0 0 0 3px rgba(255, 255, 255, 0.3),
        inset 4px 6px 16px rgba(255, 255, 255, 0.85),
        inset -4px -8px 16px rgba(65, 42, 82, 0.3),
        inset 0 -5px 15px rgba(255, 255, 255, 0.8);
}

.link-item:hover .glass-squircle::after {
    width: 65%;
    box-shadow: 0 0 20px 5px #ffffff;
}

.link-item:hover .glass-squircle i {
    transform: scale(1.12);
    color: #ffffff;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
}

.link-item:hover .link-label {
    color: var(--gold-acc);
    transform: translateY(-2px);
}

/* توسيط الأيقونة السابعة الأخيرة في السطر الثالث */
.link-item.featured-item {
    grid-column: 2 / 3;
}

/* ==========================================================================
   حركة الخلفية الأصلية
   ========================================================================== */
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================================================
   التجاوب مع الشاشات والهواتف (يبقى 3 أيقونات في السطر)
   ========================================================================== */
@media (max-width: 480px) {
    body {
        padding: 30px 12px;
    }

    h1 {
        font-size: 22px;
    }

    .contact-line {
        font-size: 13.5px;
        padding: 8px 18px;
    }

    .links-container {
        gap: 20px 12px;
    }

    .glass-squircle {
        width: 88px;
        height: 88px;
        border-radius: 26px;
    }

    .glass-squircle::before {
        border-radius: 21px;
    }

    .glass-squircle i {
        font-size: 32px;
    }

    .link-label {
        font-size: 12px;
    }
}