/* ===== XP & POINTS DISPLAY ===== */

/* XP Display below logo */
.logo-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
}

.xp-display-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -2px;
}

.xp-level-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 5px rgba(102, 126, 234, 0.4);
}

.xp-level-inline svg {
  width: 12px;
  height: 12px;
  fill: #FFD700;
  stroke: none;
}

.xp-points-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.xp-points-inline svg {
  width: 12px;
  height: 12px;
  color: #F1C40F;
}

.shop-points-display svg {
  width: 20px;
  height: 20px;
  color: #F1C40F;
  margin-right: 6px;
}

.currency-display {
  display: none;
  /* Hide legacy display */
}

/* Level badge variation colors */
.xp-level-inline[data-level="10"],
.level-badge[data-level="10"] {
  background: linear-gradient(135deg, #2ECC71, #27AE60);
}

.xp-level-inline[data-level="20"],
.level-badge[data-level="20"] {
  background: linear-gradient(135deg, #3498DB, #2980B9);
}

.xp-level-inline[data-level="30"],
.level-badge[data-level="30"] {
  background: linear-gradient(135deg, #E74C3C, #C0392B);
}

.xp-level-inline[data-level="40"],
.level-badge[data-level="40"] {
  background: linear-gradient(135deg, #9B59B6, #8E44AD);
}

.xp-level-inline[data-level="50"],
.level-badge[data-level="50"] {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}

.points-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.points-badge svg {
  width: 14px;
  height: 14px;
  color: #F1C40F;
}

/* ===== XP NOTIFICATIONS ===== */
.xp-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  z-index: 3000;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s ease;
  text-align: center;
}

.xp-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.xp-notification .xp-gain {
  font-size: 18px;
  font-weight: 700;
}

.xp-notification .points-gain {
  font-size: 12px;
  opacity: 0.9;
}

.levelup-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #333;
  padding: 30px 50px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.5);
  z-index: 3001;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
}

.levelup-notification.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.levelup-notification .levelup-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.levelup-notification .levelup-text {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.levelup-notification .levelup-level {
  font-size: 36px;
  font-weight: 800;
  margin-top: 5px;
}

/* ===== SHOP BUTTON ===== */
.shop-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 6px;
}

.shop-btn:hover {
  background: var(--bg-primary);
  border-color: #F1C40F;
  transform: translateY(-2px);
}

.shop-btn svg {
  width: 18px;
  height: 18px;
}

/* ===== SHOP MODAL ===== */
#shopModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#shopModal.show {
  display: flex;
  opacity: 1;
}

.shop-card {
  width: 95%;
  max-width: 700px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 20px 60px var(--shadow-dark);
  display: flex;
  flex-direction: column;
  height: 85vh;
  max-height: 750px;
}

.shop-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shop-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-header h2 svg {
  width: 24px;
  height: 24px;
  color: #F1C40F;
}

.shop-points-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 600;
}

.shop-points-display svg {
  width: 16px;
  height: 16px;
  color: #F1C40F;
}

.close-shop-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0 8px;
  margin-left: 12px;
}

.close-shop-btn:hover {
  color: var(--text-primary);
}

/* ===== CATEGORY TABS ===== */
.shop-categories {
  display: flex;
  padding: 12px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}

.shop-categories::-webkit-scrollbar {
  display: none;
}

.shop-category-tab {
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.shop-category-tab:hover {
  background: var(--bg-tertiary);
}

.shop-category-tab.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* ===== ITEMS GRID ===== */
.shop-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

#shopItemsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.shop-item {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}

.shop-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

.shop-item.owned {
  border-color: #2ECC71;
}

.shop-item.equipped {
  border-color: #3498DB;
  background: rgba(52, 152, 219, 0.1);
}

.shop-item.cant-afford {
  opacity: 0.6;
}

.shop-item-preview {
  font-size: 36px;
  margin-bottom: 8px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-item-preview svg {
  width: 36px;
  height: 36px;
}

.shop-category-tab svg {
  width: 16px;
  height: 16px;
}

.shop-item-preview.animated {
  animation: itemFloat 2s ease-in-out infinite;
}

@keyframes itemFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.shop-item-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.shop-item-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.shop-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.shop-price {
  font-size: 12px;
  font-weight: 700;
  color: #F1C40F;
}

.buy-btn,
.equip-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.buy-btn {
  background: linear-gradient(135deg, #F1C40F, #F39C12);
  color: #333;
}

.buy-btn:hover:not(.disabled) {
  transform: scale(1.05);
  box-shadow: 0 3px 12px rgba(241, 196, 15, 0.4);
}

.buy-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.equip-btn {
  background: var(--accent-color);
  color: white;
}

.equip-btn:hover {
  transform: scale(1.05);
}

.equipped-badge {
  font-size: 11px;
  color: #2ECC71;
  font-weight: 600;
  background: rgba(46, 204, 113, 0.15);
  padding: 4px 10px;
  border-radius: 10px;
  width: 100%;
}

.shop-section-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 10px 0;
  margin: 10px 0;
  border-top: 2px solid var(--border-color);
  border-bottom: 1px solid var(--border-light);
}

.shop-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.show-owned-toggle {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.show-owned-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-color);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* ===== SHOP NOTIFICATIONS ===== */
.shop-notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 3002;
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.shop-notification.success {
  background: linear-gradient(135deg, #2ECC71, #27AE60);
  color: white;
}

.shop-notification.error {
  background: linear-gradient(135deg, #E74C3C, #C0392B);
  color: white;
}

/* ===== BIO SECTION IN PROFILE ===== */
.profile-bio-section {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.profile-bio-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}



/* ===== XP SECTION IN PROFILE ===== */
.profile-xp-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.xp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.xp-level-display {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xp-level-number {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.xp-tier-name {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--bg-tertiary);
}

.xp-points-display {
  text-align: right;
}

.xp-points-value {
  font-size: 20px;
  font-weight: 700;
  color: #F1C40F;
}

.xp-points-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.xp-progress-container {
  margin-top: 8px;
}

.xp-progress-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

#levelProgressBar {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
  transition: width 0.5s ease;
}

#xpToNextLevel {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
  text-align: right;
}

/* ===== NAME EFFECTS ===== */
.name-gradient-blue {
  background: linear-gradient(90deg, #00D2FF, #3A7BD5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.name-gradient-fire {
  background: linear-gradient(90deg, #F83600, #F9D423);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.name-gradient-purple {
  background: linear-gradient(90deg, #DA22FF, #9733EE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.name-rainbow {
  background: linear-gradient(90deg, #ff0000, #ff8000, #ffff00, #00ff00, #0080ff, #8000ff);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbowShift 3s linear infinite;
}

@keyframes rainbowShift {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.name-glow {
  text-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color), 0 0 30px var(--accent-color);
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {

  0%,
  100% {
    text-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
  }

  50% {
    text-shadow: 0 0 20px var(--accent-color), 0 0 40px var(--accent-color), 0 0 60px var(--accent-color);
  }
}

.name-gold {
  background: linear-gradient(90deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShine 3s ease-in-out infinite;
}

@keyframes goldShine {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.name-typewriter {
  overflow: hidden;
  white-space: nowrap;
  animation: typewriter 3s steps(20) infinite;
  display: inline-block;
}

@keyframes typewriter {

  0%,
  100% {
    width: 0;
  }

  50% {
    width: 100%;
  }
}

/* Ice/Frozen name effect */
.name-ice {
  background: linear-gradient(90deg, #A8E0FF, #87CEEB, #E0FFFF, #B0E0E6);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: iceShimmer 4s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(135, 206, 235, 0.3);
}

@keyframes iceShimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Matrix name effect */
.name-matrix {
  background: linear-gradient(90deg, #00FF00, #00CC00, #00FF00, #33FF33);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: matrixGlow 2s linear infinite;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

@keyframes matrixGlow {
  0% {
    background-position: 0% 50%;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
  }

  50% {
    background-position: 100% 50%;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
  }

  100% {
    background-position: 200% 50%;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
  }
}

/* Royal name effect - purple & gold */
.name-royal {
  background: linear-gradient(90deg, #9B59B6, #FFD700, #9B59B6, #FFD700);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: royalShine 3s ease-in-out infinite;
  text-shadow: 0 0 15px rgba(155, 89, 182, 0.5);
}

@keyframes royalShine {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Legendary name effect - flame */
.name-legendary {
  background: linear-gradient(90deg, #FF4500, #FFD700, #FF6347, #FFD700, #FF4500);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: legendaryFire 2s ease-in-out infinite;
}

@keyframes legendaryFire {
  0% {
    background-position: 0% 50%;
    text-shadow: 0 0 10px #FF4500, 0 0 20px #FFD700;
  }

  25% {
    background-position: 50% 50%;
    text-shadow: 0 0 15px #FF6347, 0 0 30px #FF4500;
  }

  50% {
    background-position: 100% 50%;
    text-shadow: 0 0 20px #FFD700, 0 0 40px #FF4500;
  }

  75% {
    background-position: 50% 50%;
    text-shadow: 0 0 15px #FF6347, 0 0 30px #FF4500;
  }

  100% {
    background-position: 0% 50%;
    text-shadow: 0 0 10px #FF4500, 0 0 20px #FFD700;
  }
}

/* Avatar image previews in shop */
.shop-preview-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== AVATAR FRAMES ===== */
.avatar-frame-bronze {
  box-shadow: 0 0 0 3px #CD7F32, 0 0 10px rgba(205, 127, 50, 0.5);
}

.avatar-frame-silver {
  box-shadow: 0 0 0 3px #C0C0C0, 0 0 10px rgba(192, 192, 192, 0.5);
}

.avatar-frame-gold {
  box-shadow: 0 0 0 3px #FFD700, 0 0 15px rgba(255, 215, 0, 0.6);
}

.avatar-frame-diamond {
  box-shadow: 0 0 0 3px #B9F2FF, 0 0 20px rgba(185, 242, 255, 0.6);
}

.avatar-frame-fire {
  animation: fireFrame 1.5s ease-in-out infinite;
}

@keyframes fireFrame {

  0%,
  100% {
    box-shadow: 0 0 0 3px #FF4500, 0 0 15px #FF4500, 0 0 30px #FF6347;
  }

  50% {
    box-shadow: 0 0 0 3px #FF6347, 0 0 25px #FF4500, 0 0 40px #FF6347;
  }
}

.avatar-frame-rainbow {
  animation: rainbowFrame 3s linear infinite;
}

@keyframes rainbowFrame {
  0% {
    box-shadow: 0 0 0 3px red, 0 0 15px red;
  }

  16% {
    box-shadow: 0 0 0 3px orange, 0 0 15px orange;
  }

  33% {
    box-shadow: 0 0 0 3px yellow, 0 0 15px yellow;
  }

  50% {
    box-shadow: 0 0 0 3px green, 0 0 15px green;
  }

  66% {
    box-shadow: 0 0 0 3px blue, 0 0 15px blue;
  }

  83% {
    box-shadow: 0 0 0 3px purple, 0 0 15px purple;
  }

  100% {
    box-shadow: 0 0 0 3px red, 0 0 15px red;
  }
}

.avatar-frame-neon {
  animation: neonFrame 2s ease-in-out infinite;
}

@keyframes neonFrame {

  0%,
  100% {
    box-shadow: 0 0 0 3px #00F5FF, 0 0 20px #00F5FF;
  }

  50% {
    box-shadow: 0 0 0 3px #FF00FF, 0 0 20px #FF00FF;
  }
}

.avatar-frame-emerald {
  box-shadow: 0 0 0 3px #50C878, 0 0 15px rgba(80, 200, 120, 0.5);
  animation: emeraldGlow 3s ease-in-out infinite;
}

@keyframes emeraldGlow {

  0%,
  100% {
    box-shadow: 0 0 0 3px #50C878, 0 0 15px rgba(80, 200, 120, 0.5);
  }

  50% {
    box-shadow: 0 0 0 3px #3CB371, 0 0 25px rgba(80, 200, 120, 0.8);
  }
}

.avatar-frame-platinum {
  box-shadow: 0 0 0 3px #E5E4E2, 0 0 20px rgba(229, 228, 226, 0.5), inset 0 0 5px rgba(255, 255, 255, 0.3);
  animation: platinumShine 4s ease-in-out infinite;
}

@keyframes platinumShine {

  0%,
  100% {
    box-shadow: 0 0 0 3px #E5E4E2, 0 0 20px rgba(229, 228, 226, 0.5);
  }

  50% {
    box-shadow: 0 0 0 4px #FFFFFF, 0 0 35px rgba(255, 255, 255, 0.7);
  }
}

/* ===== PUBLIC PROFILE MODAL ===== */
#publicProfileModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2147483647 !important;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#publicProfileModal.show {
  display: flex;
  opacity: 1;
}

.public-profile-card {
  width: 90%;
  max-width: 450px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 20px 60px var(--shadow-dark);
  max-height: 80vh;
  overflow-y: auto;
}

.public-profile-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.close-public-profile-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-tertiary);
  cursor: pointer;
}

.public-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 32px;
  font-weight: 700;
  overflow: hidden;
}

.public-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.public-profile-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.public-profile-bio {
  padding: 16px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  border-bottom: 1px solid var(--border-color);
}

.public-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 20px;
}

.public-stat-item {
  text-align: center;
}

.public-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.public-stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.public-profile-badges {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

.public-badges-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.public-badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.public-badge.earned {
  border-color: #F1C40F;
  background: rgba(241, 196, 15, 0.15);
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.2);
  cursor: pointer;
}

.public-badge.earned:hover {
  transform: scale(1.15);
  border-color: #F39C12;
  background: rgba(241, 196, 15, 0.25);
  box-shadow: 0 0 15px rgba(241, 196, 15, 0.4);
}

.public-badge.earned:active {
  transform: scale(0.95);
}

.public-badge svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

/* ===== CLICKABLE LEADERBOARD ROWS ===== */
.lb-row.clickable {
  cursor: pointer;
}

.lb-row.clickable:hover {
  background: var(--bg-tertiary);
}

.lb-row.clickable:hover .col-name {
  color: var(--accent-color);
  text-decoration: underline;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 480px) {
  .currency-display {
    gap: 6px;
  }

  .level-badge,
  .points-badge {
    padding: 3px 8px;
    font-size: 11px;
  }

  .shop-card {
    height: 90vh;
    border-radius: 12px 12px 0 0;
  }

  #shopItemsGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .shop-item {
    padding: 10px;
  }

  .shop-item-preview {
    font-size: 28px;
    height: 40px;
  }

  .shop-categories {
    padding: 10px 12px;
    gap: 6px;
  }

  .shop-category-tab {
    padding: 6px 10px;
    font-size: 12px;
  }

  .xp-notification {
    right: 10px;
    top: 60px;
    padding: 10px 16px;
  }

  .public-profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== COMPACT PROFILE CARD ===== */
.profile-card {
  position: relative;
}

#closeProfileBtn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-tertiary);
  cursor: pointer;
  z-index: 20;
  padding: 0 8px;
  width: auto;
  height: auto;
  border-radius: 0;
}

#closeProfileBtn:hover {
  color: var(--text-primary);
  background: none;
  transform: none;
}

.profile-compact-card {
  display: flex;
  gap: 16px;
  background: var(--bg-tertiary);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  margin-top: 10px;
}

@media (max-width: 600px) {
  .profile-compact-card {
    margin-top: 40px;
    padding: 12px;
    gap: 12px;
  }
}

.profile-compact-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 70px;
  flex-shrink: 0;
}

.profile-avatar-compact {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  overflow: hidden;
}

.profile-avatar-compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-compact-points {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-align: center;
}

.profile-compact-points span {
  color: var(--accent-color);
}

.profile-compact-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.compact-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.compact-name {
  font-size: 18px;
  margin: 0;
  line-height: 1.2;
}

.compact-since {
  font-size: 11px;
  color: var(--text-tertiary);
  margin: 0;
}

.compact-level-info {
  text-align: right;
}

.compact-level {
  font-size: 14px;
  font-weight: 700;
  display: block;
}

.compact-tier {
  font-size: 10px;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.compact-xp-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.xp-progress-bar.small {
  height: 6px;
  flex: 1;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
}

#levelProgressBar {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.3s;
}

.compact-xp-text {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.compact-bio-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 0 4px 0 12px;
  height: 36px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.compact-bio-wrapper:hover {
  background: var(--bg-primary);
}

.compact-bio-wrapper:focus-within {
  background: var(--bg-primary);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.1);
}

.compact-bio-input {
  flex: 1;
  height: 100%;
  min-height: auto;
  padding: 6px 0;
  font-size: 13px;
  border: none;
  background: transparent;
  resize: none;
  color: var(--text-primary);
  font-family: inherit;
  overflow: hidden;
}

.compact-bio-input:focus {
  outline: none;
}

.compact-save-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.compact-save-btn:hover {
  background: var(--bg-tertiary);
  color: var(--accent-color);
  transform: scale(1.1);
}

.compact-save-btn svg {
  width: 14px;
  height: 14px;
}

/* ===== BLINKIT-STYLE SHOP REDESIGN ===== */

/* Modal & Body Layout */
#shopModal .shop-card {
  width: 95%;
  max-width: 900px;
  height: 85vh;
  /* Taller, app-like */
  max-height: 900px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
}

.shop-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  /* Important for independent scroll */
  border-top: 1px solid var(--border-color);
}

/* SIDEBAR (Left) */
.shop-sidebar {
  width: 90px;
  background: var(--bg-tertiary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-header {
  display: none;
  /* Hide 'Filters' text, rely on visual */
}

.shop-categories {
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
}

.shop-category-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 4px;
  gap: 6px;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0;
  position: relative;
  width: 100%;
}

/* Active State: White bg + Green strip */
.shop-category-tab.active {
  background: var(--bg-secondary);
  color: var(--accent-color);
  font-weight: 700;
}

.shop-category-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-color);
  border-radius: 0 4px 4px 0;
}

/* Icons are key in this design */
.shop-category-tab svg {
  display: block;
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  opacity: 0.7;
}

.shop-category-tab.active svg {
  opacity: 1;
  transform: scale(1.1);
  color: var(--accent-color);
}

/* Hide bullets from previous design */
.shop-category-tab::before {
  display: none;
}

/* MAIN AREA (Right) */
.shop-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
  position: relative;
}

/* Filter/Sort Header (Visual only for now) */
.content-header {
  padding: 12px 16px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: nowrap;
  flex-shrink: 0;
  /* Sticky header look */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.shop-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: var(--bg-secondary);
  /* Light gray grid bg */
}

.shop-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  padding-bottom: 24px;
}

/* PRODUCT CARD STYLING */
.shop-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.shop-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: var(--accent-color);
}

.shop-item-preview {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.shop-item-preview svg {
  width: 40px;
  height: 40px;
}

.shop-item-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.3;
  color: var(--text-primary);
}

.shop-item-desc {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  flex: 1;
  /* Push footer down */
}

/* Button Styling (Green add button) */
.shop-item-footer {
  width: 100%;
  margin-top: auto;
}

.buy-btn {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  background: transparent;
  color: #2ECC71;
  /* Green text */
  border: 1px solid #2ECC71;
  box-shadow: none;
}

.buy-btn:hover:not(.disabled) {
  background: rgba(46, 204, 113, 0.1);
  /* Light green bg */
  transform: none;
  box-shadow: none;
}

/* Owned/Equipped States */
.shop-item.owned {
  border-color: rgba(46, 204, 113, 0.3);
}

.equipped-badge {
  background: #2ECC71;
  color: white;
  border-radius: 6px;
  padding: 6px;
  font-size: 10px;
  width: 100%;
  display: block;
}

.equip-btn {
  width: 100%;
  padding: 8px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

/* Toggle hidden */
.mobile-filter-btn {
  display: none !important;
}

/* FIX MOBILE RESPONSIVE (Always Layout) */
@media (max-width: 600px) {
  .shop-body {
    flex-direction: row;
    /* FORCE ROW */
    height: auto;
  }

  .shop-sidebar {
    position: static;
    /* No absolute drawer */
    transform: none;
    width: 80px;
    /* Narrow sidebar */
    box-shadow: none;
    background: var(--bg-tertiary);
  }

  /* 2 Column Grid on Mobile */
  .shop-items-grid {
    grid-template-columns: repeat(2, 1fr);
    /* Dense grid like blinkit */
    gap: 8px;
  }

  .shop-item {
    padding: 10px 8px;
  }

  .shop-item-name {
    font-size: 12px;
    height: 32px;
    /* Fixed height for lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .shop-item-preview svg {
    width: 32px;
    height: 32px;
  }

  .content-header {
    display: flex;
    /* Show sort bar */
    padding: 10px;
    font-size: 10px;
  }
}