body.stream-overlay-active {
  background: transparent !important;
  overflow: hidden;
}

body.stream-overlay-active .app-container {
  min-height: 100vh;
  background: transparent !important;
}

body.stream-overlay-active .sidebar,
body.stream-overlay-active .mobile-topbar,
body.stream-overlay-active #global-search-bar {
  display: none !important;
}

body.stream-overlay-active .main-content {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  width: 100vw;
  background: transparent !important;
}

body.stream-overlay-active #page-container {
  min-height: 100vh;
  padding: 0;
  background: transparent !important;
}

.stream-overlay-page {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: transparent;
}

.stream-overlay-stage {
  width: 430px;
  min-height: 196px;
  transition: none;
}

.stream-overlay-stage .stream-overlay-card > * {
  transition: opacity 620ms ease;
}

.stream-overlay-stage.is-switching .stream-overlay-card > * {
  opacity: 0;
}

.stream-overlay-card {
  width: 430px;
  height: 196px;
  border-radius: 22px;
  border: 1px solid rgba(124, 147, 187, 0.34);
  background:
    radial-gradient(circle at 10% 0%, rgba(148, 163, 184, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(18, 25, 43, 0.96), rgba(9, 14, 26, 0.92));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.stream-overlay-rank-card {
  padding: 20px 20px 18px;
}

.stream-overlay-rank-shell {
  height: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.stream-overlay-rank-shell .home-rank-overview-header {
  flex: 0 0 auto;
}

.stream-overlay-rank-shell .home-rank-overview-progress {
  flex: 0 0 auto;
  margin-top: 14px;
}

.stream-overlay-games-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  padding-top: 10px;
}

.stream-overlay-rank-stats-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  min-height: 0;
  padding-top: 18px;
}

.stream-overlay-rank-stats {
  width: 100%;
}

.stream-overlay-games-wrap .home-summary-recent-overview-strip {
  width: 100%;
  margin: 0;
}

.stream-overlay-games-wrap .home-rank-overview-games {
  grid-template-columns: repeat(6, 42px);
  gap: 13px;
  padding: 0;
}

.stream-overlay-games-wrap .home-rank-overview-game {
  border-radius: 11px;
  cursor: default;
}

.stream-overlay-games-wrap .home-rank-overview-game-badge {
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  border-radius: 6px;
}

.stream-overlay-empty {
  height: 100%;
  min-height: 156px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.stream-overlay-match-card {
  padding: 14px 18px 13px;
}

.stream-overlay-match-layout {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
}

.stream-overlay-match-top {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.stream-overlay-match-title {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stream-overlay-match-hero {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 13px;
  min-height: 66px;
}

.stream-overlay-match-icon {
  width: 66px;
  height: 66px;
  border-radius: 17px;
  border: 1px solid rgba(124, 147, 187, 0.36);
  overflow: hidden;
  background: rgba(12, 18, 32, 0.68);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.stream-overlay-match-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.stream-overlay-match-icon span {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 26px;
  font-weight: 900;
}

.stream-overlay-match-copy {
  min-width: 0;
}

.stream-overlay-match-champion {
  color: var(--text-primary);
  font-size: 25px;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.42);
}

.stream-overlay-match-result {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stream-overlay-match-result.is-win {
  color: #1dd1a1;
}

.stream-overlay-match-result.is-loss {
  color: #ff6b6b;
}

.stream-overlay-match-metric {
  justify-self: end;
  min-width: 106px;
  text-align: right;
}

.stream-overlay-match-metric-label {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stream-overlay-match-metric-value {
  margin-top: 8px;
  color: var(--text-primary);
  font-size: 29px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.42);
  transition: opacity 260ms ease;
}

.stream-overlay-match-metric-value.is-fading {
  opacity: 0;
}

.stream-overlay-match-games {
  flex: 0 0 auto;
  padding-top: 10px;
  border-top: 1px solid rgba(109, 132, 174, 0.24);
}

.stream-overlay-match-games .home-rank-overview-games {
  grid-template-columns: repeat(6, 42px);
  gap: 11px;
  justify-content: center;
  width: 100%;
  padding: 0;
}

.stream-overlay-match-games .home-rank-overview-game {
  border-radius: 10px;
}

.stream-overlay-match-games .home-rank-overview-game-badge {
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  border-radius: 5px;
}

.stream-overlay-match-metric-value.positive {
  color: #1dd1a1;
}

.stream-overlay-match-metric-value.negative {
  color: #ff6b6b;
}

.stream-overlay-match-metric-value.neutral {
  color: var(--text-primary);
}

@media (max-width: 520px) {
  .stream-overlay-stage,
  .stream-overlay-card {
    width: min(430px, calc(100vw - 24px));
  }

  .stream-overlay-match-hero {
    grid-template-columns: 58px minmax(0, 1fr) 88px;
    gap: 10px;
  }

  .stream-overlay-match-icon {
    width: 58px;
    height: 58px;
    border-radius: 15px;
  }

  .stream-overlay-match-champion {
    font-size: 22px;
  }

  .stream-overlay-match-metric-value {
    font-size: 26px;
  }
}
