/* =========================================
   ЯДРО И ПЕРЕМЕННЫЕ (CYBER-BENTO THEME)
========================================= */
:root {
  --bg-body: #050608;
  --bg-card: rgba(18, 20, 28, 0.6);
  --bg-card-hover: rgba(26, 29, 38, 0.85);

  --primary: #d946ef;
  --primary-glow: rgba(217, 70, 239, 0.4);
  --accent: #ffd700;
  --accent-glow: rgba(255, 215, 0, 0.4);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.3);
  --success: #2ecc71;
  --info: #38bdf8;

  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.15);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

.profile-wrapper * {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-body);
  background-image:
    radial-gradient(
      circle at 15% 50%,
      rgba(217, 70, 239, 0.05),
      transparent 25%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(56, 189, 248, 0.05),
      transparent 25%
    );
  background-attachment: fixed;
  font-family: "Montserrat", sans-serif;
}

.profile-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 130px 20px 80px;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

/* =========================================
   УТИЛИТЫ И ЦВЕТА
========================================= */
.text-success {
  color: #4ade80 !important;
  text-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
  font-weight: 800;
}
.text-danger {
  color: #f87171 !important;
  text-shadow: 0 0 15px rgba(248, 113, 113, 0.4);
  font-weight: 800;
}
.text-info {
  color: #38bdf8 !important;
}
.hidden-emoji {
  display: none;
}

/* =========================================
   ШАПКА ПРОФИЛЯ
========================================= */
.profile-header {
  position: relative;
  background-color: var(--bg-card);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 35px;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-header:hover {
  transform: translateY(-5px);
  border-color: var(--border-highlight);
}

.profile-header-overlay {
  width: 100%;
  background: linear-gradient(
    to top,
    rgba(8, 10, 14, 1) 0%,
    rgba(8, 10, 14, 0.8) 40%,
    transparent 100%
  );
  padding: 40px 50px;
  display: flex;
  align-items: center;
  gap: 35px;
}

.avatar-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  border-radius: 50%;
  z-index: 5;
}

.avatar-wrapper::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--info),
    var(--primary)
  );
  background-size: 200% 200%;
  animation: spinGlow 4s linear infinite;
  z-index: 0;
  opacity: 0.7;
}

@keyframes spinGlow {
  0% {
    background-position: 0% 50%;
    transform: rotate(0deg);
  }
  100% {
    background-position: 200% 50%;
    transform: rotate(360deg);
  }
}

.avatar-big {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #080a0e;
  background: var(--bg-body);
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
}

.avatar-wrapper:hover .avatar-big {
  transform: scale(1.05);
}

.avatar-frame {
  position: absolute;
  top: -15%;
  left: -15%;
  width: 130%;
  height: 130%;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.6));
  transition: transform 0.4s;
}

.avatar-wrapper:hover .avatar-frame {
  transform: scale(1.1) rotate(5deg);
}

.profile-identity {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}
.profile-identity h1 {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-main);
  margin: 0;
  line-height: 1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  letter-spacing: -1px;
}
.user-title {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
  text-shadow: 0 0 10px var(--accent-glow);
}

/* Бейджи профиля */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
}
.badge:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--border-highlight);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.badge.premium {
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.15);
}
.badge.patreon {
  background: rgba(249, 104, 84, 0.15);
  color: #f96854;
  border-color: rgba(249, 104, 84, 0.4);
}
.badge.wiki {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
  border-color: rgba(52, 152, 219, 0.4);
}
.badge.faction-neon {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.4);
}
.badge.faction-quantum {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}
.badge.faction-iron {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}
.badge.tax-warning {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
  animation: pulseRed 2s infinite;
}
.badge.rep {
  color: #86efac;
  border-color: rgba(46, 204, 113, 0.3);
  background: rgba(46, 204, 113, 0.1);
}

@keyframes pulseRed {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 15px 2px rgba(239, 68, 68, 0.2);
  }
}

.btn-edit {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(10px);
}
.btn-edit:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-main);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
.btn-message {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-customize {
  background: linear-gradient(
    135deg,
    rgba(217, 70, 239, 0.2),
    rgba(139, 92, 246, 0.2)
  );
  border-color: rgba(217, 70, 239, 0.45);
  color: #fff;
  text-decoration: none;
}
.btn-customize:hover {
  background: linear-gradient(135deg, #d946ef, #8b5cf6);
  border-color: #d946ef;
  box-shadow: 0 10px 25px rgba(217, 70, 239, 0.45);
}

/* =========================================
   ГРИД (BENTO BOXES)
========================================= */
.bento-dashboard {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  width: 100%;
}
.bento-col-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  width: 100%;
}

.span-4 {
  grid-column: span 4;
}
.span-8 {
  grid-column: span 8;
}
.span-12 {
  grid-column: span 12;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card h3,
.card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 25px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.card h3 i,
.card h2 i {
  color: var(--primary);
  font-size: 1.3rem;
  background: var(--primary-glow);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* =========================================
   СТАТИСТИКА И БАЛАНС
========================================= */
.stat-box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.stat-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 20px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: 0.3s;
}
.stat-box:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.stat-box-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}
.color-msg {
  color: #38bdf8;
}
.color-voice {
  color: #a855f7;
}
.color-fire {
  color: #e67e22;
}
.color-door {
  color: #2ecc71;
}
.stat-box-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
}
.stat-box-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  line-height: 1;
}

.chart-card {
  height: 300px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 10px;
}
.chart-container {
  height: 100%;
  width: 100%;
  position: relative;
}

.card-finance {
  background: linear-gradient(
    180deg,
    rgba(241, 196, 15, 0.05) 0%,
    rgba(22, 24, 30, 0.8) 100%
  );
  border-color: rgba(241, 196, 15, 0.2);
}
.icon-finance {
  color: #f1c40f !important;
  box-shadow: 0 0 15px rgba(241, 196, 15, 0.3) !important;
  background: rgba(241, 196, 15, 0.1) !important;
}
.finance-hero {
  text-align: center;
  padding: 20px 0 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}
.finance-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
}
.finance-hero .huge-val {
  font-size: 3rem;
  font-weight: 900;
  color: #ffd700;
  font-family: "JetBrains Mono", monospace;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
  line-height: 1;
  margin: 10px 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: 0.3s;
}
.stat-row:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}
.stat-row:last-child {
  margin-bottom: 0;
}
.stat-row .val {
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  color: var(--text-main);
  font-size: 1.05rem;
}
.stat-row .val.gold {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

.rank-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 8px;
  margin-left: 10px;
  vertical-align: text-bottom;
  font-family: "Montserrat", sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.rank-badge.top-1 {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}
.rank-badge.top-2 {
  background: rgba(192, 192, 192, 0.15);
  color: #c0c0c0;
  border-color: #c0c0c0;
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}
.rank-badge.top-3 {
  background: rgba(205, 127, 50, 0.15);
  color: #cd7f32;
  border-color: #cd7f32;
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}

/* =========================================
   ЭФФЕКТЫ И БУСТЫ
========================================= */
.effects-container {
  margin-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
}
.effects-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 5px;
}
.boost-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}
.boost-chip {
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.boost-chip.info {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
}
.boost-chip.gold {
  color: #f1c40f;
  border-color: rgba(241, 196, 15, 0.3);
  background: rgba(241, 196, 15, 0.1);
}
.boost-chip.success {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.1);
}

/* =========================================
   СЕМЬЯ, BATTLE PASS, И ДОП. БЛОКИ
========================================= */
.marriage-info {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 99, 132, 0.15),
    rgba(0, 0, 0, 0.3)
  );
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 99, 132, 0.3);
  box-shadow: inset 0 0 20px rgba(255, 99, 132, 0.05);
}
.marriage-info-centered {
  margin-top: auto;
  margin-bottom: auto;
}
.heart-icon {
  font-size: 2.5rem;
  color: #ff6384;
  filter: drop-shadow(0 0 10px rgba(255, 99, 132, 0.6));
  animation: heartBeat 1.5s infinite;
}
.marriage-info p {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}
.small-date {
  font-size: 0.85rem;
  color: #ffb3c6 !important;
  margin-top: 5px;
  font-weight: 600;
}

.empty-state-centered {
  text-align: center;
  margin: auto 0;
  color: var(--text-muted);
  opacity: 0.6;
}
.empty-state-centered i {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #555;
}
.empty-state-centered p {
  margin: 0;
  font-weight: 600;
}
.empty-card {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
}
.empty-card i {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.05);
}

@keyframes heartBeat {
  0%,
  30%,
  60%,
  100% {
    transform: scale(1);
  }
  15%,
  45% {
    transform: scale(1.15);
  }
}

/* Battle Pass Dynamic Card */
.card-bp {
  border-color: rgb(var(--fac-rgb));
  box-shadow: 0 0 25px rgba(var(--fac-rgb), 0.1);
  background: linear-gradient(
    135deg,
    rgba(var(--fac-rgb), 0.1) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.icon-bp {
  color: rgb(var(--fac-rgb)) !important;
  box-shadow: 0 0 15px rgba(var(--fac-rgb), 0.4) !important;
  background: rgba(var(--fac-rgb), 0.2) !important;
}
.bp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 15px;
}
.bp-faction-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
}
.bp-level-label {
  font-weight: 900;
  font-size: 1.8rem;
  color: #fff;
  line-height: 1;
}
.progress-bar-bg {
  height: 14px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
  background: rgb(var(--fac-rgb));
  box-shadow: 0 0 15px rgba(var(--fac-rgb), 0.8);
}
.bp-xp-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 25px;
  font-weight: 600;
}
.bp-status-row {
  margin: 0;
  background: rgba(0, 0, 0, 0.2);
}

/* Danger Zone */
.danger-zone {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(
    180deg,
    rgba(239, 68, 68, 0.05) 0%,
    transparent 100%
  );
}
.danger-zone h2 i {
  color: var(--danger);
  background: var(--danger-glow);
  box-shadow: 0 0 15px var(--danger-glow);
}
.tax-alert {
  color: var(--danger);
  font-weight: 800;
  margin-top: 15px;
  font-size: 1rem;
  background: rgba(239, 68, 68, 0.1);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  text-align: center;
}
.tax-ok {
  text-align: center;
  color: #2ecc71;
  font-weight: 700;
  margin-top: 15px;
  background: rgba(46, 204, 113, 0.1);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

/* =========================================
   ДОСТИЖЕНИЯ
========================================= */
.card-achievements {
  background: linear-gradient(to right, rgba(255, 215, 0, 0.03), transparent);
  border-left: 2px solid #ffd700;
}
.ach-title-icon {
  color: #ffd700 !important;
  background: rgba(255, 215, 0, 0.1) !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3) !important;
}
.ach-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 15px;
}
.ach-bento-item {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.08),
    rgba(0, 0, 0, 0.4)
  );
  border: 1px solid rgba(255, 215, 0, 0.15);
  padding: 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: 0.3s;
  cursor: pointer;
}
.ach-bento-item:hover {
  transform: scale(1.03);
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.15),
    rgba(0, 0, 0, 0.6)
  );
  border-color: #ffd700;
  box-shadow: 0 10px 20px rgba(255, 215, 0, 0.15);
}
.ach-bento-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}
.ach-bento-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ach-bento-name {
  font-weight: 800;
  color: #fff;
  font-size: 1rem;
  line-height: 1.2;
}
.ach-bento-title {
  font-size: 0.8rem;
  color: #ffd700;
  font-weight: 700;
  background: rgba(255, 215, 0, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
}

/* =========================================
   ИНВЕНТАРЬ
========================================= */
.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}
.inv-header h2 {
  margin: 0;
}

.inv-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.inv-filter-btn {
  font-family: inherit;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}
.inv-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.inv-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.inventory-grid-expanded {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 15px;
  margin-bottom: 5px;
}
.inv-item {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: help;
  overflow: visible;
}
.inv-item:hover {
  transform: translateY(-6px) scale(1.05);
  background: rgba(255, 255, 255, 0.05);
  z-index: 10;
}
.inv-item.hidden {
  display: none !important;
}

.inv-item.common:hover {
  box-shadow: 0 10px 20px rgba(149, 165, 166, 0.3);
  border-color: #95a5a6;
}
.inv-item.uncommon:hover {
  box-shadow: 0 10px 20px rgba(217, 70, 239, 0.3);
  border-color: #d946ef;
}
.inv-item.rare:hover {
  box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
  border-color: #3498db;
}
.inv-item.epic:hover {
  box-shadow: 0 10px 20px rgba(155, 89, 182, 0.3);
  border-color: #9b59b6;
}
.inv-item.legendary {
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  border-color: rgba(255, 215, 0, 0.3);
}
.inv-item.legendary:hover {
  box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
  border-color: #ffd700;
}

.inv-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.inv-img-icon {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
  transition: 0.3s;
}
.inv-item:hover .inv-img-icon {
  transform: scale(1.1);
}
.inv-icon .inv-emoji {
  font-size: 2rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
  transition: 0.3s;
}
.inv-item:hover .inv-icon .inv-emoji {
  transform: scale(1.1);
}
.inv-qty {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.7rem;
  color: #fff;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.inv-item::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(10, 12, 16, 0.95);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  visibility: hidden;
  z-index: 100;
}
.inv-item:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.empty-container {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  border: 2px dashed rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  color: var(--text-muted);
}

/* =========================================
   СТЕНА ПРОФИЛЯ
========================================= */
.profile-full-row {
  margin-top: 10px;
  width: 100%;
  grid-column: 1 / -1;
}

.auth-prompt {
  text-align: center;
  padding: 20px;
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}
.auth-prompt i {
  font-size: 2rem;
  color: #5865f2;
  margin-bottom: 10px;
}
.auth-prompt a {
  color: #5865f2;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
}
.auth-prompt span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.wall-input-box {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
  transition: 0.3s;
}
.wall-input-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  background: rgba(0, 0, 0, 0.5);
}
.wall-input-ava {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}
.wall-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  padding: 5px 10px;
  outline: none;
}
.wall-input::placeholder {
  color: #6b7280;
}

.btn-send {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-send:hover {
  background: #fff;
  color: var(--primary);
  transform: scale(1.1) rotate(-10deg);
}

.wall-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 10px;
}
.wall-list::-webkit-scrollbar {
  width: 6px;
}
.wall-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.wall-item {
  display: flex;
  gap: 15px;
  animation: slideInWall 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.wall-ava {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.wall-bubble {
  background: rgba(255, 255, 255, 0.03);
  padding: 16px 20px;
  border-radius: 18px;
  border-top-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  position: relative;
  transition: 0.2s;
}
.wall-item:hover .wall-bubble {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.wall-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.wall-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wall-author {
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  transition: 0.2s;
  font-size: 1rem;
}
.wall-author:hover {
  color: var(--primary);
  text-decoration: underline;
}
.wall-date {
  color: #6b7280;
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
}
.wall-text {
  color: #d1d5db;
  font-size: 0.95rem;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Кнопки модерации стены */
.wall-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.wall-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.85rem;
  padding: 4px;
}
.wall-action-btn:hover {
  color: #fff;
}
.wall-action-btn.edit:hover {
  color: #38bdf8;
}
.wall-action-btn.delete:hover {
  color: #f87171;
}

.wall-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  padding: 50px 20px;
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.2);
}
.wall-empty i {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
}
.wall-empty p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.loader-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
  font-weight: 600;
}
.loader-spinner i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 15px;
}

@keyframes slideInWall {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================
   СТИЛИ ДЛЯ JS МОДАЛОК
========================================= */
.modal-custom-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
}
.modal-custom-icon {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
}
.modal-custom-img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}
.modal-custom-emoji {
  font-size: 3.5rem;
}
.modal-custom-rarity {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px solid;
}
.modal-custom-desc-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 12px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 10px;
}
.modal-custom-desc {
  color: #ccc;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.rarity-common {
  border-color: #bdc3c7;
  box-shadow: 0 0 25px rgba(189, 195, 199, 0.2);
}
.rarity-common-badge {
  color: #bdc3c7;
  background: rgba(189, 195, 199, 0.1);
  border-color: rgba(189, 195, 199, 0.3);
}
.rarity-uncommon {
  border-color: #d946ef;
  box-shadow: 0 0 25px rgba(217, 70, 239, 0.2);
}
.rarity-uncommon-badge {
  color: #d946ef;
  background: rgba(217, 70, 239, 0.1);
  border-color: rgba(217, 70, 239, 0.3);
}
.rarity-rare {
  border-color: #3498db;
  box-shadow: 0 0 25px rgba(52, 152, 219, 0.2);
}
.rarity-rare-badge {
  color: #3498db;
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(52, 152, 219, 0.3);
}
.rarity-epic {
  border-color: #9b59b6;
  box-shadow: 0 0 25px rgba(155, 89, 182, 0.2);
}
.rarity-epic-badge {
  color: #9b59b6;
  background: rgba(155, 89, 182, 0.1);
  border-color: rgba(155, 89, 182, 0.3);
}
.rarity-legendary {
  border-color: #f1c40f;
  box-shadow: 0 0 25px rgba(241, 196, 15, 0.2);
}
.rarity-legendary-badge {
  color: #f1c40f;
  background: rgba(241, 196, 15, 0.1);
  border-color: rgba(241, 196, 15, 0.3);
}
.rarity-mythic {
  border-color: #e74c3c;
  box-shadow: 0 0 25px rgba(231, 76, 60, 0.2);
}
.rarity-mythic-badge {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.3);
}

.ach-modal-icon {
  font-size: 4rem;
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
}
.ach-modal-title {
  font-size: 1.1rem;
  color: #ffd700;
  font-weight: 800;
  background: rgba(255, 215, 0, 0.1);
  padding: 6px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}
.ach-modal-success {
  color: #4ade80;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 5px;
}

/* Banned */
.banned-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.4);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: 15px;
  vertical-align: middle;
}
.banned-container {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #180a0a 0%, #0a0202 100%);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 20px;
  padding: 80px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 0 100px rgba(231, 76, 60, 0.05);
}
.banned-icon {
  font-size: 5rem;
  color: #e74c3c;
  margin-bottom: 25px;
  animation: pulse-red-ban 2s infinite;
}
.banned-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 15px;
  text-transform: uppercase;
}
.banned-desc {
  color: #bbb;
  font-size: 1.1rem;
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 30px;
}
.ban-reason-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 25px;
  border-radius: 12px;
  color: #ff6b6b;
  font-size: 0.95rem;
  display: inline-block;
}
.avatar-lvl-pill {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 20px;
  border: 3px solid #080a0e;
  z-index: 6;
  white-space: nowrap;
  box-shadow: 0 6px 15px rgba(217, 70, 239, 0.45);
}

.pi-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.staff-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.badge.top-rank-chip {
  background: rgba(255, 215, 0, 0.14);
  border-color: rgba(255, 215, 0, 0.4);
  color: #ffd700;
}

.profile-header-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  z-index: 5;
}

.header-xp-card {
  background: rgba(8, 10, 14, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px 16px;
  min-width: 230px;
}
.hxp-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.hxp-top b {
  color: #fff;
  font-weight: 900;
}
.hxp-nums {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: #d1d5db;
}
.hxp-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}
.hxp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--info));
  border-radius: 99px;
  box-shadow: 0 0 12px var(--primary-glow);
}

.stat-box-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.rank-badge {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 0;
  font-weight: 800;
  transition: 0.2s;
}
.rank-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}
.rank-pill-large {
  padding: 7px 16px;
  border-radius: 12px;
  font-size: 0.82rem;
  margin-top: 6px;
}

.dossier-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  margin-bottom: auto;
}

.copy-uid-chip {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}
.copy-uid-chip:hover {
  border-color: var(--info);
  color: var(--info) !important;
}

@media (max-width: 1200px) {
  .profile-header-right {
    margin: 10px auto 0;
    align-items: center;
    width: 100%;
  }
  .header-xp-card,
  .header-actions-row,
  .btn-edit {
    width: 100%;
    max-width: 340px;
  }
  .pi-name-row {
    justify-content: center;
  }
}

@keyframes pulse-red-ban {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* =========================================
   MOBILE ADAPTATION
========================================= */
@media (max-width: 1200px) {
  .profile-wrapper {
    padding: 110px 15px 40px;
  }
  .profile-header {
    min-height: auto;
    flex-direction: column;
    padding-top: 80px;
    border-radius: 20px;
  }
  .profile-header-overlay {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    gap: 15px;
  }
  .avatar-wrapper {
    margin-top: -80px;
    width: 120px;
    height: 120px;
  }
  .profile-identity h1 {
    font-size: 2.2rem;
  }
  .badges {
    justify-content: center;
  }
  .btn-edit {
    margin: 15px auto 0;
    width: 100%;
    justify-content: center;
  }
  .card {
    padding: 20px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .profile-identity h1 {
    font-size: 1.8rem;
  }
  .user-title {
    font-size: 0.85rem;
  }
  .stat-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px 12px;
  }
  .wall-input-box {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }
  .wall-input-box > div {
    display: flex;
    gap: 10px;
    width: 100%;
  }
  .wall-input-ava {
    display: none;
  }
  .btn-send {
    width: 100%;
    height: 40px;
  }
  .wall-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .wall-bubble {
    padding: 12px 15px;
  }
  .chart-container {
    height: 250px;
  }
}
