/* =========================================
  =================Themes==================
========================================= */

[data-theme]::before,
[data-theme]::after {
    transform: translateZ(0);
    /* فعال‌سازی شتاب‌دهنده گرافیکی GPU */
    backface-visibility: hidden;
    perspective: 1000px;
    pointer-events: none !important;
    /* عبور کامل لمس و کلیک از لایه انیمیشن */
    position: absolute;
    content: '';
    z-index: 1 !important;
    /* رندر شدن دقیقاً پشت محتوای کارت */
    user-select: none !important;
}


/* 
--- Cyberpunk Premium --- 
*/
[data-theme="p_theme_cyberpunk"] {
    --bg-main: linear-gradient(-45deg, #0d0221, #190a38, #051923, #2a085c);
    --bg-size: 400% 400%;
    --card-bg: rgba(25, 10, 56, 0.65);
    --card-backdrop: blur(16px) saturate(180%);
    --card-border: 1px solid rgba(255, 0, 127, 0.4);
    --card-shadow: 0 8px 32px 0 rgba(255, 0, 127, 0.25), inset 0 0 15px rgba(0, 243, 255, 0.15);

    --text-primary: #ffffff;
    --text-secondary: #ff77c2;
    --accent: #ff007f;
    --accent-glow: 0 0 12px #ff007f, 0 0 25px rgba(255, 0, 127, 0.5);

    --link-bg: linear-gradient(90deg, rgba(255, 0, 127, 0.15), rgba(0, 243, 255, 0.15));
    --link-border: #ff007f;

}

[data-theme="p_theme_cyberpunk"] .profile-card {
    animation: gradientBG 3s ease infinite;
}

[data-theme="p_theme_cyberpunk"] .custom-link {
    background: linear-gradient(90deg, #ff007f, #00f3ff, #ff007f);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineText 3s linear infinite;
}

[data-theme="p_theme_cyberpunk"] .user-bio-text {
    background: linear-gradient(135deg, #ffbdfc, #d2f8fa, #e7bdff);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineText 5s linear infinite;
}



/*
 --- 24K Gold Premium --- 
 */
[data-theme="p_theme_gold"] {
    --bg-main: radial-gradient(circle at 50% -20%, #3a2d0c 0%, #120e03 60%, #050401 100%);
    --card-bg: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(15, 12, 3, 0.8) 100%);
    --card-backdrop: blur(20px);
    --card-border: 1px solid rgba(255, 215, 0, 0.35);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.15);

    --text-primary: #fff2a3;
    --text-secondary: #d4af37;
    --accent: #ffd700;
    --accent-glow: 0 0 15px rgba(255, 215, 0, 0.6);

    --link-bg: rgba(255, 215, 0, 0.08);
    --link-border: #ffd700;
}

[data-theme="p_theme_gold"] .custom-link {
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 40%, #b8860b 70%, #ffffff 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 3s ease-in-out infinite;
}

[data-theme="p_theme_gold"] .user-bio-text {
    background: linear-gradient(135deg, #ffffff 0%, #fff3ad 40%, #cab98d 70%, #ffffff 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 5s ease-in-out infinite;
}


/* 
--- Neon Pulse Premium --- 
*/
[data-theme="p_theme_neon_pulse"] {
    --bg-main: radial-gradient(ellipse at bottom, #00223e 0%, #030f1e 70%, #01060d 100%);
    --card-bg: rgba(3, 15, 30, 0.7);
    --card-backdrop: blur(14px);
    --card-border: 1px solid rgba(0, 243, 255, 0.5);
    --card-shadow: 0 0 20px rgba(0, 243, 255, 0.2), inset 0 0 12px rgba(0, 243, 255, 0.1);

    --text-primary: #ffffff;
    --text-secondary: #70f3ff;
    --accent: #00f3ff;
    --accent-glow: 0 0 15px #00f3ff, 0 0 30px rgba(0, 243, 255, 0.4);

    --link-bg: rgba(0, 243, 255, 0.1);
    --link-border: #00f3ff;
}

[data-theme="p_theme_neon_pulse"] .profile-card {
    animation: neonBreathing 1s ease-in-out infinite alternate;
}


/*
 --- Glass Titanium --- 
*/
[data-theme="p-glass-titanium"] {
    --card-bg: rgba(255, 255, 255, 0.07);
    /* شیشه بسیار شفاف */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    /* آبی الماس */
    --link-bg: rgba(255, 255, 255, 0.05);
    --link-border: rgba(255, 255, 255, 0.2);
    /* متغیرهای اختصاصی پرمیوم */
    --card-blur: blur(16px);
    --card-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

[data-theme="p-glass-titanium"] .business-card-div {
    position: relative;
    overflow: hidden;
}

[data-theme="p-glass-titanium"] .business-card-div :not(.business-card,
    .profile-card, .mini-click-badge, .mini-click-badge *, .avatar-container, link-item, .custom-link, .custom-link *,
    .view-count-badge, .view-count-badge *, .user-bio-text, h2, h2 *, a)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.15),
            rgba(56, 189, 248, 0.25),
            transparent);
    animation: titaniumPrismRefract 2s alternate-reverse infinite;
    pointer-events: none;
}

[data-theme="p-glass-titanium"] .custom-link {
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    position: relative;
    letter-spacing: 0px;

    /* ۱. شفاف کردن خود متن و استفاده از پس‌زمینه برای حروف */
    color: transparent;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.05));
    background-clip: text;
    -webkit-background-clip: text;

    /* ۲. سایه‌های متن چندلایه (text-shadow) برای ایجاد عمق ۳D و لبه‌های شیشه‌ای */
    text-shadow:
        0 1px 1px rgba(255, 255, 255, 0.9),
        /* لبه بازتاب نور بالا */
        0 2px 0 rgba(16, 185, 129, 0.4),
        /* ضخامت سه‌بعدی اول (سبز شیشه‌ای) */
        0 3px 0 rgba(16, 185, 129, 0.3),
        /* ضخامت سه‌بعدی دوم */
        0 4px 0 rgba(16, 185, 129, 0.2),
        /* ضخامت سه‌بعدی سوم */
        0 5px 0 rgba(0, 0, 0, 0.4),
        /* سایه عمق نهایی */
        0 10px 20px rgba(0, 0, 0, 0.5),
        /* سایه نرم روی پس‌زمینه */
        0 0 10px rgba(16, 185, 129, 0.5);
    /* هلا درخشان سبز شیشه‌ای */

    /* ۳. فیلترها برای تکمیل افکت شیشه و درخشش */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3)) brightness(1.2) contrast(1.1);
}



/*
 --- Cyber Aurora --- 
*/
[data-theme="p-cyber-aurora"] {
    --card-bg: rgba(13, 18, 30, 0.85);
    --text-primary: #f0fdf4;
    --text-secondary: #34d399;
    --accent: #00ffcc;
    /* فیروزه‌ای هایپر-نئون */
    --link-bg: rgba(0, 255, 204, 0.1);
    --link-border: #00ffcc;
    --card-blur: blur(12px);
    --card-glow: 0 0 30px rgba(0, 255, 204, 0.2);
}

[data-theme="p-cyber-aurora"] .custom-link {
    background: linear-gradient(90deg, #34d399, #f0fdf4, #34d399);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineText 4s linear infinite;
}


/*
 --- Aurora Mesh --- 
*/
[data-theme="p-aurora-mesh"] {
    --card-bg: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.15), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.15), transparent 40%),
        rgba(15, 23, 42, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --link-bg: rgba(56, 189, 248, 0.08);
    --link-border: rgba(56, 189, 248, 0.3);
    /* متغیرهای ساختاری پرمیوم */
    --card-border-glow: linear-gradient(135deg, #38bdf8, #a855f7);
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    --card-backdrop: blur(20px) saturate(180%);
}

[data-theme="p-aurora-mesh"] .profile-card {
    position: relative;
    overflow: hidden;
}

[data-theme="p-aurora-mesh"] .profile-card ::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: conic-gradient(from 0deg,
            rgba(75, 195, 247, 0.1),
            rgba(176, 102, 245, 0.1),
            rgba(235, 88, 161, 0.1),
            rgba(75, 199, 252, 0.1));
    animation: vipAuroraSpin 15s linear infinite;
    z-index: -1;
}


/*
 --- Hologram Matrix --- 
*/
[data-theme="p-hologram-matrix"] {
    --card-bg: linear-gradient(180deg, rgba(6, 182, 212, 0.1) 0%, rgba(0, 0, 0, 0) 100%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 4px),
        rgba(4, 13, 22, 0.9);
    --text-primary: #ecfeff;
    --text-secondary: #67e8f9;
    --accent: #06b6d4;
    --link-bg: rgba(6, 182, 212, 0.1);
    --link-border: #06b6d4;
    /* متغیرهای ساختاری پرمیوم */
    --card-border-glow: linear-gradient(90deg, #06b6d4, #3b82f6, #06b6d4);
    --card-shadow: 0 0 35px rgba(6, 182, 212, 0.25), inset 0 0 15px rgba(6, 182, 212, 0.15);
    --card-backdrop: blur(12px);
}

[data-theme="p-hologram-matrix"] .profile-card {
    background-image:
        linear-gradient(180deg, transparent 0%, rgba(6, 182, 212, 0.25) 50%, transparent 100%),
        repeating-linear-gradient(0deg, rgba(6, 182, 212, 0.05) 0px, rgba(6, 182, 212, 0.05) 1px, transparent 1px, transparent 4px) !important;
    background-size: 100% 200px, 100% 100% !important;
    animation: hologramScan3D 5s linear infinite;
}

[data-theme="p-hologram-matrix"] .custom-link {
    background: linear-gradient(180deg, #e3fdff 0%, #00ffd5cc 40%, #20706c 70%, #1fffc79f 100%);
    background-size: auto 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: matrixShimmer 3s linear infinite;
}

[data-theme="p-hologram-matrix"] .user-bio-text {
    background: linear-gradient(180deg, #bae0ff 0%, #00eeff88 40%, #295052 70%, #76eaffde 100%);
    background-size: auto 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: matrixShimmer 5s ease-in-out infinite;
}


/*
 --- Liquid Gold --- 
*/
[data-theme="p-liquid-gold"] {
    --card-bg: radial-gradient(ellipse at top, rgba(251, 191, 36, 0.12), transparent 70%),
        linear-gradient(135deg, rgba(20, 17, 12, 0.95) 0%, rgba(10, 9, 7, 0.98) 100%);
    --text-primary: #fffbeb;
    --text-secondary: #d97706;
    --accent: #fbbf24;
    --link-bg: rgba(251, 191, 36, 0.07);
    --link-border: rgba(251, 191, 36, 0.4);
    /* متغیرهای ساختاری پرمیوم */
    --card-border-glow: linear-gradient(135deg, #fbbf24, #78350f, #fbbf24);
    --card-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 20px rgba(251, 191, 36, 0.15);
    --card-backdrop: blur(16px);
}

[data-theme="p-liquid-gold"] .profile-card {
    background: linear-gradient(135deg,
            rgba(77, 14, 14, 0.95),
            rgba(148, 94, 32, 0.85),
            rgba(112, 66, 28, 0.98)) !important;
    background-size: 200% 200% !important;
    animation: liquidGoldGlow 2s ease-in-out infinite;
}

[data-theme="p-liquid-gold"] .custom-link {
    background: linear-gradient(90deg, #ff2e1f 0%, #ff7300 40%, #b84b0b 70%, #f84b4b 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 3s ease-in-out infinite;
}

[data-theme="p-liquid-gold"] .user-bio-text {
    background: linear-gradient(135deg, #ff3c00 0%, #ff5100 40%, #fd0000 70%, #f84e1a 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 5s ease-in-out infinite;
}


/* حرکت پویای پس‌زمینه سایبرپانک */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* درخشش متحرک متن طلایی */
@keyframes goldShimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* متن هولوگرام ماتریکس */
@keyframes matrixShimmer {
    0% {
        background-position: 50% 0%;
    }

    50% {
        background-position: 50% 100%;
    }

    100% {
        background-position: 50% 0%;
    }
}

/* جریان نور روی متن نئون */
@keyframes shineText {
    to {
        background-position: 200% center;
    }
}

/* پالس تنفسی کارت نئون */
@keyframes neonBreathing {
    from {
        box-shadow: 0 0 15px rgba(0, 242, 255, 0.39), inset 0 0 8px rgba(0, 242, 255, 0.158);
    }

    to {
        box-shadow: 0 0 90px rgba(117, 248, 255, 0.733), inset 0 0 18px rgba(0, 242, 255, 0.452);
    }
}

/*  انیمیشن اختصاصی VIP: بازتاب منشوری روی شیشه  */
@keyframes titaniumPrismRefract {
    0% {
        transform: translateX(-150%) skewX(-25deg);
    }

    35% {
        transform: translateX(250%) skewX(-25deg);
    }

    100% {
        transform: translateX(250%) skewX(-25deg);
    }
}

/*  انیمیشن اختصاصی VIP: چرخش میدان نوری شفق  */
@keyframes vipAuroraSpin {
    0% {
        filter: hue-rotate(0deg) blur(20px);
        transform: scale(1) rotate(0deg);
    }

    50% {
        filter: hue-rotate(60deg) blur(25px);
        transform: scale(1.1) rotate(180deg);
    }

    100% {
        filter: hue-rotate(0deg) blur(20px);
        transform: scale(1) rotate(360deg);
    }
}

/* انیمیشن اختصاصی VIP: اسکن لیزری هولوگرام */
@keyframes hologramScan3D {
    0% {
        background-position: 0 -100px, 0 0;
    }

    100% {
        background-position: 0 600px, 0 0;
    }
}

/* انیمیشن اختصاصی VIP: تپش و جریان طلای مذاب  */
@keyframes liquidGoldGlow {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(251, 191, 36, 0.1);
    }

    50% {
        background-position: 100% 50%;
        box-shadow: 0 15px 50px rgba(251, 191, 36, 0.25), inset 0 0 30px rgba(251, 191, 36, 0.3);
    }

    100% {
        background-position: 0% 50%;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(251, 191, 36, 0.1);
    }
}


.profile-card {
    isolation: isolate;
    /* اجبار مرورگر به ساخت Stacking Context تمیز */
    user-select: none;
    -webkit-user-select: none;
    background: var(--bg-main);
    -webkit-backdrop-filter: var(--card-backdrop, none);
    border: var(--card-border, 1px solid transparent);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--card-shadow, 0 10px 30px rgba(0, 0, 0, 0.3));
    backdrop-filter: var(--card-backdrop, blur(10px));
    -webkit-backdrop-filter: var(--card-backdrop, blur(10px));
    border: 1px solid transparent;
    /* ایجاد حاشیه با گرادینت زنده در صورت وجود */
    border-image: var(--card-border-glow) 1;
    /* z-index: -10; */
    align-items: center;
}

@supports not (backdrop-filter: blur(10px)) {
    .profile-card {
        background: rgba(15, 23, 42, 0.96) !important;
    }
}



/* =========================================
  ==============Avatar Frames==============
========================================= */

/* Base Frame Wrapper */
.effect-p-avatar-frame {
    position: relative;
    display: inline-block;
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 0 15px rgba(255, 100, 44, 0.863);
    animation: auraPulse 1s alternate-reverse infinite;
}

/* --- 🔥 قاب شعله‌ور --- */
.effect-p_frame_fire :not(.avatar-image) {
    background: conic-gradient(#ff4500, #ff8c00, #ff0000, #ff8c00, #ff4500);
    animation: vipAuroraSpin 6s linear infinite;
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.6);
}

/* --- 💎 قاب الماسی --- */
.effect-p_frame_diamond {
    background: linear-gradient(135deg, rgba(224, 255, 255, 0.774), #00f2ff98, rgba(224, 255, 255, 0.774), #00f2ff6c);
    background-size: 200% 200%;
    animation: diamondShine 2.5s ease infinite;
    box-shadow: 0 0 24px rgba(0, 162, 255, 0.753);
}

/* --- ✨ هاله طلایی --- */
.effect-p_frame_golden_aura :not(.avatar-image) {
    background: conic-gradient(#ffd700, #bf953f, #fcf6ba, #b38728, #ffd700);
    animation: vipAuroraSpin 10s linear infinite, auraPulse 2s ease-in-out infinite alternate;
}

/* Animations for Frames */
@keyframes rotateFrame {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes diamondShine {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes auraPulse {
    0% {
        box-shadow: 0 0 8px rgba(255, 123, 0, 0.4);
    }

    100% {
        box-shadow: 0 0 20px rgba(255, 208, 0, 0.9);
    }
}


/* =========================================
  ==============Avatar Effects==============
========================================= */

/* --- 💿 افکت هولوگرام --- */
.effect-p_photo_hologram {
    position: relative;
    overflow: hidden;
}

.p_photo_hologram::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255, 255, 255, 0) 50%,
            rgba(0, 243, 255, 0.25) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.7;
}

/* --- 👾 گلیچ سه‌بعدی (RGB Split Light) --- */
.effect-p_photo_glitch {
    filter: drop-shadow(-2px 0 0 rgba(255, 0, 127, 0.7)) drop-shadow(2px 0 0 rgba(0, 243, 255, 0.7));
    animation: glitchShake 0.4s infinite alternate-reverse;
}

@keyframes glitchShake {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-1px, 1px);
    }

    40% {
        transform: translate(-1px, -1px);
    }

    60% {
        transform: translate(1px, 1px);
    }

    80% {
        transform: translate(1px, -1px);
    }

    100% {
        transform: translate(0);
    }
}

/* --- 🌀 چرخش نئونی --- */
.effect-p_photo_rotate_glow {
    box-shadow: 0 0 15px #00f3ff;
    transition: filter 0.3s ease;
}


/* =========================================
  ==============Link Effects==============
========================================= */

/* --- 🌈 لینک رنگین‌کمانی --- */
.effect-p_link_rainbow {
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3, #ff0000);
    background-size: 400% 100%;
    color: #fff !important;
    font-weight: bold;
    animation: rainbowMove 5s linear infinite;
    border: none !important;
}

@keyframes rainbowMove {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* --- ⚡ درخشش نئون --- */
.effect-p_link_glow {
    border: 1px solid #00f3ff !important;
    color: #00f3ff !important;
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.4), inset 0 0 8px rgba(0, 243, 255, 0.2);
    animation: neonGlowPulse 1.5s ease-in-out infinite alternate;
}

@keyframes neonGlowPulse {
    from {
        box-shadow: 0 0 5px rgba(0, 243, 255, 0.4), inset 0 0 5px rgba(0, 243, 255, 0.2);
    }

    to {
        box-shadow: 0 0 18px rgba(0, 243, 255, 0.8), inset 0 0 12px rgba(0, 243, 255, 0.4);
    }
}


/* =========================================
  ==============Badge Styles==============
========================================= */

.badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    font-size: 0.9em;
}

.badge_blue_check {
    color: #1da1f2;
    filter: drop-shadow(0 0 3px rgba(29, 161, 242, 0.5));
}

.badge_gold_check {
    color: #ffd700;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.7));
}

.badge_verified {
    color: #00d26a;
    filter: drop-shadow(0 0 3px rgba(0, 210, 106, 0.5));
}

.badge_creator {
    color: #a855f7;
    filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.6));
}