html, body {
    height: 100%;
}

:root {
    --purple-glow: #a855f7;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(167, 139, 250, 0.3);
    --primary-purple: #7c3aed;
}

body {
    background-image: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url('../imgs/Untitled-2.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    color: white;
}

/* start fonts */

@font-face {
    font-family: 'Yekan';
    src: url('../fonts/YekanBakh-Regular.ttf') format('truetype'),
        url('font/MyFont.otf') format('opentype'),
        url('font/MyFont.woff2') format('woff2'),
        url('font/MyFont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'minecraft';
    src: url('../fonts/MinecraftRegular.ttf') format('truetype'),
        url('font/MyFont.otf') format('opentype'),
        url('font/MyFont.woff2') format('woff2'),
        url('font/MyFont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Graphik-bold';
    src: url('') format('truetype'),
        url('../fonts/Graphik\ Arabic\ Bold.otf') format('opentype'),
        url('font/MyFont.woff2') format('woff2'),
        url('font/MyFont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 10px #7c3aed;
    }

    100% {
        box-shadow: 0 0 25px #a855f7;
    }
}

@keyframes siteNameGlow {
    0% {
        text-shadow:
            0 0 20px #7c3aed,
            0 0 40px #a855f7,
            0 0 60px #c084fc,
            0 0 80px #e9d5ff;
    }

    50% {
        text-shadow:
            0 0 30px #6b21a8,
            0 0 60px #7c3aed,
            0 0 90px #a855f7,
            0 0 120px #c084fc,
            0 0 150px #e9d5ff;
    }

    100% {
        text-shadow:
            0 0 20px #7c3aed,
            0 0 40px #a855f7,
            0 0 60px #c084fc,
            0 0 80px #e9d5ff;
    }
}

:root {
    --primary: #7C3AED;
    --primary-light: #A78BFA;
    --secondary: #6B7280;
    --background: #FFFFFF;
    --surface: #F5F3FF;
    --text: #1A1333;
    --radius: 10px;
}

.minecraft {
    font-family: minecraft;
}

* {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

.per {
    font-family: Yekan;
}

.eng {
    font-family: Montserrat;
}

.eng2 {
    font-family: Impact;
}

html {
    scroll-behavior: smooth;
}

/* end fonts */



/* start sochial */

.link1 {
    width: 10vh;
}

.links_btn {
    position: fixed;
    top: 50%;
    right: 10px;
    display: inline;
}

.icon2 {
    position: fixed;
    right: 30px;
}

.link1 {
    position: fixed;
    top: 35vh;
    right: -25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 40px 5px 40px 5px;
    width: 80PX;
    transition: all 0.3s;
}

.link1:hover {
    box-shadow: 0 4px 40px rgb(132, 0, 255);
    background-color: rgba(124, 58, 237, 0.7);
    transform: translateY(-2px) translateZ(0);
    border: 1px solid rgb(183, 0, 255);

}

.link2 {
    position: fixed;
    top: 40vh;
    right: -25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 40px 5px 40px 5px;
    width: 80PX;
    transition: all 0.3s;

}

.link2:hover {
    box-shadow: 0 4px 40px rgb(132, 0, 255);
    background-color: rgba(124, 58, 237, 0.7);
    transform: translateY(-2px) translateZ(0);
    border: 1px solid rgb(183, 0, 255);
}

.link3 {
    position: fixed;
    top: 45vh;
    right: -25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 40px 5px 40px 5px;
    width: 80PX;
    transition: all 0.3s;

}

.link3:hover {
    box-shadow: 0 4px 40px rgb(132, 0, 255);
    background-color: rgba(124, 58, 237, 0.7);
    transform: translateY(-2px) translateZ(0);
    border: 1px solid rgb(183, 0, 255);
}

.link4 {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 40px 5px 40px 5px;
    width: 80PX;
    height: 45px;
    position: fixed;
    right: -25PX;
    transition: all 0.3s;
}

.link4:hover {
    box-shadow: 0 4px 40px rgb(132, 0, 255);
    background-color: rgba(124, 58, 237, 0.7);
    transform: translateY(-2px) translateZ(0);
    border: 1px solid rgb(183, 0, 255);
}


/* end sochial */

/* header start */

header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)), url('');
    backdrop-filter: blur(2px) saturate(1.3) brightness(0.3);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    color: white;
    text-align: center;
    z-index: 1;
}

.header_box {
    width: 75%;
    margin: 0 auto;
    padding: 300px 0;
}

/* header end  */

a {
    color: #c4b5fd;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 160px;
    background-color: #5b21b6;
    /* تغییر رنگ از خاکستری به بنفش */
    color: #fff;
    text-align: center;
    padding: 6px 8px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}



    .user-welcome {
        color: #a855f7;
        font-weight: bold;
        text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
        transition: all 0.3s ease;
    }
    
    .user-welcome:hover {
        color: #9333ea;
    }
    
    .logout-btn {
        color: #ef4444;
        transition: all 0.3s ease;
    }
    
    .logout-btn:hover {
        color: #dc2626;
        text-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
    }
    
    .logout-btn:hover svg {
        transform: translateX(5px);
    }
    
    nav a svg {
        transition: transform 0.3s ease;
    }
    
    nav a:hover svg {
        transform: scale(1.1);
        
    }

        <style>
        /* استایل دکمه مشاهده پروژه */
        .project-view-btn {
            position: absolute;
            bottom: -60px;
            left: 50%;
            transform: translateX(-50%);
            background: linear-gradient(135deg, #6f00ff 0%, #9d4edd 50%, #ff006e 100%);
            color: white;
            padding: 12px 24px;
            border-radius: 50px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: inherit;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            box-shadow: 0 4px 15px rgba(111, 0, 255, 0.5);
            opacity: 0;
            pointer-events: none;
            border: 1px solid rgba(255, 255, 255, 0.18);
            backdrop-filter: blur(10px);
            text-decoration: none;
            z-index: 10;
        }

        .sec_2_item_project1,
        .sec_2_item_project2 {
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.3s ease;
        }

        .sec_2_item_project1:hover .project-view-btn,
        .sec_2_item_project2:hover .project-view-btn {
            bottom: 20px;
            opacity: 1;
            pointer-events: all;
        }

        .project-view-btn:hover {
            transform: translateX(-50%) scale(1.05);
            box-shadow: 0 6px 30px rgba(111, 0, 255, 0.8);
            background: linear-gradient(135deg, #9d4edd 0%, #6f00ff 50%, #ff006e 100%);
        }

        /* انیمیشن آیکون چشم */
        .project-view-btn svg {
            animation: eyeBlink 3s ease-in-out infinite;
        }

        .project-view-btn:hover svg {
            animation: eyeMove 0.6s ease-in-out infinite;
        }

        @keyframes eyeBlink {
            0%, 90%, 100% {
                transform: scaleY(1);
            }
            95% {
                transform: scaleY(0.1);
            }
        }

        @keyframes eyeMove {
            0%, 100% {
                transform: translateX(0);
            }
            25% {
                transform: translateX(-3px);
            }
            75% {
                transform: translateX(3px);
            }
        }

        /* مخفی کردن آیکون‌های قدیمی */
        .sec_2_item_project1 > .eye_icon,
        .sec_2_item_project2 > .eye_icon {
            display: none;
        }


        /* ============================
           ROOT VARIABLES & RESET
           ============================ */
        :root {
            --nav-height: 72px;
            --nav-bg: rgba(10, 10, 22, 0.78);
            --nav-border: rgba(255, 255, 255, 0.08);
            --nav-glass-blur: 18px;
            --accent-1: #a855f7;
            --accent-2: #6f00ff;
            --accent-3: #ff006e;
            --accent-glow: rgba(168, 85, 247, 0.45);
            --text-primary: #f1f0f4;
            --text-muted: #b0aec1;
            --text-hover: #ffffff;
            --dropdown-bg: rgba(16, 16, 32, 0.92);
            --dropdown-border: rgba(255, 255, 255, 0.1);
            --btn-gradient: linear-gradient(135deg, #6f00ff 0%, #a855f7 50%, #ff006e 100%);
            --transition-fast: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
            --shadow-glow: 0 0 28px var(--accent-glow);
            --radius-lg: 16px;
            --radius-full: 50px;
        }

        *,
        *::before,
        *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            background: #0a0a16;
            font-family: 'Segoe UI', 'Vazirmatn', system-ui, sans-serif;
            min-height: 200vh;
            /* just to scroll and test glass effect */;
        }

        /* ============================
           NAV - GLASS CONTAINER
           ============================ */
        nav {
            position: fixed;
            top: 16px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            width: min(94%, 1280px);
            height: var(--nav-height);
            background: var(--nav-bg);
            backdrop-filter: blur(var(--nav-glass-blur));
            -webkit-backdrop-filter: blur(var(--nav-glass-blur));
            border: 1px solid var(--nav-border);
            border-radius: var(--radius-full);
            box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
            transition: all var(--transition-smooth);
            display: flex;
            align-items: center;
            padding: 0 8px;
        }

        /* Subtle top glow line */
        nav::before {
            content: '';
            position: absolute;
            top: -1px;
            left: 30px;
            right: 30px;
            height: 1px;
            background: linear-gradient(90deg,
                    transparent,
                    rgba(168, 85, 247, 0.7),
                    rgba(255, 0, 110, 0.5),
                    rgba(168, 85, 247, 0.7),
                    transparent);
            border-radius: 1px;
        }

        /* Shrink on scroll (via JS or CSS class) */
        nav.scrolled {
            width: min(90%, 1180px);
            height: 58px;
            background: rgba(10, 10, 22, 0.88);
            border-radius: 40px;
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
        }

        .nav_cont {
            width: 100%;
            display: flex;
            align-items: center;
        }

        .nav_items {
            width: 100%;
        }

        .nav_item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            gap: 6px;
            flex-wrap: nowrap;
        }

        /* ============================
           LOGO & TITLE
           ============================ */
        .nav_logo {
            height: 44px;
            width: auto;
            transition: all var(--transition-fast);
            filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.5));
            flex-shrink: 0;
        }
        .nav_logo:hover {
            filter: drop-shadow(0 0 22px rgba(168, 85, 247, 0.85));
            transform: scale(1.06);
        }

        .nav_title {
            font-size: 1.35rem;
            font-weight: 800;
            letter-spacing: 0.5px;
            background: var(--btn-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            white-space: nowrap;
            flex-shrink: 0;
            margin: 0 6px;
            transition: all var(--transition-fast);
        }
        .nav_title:hover {
            filter: brightness(1.2);
        }

        /* ============================
           NAV LINKS - MODERN STYLE
           ============================ */
        .nav_item a,
        .nav_item span a,
        .drop_btn>span a {
            text-decoration: none;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-weight: 600;
            padding: 10px 14px;
            border-radius: 30px;
            white-space: nowrap;
            transition: all var(--transition-fast);
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            letter-spacing: 0.2px;
        }

        /* Glow underline effect on hover */
        .glow-underline a::after {
            content: '';
            position: absolute;
            bottom: 4px;
            left: 50%;
            transform: translateX(-50%) scaleX(0);
            width: 60%;
            height: 2.5px;
            background: var(--btn-gradient);
            border-radius: 2px;
            transition: transform var(--transition-fast);
            box-shadow: 0 0 10px var(--accent-glow);
        }
        .glow-underline a:hover::after {
            transform: translateX(-50%) scaleX(1);
        }

        .nav_item a:hover,
        .drop_btn>span a:hover {
            color: var(--text-hover);
            background: rgba(168, 85, 247, 0.12);
            box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
            text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
        }

        /* Active link */
        .nav_item a.active {
            background: rgba(168, 85, 247, 0.2);
            color: #fff;
            box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
        }

        /* ============================
           SVG ICONS IN LINKS
           ============================ */
        .nav_item a svg,
        .drop_btn a svg {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            transition: all var(--transition-fast);
        }
        .nav_item a:hover svg {
            transform: scale(1.2);
            filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.7));
        }

        /* ============================
           DROPDOWN - MODERN STYLE
           ============================ */
        .dropdown {
            position: relative;
            list-style: none;
        }
        .drop_btn {
            list-style: none;
        }

        .drop_box {
            position: absolute;
            top: calc(100% + 14px);
            right: -10px;
            background: var(--dropdown-bg);
            backdrop-filter: blur(22px);
            -webkit-backdrop-filter: blur(22px);
            border: 1px solid var(--dropdown-border);
            border-radius: var(--radius-lg);
            padding: 8px 0;
            min-width: 190px;
            list-style: none;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-12px) scale(0.94);
            transition: all var(--transition-smooth);
            box-shadow: var(--shadow-lg), 0 0 40px rgba(111, 0, 255, 0.2);
            z-index: 200;
        }
        .drop_box::before {
            content: '';
            position: absolute;
            top: -8px;
            right: 28px;
            width: 16px;
            height: 16px;
            background: var(--dropdown-bg);
            border: 1px solid var(--dropdown-border);
            border-right: none;
            border-bottom: none;
            transform: rotate(45deg);
            border-radius: 3px 0 0 0;
        }

        .dropdown:hover .drop_box {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
        }

        .drop_box li {
            padding: 4px 8px;
        }
        .drop_box li a {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 0.88rem;
            font-weight: 500;
            transition: all var(--transition-fast);
            text-decoration: none;
        }
        .drop_box li a:hover {
            background: rgba(168, 85, 247, 0.18);
            color: #fff;
            box-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
            transform: translateX(-4px);
        }
        .drop_box li a svg {
            width: 16px;
            height: 16px;
        }

        .nav_logo {
            border-radius: 8px;
        }

        /* ============================
           LOGIN / REGISTER BUTTONS
           ============================ */
        .nav_item_regiser {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }
        .nav_item_regiser a {
            padding: 9px 18px;
            border-radius: 30px;
            font-weight: 700;
            font-size: 0.85rem;
            transition: all var(--transition-fast);
            text-decoration: none;
            letter-spacing: 0.3px;
        }
        .nav_item_regiser a:first-child {
            background: var(--btn-gradient);
            color: #fff;
            box-shadow: 0 4px 18px rgba(111, 0, 255, 0.45);
            border: none;
        }
        .nav_item_regiser a:first-child:hover {
            box-shadow: 0 6px 28px rgba(111, 0, 255, 0.7);
            transform: translateY(-2px);
        }
        .nav_item_regiser a:last-child {
            background: transparent;
            color: var(--text-muted);
            border: 1.5px solid rgba(255, 255, 255, 0.2);
        }
        .nav_item_regiser a:last-child:hover {
            border-color: rgba(255, 255, 255, 0.5);
            color: #fff;
            background: rgba(255, 255, 255, 0.06);
        }

        /* User welcome */
        .user-welcome {
            color: #c084fc !important;
            font-weight: 700;
            text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
            background: rgba(168, 85, 247, 0.1) !important;
            border-radius: 30px !important;
            padding: 9px 16px !important;
        }
        .logout-btn {
            color: #f87171 !important;
            border: 1.5px solid rgba(248, 113, 113, 0.35) !important;
            border-radius: 30px !important;
            padding: 9px 16px !important;
            transition: all var(--transition-fast) !important;
        }
        .logout-btn:hover {
            background: rgba(248, 113, 113, 0.12) !important;
            border-color: #f87171 !important;
            box-shadow: 0 0 18px rgba(248, 113, 113, 0.4) !important;
        }

        /* ============================
           MOBILE TOGGLE BUTTON
           ============================ */
        .responsive {
            display: none;
            background: rgba(168, 85, 247, 0.15);
            border: 1.5px solid rgba(168, 85, 247, 0.4);
            color: #c084fc;
            font-size: 1.6rem;
            padding: 8px 14px;
            border-radius: 14px;
            cursor: pointer;
            z-index: 1100;
            position: fixed;
            top: 22px;
            right: 22px;
            transition: all var(--transition-fast);
        }
        .responsive:hover {
            background: rgba(168, 85, 247, 0.3);
            box-shadow: 0 0 22px rgba(168, 85, 247, 0.5);
        }

        /* ============================
           MOBILE NAV STYLES
           ============================ */
        @media (max-width: 992px) {
            nav {
                width: 94%;
                height: auto;
                min-height: 60px;
                border-radius: 22px;
                top: 10px;
                padding: 12px 16px;
            }
            nav::before {
                left: 14px;
                right: 14px;
            }
            .nav_item {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
                width: 100%;
            }
            .nav_item>* {
                width: 100%;
            }
            .nav_item a,
            .drop_btn>span a {
                display: flex;
                width: 100%;
                justify-content: flex-start;
                padding: 12px 16px;
                border-radius: 12px;
                font-size: 0.95rem;
            }
            .drop_box {
                position: static;
                opacity: 1;
                visibility: visible;
                transform: none;
                background: rgba(30, 30, 50, 0.9);
                border-radius: 12px;
                margin-top: 6px;
                box-shadow: none;
                border: 1px solid rgba(255, 255, 255, 0.06);
            }
            .drop_box::before {
                display: none;
            }
            .drop_box li a {
                border-radius: 8px;
            }
            .responsive {
                display: block;
            }
            .nav_item {
                display: none;
            }
            .nav_item.active {
                display: flex;
            }
            .nav_item_regiser {
                flex-direction: column;
                gap: 8px;
                width: 100%;
            }
            .nav_item_regiser a {
                text-align: center;
                justify-content: center;
                width: 100%;
            }
            nav.scrolled {
                border-radius: 18px;
                height: auto;
            }
        }

        /* ============================
           DESKTOP - HIDE MOBILE ELEMENTS
           ============================ */
        @media (min-width: 993px) {
            .responsive {
                display: none !important;
            }
            .nav_item {
                display: flex !important;
            }

            .menu-toggle { display: none !important; }
        }

        /* ============================
           LOGOUT BUTTON SVG ANIMATION
           ============================ */
        .logout-btn svg {
            transition: transform var(--transition-fast);
        }
        .logout-btn:hover svg {
            transform: translateX(-4px);
        }

        /* ============================
           SCROLLED NAV STATE (JS)
           ============================ */
        /* Add class 'scrolled' via JS on window scroll */

        /* ============================
           SMOOTH SCROLL FOR ANCHORS
           ============================ */
        html {
            scroll-behavior: smooth;
        }

        /* ============================
           NAV ITEM ORDER & SPACING FIX
           ============================ */
        .nav_item>* {
            flex-shrink: 0;
        }
        /* Add some breathing room */
        .nav_item {
            padding: 0 4px;
        }

        /* ============================
           GLOW PULSE ON LOGO
           ============================ */
        @keyframes logoPulse {
            0%,
            100% {
                filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.5));
            }
            50% {
                filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.8)) drop-shadow(0 0 40px rgba(255, 0, 110, 0.3));
            }
        }
        .nav_logo {
            animation: logoPulse 3.5s ease-in-out infinite;
        }

        /* ============================
           FLOATING NAV INDICATOR DOT
           ============================ */
        .nav-indicator {
            position: absolute;
            bottom: -3px;
            height: 3px;
            border-radius: 3px;
            background: var(--btn-gradient);
            transition: all var(--transition-smooth);
            box-shadow: 0 0 12px var(--accent-glow);
            pointer-events: none;
        
        }

        /* ===========================
   RESPONSIVE ENHANCEMENTS
   (navbar fully preserved)
   =========================== */

@media (max-width: 430px) {
    .nav_title{
        position: absolute !important;
        left: -20vh !important;
    }
    
}

/* ---------- Tablet / Large Phone ---------- */
@media (max-width: 768px) {

  /* ----- Header section ----- */
  .header_box {
    width: 90%;
    padding: 150px 0;          /* less vertical space */
  }

  /* ----- Social links: move to bottom row ----- */
  .link1,
  .link2,
  .link3,
  .link4 {
    position: fixed;
    top: auto !important;      /* override any existing top */
    bottom: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;        /* round icons */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    right: auto;               /* will be set individually */
  }
  .link1 { right: 20px; }
  .link2 { right: 80px; }
  .link3 { right: 140px; }
  .link4 { right: 200px; }
  .icon2 { right: 7px; top: 5px !important; width: 32px !important; }
  .menu-toggle { display: block !important; }

  .ham { display: block; }

  .menu-toggle { display: block; }

  /* Adjust hover effects to avoid oversized shadows on small screens */
  .link1:hover,
  .link2:hover,
  .link3:hover,
  .link4:hover {
    box-shadow: 0 4px 30px rgb(132, 0, 255);
    transform: translateY(-3px) translateZ(0);
  }

  /* ----- Project view buttons (always visible on touch) ----- */
  .sec_2_item_project1 .project-view-btn,
  .sec_2_item_project2 .project-view-btn {
    bottom: 12px !important;
    padding: 8px 18px;
    font-size: 13px;
    opacity: 1 !important;
    pointer-events: all !important;
    /* center it safely */
    left: 50%;
    transform: translateX(-50%);
  }

  /* Disable the hover‑only slide effect on touch devices */
  .sec_2_item_project1:hover .project-view-btn,
  .sec_2_item_project2:hover .project-view-btn {
    bottom: 12px !important;
  }

  /* Let the eye icon animations remain, but shrink a bit */
  .project-view-btn svg {
    width: 16px;
    height: 16px;
  }

  /* Optional: slightly smaller tooltip on mobile */
  .tooltip .tooltiptext {
    width: 130px;
    font-size: 0.75rem;
    padding: 5px 8px;
  }
  
}

/* ---------- Small Mobile ---------- */
@media (max-width: 480px) {

  .header_box {
    width: 94%;
    padding: 100px 0;
  }

  /* Stack social links vertically again if preferred,
     or keep horizontal row with smaller icons */
  .link1,
  .link2,
  .link3,
  .link4 {
    width: 40px;
    height: 40px;
    border-radius: 40%;
    bottom: 15px;
  }
  .link1 { right: 15px; }
  .link2 { right: 65px; }
  .link3 { right: 115px; }
  .link4 { right: 165px; }
  .icon2{ width: 28px !important; left: 5px; top: 3px !important; }
  .links{

    margin-left: 200px !important;
  }

  /* Project buttons even more compact */
  .sec_2_item_project1 .project-view-btn,
  .sec_2_item_project2 .project-view-btn {
    padding: 6px 14px;
    font-size: 11px;
    border-radius: 40px;
  }

  /* Ensure any text inside header stays readable */
  .header_box {
    font-size: 0.9rem;
  }



}

/* ---------- Extra: fix possible overflow ---------- */
@media (max-width: 992px) {
  /* No navbar changes here. Only global fixes if needed. */
  body {
    overflow-x: hidden;
  }
}
        

/* مخفی کردن دکمه همبرگر در دسکتاپ */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 60;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
}

/* خط‌های همبرگر */
.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #f3f4f6;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* انیمیشن تبدیل همبرگر به X */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* موبایل: نمایش دکمه و استایل منوی کشویی */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .nav_item {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 1px;

        border-radius: 0 0 12px 12px;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        padding: 1.5rem 1rem;
        z-index: 55;
        gap: 1rem;
    }

    .nav_title,.nav_logo{
        display: block !important;
        position: relative !important;
        left: -49vh !important;
        top: -9.6vh;
    }

    .nav_title{
        position: relative !important;
        top: -16.4vh !important;
        left: -34vh !important;
    }

    .nav_item.active {
        display: flex;
        width: 100% !important;
        left: 20px !important;
        
    }

    .active{
        background-color: #1a1333a8;
    }

    .font_nav3{
        top: 20px  !important;
    }

    /* تمام لینک‌ها فول‌عرض شوند */
    .nav_item > * {
        width: 100%;
        text-align: right;
    }

    /* دراپ‌داون داخل موبایل */
    .dropdown {
        width: 100%;
        position: relative;
    }
    .drop_btn {
        width: 100%;
    }
    .drop_box {
        display: none;
        position: static;
        background: transparent;
        border: none;
        padding: 0.5rem 1.5rem 0 0;
        list-style: none;
    }
    .dropdown.active .drop_box {
        display: block;
    }
    .drop_box li a {
        display: block;
        padding: 0.4rem 0;
    }

        .active{
        background-color: #1a1333a8;
    }


}

 :root {
            --bg-primary: #0a0a0f;
            --bg-secondary: #11111a;
            --bg-card: #161626;
            --bg-card-hover: #1a1a2e;
            --accent: #a855f7;
            --accent-light: #c084fc;
            --accent-glow: rgba(168, 85, 247, 0.3);
            --text-primary: #f3f4f6;
            --text-secondary: #cbd5e1;
            --text-muted: #9ca3af;
            --border: rgba(139, 92, 246, 0.25);
            --border-light: rgba(139, 92, 246, 0.15);
            --green: #4ade80;
            --green-glow: rgba(74, 222, 128, 0.3);
            --red: #f87171;
            --red-glow: rgba(248, 113, 113, 0.3);
            --radius: 16px;
            --radius-sm: 10px;
            --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .popup-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fadeIn 0.35s ease-out; }
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        .popup-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 20px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 0 60px rgba(168,85,247,0.12),0 20px 60px rgba(0,0,0,0.6),0 0 0 1px rgba(255,255,255,0.03) inset; animation: slideUp 0.45s cubic-bezier(0.16,1,0.3,1); }
        @keyframes slideUp { from { opacity: 0; transform: translateY(40px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
        .popup-header { padding: 1.5rem 1.75rem; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; background: var(--bg-secondary); border-radius: 20px 20px 0 0; z-index: 2; backdrop-filter: blur(10px); }
        .shield-icon-wrapper { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
        .shield-icon-bg { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, rgba(74,222,128,0.2), rgba(168,85,247,0.2)); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; border: 1px solid rgba(74,222,128,0.35); }
        .shield-pulse { position: absolute; inset: -6px; border-radius: 20px; background: transparent; border: 2px solid rgba(74,222,128,0.5); animation: shieldPulse 2.2s ease-in-out infinite; z-index: 0; }
        @keyframes shieldPulse { 0%,100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.15); opacity: 0; } }
        .shield-icon-bg svg { width: 26px; height: 26px; color: var(--green); position: relative; z-index: 1; }
        .header-text h2 { font-size: 1.35rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
        .header-text .subtitle { font-size: 0.8rem; color: var(--green); font-weight: 600; letter-spacing: 0.3px; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
        .header-text .subtitle .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; animation: dotBlink 2s ease-in-out infinite; }
        @keyframes dotBlink { 0%,100% { opacity: 1; box-shadow: 0 0 8px var(--green-glow); } 50% { opacity: 0.35; box-shadow: 0 0 2px var(--green-glow); } }
        .close-btn { position: absolute; top: 1.25rem; left: 1.5rem; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.04); color: #cbd5e1; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); z-index: 3; }
        .close-btn:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.3); transform: rotate(90deg); }
        .popup-body { padding: 1.5rem 1.75rem; display: flex; flex-direction: column; gap: 1.25rem; }
        .cert-row { display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.9rem 1rem; background: var(--bg-card); border-radius: var(--radius-sm); border: 1px solid var(--border-light); transition: var(--transition); word-break: break-all; }
        .cert-row:hover { background: var(--bg-card-hover); border-color: var(--border); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
        .cert-row .row-icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(168,85,247,0.1); color: var(--accent-light); }
        .cert-row .row-icon svg { width: 18px; height: 18px; }
        .cert-row .row-content { flex: 1; min-width: 0; }
        .cert-row .row-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
        .cert-row .row-value { font-size: 0.9rem; color: var(--text-primary); font-weight: 500; font-family: 'SF Mono','Fira Code','Consolas','Monaco',monospace; line-height: 1.5; word-break: break-all; }
        .cert-row .row-value.domain { font-size: 1rem; font-weight: 700; background: linear-gradient(135deg,#c084fc,#a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; font-family: inherit; }
        .fingerprint-display { background: #0d0d18; border: 1px dashed rgba(139,92,246,0.4); border-radius: var(--radius-sm); padding: 1rem 1.15rem; font-family: 'SF Mono','Fira Code','Consolas',monospace; font-size: 0.75rem; color: #e2e8f0; word-break: break-all; letter-spacing: 0.4px; line-height: 1.8; position: relative; text-align: left; direction: ltr; }
        .fingerprint-display .fp-label { position: absolute; top: -10px; right: 16px; background: var(--bg-secondary); padding: 0 10px; font-size: 0.65rem; letter-spacing: 1px; color: var(--accent-light); text-transform: uppercase; font-family: inherit; direction: rtl; }
        .validity-section { background: var(--bg-card); border-radius: var(--radius-sm); padding: 1rem 1.15rem; border: 1px solid var(--border-light); }
        .validity-section .val-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); margin-bottom: 0.75rem; font-weight: 600; }
        .validity-dates { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
        .val-date { flex: 1; min-width: 120px; text-align: center; padding: 0.7rem 0.5rem; border-radius: 8px; background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.05); }
        .val-date .val-date-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); margin-bottom: 4px; }
        .val-date .val-date-value { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
        .val-date.issued .val-date-value { color: var(--green); }
        .val-date.expires .val-date-value { color: #fbbf24; }
        .progress-wrap { margin-top: 0.85rem; }
        .progress-info { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted); margin-bottom: 5px; }
        .progress-bar-bg { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06); overflow: hidden; }
        .progress-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg,#4ade80,#a855f7,#fbbf24); transition: width 0.6s ease; }
        .popup-footer { padding: 1rem 1.75rem 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end; border-top: 1px solid var(--border-light); }
        .btn-popup { padding: 0.65rem 1.3rem; border-radius: 8px; font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: var(--transition); border: 1px solid transparent; font-family: inherit; letter-spacing: 0.3px; display: inline-flex; align-items: center; gap: 7px; }
        .btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--text-secondary); }
        .btn-outline:hover { border-color: rgba(255,255,255,0.4); color: #fff; background: rgba(255,255,255,0.04); }
        .btn-primary { background: linear-gradient(135deg,#a855f7,#7c3aed); color: #fff; border: none; box-shadow: 0 4px 18px rgba(168,85,247,0.3); }
        .btn-primary:hover { box-shadow: 0 6px 25px rgba(168,85,247,0.5); transform: translateY(-1px); }
        .popup-card::-webkit-scrollbar { width: 5px; }
        .popup-card::-webkit-scrollbar-track { background: transparent; }
        .popup-card::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 10px; }
        @media (max-width: 480px) {
            .popup-card { border-radius: 16px; max-width: 100%; }
            .popup-header { padding: 1.15rem; gap: 0.6rem; }
            .popup-body { padding: 1rem; gap: 0.9rem; }
            .popup-footer { padding: 0.75rem 1rem 1.15rem; justify-content: center; }
            .header-text h2 { font-size: 1.1rem; }
            .shield-icon-wrapper { width: 40px; height: 40px; }
            .shield-icon-bg { width: 40px; height: 40px; border-radius: 10px; }
            .shield-icon-bg svg { width: 20px; height: 20px; }
            .cert-row .row-value { font-size: 0.75rem; }
            .fingerprint-display { font-size: 0.68rem; padding: 0.75rem; }
            .close-btn { top: 1rem; left: 1rem; width: 30px; height: 30px; font-size: 0.9rem; }
        }


        /* base: hide hamburger on desktop, show on mobile */
        .menu-toggle {
            display: none;
            background: none;
            border: none;
            color: #f3f4f6;
            cursor: pointer;
            padding: 0.5rem;
            margin-right: auto;    /* push to right edge in RTL? Actually RTL direction, auto margin on right pushes to left? we use order for consistency */
            z-index: 60;
            position: relative;
            transition: all 0.2s ease;
        }

        .menu-toggle svg {
            width: 28px;
            height: 28px;
            stroke: white;
            stroke-width: 2;
            filter: drop-shadow(0 0 4px rgba(168,85,247,0.4));
        }

        /* mobile & tablet view */
        @media (max-width: 992px) {
            .menu-toggle {
                display: flex;
                align-items: center;
                justify-content: center;
                margin-right: 0;
                margin-left: auto;  /* in RTL, margin-left auto pushes to left (start) -> visible at left edge */
            }

            /* make nav_item container flexible in column direction, but keep logo + title row */
            .nav_item {
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                justify-content: space-between;
                width: 100%;
                gap: 0.5rem;
                
            }

            /* Hide all navigation links by default (spans, dropdown menu etc except logo + h1 + toggle) */
            .nav_item > span:not(.nav_title):not(.nav_logo):not(.menu-toggle),
            .nav_item .dropdown,
            .nav_item .nav_item_home,
            .nav_item .nav_item_staffs,
            .nav_item .nav_item_aboutus,
            .nav_item .nav_item_regiser {
                display: none;
                width: 100%;
                text-align: right;
                padding: 0.5rem 0;
            }

            .nav_item.active{
                top: -100px;
                background-color: rgba(14, 0, 36, 0.878);
                border: 2px solid #9ca3af50 ;
                margin-right: -4px;

            }

            /* When menu is active, show all navigation elements as block/flex column */
            .nav_item.active > span:not(.nav_title):not(.nav_logo):not(.menu-toggle),
            .nav_item.active .dropdown,
            .nav_item.active .nav_item_home,
            .nav_item.active .nav_item_staffs,
            .nav_item.active .nav_item_aboutus,
            .nav_item.active .nav_item_regiser {
                display: block;
            }

            /* dropdown styling inside mobile menu */
            .dropdown {
                position: relative;
                width: 100%;
            }
            .drop_btn {
                width: 100%;
                display: block;
            }
            .drop_box {
                display: none;
                list-style: none;
                padding-right: 1.5rem;
                margin: 0.5rem 0 0;
                background: rgba(0,0,0,0.2);
                border-radius: 8px;
            }
            .dropdown.active .drop_box {
                display: block;
            }
            .drop_box li a {
                display: block;
                padding: 0.5rem 0;
                color: #cbd5e1;
            }

            /* ensure logo & title stay visible */
            .nav_logo, .minecraft.nav_title {
                display: inline-block;
            }
            .nav_title.eng {
                margin-left: auto;
            }
            .nav_cont {
                width: 100%;
            }
        }

        /* desktop: hide hamburger, show normal menu */
        @media (min-width: 993px) {
            .menu-toggle {
                display: none !important;
            }
            .nav_item {
                display: flex;
                align-items: center;
                gap: 1rem;
            }
            .nav_item > span, .dropdown {
                display: inline-block;
            }
            .drop_box {
                display: none;
                position: absolute;
                background: #11111a;
                border: 1px solid var(--border);
                border-radius: 12px;
                top: 100%;
                right: 0;
                min-width: 160px;
                z-index: 50;
            }
            .dropdown:hover .drop_box {
                display: block;
            }
        }

        /* additional navbar responsive touch */
        .nav_cont {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 1.5rem;
        }
        .nav_item {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        .logout-btn {
            margin-right: 0.75rem;
            font-size: 0.85rem;
            padding: 0.2rem 0.6rem;
            background: rgba(248,113,113,0.2);
            border-radius: 20px;
            transition: 0.2s;
        }
        .logout-btn:hover {
            background: rgba(248,113,113,0.4);
            color: #f87171;
        }
        /* ensure no leftover left:-100vh */
        .menu-toggle {
            left: auto;
            right: auto;
        }