/* --- 0. FONT BRICK SANS --- */
    @font-face {
        font-family: 'BrickSans';
        src: url('BrickSans.ttf') format('truetype');
        font-weight: normal;
        font-style: normal;
    }

/* --- 1. CSS Variables --- */
        :root {
            --bg-color: #050505;
            --text-color: #ffffff;
            --card-bg: rgba(255, 255, 255, 0.03);
            --card-border: rgba(255, 255, 255, 0.1);
            --neon-purple: #5600ab;
            --neon-glow: #8a2be2;
            --hover-bg: rgba(86, 0, 171, 0.15);
            --toast-bg: #1a1a1a;
            --font-main: 'Poppins', sans-serif;
            --font-tech: 'Orbitron', sans-serif;
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            --footer-color: rgba(255, 255, 255, 0.5);
        }

        /* Light Mode Variables */
        body.light-mode {
            --bg-color: #f0f0f0;
            --text-color: #1a1a1a;
            --card-bg: rgba(0, 0, 0, 0.05);
            --card-border: rgba(0, 0, 0, 0.1);
            --toast-bg: #ffffff;
            --footer-color:  rgba(3, 3, 3, 0.5);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-color);
            font-family: var(--font-main);
            overflow-x: hidden;
            transition: background-color 0.5s ease;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            background-image: 
                radial-gradient(circle at 50% 10%, rgba(86, 0, 171, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 90% 90%, rgba(86, 0, 171, 0.1) 0%, transparent 40%);
        }

        /* --- 2. Animations --- */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes pulseGlow {
            0% { box-shadow: 0 0 10px var(--neon-purple); }
            50% { box-shadow: 0 0 25px var(--neon-glow); }
            100% { box-shadow: 0 0 10px var(--neon-purple); }
        }

        @keyframes borderRotate {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        /* --- 3. Layout Components --- */
        
        /* Theme Toggle */
        .theme-toggle {
            position: absolute;
            top: 20px;
            left: 20px; 
            background: transparent;
            border: 1px solid var(--card-border);
            color: var(--text-color);
            padding: 10px;
            border-radius: 50%;
            cursor: pointer;
            z-index: 100;
            transition: var(--transition);
        }
        .theme-toggle:hover {
            background: var(--neon-purple);
            box-shadow: 0 0 15px var(--neon-purple);
        }

        /* Container */
        .container {
            width: 100%;
            max-width: 600px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            flex: 1; /* Push footer down */
        }

        /* Header */
        header {
            text-align: center;
            margin-top: 40px;
            margin-bottom: 40px;
            animation: fadeInUp 0.8s ease-out;
        }

        .avatar-container {
            position: relative;
            width: 120px;
            height: 120px;
            margin: 0 auto 20px;
        }

        .avatar {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid var(--neon-purple);
            animation: pulseGlow 3s infinite;
        }

        .name {
            font-family: BrickSans;
            font-size: 2.2rem;
            margin-bottom: 10px;
            text-shadow: 0 0 10px var(--neon-purple);
        }

        .role {
            font-size: 0.9rem;
            opacity: 0.8;
            letter-spacing: 1px;
            min-height: 24px; 
        }

        .role::after {
            content: '|';
            animation: blink 1s infinite;
            color: var(--neon-glow);
        }

        @keyframes blink { 50% { opacity: 0; } }

        /* Social Links */
        .links-container {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .link-card {
            position: relative;
            background: var(--card-bg);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 15px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            text-decoration: none;
            color: var(--text-color);
            transition: var(--transition);
            overflow: hidden;
            animation: fadeInUp 0.5s ease-out backwards;
            cursor: pointer;
        }

        /* Staggered Animation delays */
        .link-card:nth-child(1) { animation-delay: 0.1s; }
        .link-card:nth-child(2) { animation-delay: 0.2s; }
        .link-card:nth-child(3) { animation-delay: 0.3s; }
        .link-card:nth-child(4) { animation-delay: 0.4s; }
        .link-card:nth-child(5) { animation-delay: 0.5s; }
        .link-card:nth-child(6) { animation-delay: 0.6s; }
        .link-card:nth-child(7) { animation-delay: 0.7s; }
        .link-card:nth-child(8) { animation-delay: 0.8s; }

        .link-card:hover {
            transform: scale(1.03) translateY(-2px);
            background: var(--hover-bg);
            border-color: var(--neon-purple);
            box-shadow: 0 5px 20px rgba(86, 0, 171, 0.3);
        }

        /* Neon Border Effect on Hover */
        .link-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            border-radius: 16px;
            padding: 1px;
            background: linear-gradient(45deg, transparent, var(--neon-purple), transparent);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); 
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .link-card:hover::before {
            opacity: 1;
        }

        .card-content {
            display: flex;
            align-items: center;
            gap: 15px;
            flex-grow: 1;
        }

        .icon-box {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }
        
        .icon-box svg {
            width: 28px;
            height: 28px;
            fill: var(--text-color);
            transition: var(--transition);
        }

        .link-card:hover .icon-box svg {
            fill: var(--neon-glow);
            filter: drop-shadow(0 0 5px var(--neon-purple));
        }

        .platform-name {
            font-weight: 600;
            font-size: 1.1rem;
        }

        .actions {
            display: flex;
            align-items: center;
            gap: 10px;
            z-index: 2; /* فوق الرابط الرئيسي */
        }

        /* Copy Button */
        .copy-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: var(--text-color);
            width: 35px;
            height: 35px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition);
            opacity: 0; /* مخفي في الموبايل حتى الضغط أو دائما ظاهر في الديسكتوب */
        }

        @media (min-width: 768px) {
             .copy-btn { opacity: 0.5; }
        }

        .link-card:hover .copy-btn {
            opacity: 1;
        }

        .copy-btn:hover {
            background: var(--neon-purple);
            transform: scale(1.1);
        }
        
        .copy-btn svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }

        .arrow-icon {
            opacity: 0.5;
            transition: var(--transition);
        }

        .link-card:hover .arrow-icon {
            opacity: 1;
            transform: translateX(-5px); /* عكس الاتجاه لأننا RTL */
        }

        /* Footer */
        footer {
            margin-top: auto;
            padding: 30px;
            text-align: center;
            font-size: 0.9rem;
            color: var(--footer-color);
            width: 100%;
            font-family: BrickSans;
        }

        /* Toast Notification */
        .toast {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: var(--toast-bg);
            color: var(--text-color);
            padding: 12px 24px;
            border-radius: 30px;
            border: 1px solid var(--neon-purple);
            box-shadow: 0 5px 20px rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.9rem;
            z-index: 1000;
            opacity: 0;
            transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        }

        .toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        .toast svg {
            width: 20px;
            height: 20px;
            fill: #00ff88; /* لون النجاح */
        }

        /* Responsive */
        @media (max-width: 480px) {
            .name { font-size: 1.8rem; }
            .copy-btn { opacity: 1; background: transparent; } 
            .container { padding: 15px; }
            .link-card { padding: 12px 15px; }
        }

