/* css/badges.css — profil nişanları (badge) üçün stil. 6 səviyyə: bronza < gümüş <
   qızıl < platin < almaz < əfsanə. Hər səviyyənin öz rəngi, çərçivəsi və ad effekti var. */

/* ---------- 1) AVATAR ÇƏRÇİVƏSİ (profil, böyük ölçü) ---------- */
@keyframes badge-frame-pulse-bronze {
  0%, 100% { box-shadow: 0 0 0 4px #cd7f32, 0 0 14px rgba(205, 127, 50, .5); }
  50% { box-shadow: 0 0 0 4px #cd7f32, 0 0 26px rgba(205, 127, 50, .95); }
}
@keyframes badge-frame-pulse-silver {
  0%, 100% { box-shadow: 0 0 0 4px #d9d9d9, 0 0 14px rgba(217, 217, 217, .55); }
  50% { box-shadow: 0 0 0 4px #d9d9d9, 0 0 28px rgba(217, 217, 217, 1); }
}
@keyframes badge-frame-pulse-gold {
  0%, 100% { box-shadow: 0 0 0 4px #ffd166, 0 0 16px rgba(255, 209, 102, .65); }
  50% { box-shadow: 0 0 0 4px #ffd166, 0 0 32px rgba(255, 209, 102, 1); }
}
@keyframes badge-frame-pulse-platinum {
  0%, 100% { box-shadow: 0 0 0 4px #22d3ee, 0 0 16px rgba(34, 211, 238, .6); }
  50% { box-shadow: 0 0 0 4px #22d3ee, 0 0 34px rgba(34, 211, 238, 1); }
}
@keyframes badge-frame-pulse-diamond {
  0%, 100% { box-shadow: 0 0 0 4px #a78bfa, 0 0 18px rgba(167, 139, 250, .65); }
  50% { box-shadow: 0 0 0 4px #a78bfa, 0 0 36px rgba(236, 72, 153, .9); }
}
@keyframes badge-frame-pulse-legend {
  0% { box-shadow: 0 0 0 4px #ff3d3d, 0 0 26px rgba(255, 61, 61, .9); }
  20% { box-shadow: 0 0 0 4px #ff9f1c, 0 0 26px rgba(255, 159, 28, .9); }
  40% { box-shadow: 0 0 0 4px #ffee32, 0 0 26px rgba(255, 238, 50, .9); }
  60% { box-shadow: 0 0 0 4px #2ee6a6, 0 0 26px rgba(46, 230, 166, .9); }
  80% { box-shadow: 0 0 0 4px #3aa0ff, 0 0 26px rgba(58, 160, 255, .9); }
  100% { box-shadow: 0 0 0 4px #c04bff, 0 0 26px rgba(192, 75, 255, .9); }
}

.profile-avatar.frame-bronze img { animation: badge-frame-pulse-bronze 1.8s ease-in-out infinite; }
.profile-avatar.frame-silver img { animation: badge-frame-pulse-silver 1.8s ease-in-out infinite; }
.profile-avatar.frame-gold img { animation: badge-frame-pulse-gold 1.6s ease-in-out infinite; }
.profile-avatar.frame-platinum img { animation: badge-frame-pulse-platinum 1.5s ease-in-out infinite; }
.profile-avatar.frame-diamond img { animation: badge-frame-pulse-diamond 1.4s ease-in-out infinite; }
.profile-avatar.frame-legend img { animation: badge-frame-pulse-legend 2.4s linear infinite; }

/* Əfsanədən sonrakı 3 yeni səviyyə: Alov, İldırım, Kosmik */
@keyframes badge-frame-pulse-alov {
  0%, 100% { box-shadow: 0 0 0 4px #ff5500, 0 0 18px rgba(255, 85, 0, .75); }
  50% { box-shadow: 0 0 0 4px #ffcc00, 0 0 40px rgba(255, 120, 0, 1); }
}
@keyframes badge-frame-pulse-ildirim {
  0%, 44%, 56%, 100% { box-shadow: 0 0 0 4px #22d3ee, 0 0 16px rgba(34, 211, 238, .7); }
  50% { box-shadow: 0 0 0 4px #eafcff, 0 0 44px rgba(255, 255, 255, 1); }
}
@keyframes badge-frame-pulse-kosmik {
  0%, 100% { box-shadow: 0 0 0 4px #7c3aed, 0 0 18px rgba(124, 58, 237, .7); }
  33% { box-shadow: 0 0 0 4px #ec4899, 0 0 32px rgba(236, 72, 153, .9); }
  66% { box-shadow: 0 0 0 4px #3b82f6, 0 0 32px rgba(59, 130, 246, .9); }
}

.profile-avatar.frame-alov img { animation: badge-frame-pulse-alov 1.2s ease-in-out infinite; }
.profile-avatar.frame-ildirim img { animation: badge-frame-pulse-ildirim 1.6s steps(1) infinite; }
.profile-avatar.frame-kosmik img { animation: badge-frame-pulse-kosmik 2.4s ease-in-out infinite; }

/* ---------- 2) AVATAR ÇƏRÇİVƏSİ (çat, kiçik ölçü — qalın həlqə + scale) ---------- */
@keyframes badge-frame-pulse-chat-bronze {
  0%, 100% { box-shadow: 0 0 0 3px #cd7f32, 0 0 10px 2px rgba(205, 127, 50, .85); transform: scale(1); }
  50% { box-shadow: 0 0 0 3px #cd7f32, 0 0 20px 4px rgba(205, 127, 50, 1); transform: scale(1.08); }
}
@keyframes badge-frame-pulse-chat-silver {
  0%, 100% { box-shadow: 0 0 0 3px #d9d9d9, 0 0 10px 2px rgba(220, 220, 220, .9); transform: scale(1); }
  50% { box-shadow: 0 0 0 3px #d9d9d9, 0 0 22px 4px rgba(220, 220, 220, 1); transform: scale(1.08); }
}
@keyframes badge-frame-pulse-chat-gold {
  0%, 100% { box-shadow: 0 0 0 3px #ffd166, 0 0 12px 3px rgba(255, 209, 102, .95); transform: scale(1); }
  50% { box-shadow: 0 0 0 3px #ffd166, 0 0 26px 5px rgba(255, 209, 102, 1); transform: scale(1.1); }
}
@keyframes badge-frame-pulse-chat-platinum {
  0%, 100% { box-shadow: 0 0 0 3px #22d3ee, 0 0 12px 3px rgba(34, 211, 238, .95); transform: scale(1); }
  50% { box-shadow: 0 0 0 3px #22d3ee, 0 0 26px 5px rgba(34, 211, 238, 1); transform: scale(1.1); }
}
@keyframes badge-frame-pulse-chat-diamond {
  0%, 100% { box-shadow: 0 0 0 3px #a78bfa, 0 0 13px 3px rgba(167, 139, 250, 1); transform: scale(1); }
  50% { box-shadow: 0 0 0 3px #a78bfa, 0 0 28px 6px rgba(236, 72, 153, 1); transform: scale(1.12); }
}
@keyframes badge-frame-pulse-chat-legend {
  0% { box-shadow: 0 0 0 3px #ff3d3d, 0 0 18px 4px rgba(255, 61, 61, 1); transform: scale(1.05); }
  20% { box-shadow: 0 0 0 3px #ff9f1c, 0 0 18px 4px rgba(255, 159, 28, 1); transform: scale(1); }
  40% { box-shadow: 0 0 0 3px #ffee32, 0 0 18px 4px rgba(255, 238, 50, 1); transform: scale(1.05); }
  60% { box-shadow: 0 0 0 3px #2ee6a6, 0 0 18px 4px rgba(46, 230, 166, 1); transform: scale(1); }
  80% { box-shadow: 0 0 0 3px #3aa0ff, 0 0 18px 4px rgba(58, 160, 255, 1); transform: scale(1.05); }
  100% { box-shadow: 0 0 0 3px #c04bff, 0 0 18px 4px rgba(192, 75, 255, 1); transform: scale(1); }
}

.message-row .avatar.frame-bronze { animation: badge-frame-pulse-chat-bronze 1.4s ease-in-out infinite; }
.message-row .avatar.frame-silver { animation: badge-frame-pulse-chat-silver 1.4s ease-in-out infinite; }
.message-row .avatar.frame-gold { animation: badge-frame-pulse-chat-gold 1.2s ease-in-out infinite; }
.message-row .avatar.frame-platinum { animation: badge-frame-pulse-chat-platinum 1.1s ease-in-out infinite; }
.message-row .avatar.frame-diamond { animation: badge-frame-pulse-chat-diamond 1s ease-in-out infinite; }
.message-row .avatar.frame-legend { animation: badge-frame-pulse-chat-legend 1.8s linear infinite; }

@keyframes badge-frame-pulse-chat-alov {
  0%, 100% { box-shadow: 0 0 0 3px #ff5500, 0 0 13px 3px rgba(255, 85, 0, .95); transform: scale(1); }
  50% { box-shadow: 0 0 0 3px #ffcc00, 0 0 28px 6px rgba(255, 120, 0, 1); transform: scale(1.12); }
}
@keyframes badge-frame-pulse-chat-ildirim {
  0%, 44%, 56%, 100% { box-shadow: 0 0 0 3px #22d3ee, 0 0 12px 3px rgba(34, 211, 238, .95); transform: scale(1); }
  50% { box-shadow: 0 0 0 3px #eafcff, 0 0 30px 6px rgba(255, 255, 255, 1); transform: scale(1.14); }
}
@keyframes badge-frame-pulse-chat-kosmik {
  0%, 100% { box-shadow: 0 0 0 3px #7c3aed, 0 0 13px 3px rgba(124, 58, 237, 1); transform: scale(1); }
  33% { box-shadow: 0 0 0 3px #ec4899, 0 0 26px 5px rgba(236, 72, 153, 1); transform: scale(1.1); }
  66% { box-shadow: 0 0 0 3px #3b82f6, 0 0 26px 5px rgba(59, 130, 246, 1); transform: scale(1.1); }
}

.message-row .avatar.frame-alov { animation: badge-frame-pulse-chat-alov .9s ease-in-out infinite; }
.message-row .avatar.frame-ildirim { animation: badge-frame-pulse-chat-ildirim 1.3s steps(1) infinite; }
.message-row .avatar.frame-kosmik { animation: badge-frame-pulse-chat-kosmik 2s ease-in-out infinite; }

/* ---------- 3) AD EFFEKTİ (hər səviyyənin öz hərəkətli rəng qradienti) ---------- */
@keyframes tier-name-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.user-name-text[class*="tier-name-"],
.profile-name[class*="tier-name-"] {
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
  animation: tier-name-shift 2.4s linear infinite;
}

.tier-name-bronze { background-image: linear-gradient(90deg, #cd7f32, #ffb37a, #cd7f32); }
.tier-name-silver { background-image: linear-gradient(90deg, #9ca3af, #ffffff, #9ca3af); }
.tier-name-gold { background-image: linear-gradient(90deg, #ff3d00, #ff8f00, #ffd166, #ff8f00, #ff3d00); animation-duration: 2.2s; }
.tier-name-platinum { background-image: linear-gradient(90deg, #0891b2, #a5f3fc, #0891b2); animation-duration: 2s; }
.tier-name-diamond { background-image: linear-gradient(90deg, #7c3aed, #f0abfc, #7c3aed); animation-duration: 1.8s; }
.tier-name-legend {
  background-image: linear-gradient(90deg, #ff3d3d, #ff9f1c, #ffee32, #2ee6a6, #3aa0ff, #c04bff, #ff3d3d);
  animation-duration: 1.4s;
}

/* Əfsanədən sonrakı 3 yeni səviyyə — hərəkətli qradientdən əlavə, addan
   "çıxan" kiçik animasiyalı simvollar (alov/qığılcım/ulduz) da var. */
@keyframes tier-particle-rise {
  0% { transform: translateY(2px) scale(.6); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(-14px) scale(1.05); opacity: 0; }
}
@keyframes tier-particle-flicker {
  0%, 18%, 22%, 100% { opacity: 0; }
  20% { opacity: 1; transform: scale(1.15); }
  55% { opacity: 0; }
  58% { opacity: 1; transform: scale(1); }
  62% { opacity: 0; }
}
@keyframes tier-particle-twinkle {
  0%, 100% { opacity: 0; transform: scale(.4); }
  50% { opacity: 1; transform: scale(1); }
}

.tier-name-alov,
.tier-name-ildirim,
.tier-name-kosmik {
  position: relative;
  padding: 0 3px;
}

.tier-name-alov::before,
.tier-name-alov::after,
.tier-name-ildirim::before,
.tier-name-kosmik::before,
.tier-name-kosmik::after {
  -webkit-text-fill-color: initial;
  color: initial;
  position: absolute;
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
}

.tier-name-alov { background-image: linear-gradient(90deg, #ff2d00, #ff8a00, #ffd500, #ff8a00, #ff2d00); animation-duration: 1.1s; }
.tier-name-alov::before { content: "🔥"; top: -3px; left: 0; animation: tier-particle-rise 1s ease-in infinite; }
.tier-name-alov::after { content: "🔥"; top: -3px; right: 0; animation: tier-particle-rise 1s ease-in infinite .5s; }

.tier-name-ildirim { background-image: linear-gradient(90deg, #0ea5e9, #eafcff, #0ea5e9); animation-duration: 1s; }
.tier-name-ildirim::before { content: "⚡"; top: -6px; right: -6px; font-size: 12px; animation: tier-particle-flicker 1.6s steps(1) infinite; }

.tier-name-kosmik { background-image: linear-gradient(90deg, #4c1d95, #ec4899, #3b82f6, #4c1d95); animation-duration: 2.4s; }
.tier-name-kosmik::before { content: "✨"; top: -4px; left: -2px; animation: tier-particle-twinkle 1.4s ease-in-out infinite; }
.tier-name-kosmik::after { content: "✨"; bottom: -4px; right: -2px; font-size: 8px; animation: tier-particle-twinkle 1.4s ease-in-out infinite .7s; }

/* ---------- 4) AD YANINDAKI ULDUZ İKONU (səviyyəyə görə rəng) ---------- */
.chat-badge-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 13px;
  vertical-align: middle;
  font-weight: 700;
}

.chat-badge-icon:empty {
  display: none;
}

.chat-badge-icon.star-bronze { color: #cd7f32; }
.chat-badge-icon.star-silver { color: #c0c0c0; }
.chat-badge-icon.star-gold { color: #ffd166; }
.chat-badge-icon.star-platinum { color: #22d3ee; }
.chat-badge-icon.star-diamond { color: #a78bfa; }
.chat-badge-icon.star-legend {
  background-image: linear-gradient(90deg, #ff3d3d, #ff9f1c, #ffee32, #2ee6a6, #3aa0ff, #c04bff, #ff3d3d);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: tier-name-shift 1.4s linear infinite;
}

.chat-badge-icon.star-alov,
.chat-badge-icon.star-ildirim,
.chat-badge-icon.star-kosmik {
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.chat-badge-icon.star-alov {
  background-image: linear-gradient(90deg, #ff2d00, #ff8a00, #ffd500, #ff8a00, #ff2d00);
  animation: tier-name-shift 1.1s linear infinite;
}
.chat-badge-icon.star-ildirim {
  background-image: linear-gradient(90deg, #0ea5e9, #eafcff, #0ea5e9);
  animation: tier-name-shift 1s linear infinite;
}
.chat-badge-icon.star-kosmik {
  background-image: linear-gradient(90deg, #4c1d95, #ec4899, #3b82f6, #4c1d95);
  animation: tier-name-shift 2.4s linear infinite;
}

/* Səviyyə çarxı — profildəki rəng/çərçivə/ulduzun HANSI SƏVİYYƏDƏN gəldiyini
   və növbəti səviyyəyə nə tələb olunduğunu aydın göstərir. */
.level-wheel-section {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  text-align: left;
}

/* #102 Bal-əsaslı səviyyə kartı — .level-wheel-section-un EYNİ ümumi
   görünüşü (fon/radius/padding), amma öz sinifləri ilə, ki tərtibatı
   dəyişəndə bir-birinə TOXUNMASIN. */
.point-level-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
.point-level-card[hidden] {
  display: none;
}
.point-level-icon {
  font-size: 26px;
  flex: 0 0 auto;
}
.point-level-info {
  flex: 1;
  min-width: 0;
}
.point-level-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.point-level-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}
.point-level-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb238, #ff7a3d);
  transition: width .3s ease;
}
.point-level-sub {
  font-size: 11px;
  opacity: .7;
  margin-top: 5px;
}

.level-wheel {
  flex: 0 0 auto;
}

.level-wheel-ring {
  --level-color: #cd7f32;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(var(--level-color) 100%, rgba(255, 255, 255, .2) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

.level-wheel-inner {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  color: #fff;
}

.level-wheel-number {
  font-size: 18px;
  font-weight: 800;
}

.level-wheel-label {
  font-size: 8px;
  opacity: .6;
  text-transform: uppercase;
}

.level-wheel-info {
  flex: 1;
  min-width: 0;
}

.level-wheel-tier-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}

.level-wheel-desc {
  font-size: 11px;
  opacity: .8;
  line-height: 1.5;
}

.level-wheel-next-list {
  margin: 4px 0 0;
  padding-left: 18px;
}

.level-wheel-next-list li {
  margin-bottom: 2px;
}

.badges-section {
  margin: 18px 0;
}

.badges-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: inherit;
}

.vip-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 209, 102, .25);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
  /* Mobil brauzerlərdə "title" atributu basıb-saxlamada göstərilmir —
     bu düymə görüntü YOX, JS click handler-i ilə işləyir. */
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.badges-grid[hidden] {
  display: none !important;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255, 209, 102, .16);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.badge-icon {
  font-size: 26px;
}

.badge-name {
  font-size: 11px;
  font-weight: 600;
}

.badge-rarity {
  font-size: 10px;
  opacity: .65;
}

.badges-empty {
  font-size: 13px;
  opacity: .7;
}

.badges-empty[hidden] {
  display: none !important;
}

/* Mənim Səyahətim (şəxsi statistika paneli) */
.journey-section {
  margin: 18px 0;
}

.journey-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.journey-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .04);
}

.journey-stat-icon {
  font-size: 20px;
}

.journey-stat-value {
  font-size: 14px;
  font-weight: 700;
}

.journey-stat-label {
  font-size: 10px;
  opacity: .65;
}

/* Özünlə yarış (həftəlik özünü keçmə) */
.weekly-challenge {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 209, 102, .18), rgba(255, 138, 61, .1));
}

.weekly-challenge[hidden] {
  display: none !important;
}

.weekly-challenge-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.weekly-challenge-copy {
  font-size: 12px;
  opacity: .85;
  margin-bottom: 8px;
}

/* Növbəti nişana qədər irəliləyiş zolağı */
.badge-progress-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.badge-progress-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .04);
}

.badge-progress-icon {
  font-size: 20px;
  flex: 0 0 auto;
  opacity: .55;
}

.badge-progress-body {
  flex: 1;
  min-width: 0;
}

.badge-progress-label {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  opacity: .8;
}

.badge-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .08);
  overflow: hidden;
}

.badge-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd166, #ff8a3d);
  transition: width .4s ease;
}

/* Yeni nişan qazanıldı bildirişi (toast) */
.badge-earned-toast {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2a2a3d, #1c1c2b);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 209, 102, .4);
  z-index: 9999;
  transition: top .4s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
  max-width: 90vw;
}

.badge-earned-toast.show {
  top: 16px;
}

.badge-earned-icon {
  font-size: 26px;
  flex: 0 0 auto;
}

.badge-earned-text {
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
}

/* #70 Nailiyyət celebration ekranı — köhnə küncdəki balaca toast-ın (yuxarıda)
   ƏVƏZİNƏ deyil, ÜSTÜNDƏN: eyni "yeni nişan" aşkarlama məntiqi indi bunu
   göstərir (bax js/badge-notify.js) — tam ekranlı, konfetili. */
.badge-celebration-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 20, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: background .35s ease, opacity .35s ease;
  overflow: hidden;
}

.badge-celebration-overlay.show {
  background: rgba(10, 6, 20, 0.72);
  opacity: 1;
  pointer-events: auto;
}

.badge-celebration-card {
  position: relative;
  width: min(90vw, 340px);
  padding: 32px 24px 24px;
  border-radius: 22px;
  background: linear-gradient(160deg, #2a2140, #1a1428);
  border: 1px solid rgba(255, 209, 102, .5);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 40px rgba(255, 209, 102, .25);
  text-align: center;
  color: #fff;
  transform: scale(.75) translateY(20px);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}

.badge-celebration-overlay.show .badge-celebration-card {
  transform: scale(1) translateY(0);
}

.badge-celebration-kicker {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffd166;
  font-weight: 700;
  margin-bottom: 10px;
}

.badge-celebration-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 14px;
  animation: badge-celebration-pop .6s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes badge-celebration-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.badge-celebration-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.badge-celebration-tier {
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 22px;
  text-transform: capitalize;
}

.badge-celebration-close {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffd166, #ffb020);
  color: #2a1a00;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}

.badge-celebration-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: 22px;
}

.badge-confetti-piece {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 14px;
  opacity: .9;
  animation-name: badge-confetti-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes badge-confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(340px) rotate(540deg); opacity: 0; }
}

/* Dostlarım bölməsi (profil) — level-wheel-section ilə eyni vizual dil (ağ
   mətn, şəffaf ağ örtüklər) çünki bu da bənövşəyi sidebar fonunun üstündədir. */
.friends-section {
  margin: 18px 0;
}

.friend-requests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.friend-requests-list[hidden] {
  display: none !important;
}

.friend-request-row {
  background: rgba(255, 209, 102, .18);
  border: 1px solid rgba(255, 209, 102, .4);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
}

.friend-request-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.friend-request-actions button {
  flex: 1;
  border: 0;
  border-radius: 8px;
  padding: 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.friend-accept-btn {
  background: #ffd166;
  color: #1a1a1a;
}

.friend-decline-btn {
  background: rgba(255, 255, 255, .15);
  color: inherit;
}

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, .04);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

.friend-remove-btn {
  border: 0;
  background: rgba(229, 62, 62, .18);
  color: #e53e3e;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  flex: 0 0 auto;
}

.friends-empty {
  font-size: 13px;
  opacity: .7;
}

.friends-empty[hidden] {
  display: none !important;
}

.video-privacy-section {
  margin: 18px 0;
}

.my-videos-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 209, 102, .18);
  border: 1px solid rgba(255, 209, 102, .4);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
}

.referral-count-text {
  font-size: 12px;
  color: inherit;
  opacity: .85;
  margin: 0 0 10px;
}

.referral-bonus-hint {
  font-size: 11.5px;
  color: inherit;
  opacity: .7;
  margin: -6px 0 10px;
}

.referral-link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.referral-link-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 209, 102, .1);
  border: 1px solid rgba(255, 209, 102, .35);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 12px;
  color: inherit;
}

.referral-copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 209, 102, .18);
  border: 1px solid rgba(255, 209, 102, .4);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.referral-copy-btn:active {
  transform: scale(0.97);
}

/* #39 QR kodla dost əlavəsi — friends-section-da .my-videos-link linkindən
   sonra tam-en düyməsi kimi oturur (öz sətrini tutur, flex-row-a ehtiyacı yoxdur). */
.my-qr-btn {
  width: 100%;
  justify-content: center;
  height: 40px;
  margin-top: 8px;
}

.qr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.qr-modal-overlay.hidden {
  display: none;
}

.qr-modal-box {
  background: #1a1a2e;
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 320px;
  width: 90%;
  text-align: center;
}

.qr-modal-box h3 {
  margin: 0 0 16px;
  font-size: 16px;
}

.qr-modal-canvas {
  display: flex;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.qr-modal-hint {
  font-size: 12px;
  opacity: .7;
  margin: 0 0 16px;
}

.qr-modal-close-btn {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 209, 102, .18);
  border: 1px solid rgba(255, 209, 102, .4);
  color: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* 🐛 DÜZƏLİŞ: bu 4 effektin ƏSL görüntü qaydaları (box-shadow/animation)
   yalnız css/chat.css-də var idi — profile.html isə HEÇ VAXT chat.css
   yükləmirdi (bax <link> siyahısı), ona görə JS düzgün class əlavə etsə
   belə heç bir stil tətbiq olunmurdu, çərçivə görünmürdü. chat.css-i bura
   BÜTÖV yükləmək riskli olardı (o fayl çox böyükdür, əlaqəsiz sinif adları
   toqquşa bilər) — ona görə YALNIZ #avatarImg-ə aid variantı köçürülüb.
   css/chat.css-dəki əsl nüsxə ilə EYNİ saxlanmalıdır. */
#avatarImg.avatar-frame-glow {
  box-shadow: 0 0 0 3px #fff176, 0 0 14px 3px rgba(255, 241, 118, .85) !important;
  animation: avatar-frame-glow-pulse 1.6s ease-in-out infinite !important;
}
@keyframes avatar-frame-glow-pulse {
  0%, 100% { box-shadow: 0 0 0 3px #fff176, 0 0 12px 3px rgba(255, 241, 118, .7); }
  50% { box-shadow: 0 0 0 3px #fff176, 0 0 24px 5px rgba(255, 241, 118, 1); }
}
#avatarImg.avatar-frame-ice {
  box-shadow: 0 0 0 3px #7ee8fa, 0 0 14px 3px rgba(126, 232, 250, .85) !important;
  animation: avatar-frame-ice-pulse 1.8s ease-in-out infinite !important;
}
@keyframes avatar-frame-ice-pulse {
  0%, 100% { box-shadow: 0 0 0 3px #7ee8fa, 0 0 10px 3px rgba(126, 232, 250, .6); }
  50% { box-shadow: 0 0 0 3px #7ee8fa, 0 0 22px 5px rgba(126, 232, 250, 1); }
}
#avatarImg.avatar-frame-emerald {
  box-shadow: 0 0 0 3px #2ecc71, 0 0 14px 3px rgba(46, 204, 113, .8) !important;
  animation: avatar-frame-emerald-pulse 2s ease-in-out infinite !important;
}
@keyframes avatar-frame-emerald-pulse {
  0%, 100% { box-shadow: 0 0 0 3px #2ecc71, 0 0 10px 3px rgba(46, 204, 113, .55); }
  50% { box-shadow: 0 0 0 3px #a8ffce, 0 0 20px 4px rgba(46, 204, 113, .95); }
}
#avatarImg.avatar-frame-sunset {
  animation: avatar-frame-sunset-cycle 3s linear infinite !important;
}
@keyframes avatar-frame-sunset-cycle {
  0%   { box-shadow: 0 0 0 3px #ff7e5f, 0 0 16px 4px rgba(255, 126, 95, .8); }
  33%  { box-shadow: 0 0 0 3px #feb47b, 0 0 16px 4px rgba(254, 180, 123, .8); }
  66%  { box-shadow: 0 0 0 3px #c56cf0, 0 0 16px 4px rgba(197, 108, 240, .8); }
  100% { box-shadow: 0 0 0 3px #ff7e5f, 0 0 16px 4px rgba(255, 126, 95, .8); }
}

/* #55 Alına bilən profil çərçivələri */
.avatar-frame-shop {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}

.avatar-frame-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: 10px 6px;
  color: inherit;
  cursor: pointer;
  text-align: center;
}

.avatar-frame-option.active {
  border-color: rgba(255, 209, 102, .8);
  background: rgba(255, 209, 102, .14);
}

/* #56 hissə 5: VIP-yalnız əşyalar üçün kilidli görünüş (məs. Almaz Çərçivə). */
.avatar-frame-option.locked {
  opacity: .5;
  cursor: not-allowed;
}

.avatar-frame-icon {
  font-size: 24px;
}

.avatar-frame-option small {
  font-size: 10px;
  opacity: .75;
}

.friends-request-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.friends-request-badge[hidden] {
  display: none !important;
}

.video-privacy-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
}

.video-privacy-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.video-privacy-slider {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  border-radius: 20px;
  background: rgba(0, 0, 0, .15);
  transition: background .2s ease;
}

.video-privacy-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
}

.video-privacy-toggle input:checked + .video-privacy-slider {
  background: #ffd166;
}

.video-privacy-toggle input:checked + .video-privacy-slider::before {
  transform: translateX(18px);
}
