/* The hiscores page (style.css first). */

/* Header band */
.hs-hero { position: relative; padding: 140px var(--gutter) 48px; text-align: center; overflow: hidden; isolation: isolate; }
.hs-hero-bg { position: absolute; inset: 0; z-index: -1; background: url("../img/temple-bg@2x.jpg") 50% 40% / cover no-repeat; transform: scale(1.15); filter: blur(2px) saturate(1.05); }
.hs-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 60% 80% at 50% 45%, rgba(7, 11, 8, .62), rgba(7, 11, 8, .9)), linear-gradient(180deg, transparent 60%, var(--bg)); }
.hs-hero h1 { margin: 12px 0 10px; font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; background: linear-gradient(180deg, #fff8e4 10%, var(--gold) 65%, #b98f3c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .6)); }
.hs-hero p { margin: 0 auto 28px; max-width: 520px; color: #d6cfb8; }

.hs-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 520px; margin: 0 auto; padding: 6px 6px 6px 16px; border-radius: 12px; background: rgba(8, 13, 9, .78); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 20px 40px -20px #000; backdrop-filter: blur(8px); transition: box-shadow .2s ease; }
.hs-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--flame), 0 0 0 4px rgba(73, 224, 161, .15), 0 20px 40px -20px #000; }
.hs-search > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.hs-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--cream); font: 500 1rem var(--body); padding: 10px 4px; }
.hs-search input::placeholder { color: var(--faint); }
.hs-search input::-webkit-search-cancel-button { filter: invert(.7); }
.hs-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 6px; text-align: left; border-radius: 12px; background: #0e1610; box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 50px -16px #000; }
.hs-suggest li { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.hs-suggest li:hover, .hs-suggest li.is-on { background: rgba(73, 224, 161, .1); color: #fff; }

/* Filters */
.hs-filters { position: sticky; top: 59px; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 12px var(--gutter); background: rgba(7, 11, 8, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.hs-modes, .hs-xp { display: flex; gap: 6px; flex-wrap: wrap; }
.hs-modes button, .hs-xp button {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 .86rem var(--body); color: var(--muted); background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line);
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.hs-modes button img { height: 13px; width: auto; }
.hs-modes button:hover, .hs-xp button:hover { color: var(--cream); box-shadow: inset 0 0 0 1px var(--line-2); }
.hs-modes button.is-on { color: #1b1407; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: none; }
.hs-xp button.is-on { color: var(--flame-hi); background: rgba(73, 224, 161, .1); box-shadow: inset 0 0 0 1px rgba(73, 224, 161, .5); }

/* Layout */
.hs-main { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 32px var(--gutter) 90px; align-items: start; }
.hs-side { position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--stone) transparent; }
.hs-select { display: none; }
.hs-group + .hs-group { margin-top: 22px; }
.hs-group h3 { font-size: .72rem; font-family: var(--body); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--flame); margin: 0 0 8px 10px; }
.hs-group ul { list-style: none; margin: 0; padding: 0; }
.hs-group a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--cream); font-size: .9rem; opacity: .82; transition: background .15s ease, opacity .15s ease; }
.hs-group a img { width: 25px; height: 22px; object-fit: contain; flex: none; }
.hs-group a:hover { opacity: 1; background: rgba(255, 255, 255, .04); }
.hs-group a.is-on { opacity: 1; color: var(--gold-hi); background: rgba(227, 196, 107, .1); box-shadow: inset 2px 0 0 var(--gold); }

/* The board */
.hs-card { border-radius: 14px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 70px -40px rgba(0, 0, 0, .95); overflow: hidden; }
.hs-card-head { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--line); background: radial-gradient(600px 120px at 0% 0%, rgba(73, 224, 161, .08), transparent); }
.hs-card-head img { width: 54px; height: 48px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6)); }
.hs-card-head h2 { font-size: 1.7rem; font-weight: 800; color: var(--gold); }
.hs-card-head span { color: var(--muted); font-size: .88rem; }

.hs-table-wrap { overflow-x: auto; }
.hs-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hs-table th { padding: 12px 24px; text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.hs-table td { padding: 12px 24px; border-bottom: 1px solid rgba(227, 196, 107, .07); white-space: nowrap; }
.hs-table .num { text-align: right; }
.hs-table td.strong { font-weight: 600; color: var(--cream); }
.hs-table td.num:not(.strong) { color: var(--muted); }
.hs-table tbody tr { transition: background .15s ease; }
.hs-table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.hs-table .rank { width: 90px; font-family: var(--display); font-weight: 800; color: var(--muted); }
.hs-table .who a { display: inline-flex; align-items: center; color: var(--cream); font-weight: 600; }
.hs-table .who a:hover { color: var(--gold-hi); }
.hs-table tr.top .rank span { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 50%; color: #1b1407; }
.hs-table tr.top-1 .rank span { background: radial-gradient(circle at 35% 30%, #fff1b8, #e7b73c 60%, #9c7418); box-shadow: 0 0 18px rgba(240, 196, 80, .45); }
.hs-table tr.top-2 .rank span { background: radial-gradient(circle at 35% 30%, #ffffff, #c4cad3 60%, #7d848f); }
.hs-table tr.top-3 .rank span { background: radial-gradient(circle at 35% 30%, #ffd3ad, #cf8a52 60%, #85512a); }
.hs-table tr.top-1 { background: linear-gradient(90deg, rgba(231, 183, 60, .09), transparent 60%); }
.hs-table tr.is-me { background: rgba(73, 224, 161, .1) !important; box-shadow: inset 3px 0 0 var(--flame); }
.hs-table tr.sk td i { display: block; height: 12px; width: 60%; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; }
.hs-table tr.sk td:first-child i { width: 28px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.hs-empty { padding: 48px 24px !important; text-align: center; white-space: normal !important; }
.hs-empty strong { display: block; font-family: var(--display); font-size: 1.2rem; color: var(--gold); margin-bottom: 4px; }
.hs-empty span { color: var(--muted); }

.hs-pager { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 18px; flex-wrap: wrap; }
.hs-pager:empty { display: none; }
.hs-pager button { min-width: 38px; height: 38px; padding: 0 10px; border: 0; border-radius: 9px; cursor: pointer; font: 600 .9rem var(--body); color: var(--cream); background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); }
.hs-pager button:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-hi); }
.hs-pager button.is-on { color: #1b1407; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: none; }
.hs-pager button:disabled { opacity: .35; cursor: default; }
.hs-pager .gap { color: var(--faint); padding: 0 2px; }

.hs-loading { display: grid; justify-items: center; gap: 16px; padding: 70px 20px; color: var(--muted); }
.hs-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(73, 224, 161, .2); border-top-color: var(--flame); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hs-empty-card { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 24px; }
.hs-empty-card img { width: 72px; height: 64px; }
.hs-empty-card h2 { font-size: 1.5rem; color: var(--gold); }
.hs-empty-card p { margin: 0 0 10px; max-width: 460px; color: var(--muted); }

/* Player profile */
.hs-profile { padding-bottom: 8px; }
.hs-profile-head { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 26px; border-bottom: 1px solid var(--line); background: radial-gradient(700px 200px at 0% 0%, rgba(227, 196, 107, .1), transparent); }
.hs-avatar { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(160deg, #1e3125, #0d150f); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 10px 24px -10px #000; }
.hs-avatar img { width: 40px; height: auto; }
.hs-avatar span { font-family: var(--display); font-weight: 800; font-size: 2rem; color: var(--gold); }
.hs-id h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 800; color: var(--cream); word-break: break-word; }
.hs-id small { display: block; margin-top: 8px; color: var(--faint); font-size: .8rem; }
.hs-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; color: var(--cream); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line-2); }
.badge-live { color: var(--flame-hi); box-shadow: inset 0 0 0 1px rgba(73, 224, 161, .5); }
.badge-live .online-dot { margin: 0 6px 0 0; }
.hs-totals { display: grid; grid-template-columns: repeat(3, auto); gap: 6px 26px; margin: 0; text-align: right; }
.hs-totals dt { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hs-totals dd { margin: 2px 0 0; font-family: var(--display); font-weight: 800; font-size: 1.45rem; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.hs-note { margin: 18px 26px 0; padding: 10px 14px; border-radius: 9px; font-size: .88rem; color: var(--muted); background: rgba(227, 196, 107, .06); box-shadow: inset 0 0 0 1px var(--line); }
.hs-sec { margin: 28px 26px 12px; font-size: .74rem; font-family: var(--body); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--flame); }
.hs-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; padding: 0 26px; }
.hs-skill { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--cream); background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s ease, box-shadow .15s ease; }
.hs-skill img { grid-row: span 2; width: 25px; height: auto; }
.hs-skill b { font-family: var(--display); font-size: 1.25rem; line-height: 1.1; color: #ffde6a; text-shadow: 1px 1px 0 #000; }
.hs-skill span { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hs-skill:hover { color: var(--cream); transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--gold); }
.hs-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; padding: 0 26px; }
.hs-count { display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 10px; color: var(--cream); background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s ease, transform .15s ease; }
.hs-count img { width: 36px; height: 32px; }
.hs-count .nm { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-count b { font-variant-numeric: tabular-nums; }
.hs-count .rk { min-width: 54px; text-align: right; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hs-count:hover { color: var(--cream); transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--gold); }
.hs-none { margin: 0 26px; color: var(--faint); font-size: .92rem; }
.hs-profile-foot { padding: 28px 26px 20px; }

@media (max-width: 900px) {
  .hs-main { grid-template-columns: 1fr; gap: 16px; padding-top: 20px; }
  .hs-side { position: static; max-height: none; overflow: visible; padding: 0; }
  .hs-side-lists { display: none; }
  .hs-select { display: block; width: 100%; padding: 12px 14px; border-radius: 10px; border: 0; font: 600 1rem var(--body); color: var(--cream); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
  .hs-filters { top: 58px; }
  .hs-profile-head { grid-template-columns: auto 1fr; }
  .hs-totals { grid-column: 1 / -1; text-align: left; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .hs-filters { position: static; flex-direction: column; align-items: stretch; }
  .hs-modes, .hs-xp { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .hs-modes::-webkit-scrollbar, .hs-xp::-webkit-scrollbar { display: none; }
  .hs-modes button, .hs-xp button { flex: none; }
  .hs-table th, .hs-table td { padding: 11px 12px; }
  .hs-table .rank { width: 56px; }
  .hs-table:not(.is-count) th:last-child, .hs-table:not(.is-count) td:last-child { display: none; }
  .hs-card-head { padding: 18px 16px; }
  .hs-skills, .hs-counts { padding: 0 16px; grid-template-columns: repeat(2, 1fr); }
  .hs-counts { grid-template-columns: 1fr; }
  .hs-sec { margin-left: 16px; margin-right: 16px; }
  .hs-profile-head { padding: 20px 16px; }
  .hs-search .btn { display: none; }
}
