/* ── PROFILE PAGE ── */
.profile-content {
  flex: 1; padding: 24px 28px; max-width: 1060px;
  margin: 0 auto; width: 100%;
  display: flex; flex-direction: column; gap: 20px;
}

/* ── Player Showcase Hero Card ── */
.profile-hero-card {
  background: rgba(26, 22, 40, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar {
  font-size: 46px; width: 84px; height: 84px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(173, 98, 255, 0.4);
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(173, 98, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.profile-avatar:hover {
  transform: scale(1.04);
  box-shadow: 0 0 28px rgba(173, 98, 255, 0.35);
}
.profile-info { flex: 1; min-width: 200px; }
.profile-username {
  font-family: 'Playfair Display', serif; font-size: 28px;
  font-weight: 900; color: var(--text); margin-bottom: 4px;
  display: inline-block;
}
.profile-meta {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  color: var(--text3); margin-bottom: 6px;
}
.profile-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(173, 98, 255, 0.12);
  border: 1px solid rgba(173, 98, 255, 0.3);
  color: var(--accent);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 14px;
}
.profile-rank { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent); }

/* ── Performance Stats Grid ── */
.profile-stats-grid,
.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  width: 100%;
}
.profile-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px; padding: 10px 12px; text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.profile-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(173, 98, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}
.profile-stat-value {
  font-family: 'IBM Plex Mono', monospace; font-size: 17px;
  font-weight: 700; color: var(--text);
}
.profile-stat-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 9px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text3); margin-top: 3px;
}

/* ── Profile Tabs Bar ── */
.profile-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 8px;
  align-items: center;
}

.profile-tab {
  background: rgba(26, 22, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text2);
  padding: 9px 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-tab:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}
.profile-tab.active {
  background: linear-gradient(135deg, rgba(173, 98, 255, 0.28) 0%, rgba(99, 102, 241, 0.24) 100%);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 14px rgba(173, 98, 255, 0.35);
}

.profile-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

/* ── Live Name Preview Card ── */
.profile-preview-card {
  border: 1px solid rgba(173, 98, 255, 0.25);
  background: linear-gradient(135deg, rgba(26, 22, 40, 0.8) 0%, rgba(38, 28, 60, 0.65) 100%);
}
.profile-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  background: rgba(14, 11, 22, 0.7);
  border: 1px dashed rgba(173, 98, 255, 0.35);
  border-radius: 12px;
  margin-top: 12px;
  text-align: center;
}
.profile-preview-name-display {
  font-size: 32px;
  font-weight: 900;
  font-family: 'Playfair Display', serif;
  margin-bottom: 8px;
  display: inline-block;
}
.profile-preview-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text3);
}

/* ── Toggle Switch for Preferences ── */
.pref-switch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  user-select: none;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.pref-switch-card:hover {
  border-color: rgba(173, 98, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}
.pref-switch-info { flex: 1; }
.pref-switch-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.pref-switch-desc {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
  line-height: 1.4;
}
.pref-switch-control {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.pref-switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.pref-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.25s ease;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.pref-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.pref-switch-control input:checked + .pref-switch-slider {
  background-color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(173, 98, 255, 0.4);
}
.pref-switch-control input:checked + .pref-switch-slider:before {
  transform: translateX(22px);
}

.profile-badge-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.profile-badge-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px; cursor: pointer; transition: all 0.18s ease;
  min-width: 78px; text-align: center;
}
.profile-badge-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
}
.profile-badge-item.active {
  border-color: var(--accent); background: rgba(173, 98, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(173, 98, 255, 0.35);
}
.profile-badge-emoji { font-size: 28px; }
.profile-badge-name {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  color: var(--text2); max-width: 86px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-color-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.color-stat-block {
  flex: 1; min-width: 150px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 8px; padding: 14px;
}
.color-stat-title {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  color: var(--text2); margin-bottom: 8px;
}
.color-stat-bar {
  height: 8px; background: var(--border);
  border-radius: 4px; overflow: hidden; margin-bottom: 6px;
}
.color-stat-fill {
  height: 100%; border-radius: 4px; transition: width 0.5s ease;
}
.color-stat-fill.white { background: #eee; }
.color-stat-fill.black { background: var(--accent); }
.color-stat-count {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--text);
}

/* ── Username Glow Animations ── */
.glow-anim-float {
  display: inline-block;
  animation: usernameFloat 3s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  color: white;
}
@keyframes usernameFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

.glow-anim-flash {
  display: inline-block;
  animation: usernameFlash 1.5s ease-in-out infinite;
  color: white;
}
@keyframes usernameFlash {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff; }
  50%      { opacity: 0.5; text-shadow: 0 0 4px #00ffff; }
}

.glow-anim-rainbow {
  display: inline-block;
  background: linear-gradient(to right, #ff416c, #ff4b2b, #ffca28, #9ccc65, #00ffff, #7e57c2, #ff416c);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: usernameRainbow 3s linear infinite;
  text-shadow: none !important;
}
@keyframes usernameRainbow {
  to { background-position: 200% center; }
}

/* ── Pyro / Fire Glow ── */
.glow-anim-pyro {
  display: inline-block;
  color: #fff;
  font-weight: bold;
  will-change: text-shadow, transform;
  animation: pyroFlicker 1.8s ease-in-out infinite alternate;
}
@keyframes pyroFlicker {
  0%, 100% {
    text-shadow: 0 -1px 4px #fff, 0 -2px 10px #ff0,
                 0 -10px 20px #ff8000, 0 -18px 40px #f00;
  }
  50% {
    text-shadow: 0 -2px 4px #fff, 0 -4px 12px #ffdd00,
                 0 -12px 24px #ff5d00, 0 -22px 44px #d30000;
    transform: scale(1.02) skewX(-1deg);
  }
}

/* ── Liquid Gold Sheen ── */
.glow-anim-gold {
  display: inline-block;
  background: linear-gradient(
    90deg,
    #ffd700 0%, #fff8dc 25%, #ffd700 50%, #b8860b 75%, #ffd700 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldSweep 4s linear infinite;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
  font-weight: 900;
  will-change: background-position;
}
@keyframes goldSweep {
  0%   { background-position: 0% center; }
  100% { background-position: -200% center; }
}

/* ── Cosmic Nebula ── */
.glow-anim-nebula {
  display: inline-block;
  background: linear-gradient(
    135deg, #00f2fe 0%, #4facfe 30%, #a78bfa 60%, #f78da7 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: nebulaDrift 8s ease infinite alternate;
  filter: drop-shadow(0 0 6px rgba(155, 81, 224, 0.55));
  will-change: background-position;
}
@keyframes nebulaDrift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Cyberpunk Glitch ── */
.glow-anim-cyber {
  display: inline-block;
  color: #fff;
  position: relative;
  text-shadow: 0.05em 0 0 rgba(255, 0, 80, 0.75),
               -0.025em -0.05em 0 rgba(0, 255, 200, 0.75),
               0.025em 0.05em 0 rgba(255, 225, 0, 0.75);
  animation: cyberShake 3s infinite;
  will-change: text-shadow;
}
@keyframes cyberShake {
  0%, 90%, 100% {
    text-shadow: 0.05em 0 0 rgba(255,0,80,0.75),
                 -0.025em -0.05em 0 rgba(0,255,200,0.75),
                 0.025em 0.05em 0 rgba(255,225,0,0.75);
  }
  92% {
    text-shadow: -0.05em -0.025em 0 rgba(255,0,80,0.75),
                 0.025em 0.025em 0 rgba(0,255,200,0.75),
                 -0.05em -0.05em 0 rgba(255,225,0,0.75);
  }
  95% {
    text-shadow: 0.025em 0.05em 0 rgba(255,0,80,0.75),
                 0.05em 0 0 rgba(0,255,200,0.75),
                 0 -0.05em 0 rgba(255,225,0,0.75);
  }
}

/* ── Ghostly Mist ── */
.glow-anim-ghost {
  display: inline-block;
  color: rgba(255, 255, 255, 0.95);
  will-change: text-shadow, opacity, transform;
  animation: ghostDrift 4s ease-in-out infinite;
}
@keyframes ghostDrift {
  0%, 100% {
    text-shadow: 0 0 4px rgba(168, 85, 247, 0.4), 0 0 10px rgba(168, 85, 247, 0.2);
    opacity: 0.9;
    transform: translateY(0) scale(1);
  }
  50% {
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.85), 0 0 24px rgba(168, 85, 247, 0.4), 0 0 36px rgba(168, 85, 247, 0.2);
    opacity: 0.45;
    transform: translateY(-2px) scale(1.02);
    filter: blur(0.5px);
  }
}

/* ── Runic Glint / Diamond Shine ── */
.glow-anim-glint {
  display: inline-block;
  background: linear-gradient(
    135deg,
    #cbd5e1 30%,
    #ffffff 50%,
    #cbd5e1 70%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  will-change: background-position;
  animation: glintSweep 3.5s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
  font-weight: 800;
}
@keyframes glintSweep {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ── Toxic Drip ── */
.glow-anim-toxic {
  display: inline-block;
  color: #fff;
  font-weight: bold;
  will-change: text-shadow;
  animation: toxicPulse 2.5s ease-in-out infinite;
}
@keyframes toxicPulse {
  0%, 100% {
    text-shadow: 0 0 4px #39ff14, 0 0 8px rgba(57, 255, 20, 0.5);
  }
  50% {
    text-shadow: 0 0 12px #39ff14, 0 0 24px #39ff14, 0 0 32px rgba(57, 255, 20, 0.8);
  }
}

@media (max-width: 720px) {
  .profile-content { padding: 14px 10px; }
  .profile-stats-row { gap: 8px; }
  .profile-stat { padding: 8px 10px; min-width: 65px; }
}
