.top-header {
  padding: 10px 28px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 10;
  gap: 16px;
}
.header-center { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0 }
.header-divider { width: 1px; height: 22px; background: var(--card-border); flex-shrink: 0 }
.header-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0 }
.header-progress-ring { position: relative; width: 44px; height: 44px; flex-shrink: 0 }
.header-progress-ring svg { width: 44px; height: 44px }
.header-ring-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 10px; font-weight: 700; color: var(--text-muted); font-family: 'Space Grotesk', sans-serif }
#headerRing { transition: stroke-dashoffset .8s var(--ease) }
.header-notif { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--card-border); background: transparent; color: var(--text-muted); font-size: 16px; cursor: pointer; transition: all .2s var(--ease); display: flex; align-items: center; justify-content: center }
.header-notif:hover { background: rgba(241, 245, 249, .8); color: var(--text-primary) }
.header-notif-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid #fff }
.header-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #3b82f6); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .25) }

.header-level-bar { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0 }
.header-level-icon { font-size: 16px; filter: grayscale(1) opacity(.3); transition: all .3s var(--ease); cursor: default; flex-shrink: 0 }
.header-level-icon.active { filter: none; opacity: 1 }
.header-level-icon.current { animation: shieldPulse 2.5s ease-in-out infinite }
.header-level-connector { flex: 1; height: 2px; background: #e2e8f0; border-radius: 2px; min-width: 12px; max-width: 60px; transition: background .4s var(--ease) }
.header-level-connector.filled { background: linear-gradient(90deg, var(--primary), var(--accent)) }

.header-xp-badge { display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: rgba(37, 99, 235, .06); border: 1px solid rgba(37, 99, 235, .12); border-radius: 20px; font-size: 12px; font-weight: 700; color: var(--primary); white-space: nowrap; font-family: 'Space Grotesk', sans-serif; letter-spacing: .3px; animation: xpGlow 3s ease-in-out infinite }
.header-xp-badge i { font-size: 11px; color: var(--accent) }
@keyframes xpGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0) } 50% { box-shadow: 0 0 12px 2px rgba(37, 99, 235, .15) } }

.header-badges-row { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; justify-content: flex-end }
.header-badge-icon { font-size: 20px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; transition: all .3s var(--ease); position: relative; cursor: default }
.header-badge-icon.earned { background: rgba(245, 158, 11, .1); box-shadow: 0 0 0 1px rgba(245, 158, 11, .2) }
.header-badge-icon.earned:hover { transform: scale(1.15) translateY(-2px); background: rgba(245, 158, 11, .18); box-shadow: 0 4px 12px rgba(245, 158, 11, .2) }
.header-badge-icon.earned::after { content: attr(title); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 100 }
.header-badge-icon.earned:hover::after { opacity: 1 }
.header-badge-count { font-size: 11px; font-weight: 700; color: var(--text-muted); background: #f1f5f9; border-radius: 20px; padding: 4px 10px; white-space: nowrap; letter-spacing: .2px }
.header-badge-empty { font-size: 11px; color: var(--text-muted); white-space: nowrap; font-weight: 500 }

.header-profile { display: flex; align-items: center; gap: 10px; cursor: default }
.header-profile-info { display: flex; flex-direction: column; line-height: 1.2 }
.header-profile-name { font-size: 13px; font-weight: 600; color: var(--text-primary) }
.header-profile-level { font-size: 11px; color: var(--accent); font-weight: 600 }

.hamburger-btn { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--card-border); background: transparent; color: var(--text-secondary); font-size: 18px; cursor: pointer; align-items: center; justify-content: center; transition: all .2s var(--ease); flex-shrink: 0 }
.hamburger-btn:hover { background: #f1f5f9; color: var(--text-primary) }

@media (max-width: 1024px) {
  .top-header { padding: 14px 28px }
  .header-level-bar { gap: 3px }
  .header-badge-icon { width: 28px; height: 28px; font-size: 16px }
}
@media (max-width: 768px) {
  .hamburger-btn { display: flex }
  .top-header { padding: 10px 12px; gap: 10px }
  .header-level-bar { display: none }
  .header-divider { display: none }
  .header-profile-info { display: none }
  .header-badges-row { gap: 4px }
  .header-badge-icon { width: 28px; height: 28px; font-size: 15px; border-radius: 8px }
  .header-badge-icon.earned::after { display: none }
  .header-xp-badge { padding: 4px 10px; font-size: 11px }
  .header-xp-badge i { font-size: 10px }
  .header-progress-ring { width: 36px; height: 36px }
  .header-progress-ring svg { width: 36px; height: 36px }
  .header-ring-text { font-size: 8px }
  .header-avatar { width: 34px; height: 34px; font-size: 11px }
  .header-right { gap: 8px }
}
@media (max-width: 480px) {
  .header-badges-row { display: none }
  .header-xp-badge { display: flex }
  .top-header { padding: 8px 10px; gap: 8px }
}
