/* ==========================================================================
   Croplod — Formal look (global)
   گوشه‌های تیز و رسمی برای تمام سرویس‌های اکوسیستم + اسکرول‌بار ریز
   ========================================================================== */

/* ---------- Thin, tidy scrollbars (مثل اسکرول‌بار سایدبار) ---------- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb, rgba(100, 116, 139, 0.5)) transparent;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb, rgba(100, 116, 139, 0.5));
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb, rgba(100, 116, 139, 0.75));
}
::-webkit-scrollbar-corner {
    background: transparent;
}

/* ---------- Sharp corners for shared components (all services) ---------- */
.account-card,
.stat-card,
.wallet-hero,
.auth-card,
.checkout-card,
.profile-card,
.pm-card,
.lib-card,
.plus-card,
.list-group {
    border-radius: 10px !important;
}

.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-danger,
.btn-sm,
.btn-lg,
.btn-block {
    border-radius: 6px !important;
}

.list-item,
.soc-search-card,
.soc-search,
.post {
    border-radius: 8px !important;
}

.badge,
.chip,
.wallet-chip,
.soc-history-chip {
    border-radius: 4px !important;
}

.empty-state,
.empty-state-icon,
.account-sidebar-link {
    border-radius: 8px !important;
}

.account-header-action-btn {
    border-radius: 8px !important;
}

/* Modal panels: رسمی‌تر */
.profile-modal,
.confirm-modal,
.modal,
.modal-content {
    border-radius: 12px !important;
}

/* Cards inside feeds (post cards are .post — already covered) */
.soc-feed-card,
.soc-layout-main .account-card,
.soc-layout-side .account-card {
    border-radius: 10px !important;
}

/* ---------- Premium star halo behind avatars ---------- */
.pm-avatar-wrap.premium-halo,
.account-profile-avatar.premium-halo {
    position: relative;
}
.premium-halo .pm-avatar,
.premium-halo img.pm-avatar,
.premium-avatar .pm-avatar,
.account-profile-avatar.premium-halo img,
.account-profile-avatar.premium-halo {
    position: relative;
    z-index: 1;
}

/* ---------- Premium profile hero (آواتار پریمیوم + بک‌گراند متحرک) ---------- */
.premium-profile-hero {
    position: relative;
    overflow: hidden;
    border-radius: 12px !important;
}
.premium-profile-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.premium-profile-stars i {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 4px 1px rgba(251, 191, 36, 0.7);
    animation: premium-star-twinkle 3s ease-in-out infinite;
}
.premium-profile-stars i:nth-child(1) { left: 8%; top: 18%; animation-delay: 0s; }
.premium-profile-stars i:nth-child(2) { left: 22%; top: 70%; animation-delay: .4s; }
.premium-profile-stars i:nth-child(3) { left: 38%; top: 12%; animation-delay: .9s; }
.premium-profile-stars i:nth-child(4) { left: 55%; top: 78%; animation-delay: 1.3s; }
.premium-profile-stars i:nth-child(5) { left: 68%; top: 22%; animation-delay: .2s; }
.premium-profile-stars i:nth-child(6) { left: 84%; top: 60%; animation-delay: 1.6s; }
.premium-profile-stars i:nth-child(7) { left: 92%; top: 30%; animation-delay: .7s; }
.premium-profile-stars i:nth-child(8) { left: 12%; top: 42%; animation-delay: 2.1s; }
.premium-profile-stars i:nth-child(9) { left: 48%; top: 50%; animation-delay: 1.1s; }
.premium-profile-stars i:nth-child(10) { left: 76%; top: 86%; animation-delay: 2.5s; }
.premium-profile-stars i:nth-child(11) { left: 32%; top: 90%; animation-delay: 1.8s; }
.premium-profile-stars i:nth-child(12) { left: 62%; top: 8%; animation-delay: 2.9s; }
@keyframes premium-star-twinkle {
    0%, 100% { opacity: .2; transform: scale(.7); }
    50% { opacity: 1; transform: scale(1.3); }
}
.premium-profile-hero .btn-primary {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a1205;
    border: none;
    box-shadow: 0 6px 20px -6px rgba(245,158,11,.7);
}

/* Premium header avatar ring */
.account-header-avatar.premium-header-avatar {
    position: relative;
    box-shadow: 0 0 0 2px var(--bg-card, #fff), 0 0 14px 1px rgba(251, 191, 36, 0.6);
}

/* Premium avatar ring on posts/comments */
.post-avatar.premium-avatar,
.soc-avatar-mini.premium-avatar {
    position: relative;
    border-radius: 50%;
}

/* ---------- Premium upgrade CTA ---------- */
.cr-upgrade-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 45%, #f59e0b 100%);
    color: #1a1205 !important;
    font-weight: 800;
    font-size: 13.5px;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 18px -4px rgba(245, 158, 11, 0.65);
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.cr-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px -4px rgba(245, 158, 11, 0.85);
    filter: brightness(1.04);
    color: #1a1205 !important;
}
.cr-upgrade-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.cr-upgrade-btn-sm {
    padding: 7px 14px;
    font-size: 12.5px;
    border-radius: 6px;
}

/* Sidebar upgrade link */
.cr-upgrade-sidebar-link {
    background: linear-gradient(135deg, rgba(245,158,11,.14), rgba(251,191,36,.08)) !important;
    border: 1px solid rgba(245,158,11,.35);
    color: #b45309 !important;
    font-weight: 800 !important;
    margin: 2px 10px;
    width: calc(100% - 20px);
}
.cr-upgrade-sidebar-link .cr-upgrade-star {
    margin-inline-start: auto;
    color: #f59e0b;
    animation: premium-star-pulse 1.6s ease-in-out infinite;
}
@keyframes premium-star-pulse {
    0%, 100% { transform: scale(1); opacity: .7; }
    50% { transform: scale(1.25); opacity: 1; }
}

/* Premium badge chip */
.cr-premium-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a1205;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
}
.cr-premium-chip svg {
    width: 12px;
    height: 12px;
}
