:root {
  --bg: #07060a;
  --card: rgba(22, 16, 24, 0.82);
  --border: rgba(255, 140, 40, 0.18);
  --text: #fbf4ec;
  --muted: #a99c90;
  --orange: #ff8a1f;
  --orange-2: #ffb347;
  --purple: #8b5cf6;
  --green: #4ade80;
  --red: #ef4444;
  --font: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.hr {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 120, 20, 0.22), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(139, 92, 246, 0.18), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}
img { image-rendering: pixelated; }
.hr-fog {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200'%3E%3Cfilter id='f'%3E%3CfeTurbulence baseFrequency='0.012' numOctaves='3'/%3E%3C/filter%3E%3Crect width='400' height='200' filter='url(%23f)' opacity='0.07'/%3E%3C/svg%3E");
  animation: hr-fog 60s linear infinite;
}
@keyframes hr-fog { to { background-position: 800px 0; } }

.hr-shell { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 18px 18px 40px; }
.hr-top { display: flex; align-items: center; justify-content: space-between; }
.hr-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.hr-back:hover { color: var(--orange-2); }
.hr-logo { height: 44px; width: auto; image-rendering: auto; }

.hr-hero { text-align: center; margin: 26px 0 22px; }
.hr-kicker { display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(255, 138, 31, 0.12); border: 1px solid var(--border); color: var(--orange-2); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.hr-test-badge { display: block; width: fit-content; margin: 10px auto 0; padding: 5px 12px; border-radius: 999px; background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.45); color: #86efac; font-size: 0.78rem; font-weight: 700; text-decoration: none; }
.hr-hero h1 {
  margin: 12px 0 8px; font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; line-height: 1.05;
  background: linear-gradient(180deg, #ffd08a, #ff7a00 60%, #c2410c); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255, 120, 20, 0.35));
}
.hr-hero p { max-width: 640px; margin: 0 auto; color: var(--muted); line-height: 1.6; }
.hr-hero strong { color: var(--text); }

.hr-card, .hr-boss, .hr-tiers, .hr-play {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  backdrop-filter: blur(6px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* Boss */
.hr-boss { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: center; padding: 20px; }
.hr-boss__stage {
  position: relative; height: 230px; border-radius: 16px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 70%, rgba(255, 120, 20, 0.35), transparent 65%), #0d0a10;
  overflow: hidden;
}
.hr-boss__sprite { width: 192px; height: 192px; transition: transform 0.15s, filter 0.15s; }
.hr-boss__sprite.is-hit { transform: translateX(4px) scale(0.97); filter: brightness(2.2) saturate(0.4); }
.hr-boss__sprite.is-dead { animation: hr-die 1.6s forwards; }
@keyframes hr-die { 50% { transform: rotate(-12deg) scale(1.1); filter: brightness(3); } 100% { transform: translateY(40px) scale(0.3); opacity: 0; } }
.hr-boss__reaper { position: absolute; bottom: 22px; width: 66px; height: 66px; opacity: 0; transition: opacity 0.4s; }
.hr-boss__reaper--l { left: 14px; }
.hr-boss__reaper--r { right: 14px; }
.hr-boss.is-reapers .hr-boss__reaper { opacity: 1; }
.hr-boss.is-fury .hr-boss__stage { background: radial-gradient(circle at 50% 70%, rgba(239, 68, 68, 0.45), transparent 65%), #120808; animation: hr-pulse 1.2s ease-in-out infinite; }
@keyframes hr-pulse { 50% { box-shadow: inset 0 0 40px rgba(239, 68, 68, 0.45); } }
.hr-hits { position: absolute; inset: 0; pointer-events: none; }
.hr-hit { position: absolute; font-weight: 800; color: #ff4d4d; text-shadow: 0 2px 0 #000; animation: hr-float 1.2s forwards; }
@keyframes hr-float { to { transform: translateY(-50px); opacity: 0; } }

.hr-boss__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hr-boss__head h2 { margin: 0; font-size: 1.5rem; }
.hr-phase { padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: rgba(255, 138, 31, 0.15); color: var(--orange-2); }
.hr-hp { position: relative; height: 30px; margin: 14px 0; border-radius: 10px; background: #1b0f0f; border: 1px solid rgba(239, 68, 68, 0.35); overflow: hidden; }
.hr-hp__fill { height: 100%; width: 100%; background: linear-gradient(90deg, #b91c1c, #ef4444 60%, #f97316); transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.hr-hp__text { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; text-shadow: 0 1px 2px #000; }
.hr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hr-stats div { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); }
.hr-stats span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.hr-stats strong { font-size: 1.15rem; }

/* Faixas */
.hr-tiers { margin-top: 16px; padding: 22px 26px 18px; }
.hr-track { position: relative; height: 12px; margin: 8px 6px 52px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.hr-track__fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--purple), var(--orange)); transition: width 0.8s; box-shadow: 0 0 18px rgba(255, 138, 31, 0.5); }
.hr-tier { position: absolute; left: var(--pos); top: -5px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; white-space: nowrap; }
.hr-tier:last-child { transform: translateX(-85%); }
.hr-tier__dot { width: 22px; height: 22px; border-radius: 50%; background: #1d1620; border: 3px solid rgba(255, 255, 255, 0.2); }
.hr-tier strong { font-size: 0.95rem; color: var(--muted); }
.hr-tier small { font-size: 0.7rem; color: var(--muted); }
.hr-tier.is-done .hr-tier__dot { background: var(--orange); border-color: #ffd08a; box-shadow: 0 0 14px var(--orange); }
.hr-tier.is-done strong { color: var(--orange-2); }
.hr-tiers__note { margin: 0; color: var(--muted); font-size: 0.86rem; text-align: center; }
.hr-tiers__note strong { color: var(--text); }

/* Jogar */
.hr-play { margin-top: 16px; padding: 22px; text-align: center; }
.hr-play__intro { margin-bottom: 14px; color: var(--muted); line-height: 1.55; }
.hr-play__intro strong { color: var(--text); }
.hr-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; border: 0; border-radius: 14px; cursor: pointer;
  font: 800 1.05rem var(--font); color: #1a0c00;
  background: linear-gradient(180deg, #ffc46b, var(--orange)); box-shadow: 0 10px 30px rgba(255, 120, 20, 0.35);
  transition: transform 0.15s, filter 0.15s;
}
.hr-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.hr-btn:disabled { cursor: not-allowed; filter: grayscale(0.8) brightness(0.7); }
.hr-btn--ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); box-shadow: none; }
.hr-test-games { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 0.82rem; color: #86efac; }
.hr-test-games button { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.1); color: #bbf7d0; font: 600 0.82rem var(--font); cursor: pointer; }
.hr-test-games button:hover { background: rgba(74, 222, 128, 0.22); }
.hr-play__hint { margin: 12px 0 0; font-size: 0.82rem; color: var(--muted); }

.hr-game__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-weight: 600; }
.hr-game__name { color: var(--orange-2); font-weight: 800; }
.hr-game__name small { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.hr-game__time strong { font-size: 1.3rem; }
.hr-game__lives { letter-spacing: 2px; }
.hr-arena {
  position: relative; height: 380px; border-radius: 16px; overflow: hidden; user-select: none; touch-action: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(5, 3, 8, 0.6)),
    linear-gradient(rgba(8, 5, 12, 0.18), rgba(8, 5, 12, 0.35)),
    url("../imgs/halloween/arena-bg.jpg") 50% 45% / cover no-repeat, #0b0810;
  border: 1px solid rgba(255, 255, 255, 0.06); cursor: crosshair;
}
.hr-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.hr-controls b { color: var(--orange-2); font-weight: 700; margin-right: 4px; }

.hr-ready {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px; background: rgba(8, 5, 12, 0.72); backdrop-filter: blur(2px); cursor: default; animation: hr-fade 0.25s ease-out;
}
@keyframes hr-fade { from { opacity: 0; } }
.hr-ready h3 { margin: 0; font-size: 1.6rem; color: var(--orange-2); }
.hr-ready__step { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.hr-ready__prev { margin: 0 0 8px; padding: 6px 12px; border-radius: 999px; background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.3); color: #bbf7d0; font-size: 0.85rem; }
.hr-ready__goal { max-width: 520px; margin: 2px 0 6px; color: var(--text); line-height: 1.45; font-size: 0.95rem; }
.hr-ready__controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 4px 0; }
.hr-ready__controls div { display: grid; justify-items: center; gap: 2px; min-width: 170px; max-width: 220px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); }
.hr-ready__icon { font-size: 1.5rem; line-height: 1; }
.hr-ready__controls strong { font-size: 0.95rem; }
.hr-ready__controls small { color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.hr-ready__rate { margin: 2px 0 8px; font-size: 0.8rem; color: var(--muted); }
.hr-ready .hr-btn { padding: 11px 26px; }
.hr-ready .hr-btn span { font-weight: 600; opacity: 0.7; }
.hr-arena img { position: absolute; -webkit-user-drag: none; }
.hr-target { cursor: pointer; transition: transform 0.12s; animation: hr-pop 0.18s ease-out; }
.hr-target:hover { transform: scale(1.08); }
@keyframes hr-pop { from { transform: scale(0.3); opacity: 0; } }
.hr-splash { position: absolute; font-weight: 800; pointer-events: none; animation: hr-float 0.8s forwards; text-shadow: 0 2px 0 #000; }
.hr-splash--good { color: var(--green); }
.hr-splash--bad { color: var(--red); }

.hr-dodge-player { width: 64px; height: 64px; bottom: 6px; }
.hr-arena img.is-hurt { animation: hr-blink 0.15s steps(2) 6; }
.hr-arena img { pointer-events: none; }
@keyframes hr-blink { 50% { opacity: 0.2; } }
.hr-dodge-boss { width: 96px; height: 96px; top: 4px; }
.hr-arena img.hr-shot { width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(255, 120, 20, 0.85)); animation: hr-spin 0.7s linear infinite; }
@keyframes hr-spin { to { transform: rotate(360deg); } }

.hr-result { padding: 10px 0; }
.hr-result__num { font-size: 3.2rem; font-weight: 800; color: #ff5a3c; text-shadow: 0 4px 24px rgba(255, 90, 60, 0.45); }
.hr-result__text { color: var(--muted); margin: 6px 0 16px; line-height: 1.5; }
.hr-result__text strong { color: var(--text); }
.hr-result__list { list-style: none; max-width: 440px; margin: 4px auto 12px; padding: 0; text-align: left; }
.hr-result__list li { display: grid; grid-template-columns: 1fr auto 52px; gap: 12px; padding: 7px 12px; border-radius: 10px; }
.hr-result__list li:nth-child(odd) { background: rgba(255, 255, 255, 0.04); }
.hr-result__list strong { color: #ff6b4a; text-align: right; }

.hr-final h2 { margin: 6px 0; font-size: 1.8rem; color: var(--orange-2); }
.hr-final p { color: var(--muted); line-height: 1.6; max-width: 560px; margin: 0 auto; }
.hr-final p strong { color: var(--text); }
.hr-final__img { width: 128px; height: 128px; filter: grayscale(0.6); }

/* Feed e regras */
.hr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.hr-card { padding: 18px 20px; }
.hr-card h3 { margin: 0 0 12px; font-size: 1.05rem; }
.hr-feed {
  list-style: none; margin: 0 -8px 0 0; padding: 0 8px 0 0; max-height: 330px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255, 138, 31, 0.45) transparent;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent);
}
.hr-feed::-webkit-scrollbar { width: 6px; }
.hr-feed::-webkit-scrollbar-track { background: transparent; }
.hr-feed::-webkit-scrollbar-thumb { background: rgba(255, 138, 31, 0.4); border-radius: 999px; }
.hr-feed::-webkit-scrollbar-thumb:hover { background: rgba(255, 138, 31, 0.7); }
.hr-feed li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; margin-bottom: 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); font-size: 0.88rem; }
.hr-feed li:last-child { margin-bottom: 24px; }
.hr-feed__who { display: grid; gap: 2px; min-width: 0; }
.hr-feed__dmg { padding: 3px 9px; border-radius: 999px; background: rgba(255, 107, 74, 0.12); color: #ff6b4a; font-weight: 800; white-space: nowrap; }
.hr-feed__time { color: var(--muted); font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-feed__empty { color: var(--muted); }
.hr-how { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.6; font-size: 0.9rem; }
.hr-how li { margin-bottom: 6px; }
.hr-how strong { color: var(--text); }
.hr-foot { margin-top: 26px; text-align: center; color: var(--muted); font-size: 0.8rem; }

@media (max-width: 760px) {
  .hr-boss { grid-template-columns: 1fr; }
  .hr-boss__stage { height: 200px; }
  .hr-grid { grid-template-columns: 1fr; }
  .hr-arena { height: 380px; }
  .hr-ready h3 { font-size: 1.25rem; }
  .hr-ready__goal { font-size: 0.85rem; }
  .hr-ready__controls div { min-width: 130px; padding: 8px 10px; }
}
