:root {
  --hg-bg: #f4f4f4;
  --hg-card: #ffffff;
  --hg-ink: #111111;
  --hg-muted: #6b7280;
  --hg-green: #20a960;
  --hg-green-dark: #188e55;
  --hg-green-soft: #e8f5e9;
  --hg-mint: #2faf70;
  --hg-header: #0b0b0b;
  --hg-star: #ff9e1b;
  --hg-blue: #4f6fbf;
  --hg-orange: #ff8c2a;
  --hg-radius: 16px;
  --hg-max: 480px;
  --font: "DM Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--hg-bg);
  color: var(--hg-ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.hg-shell {
  min-height: 100vh;
  background: var(--hg-bg);
}

.hg-header {
  background: var(--hg-header);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.hg-header-inner {
  max-width: var(--hg-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 44px 1fr 72px;
  align-items: center;
  padding: 10px 14px;
  gap: 8px;
}

.hg-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  border-radius: 10px;
}

.hg-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hg-logo img {
  max-height: 42px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
}

.hg-support {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.hg-support i { font-size: 15px; opacity: .9; }

.hg-subnav {
  background: var(--hg-header);
  border-top: 1px solid rgba(255,255,255,.06);
}

.hg-subnav-inner {
  max-width: var(--hg-max);
  margin: 0 auto;
  display: flex;
  gap: 22px;
  padding: 8px 18px 14px;
}

.hg-subnav a {
  color: rgba(255,255,255,.72);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hg-subnav a.active { color: #fff; }
.hg-subnav .star {
  color: var(--hg-star);
  font-size: 12px;
}

.hg-main {
  max-width: var(--hg-max);
  margin: 0 auto;
  padding: 16px 14px 110px;
}

.hg-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 14px;
}

.hg-section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hg-section-head h2 .star { color: var(--hg-star); font-size: 14px; }
.hg-section-head span {
  color: var(--hg-muted);
  font-size: 13px;
  font-weight: 500;
}

.hg-card {
  background: var(--hg-card);
  border-radius: var(--hg-radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  margin-bottom: 16px;
}

.hg-card-media {
  position: relative;
  background: #111;
}

.hg-card-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.hg-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: var(--hg-mint);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

.hg-badge.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e11d48;
  padding-right: 12px;
}

.hg-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,.7);
  animation: hg-pulse 1.4s infinite;
}

@keyframes hg-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); }
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.hg-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffe4e6;
  color: #be123c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 10px;
  margin-bottom: 10px;
}

.hg-live-chip .hg-live-dot {
  background: #e11d48;
  box-shadow: 0 0 0 0 rgba(225,29,72,.55);
  animation: hg-pulse-red 1.4s infinite;
}

@keyframes hg-pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(225,29,72,.55); }
  70% { box-shadow: 0 0 0 8px rgba(225,29,72,0); }
  100% { box-shadow: 0 0 0 0 rgba(225,29,72,0); }
}

.hg-min-note {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.hg-card-body {
  padding: 14px 14px 16px;
}

.hg-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #111;
}

.hg-card-sub {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #9aa0a6;
}

.hg-winner {
  margin-top: 12px;
  background: var(--hg-green-soft);
  color: #1b5e20;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.hg-winner i { color: var(--hg-green); font-size: 16px; }

.hg-prizes {
  margin-top: 14px;
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px;
}

.hg-prizes-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.hg-prizes-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hg-prizes-head h4 i { color: #eab308; }

.hg-prizes-head p {
  margin: 3px 0 0;
  font-size: 11px;
  color: #6b7280;
}

.hg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.hg-tab {
  border: 0;
  border-radius: 10px;
  padding: 9px 8px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
}

.hg-tab.disp { background: #14b8a6; }
.hg-tab.sort { background: #fb7185; }
.hg-tab.inactive { opacity: .55; }

.hg-prize-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 6px;
}

.hg-prize-row.drawn { background: #e8f5e9; }

.hg-prize-num {
  background: #334155;
  color: #fff;
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
}

.hg-prize-desc {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
}

.hg-prize-status {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.hg-prize-row.drawn .hg-prize-status {
  color: #15803d;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: normal;
  text-align: right;
  max-width: 110px;
}

.hg-prize-empty {
  font-size: 12px;
  color: #6b7280;
  padding: 6px 2px;
}

.hg-prizes [id^="disp-"],
.hg-prizes [id^="sort-"] {
  max-height: 280px;
  overflow-y: auto;
}

.hg-buy {
  margin-top: 14px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #28b866 0%, #1f9d57 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(32,169,96,.28);
}

.hg-buy-left {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.hg-buy-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.hg-buy-text strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
}

.hg-buy-text small {
  display: block;
  font-size: 11px;
  opacity: .92;
  font-weight: 500;
}

.hg-buy-price {
  background: rgba(255,255,255,.16);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}

.hg-closed {
  margin-top: 12px;
  width: 100%;
  border-radius: 12px;
  background: #202020;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

.hg-closed-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hg-closed-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hg-closed-text strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.hg-closed-text small {
  display: block;
  font-size: 11px;
  opacity: .85;
}

.hg-closed-pill {
  background: #4a4a4a;
  color: #fff;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hg-winners-head {
  margin: 22px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
}

.hg-winners-head i { color: var(--hg-green); }

.hg-winner-row {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.hg-winner-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--hg-green-soft);
  color: var(--hg-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hg-winner-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.hg-winner-meta span {
  display: block;
  font-size: 12px;
  color: var(--hg-muted);
  margin-top: 2px;
}

.hg-help {
  margin-top: 14px;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.hg-help-ico {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff3e6;
  color: var(--hg-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.hg-help strong { display: block; font-size: 15px; }
.hg-help span { display: block; font-size: 12px; color: var(--hg-muted); margin-top: 2px; }

.hg-footer {
  margin-top: 22px;
  text-align: center;
  color: var(--hg-muted);
  padding-bottom: 20px;
}

.hg-age {
  display: inline-block;
  background: #e9ecef;
  color: #6c757d;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}

.hg-partners {
  display: flex;
  justify-content: center;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 800;
  font-size: 15px;
}

.hg-partners .lotep { color: #ef334f; }
.hg-partners .alpha { color: #6f42c1; }

.hg-legal {
  font-size: 11px;
  line-height: 1.45;
  max-width: 360px;
  margin: 0 auto;
  color: #9aa0a6;
}

.hg-appbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: calc(100% - 28px);
  max-width: calc(var(--hg-max) - 28px);
  background: linear-gradient(90deg, #4f6fbf, #5b7fd0);
  color: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 60;
  box-shadow: 0 10px 24px rgba(79,111,191,.35);
}

.hg-appbar-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hg-appbar-text { flex: 1; min-width: 0; }
.hg-appbar-text strong { display: block; font-size: 13px; font-weight: 800; }
.hg-appbar-text span { display: block; font-size: 11px; opacity: .92; }
.hg-appbar-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
}

.hg-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.hg-drawer.open { display: block; }

.hg-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.hg-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: #0b0b0b;
  color: #fff;
  padding: 18px 16px;
  box-shadow: 8px 0 30px rgba(0,0,0,.35);
}

.hg-drawer-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-weight: 600;
}

.hg-drawer-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.hg-drawer-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hg-drawer-top img { height: 36px; }

@media (min-width: 768px) {
  .hg-card-media img { aspect-ratio: 16 / 12; }
}
