/* ============================================
   Player HUD Component
   ============================================ */

.player-hud {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  position: relative;
}

/* ---- Avatar ---- */
.player-hud__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  color: #fff;
  flex-shrink: 0;
  position: relative;
}

.player-hud__avatar--premium {
  background: linear-gradient(135deg, var(--color-gold) 0%, #FFD060 100%);
  color: #1A1A2E;
}

/* Premium badge on avatar */
.player-hud__premium-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: var(--color-gold);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-hud__premium-badge .icon {
  width: 10px;
  height: 10px;
  color: #1A1A2E;
}

/* ---- Info ---- */
.player-hud__info {
  display: none;
  flex-direction: column;
  gap: 2px;
}

@media (min-width: 768px) {
  .player-hud__info {
    display: flex;
  }
}

.player-hud__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: 1;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Diamonds Display ---- */
.player-hud__diamonds {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-gold);
  line-height: 1;
}

.player-hud__diamonds .icon {
  width: 14px;
  height: 14px;
}

/* ---- Dropdown Menu ---- */
.player-hud__dropdown {
  position: absolute;
  top: calc(100% + var(--space-3));
  right: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: all var(--transition-fast);
}

.player-hud__dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.player-hud__dropdown-header {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.player-hud__dropdown-name {
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
}

.player-hud__dropdown-diamonds {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-gold);
}

.player-hud__dropdown-diamonds .icon {
  width: 16px;
  height: 16px;
}

.player-hud__dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  text-align: left;
  background: none;
  border: none;
}

.player-hud__dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.player-hud__dropdown-item .icon {
  width: 18px;
  height: 18px;
}

.player-hud__dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-1) 0;
}
