/* Habbodo HUD — compact, avoids Nitro toolbar / purse / friend bar */
:root {
  --hd-panel: rgba(18, 16, 22, 0.9);
  --hd-panel-border: #5a4a2e;
  --hd-gold: #efc14a;
  --hd-cream: #f7ecd2;
  --hd-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --hd-font: "Trebuchet MS", "Verdana", sans-serif;
}

#habbodo-hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  font-family: var(--hd-font);
  color: var(--hd-cream);
  opacity: 0;
  transition: opacity 0.35s ease;
}
#habbodo-hud.hd-on { opacity: 1; }
#habbodo-hud * { box-sizing: border-box; }
#habbodo-hud .hd-hit { pointer-events: auto; }

/* Hotel view already has landing widgets / logo — hide our heavy chrome there */
#habbodo-hud.hd-hotelview .hd-right,
#habbodo-hud.hd-hotelview .hd-level { display: none; }

.hd-online {
  position: absolute;
  top: 46px;
  left: 12px;
  background: var(--hd-panel);
  border: 2px solid var(--hd-panel-border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: var(--hd-shadow);
  text-transform: uppercase;
}
.hd-online b { color: #7dff9a; }

.hd-tv {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 210px;
  background: var(--hd-panel);
  border: 2px solid var(--hd-panel-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--hd-shadow);
}
.hd-tv-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  cursor: pointer;
  background: linear-gradient(#2a2430, #16131a);
}
.hd-live {
  background: #e23b3b;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  animation: hd-pulse 1.4s infinite;
}
@keyframes hd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.hd-tv-title { font-size: 11px; font-weight: 700; flex: 1; }
.hd-tv-body { display: none; height: 118px; background: #000; }
.hd-tv.open .hd-tv-body { display: block; }
.hd-tv-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: #ddd;
  font-size: 11px;
  background: radial-gradient(circle at 30% 20%, #3a2a12, #0d0b10 70%);
}

.hd-right {
  position: absolute;
  top: 52px;
  right: 10px;
  width: 210px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hd-card {
  background: var(--hd-panel);
  border: 2px solid var(--hd-panel-border);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: var(--hd-shadow);
}
.hd-card h4 {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--hd-gold);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.hd-card p { margin: 0 0 6px; font-size: 11px; line-height: 1.3; color: #e8dcc4; }
.hd-btn {
  display: inline-block;
  background: linear-gradient(#f3d36a, #d59a2a);
  color: #2a1c08;
  border: 2px solid #8a5a12;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
}
.hd-btn:hover { filter: brightness(1.08); }

.hd-progress {
  height: 8px;
  background: #2a2430;
  border: 1px solid #5a4a2e;
  border-radius: 6px;
  overflow: hidden;
  margin: 3px 0 4px;
}
.hd-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(#7dff9a, #2e9b55);
  width: 0;
  transition: width 0.4s ease;
}

.hd-level {
  position: absolute;
  left: 8px;
  bottom: 98px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--hd-panel);
  border: 2px solid var(--hd-panel-border);
  border-radius: 10px;
  padding: 4px 8px 4px 4px;
  min-width: 168px;
  max-width: 190px;
  box-shadow: var(--hd-shadow);
}
.hd-avatar {
  width: 40px;
  height: 44px;
  border-radius: 8px;
  background: #2b3340 center bottom / 56px no-repeat;
  border: 1px solid #5a4a2e;
}
.hd-level .meta { flex: 1; min-width: 0; }
.hd-level .name { font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-level .lvl { font-size: 10px; color: var(--hd-gold); }

.hd-modal {
  position: absolute;
  right: 12px;
  bottom: 100px;
  width: 260px;
  max-height: 280px;
  overflow: auto;
  display: none;
}
.hd-modal.open { display: block; }
.hd-user {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #3a3124;
  font-size: 12px;
}
.hd-user img { width: 40px; height: 44px; object-fit: contain; }
.hd-vip-pill {
  display: inline-block;
  background: linear-gradient(#f7e7a1, #c9a227);
  color: #3a2a08;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
}
.hd-quest {
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 0;
  color: #d9cbb0;
}
.hd-quest.done { color: #7dff9a; text-decoration: line-through; }
