:root {
  --hlp-bg: #0a0808;
  --hlp-surface: #170d0d;
  --hlp-surface2: #1f1010;
  --hlp-primary: #c0392b;
  --hlp-orange: #e05a00;
  --hlp-cta: #ff4500;
  --hlp-text: #f5f0f0;
  --hlp-muted: #9a8080;
  --hlp-border: #2d1515;
  --hlp-discord: #5865f2;

  /* Geometry of the shared forum top nav. Both are 0 when the bar is absent,
     so every offset below collapses and the layout matches a topnav-less page.
     --hlptn-h is the bar's layout height; --hlptn-border is its bottom border,
     which sits *outside* that height (the component's shadow DOM is content-box
     and does not inherit our `* { box-sizing: border-box }`). */
  --hlptn-h: 0px;
  --hlptn-border: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--hlp-bg);
  color: var(--hlp-text);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
}

/* ── FORUM TOP NAV OFFSETS ──────────────────────────────
   hlp-topnav renders a fixed 48px bar (44px ≤720px) into its own shadow DOM
   and then sets body padding-top itself — but only once its fetch resolves.
   Reserving the space up front keeps the page from jumping on load. */
body:has(hlp-topnav) {
  --hlptn-h: 48px;
  --hlptn-border: 1px;
  /* Deliberately excludes the border, to match the padding-top the component
     assigns itself once its fetch resolves — otherwise the page shifts 1px. */
  padding-top: var(--hlptn-h);
}

/* matches the component's own breakpoint */
@media (max-width: 720px) {
  body:has(hlp-topnav) {
    --hlptn-h: 44px;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Rajdhani", sans-serif;
}

/* ── NAVBAR ─────────────────────────────────────────── */
.hlp-navbar {
  background: rgba(10, 8, 8, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hlp-border);
  padding: 0.6rem 0;
  /* .fixed-top pins this to top: 0; sit flush below the forum top nav instead. */
  top: calc(var(--hlptn-h) + var(--hlptn-border));
}

.hlp-navbar .navbar-brand img {
  height: 42px;
}

.hlp-navbar-username {
  color: var(--hlp-text);
  font-size: 0.9rem;
}

.hlp-search-wrap {
  flex: 1;
  max-width: 380px;
  margin: 0 1.5rem;
}

.hlp-search {
  background: rgba(23, 13, 13, 0.85);
  border: 1px solid var(--hlp-border);
  color: var(--hlp-text);
  border-radius: 50px;
  padding: 0.42rem 1.1rem 0.42rem 2.7rem;
  width: 100%;
  outline: none;
  font-size: 0.87rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.hlp-search::placeholder {
  color: var(--hlp-muted);
}
.hlp-search:focus {
  border-color: var(--hlp-primary);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.22);
}

.hlp-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hlp-muted);
  font-size: 0.88rem;
  pointer-events: none;
}

.btn-hlp-signin {
  color: var(--hlp-text);
  border: 1px solid var(--hlp-border);
  background: transparent;
  border-radius: 6px;
  padding: 0.38rem 1rem;
  font-size: 0.87rem;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.btn-hlp-signin:hover {
  border-color: var(--hlp-primary);
  color: var(--hlp-primary);
}

.btn-hlp-signup {
  background: var(--hlp-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.38rem 1.1rem;
  font-size: 0.87rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.btn-hlp-signup:hover {
  background: var(--hlp-cta);
  box-shadow: 0 0 14px rgba(255, 69, 0, 0.45);
  color: #fff;
}

/* ── HERO ───────────────────────────────────────────── */
.hero {
  position: relative;
  height: calc(100vh - var(--hlptn-h));
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 8, 8, 0.2) 0%,
    rgba(10, 8, 8, 0.55) 55%,
    rgba(10, 8, 8, 0.93) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-tagline {
  font-family: "Rajdhani", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--hlp-muted);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(2.4rem, 6.5vw, 4.8rem);
  font-weight: 700;
  color: var(--hlp-text);
  line-height: 1.08;
  margin-bottom: 2rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
}
.hero-title span {
  color: var(--hlp-cta);
}

.btn-hero-forums {
  background: var(--hlp-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.78rem 2.1rem;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}
.btn-hero-forums:hover {
  background: var(--hlp-cta);
  box-shadow: 0 0 22px rgba(255, 69, 0, 0.55);
  transform: translateY(-3px);
  color: #fff;
}

.btn-hero-discord {
  background: transparent;
  color: #fff;
  border: 2px solid var(--hlp-discord);
  border-radius: 8px;
  padding: 0.76rem 2.1rem;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}
.btn-hero-discord:hover {
  background: var(--hlp-discord);
  box-shadow: 0 0 22px rgba(88, 101, 242, 0.48);
  transform: translateY(-3px);
  color: #fff;
}

/* ── SECTION TITLES ─────────────────────────────────── */
.section-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hlp-text);
  border-left: 4px solid var(--hlp-primary);
  padding-left: 0.85rem;
  margin-bottom: 1.5rem;
}

/* ── GAMES & MODS ────────────────────────────────────── */
.games-section {
  padding: 3.5rem 0 2.5rem;
}

.games-scroll-wrap {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 0.5rem;
  padding-top: 0.25rem;
  cursor: grab;
  user-select: none;
}
.games-scroll-wrap:active {
  cursor: grabbing;
}

.games-scroll-wrap::-webkit-scrollbar {
  height: 4px;
}
.games-scroll-wrap::-webkit-scrollbar-track {
  background: var(--hlp-surface);
  border-radius: 10px;
}
.games-scroll-wrap::-webkit-scrollbar-thumb {
  background: var(--hlp-primary);
  border-radius: 10px;
}

.games-row {
  display: flex;
  gap: 1rem;
  padding: 0.25rem 0.1rem 0.4rem;
  width: max-content;
}

.game-card {
  width: 195px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--hlp-surface);
  border: 1px solid var(--hlp-border);
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  display: block;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;
}
.game-card:hover {
  transform: translateY(-5px) scale(1.025);
  box-shadow: 0 10px 30px rgba(192, 57, 43, 0.28);
  border-color: var(--hlp-primary);
  color: inherit;
}

.game-card-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fallback background; a mod's inline background-image (when CoverImageUrl is set)
     overrides just that layer since inline style beats this shorthand regardless of specificity. */
  background: linear-gradient(160deg, #2a0a08 0%, #8a1e14 55%, #3d0e08 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.game-card-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  opacity: 0.16;
  filter: grayscale(1);
}

.game-card-body {
  padding: 0.6rem 0.75rem 0.75rem;
}

.game-card-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.22rem;
  color: var(--hlp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── FEED ────────────────────────────────────────────── */
.feed-section {
  padding: 3rem 0 4.5rem;
}

.post-card {
  background: var(--hlp-surface);
  border: 1px solid var(--hlp-border);
  border-radius: 10px;
  padding: 1.3rem 1.5rem;
  margin-bottom: 1rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.post-card:hover {
  border-color: rgba(192, 57, 43, 0.38);
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.38);
}

.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.post-author {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--hlp-text);
}

.post-time {
  font-size: 0.77rem;
  color: var(--hlp-muted);
}

.post-badge {
  font-size: 0.71rem;
  padding: 0.16em 0.65em;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.post-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.8rem 0 0.45rem;
  color: var(--hlp-text);
}

.post-excerpt {
  font-size: 0.88rem;
  color: #c0acac;
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

.post-thumb {
  width: 100%;
  height: 220px;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-action {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hlp-border);
  color: var(--hlp-muted);
  border-radius: 6px;
  padding: 0.33rem 0.9rem;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  font-family: "Inter", sans-serif;
}

.btn-action.heart:hover,
.btn-action.heart.liked {
  color: #e8637a;
  border-color: rgba(232, 99, 122, 0.55);
  background: rgba(232, 99, 122, 0.1);
}

.btn-action.comment:hover {
  color: #4dabf7;
  border-color: rgba(77, 171, 247, 0.55);
  background: rgba(77, 171, 247, 0.08);
}

.btn-action.share:hover {
  color: #51cf66;
  border-color: rgba(81, 207, 102, 0.55);
  background: rgba(81, 207, 102, 0.08);
}

.btn-action.delete:hover {
  border-color: rgba(70, 70, 70, 0.55);
  background: rgba(50, 50, 50, 0.12);
}

.btn-page {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-page-current {
  border: 2px solid var(--hlp-primary);
}

.btn-page-clickable {
  border: 2px solid var(--hlp-border);
  transition: border-color 0.2s;
}

.btn-page-clickable:hover {
  cursor: pointer;
  border-color: rgba(192, 57, 43, 0.38);
}

/* ── MOD MANAGEMENT───────────────────────────────────── */
.mod-management {
}

.btn-hlp-mod-update {
  position:fixed;
  padding: 10px;
  bottom:40px;
  right:40px;
  background-color:var(--hlp-border);
  color:var(--hlp-text);
  border-radius:20px;
  text-align:center;
  box-shadow: 2px 2px 3px #999;
  z-index: 2;
  text-decoration: none;
}

.btn-hlp-mod-update:hover {
  background-color: var(--hlp-primary);
}

.btn-hlp-mod-update:active {
  background-color:  #60191b;
}

/* ── FOOTER ──────────────────────────────────────────── */
.hlp-footer {
  background: var(--hlp-surface);
  border-top: 2px solid var(--hlp-primary);
  padding: 2rem 0 1.75rem;
}

.hlp-footer img {
  height: 34px;
  opacity: 0.85;
}

.hlp-footer-links a {
  color: var(--hlp-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.hlp-footer-links a:hover {
  color: var(--hlp-primary);
}

.hlp-copyright {
  font-size: 0.77rem;
  color: var(--hlp-muted);
  margin-top: 0.85rem;
}

/* ── LAYOUT HELPER ───────────────────────────────────── */
.content-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
