/* --- CONFIG & SCROLLBAR --- */
:root {
    --background-wrapper: #1b212a;
    --hpu-bar-wrapper: #292c30;
    --statistics-home-bg: #5b6068;
    --statistics-win-bg: #06be46;
    --statistics-title: #FFFFFF;
    --statistics-win-bg-text-color: #06be46;
    --border-bottom-color: rgba(73, 73, 73, .4);
    --btn-text-color: #afb4ba;
    --btn--bg: linear-gradient(250deg, #22252c 33.6%, #222734 43.94%, #242c3e 59.4%);
    --btn-active-text-color: #4cf446;
    --btn-active-bg: linear-gradient(0deg, rgba(60, 225, 173, .2), rgba(5, 159, 71, .2));
    --btn-active-border-color: transparent;
}
*::-webkit-scrollbar { height: 4px; width: 4px; }
*::-webkit-scrollbar-thumb { background: #fff; border-radius: 4px; }
*::-webkit-scrollbar-track { background: #60828b; }

/* --- TABS NAVIGATION --- */
.hpu-nav-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: .5rem;
  list-style: none;
  overflow-x: auto;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-bottom-color) !important;
  padding: 6px 0 12px;
  background: transparent;
}

.hpu-nav-tabs .hpu-nav-item { padding: 0 !important; margin: 0 !important; }

.hpu-nav-tabs .hpu-nav-item a {
    align-items: center;
    background: linear-gradient(250deg, #22252c 33.6%, #222734 43.94%, #242c3e 59.4%);
    border: .0625rem solid #343940;
    border-radius: 6px;
    color: #afb4ba;
    cursor: pointer;
    display: flex;
    font-family: Roboto Condensed;
    font-size: .875rem;
    font-weight: 400;
    justify-content: center;
    line-height: .5625rem;
    padding: .5rem .75rem;
    text-align: center;
    text-transform: uppercase;
}
.hpu-nav-tabs .hpu-nav-item a:hover, 
.hpu-nav-tabs .hpu-nav-item a.active {
  background: var(--btn-active-bg);
  color: var(--btn-active-text-color) !important;
  border: none;
  position: relative;
  font-weight: 700;
}

/* Border Effect cho Active Tab */
.hpu-nav-tabs .hpu-nav-item a.active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  padding: 1px;
  background: linear-gradient(135deg,#00fc22,#00fc2200 30% 70%,#00fc22);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: .3;
  pointer-events: none;
}

/* --- POPUP STRUCTURE --- */
.match-popup {
  position: absolute;
  left: 0;
  top: 80px;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 999;
}
.match-popup.statistic-section { top: 40px; }

.match-popup .statics-popup, 
.match-popup .incident-popup {
  width: 420px;
  background: var(--background-wrapper);
  border-radius: 13px;
  padding: 8px;
}

.hpu-home-scrollable-content {
  max-height: 380px;
  overflow-y: auto;
}

/* --- STATISTICS --- */
.hpu-stats { padding: 35px 1rem 1rem; }
.hpu-stats__content { display: flex; flex-direction: column; gap: 1.5rem; }
.hpu-stats__line {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 12px;
  gap: .69rem;
}

.hpu-stats__value {
  position: absolute;
  bottom: 100%;
  left: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 6px;
}
.hpu-stats__value--away { left: auto; right: 0; }
.hpu-stats__home-win, .hpu-stats__away-win { 
  color: var(--statistics-win-bg-text-color); 
  font-weight: 700; 
}

.hpu-stats__bar-wrapper {
  flex: 1;
  height: 9px;
  background: var(--hpu-bar-wrapper);
  overflow: hidden;
  display: flex;
}
.hpu-stats__bar-wrapper--home { justify-content: flex-end; }
.hpu-stats__bar { background: var(--statistics-home-bg); height: 100%; width: 0; transition: width 0.3s; }
.hpu-stats__home-win .hpu-stats__bar, 
.hpu-stats__away-win .hpu-stats__bar { background: var(--statistics-win-bg); }

.hpu-stats__title {
  position: absolute;
  bottom: 100%;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* --- SUMMARY / EVENTS --- */
.hpu-summary-block { position: relative; font-family: Roboto; }
.hpu-summary-block__start { padding: 3px 12px 18px 54px; text-align: center; }

.hpu-summary-block__event {
  display: flex;
  padding: 10px 12px;
  justify-content: flex-end;
  position: relative;
}

.hpu-summary-block__event-time { flex-basis: 39px; color: #fff; font-size: 12px; text-align: center; }

.hpu-summary-block__event-icon {
  display: flex;
  position: relative;
  padding: 0 12px;
  justify-content: flex-start;
}
.hpu-summary-block__event-icon::before {
  content: "";
  position: absolute;
  left: 49%;
  top: 0;
  width: 1px;
  height: 54px;
  background: #5d5d5d;
  z-index: 1;
}

.hpu-summary-block__event-icon .hpu-icon {
  width: 33px; height: 33px;
  background: #1a1a1a;
  border: 2px solid #535353;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.hpu-summary-block__event-score button {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 24px;
  min-width: 60px;
  padding: 0 10px;
  background: #303339;
  border: 1px solid #1b842e;
  border-radius: 30px;
  color: #fff;
  font-weight: 700;
}

.hpu-summary-block__player { display: flex; width: 100%; gap: 6px; }
.hpu-summary-block__player .hpu-player-avatar { width: 32px; height: 32px; }
.hpu-summary-block__player-logo--in { border: 3px solid #2187e5; border-radius: 50%; }
.hpu-summary-block__player-logo--out { border: 3px solid #e53030; border-radius: 50%; }

.hpu-summary-block__player-name { color: #fff; font-size: 13px; line-height: 16px; }
.hpu-summary-block__player-name span { display: block; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Home/Away Logic */
.hpu-summary-block__event--home { flex-direction: row-reverse; }
.hpu-summary-block__event--home .hpu-summary-block__player { flex-direction: row-reverse; align-items: center; }
.hpu-summary-block__event--home .hpu-summary-block__event-score { justify-content: flex-start; }
.hpu-summary-block__event--away .hpu-summary-block__event-icon { justify-content: flex-end; }
.hpu-score-home, .hpu-score-away { color: #00eb1f; }

/* --- RESPONSIVE --- */
@media (max-width: 576px) {
  .hpu-summary-block__player { gap: 4px; }
  .hpu-summary-block__player .hpu-player-avatar { width: 24px; height: 24px; }
  .hpu-summary-block__player-name { font-size: 12px; }
  .hpu-summary-block__player-name span { max-width: 60px; }
  .hpu-summary-block__player-logo--in, .hpu-summary-block__player-logo--out { border-width: 1px; }
}