/* ===== UPD: Hub blocks — Live Streams / Games / Live Betting ===== */
.upd-hub {
  --upd-hub-bg: transparent;
  --upd-hub-card: var(--card-bg, #1e1e1e);
  --upd-hub-card2: var(--dark3, #222222);
  --upd-hub-border: var(--border, #333333);
  --upd-hub-orange: var(--orange, #f15a22);
  --upd-hub-orange-dark: var(--orange-dark, #d94e18);
  --upd-hub-white: var(--white, #ffffff);
  --upd-hub-muted: var(--gray, #888888);
  --upd-hub-text: var(--gray-light, #cccccc);
  --upd-hub-gold: var(--gold, #f5c518);
  --upd-hub-green: #3ddc84;
  --upd-hub-red: #ff4d4f;
  --upd-hub-font: 'Segoe UI', Arial, sans-serif;
  --upd-hub-radius: 10px;
  --upd-hub-max: 1280px;

  font-family: var(--upd-hub-font);
  padding: 18px 16px 8px;
  color: var(--upd-hub-white);
}

.upd-hub__inner {
  max-width: var(--upd-hub-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.upd-hub__block {
  min-width: 0;
}

.upd-hub__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.upd-hub__title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--upd-hub-white);
}

.upd-hub__more {
  color: var(--upd-hub-orange);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.upd-hub__more:hover {
  color: var(--orange-light, #ff7a3d);
}

/* ----- Live Streams ----- */
.upd-streams__row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.upd-streams__row::-webkit-scrollbar {
  display: none;
}

.upd-stream-card {
  position: relative;
  flex: 0 0 auto;
  width: min(220px, 72vw);
  aspect-ratio: 16 / 10;
  border-radius: var(--upd-hub-radius);
  overflow: hidden;
  scroll-snap-align: start;
  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.upd-stream-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.upd-stream-card:hover img {
  transform: scale(1.05);
}

.upd-stream-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.25) 40%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
}

.upd-stream-card__live {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e11d2e;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  z-index: 1;
}

.upd-stream-card__live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: upd-live-pulse 1.6s infinite;
}

@keyframes upd-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.upd-stream-card__viewers {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  z-index: 1;
  backdrop-filter: blur(4px);
}

.upd-stream-card__viewers svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.upd-stream-card__meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
}

.upd-stream-card__name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.upd-stream-card__sub {
  margin-top: 3px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

/* ----- Games (sports) ----- */
.upd-games {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upd-match--featured {
  background: linear-gradient(180deg, #242424 0%, var(--upd-hub-card) 100%);
  border: 1px solid var(--upd-hub-border);
  border-radius: var(--upd-hub-radius);
  padding: 14px 16px 16px;
}

.upd-match__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.upd-match__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.upd-match__pill {
  background: rgba(245, 197, 24, 0.12);
  color: var(--upd-hub-gold);
  border: 1px solid rgba(245, 197, 24, 0.35);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}

.upd-match__league {
  color: var(--upd-hub-text);
  font-size: 0.78rem;
  font-weight: 600;
}

.upd-match__boost {
  color: var(--upd-hub-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.upd-match__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.upd-match__team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.upd-match__team--away {
  justify-content: flex-end;
  text-align: right;
}

.upd-match__team--away .upd-match__team-name {
  order: -1;
}

.upd-match__logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--upd-hub-card2);
  border: 1px solid var(--upd-hub-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--upd-hub-orange);
  flex: 0 0 auto;
}

.upd-match__team-name {
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upd-match__vs {
  text-align: center;
  color: var(--upd-hub-muted);
}

.upd-match__vs-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--upd-hub-white);
}

.upd-match__vs-time {
  font-size: 0.72rem;
  margin-top: 2px;
}

.upd-odds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.upd-odds--2 {
  grid-template-columns: repeat(2, 1fr);
}

.upd-odds__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: var(--upd-hub-white);
  border-radius: 8px;
  padding: 10px 12px;
  text-decoration: none;
  font-weight: 700;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

a.upd-match:hover .upd-odds__btn {
  border-color: #4a4a4a;
  background: #303030;
}

.upd-odds__key {
  color: var(--upd-hub-muted);
  font-size: 0.8rem;
  text-transform: lowercase;
}

.upd-odds__val {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.95rem;
}

.upd-odds__arrow {
  font-size: 0.7rem;
  line-height: 1;
}

.upd-odds__arrow--up {
  color: var(--upd-hub-green);
}

.upd-odds__arrow--down {
  color: var(--upd-hub-red);
}

.upd-games__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.upd-match {
  background: var(--upd-hub-card);
  border: 1px solid var(--upd-hub-border);
  border-radius: var(--upd-hub-radius);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

a.upd-match:hover {
  border-color: rgba(241, 90, 34, 0.55);
  color: inherit;
}

.upd-match__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--upd-hub-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.upd-match__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.upd-match__list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

/* ----- Live Betting ----- */
.upd-lb__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.upd-lb-card {
  background: var(--upd-hub-card);
  border: 1px solid var(--upd-hub-border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s;
}

a.upd-lb-card:hover {
  border-color: rgba(241, 90, 34, 0.55);
  color: inherit;
}

.upd-lb-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.upd-lb-card__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.upd-lb-card__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ff6b6b;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.upd-lb-card__live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4f;
  box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.55);
  animation: upd-live-pulse 1.6s infinite;
}

.upd-lb-card__history {
  display: flex;
  gap: 6px;
  overflow: hidden;
  flex-wrap: nowrap;
}

.upd-lb-chip {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.upd-lb-chip--low {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 77, 79, 0.08);
}

.upd-lb-chip--mid {
  color: var(--upd-hub-text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.upd-lb-chip--high {
  color: var(--upd-hub-green);
  border-color: rgba(61, 220, 132, 0.45);
  background: rgba(61, 220, 132, 0.08);
}

.upd-lb-card__stage {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.upd-lb-card__stage-bg {
  position: absolute;
  inset: -12px;
  background-size: cover;
  background-position: center;
  filter: blur(14px) saturate(1.05) brightness(0.72);
  transform: scale(1.08);
  pointer-events: none;
}

.upd-lb-card__stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

.upd-lb-card__result,
.upd-lb-card__demo {
  z-index: 1;
}

.upd-lb-card__result {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 72px;
  backdrop-filter: blur(4px);
}

.upd-lb-card__result-val {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.upd-lb-card__result-val.is-low { color: #ff6b6b; }
.upd-lb-card__result-val.is-high { color: var(--upd-hub-green); }

.upd-lb-card__result-label {
  margin-top: 3px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

.upd-lb-card__demo {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.upd-lb-card__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upd-lb-card__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--upd-hub-orange);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 11px 16px;
  border-radius: 8px;
  transition: background 0.2s;
  white-space: nowrap;
}

a.upd-lb-card:hover .upd-lb-card__play {
  background: var(--upd-hub-orange-dark);
  color: #fff;
}

.upd-lb-card__playing {
  color: var(--upd-hub-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.upd-lb-card__winners {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}

.upd-lb-card__winners-track {
  display: flex;
  gap: 8px;
  width: max-content;
  will-change: transform;
}

.upd-lb-card__winners-track.is-ready {
  animation: upd-lb-winners 48s linear infinite;
}

@keyframes upd-lb-winners {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.upd-lb-winner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.upd-lb-winner__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.upd-lb-winner__user {
  color: var(--upd-hub-text);
  font-weight: 600;
}

.upd-lb-winner__amount {
  color: var(--upd-hub-green);
  font-weight: 800;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .upd-lb__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .upd-hub {
    padding: 14px 12px 4px;
  }

  .upd-hub__inner {
    gap: 22px;
  }

  .upd-hub__title {
    font-size: 1.02rem;
  }

  .upd-games__grid {
    grid-template-columns: 1fr;
  }

  .upd-match__teams {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .upd-match__vs {
    display: none;
  }

  .upd-match__team {
    justify-content: flex-start;
    text-align: left;
  }

  .upd-match__team--away {
    justify-content: flex-start;
    text-align: left;
  }

  .upd-match__team--away .upd-match__team-name {
    order: 0;
  }

  .upd-stream-card {
    width: min(200px, 78vw);
  }

  .upd-lb-card__actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .upd-odds {
    gap: 6px;
  }

  .upd-odds__btn {
    padding: 9px 8px;
  }

  .upd-odds__val {
    font-size: 0.88rem;
  }

  .upd-lb-card__play {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .upd-stream-card__live::before,
  .upd-lb-card__live-dot {
    animation: none;
  }

  .upd-lb-card__winners-track.is-ready {
    animation: none;
  }
}
