/* ════════════════════════════════════════════════════════════
   PROFILE-HERO.CSS — v2.0.3 Premium Player Identity
   Evolves the existing profile layout. Hero first, stats last.
════════════════════════════════════════════════════════════ */

/* ── HERO IDENTITY CARD ─────────────────────────────────────── */
.hero-identity-card {
  margin-bottom: var(--space-6);
}
.hero-identity-glass {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-5) var(--space-6);
  border-radius: 22px;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--shadow-lifted), inset 0 1px 0 rgba(232, 217, 166, 0.08);
  overflow: hidden;
}
.hero-identity-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 30%, rgba(106, 76, 255, 0.08) 50%, transparent 70%);
  animation: hero-glass-sheen 12s ease-in-out infinite;
  pointer-events: none;
}
@keyframes hero-glass-sheen {
  0%, 100% { transform: translateX(-30%); opacity: 0.4; }
  50% { transform: translateX(30%); opacity: 0.7; }
}

/* ── AVATAR STAGE + XP RING ─────────────────────────────────── */
.hero-avatar-stage {
  position: relative;
  width: 148px;
  height: 148px;
  margin-bottom: var(--space-5);
}
.hero-xp-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: hero-ring-drift 48s linear infinite;
}
@keyframes hero-ring-drift {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero-xp-ring-track {
  fill: none;
  stroke: rgba(43, 36, 64, 0.9);
  stroke-width: 5;
}
.hero-xp-ring-fill {
  fill: none;
  stroke: url(#heroXpGold);
  stroke-width: 5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(201, 162, 75, 0.45));
  transition: stroke-dashoffset 0.8s var(--ease-out-expo);
}
.hero-xp-runes {
  transform-origin: 70px 70px;
  animation: hero-runes-spin 120s linear infinite;
}
.hero-xp-runes text {
  fill: rgba(232, 217, 166, 0.35);
  font-family: var(--font-display);
  font-size: 7px;
  letter-spacing: 0.2em;
}
@keyframes hero-runes-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero-xp-particle {
  fill: rgba(232, 217, 166, 0.5);
  animation: hero-particle-float 4s ease-in-out infinite;
}
@keyframes hero-particle-float {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 0.7; transform: translateY(-3px); }
}

.hero-avatar-border {
  position: absolute;
  inset: 18px;
  border-radius: 20px;
  padding: 3px;
  background: linear-gradient(135deg, rgba(201, 162, 75, 0.7), rgba(106, 76, 255, 0.5), rgba(201, 162, 75, 0.4));
  animation: hero-avatar-breathe 5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(106, 76, 255, 0.25);
}
.hero-avatar-border--online {
  box-shadow: 0 0 18px rgba(88, 201, 122, 0.35), 0 0 24px rgba(106, 76, 255, 0.2);
}
.hero-avatar-border--playing {
  background: linear-gradient(135deg, rgba(106, 76, 255, 0.8), rgba(141, 115, 255, 0.5), rgba(106, 76, 255, 0.6));
}
@keyframes hero-avatar-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.hero-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 30%, rgba(106, 76, 255, 0.35), rgba(13, 11, 20, 0.95));
  border: 1px solid rgba(201, 162, 75, 0.35);
}
.hero-avatar-inner .art-silhouette {
  width: 58%;
  height: 58%;
}

/* ── AVATAR PRESENCE DOT (Discord-style) ───────────────────── */
.hero-presence-dot {
  position: absolute;
  bottom: 12px;
  right: 8px;
  width: clamp(10px, 2.8vw, 14px);
  height: clamp(10px, 2.8vw, 14px);
  border-radius: 50%;
  border: 2px solid #0a090d;
  z-index: 3;
  pointer-events: none;
}
.hero-presence-dot--online {
  background: #34D058;
  box-shadow: 0 0 6px rgba(52, 208, 88, 0.65), 0 0 12px rgba(52, 208, 88, 0.35);
}
.hero-presence-dot--offline {
  background: #8b8b95;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
}

/* ── STATUS INDICATORS ──────────────────────────────────────── */
.hero-status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  width: 100%;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(13, 11, 20, 0.75);
  border: 1px solid rgba(100, 90, 140, 0.35);
  color: var(--color-text-secondary);
}
.status-pill img, .status-pill .status-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: status-pulse 3s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
.status-pill--online { color: var(--status-online); border-color: rgba(88, 201, 122, 0.45); }
.status-pill--online .status-dot { background: var(--status-online); box-shadow: 0 0 8px rgba(88, 201, 122, 0.6); }
.status-pill--offline .status-dot { background: var(--status-offline); animation: none; }
.status-pill--playing { color: var(--status-playing); border-color: rgba(141, 115, 255, 0.5); }
.status-pill--playing .status-dot { background: var(--status-playing); }
.status-pill--lobby { color: var(--abyss-gold); border-color: rgba(201, 162, 75, 0.5); }
.status-pill--lobby .status-dot { background: var(--abyss-gold); }
.status-pill--recent { color: var(--color-info); border-color: rgba(109, 167, 255, 0.45); }
.status-pill--recent .status-dot { background: var(--color-info); }
.status-pill--cloud { color: var(--color-info); border-color: rgba(109, 167, 255, 0.35); }

/* ── NAME, USERNAME, RANK ───────────────────────────────────── */
.hero-display-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-2xl);
  letter-spacing: 0.04em;
  color: var(--abyss-white);
  margin: 0 0 var(--space-2);
  line-height: 1.15;
}
.hero-username {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
}
.hero-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-2);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(43, 36, 64, 0.7), rgba(27, 22, 38, 0.9));
  border: 1px solid rgba(201, 162, 75, 0.45);
  box-shadow: inset 0 1px 0 rgba(232, 217, 166, 0.15), var(--glow-gold-soft);
}
.hero-rank-badge img { width: 16px; height: 16px; color: var(--abyss-gold-br); }
.hero-rank-badge span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--abyss-gold-br);
}
.hero-level {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-4);
}

/* ── EQUIPPED BADGES ────────────────────────────────────────── */
.hero-badges-equipped {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  min-height: 44px;
}
.hero-badge-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  padding: var(--space-2);
  border-radius: 12px;
  background: rgba(13, 11, 20, 0.5);
  border: 1px solid rgba(201, 162, 75, 0.22);
  animation: hero-badge-shimmer 6s ease-in-out infinite;
}
.hero-badge-slot:nth-child(2) { animation-delay: 2s; }
.hero-badge-slot:nth-child(3) { animation-delay: 4s; }
.hero-badge-slot--empty {
  opacity: 0.35;
  border-style: dashed;
  animation: none;
}
@keyframes hero-badge-shimmer {
  0%, 90%, 100% { box-shadow: none; }
  95% { box-shadow: 0 0 12px rgba(201, 162, 75, 0.35); }
}
.hero-badge-slot img { width: 22px; height: 22px; color: var(--abyss-gold-br); }
.hero-badge-slot span {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--color-text-secondary);
  line-height: 1.2;
}

/* ── RECENT ACTIVITY (REPUTATION) ───────────────────────────── */
.hero-reputation {
  margin-bottom: var(--space-6);
}
.hero-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-4);
}
.activity-feed { display: flex; flex-direction: column; gap: var(--space-3); }
.activity-story {
  padding: var(--space-4);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(43, 36, 64, 0.4), rgba(27, 22, 38, 0.85));
  border: 1px solid rgba(201, 162, 75, 0.16);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s;
}
.activity-story:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft), var(--glow-gold-soft); }
.activity-story-verb {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.activity-story-subject {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--abyss-white);
  margin-bottom: var(--space-2);
}
.activity-story-time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--color-info);
  letter-spacing: 0.06em;
}
.activity-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 75, 0.25), transparent);
  margin: var(--space-1) 0;
}

/* ── ACHIEVEMENTS PREVIEW ───────────────────────────────────── */
.hero-achievements {
  margin-bottom: var(--space-6);
}
.hero-achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
}
.hero-achievement-chip {
  padding: var(--space-3);
  border-radius: 12px;
  background: rgba(13, 11, 20, 0.45);
  border: 1px solid rgba(201, 162, 75, 0.18);
  text-align: center;
}
.hero-achievement-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--abyss-gold-br);
  margin-bottom: 2px;
}
.hero-achievement-chip span {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── STATISTICS (LOWEST PRIORITY) ───────────────────────────── */
.hero-statistics {
  margin-bottom: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(201, 162, 75, 0.12);
}
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4) var(--space-2);
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-3) var(--space-2);
}
.hero-stat-v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--abyss-white);
}
.hero-stat-l {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Badge collection (unlocked, below hero sections) */
.hero-badge-collection {
  margin-bottom: var(--space-5);
}
.badge-collection-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.badge-collection-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  background: rgba(43, 36, 64, 0.45);
  border: 1px solid rgba(201, 162, 75, 0.2);
}
.badge-collection-item img { width: 14px; height: 14px; }

@media (prefers-reduced-motion: reduce) {
  .hero-xp-ring, .hero-xp-runes, .hero-avatar-border,
  .hero-identity-glass::before, .status-dot, .hero-badge-slot {
    animation: none !important;
  }
  .activity-story:hover { transform: none; }
}
