:root {
  --rating-page-ink: #121827;
  --rating-page-navy: #111b31;
  --rating-page-violet: #5538df;
  --rating-page-lime: #c9f24c;
  --rating-page-coral: #ff705d;
  --rating-page-paper: #fffefb;
  --rating-page-muted: #6c7484;
  --rating-page-line: rgba(17, 24, 39, 0.1);
  --rating-page-positive: #16784b;
  --rating-page-negative: #c44754;
}

.rating-change-body .app-content {
  background:
    radial-gradient(circle at 5% 4%, rgba(201, 242, 76, 0.15), transparent 23rem),
    radial-gradient(circle at 94% 20%, rgba(85, 56, 223, 0.12), transparent 30rem),
    #eef0f7;
}

.rating-change-body .app-content.quag-layout-container {
  padding-top: 0;
  padding-right: clamp(0.75rem, 2.2vw, 2.1rem);
  padding-left: clamp(0.75rem, 2.2vw, 2.1rem);
}

.rating-change-page {
  display: flex;
  flex-direction: column;
  width: min(100%, 1260px);
  margin: 0 auto;
  padding: clamp(0.75rem, 1.7vw, 1.4rem) 0 3.5rem;
  color: var(--rating-page-ink);
}

.rating-change-intro {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  min-height: 245px;
  overflow: hidden;
  padding: clamp(1.6rem, 3.5vw, 3rem);
  border-radius: 30px 11px 30px 30px;
  color: #fff;
  background: linear-gradient(132deg, #5d3ce5 0%, #27315a 52%, var(--rating-page-navy) 100%);
  box-shadow: 0 24px 58px rgba(17, 27, 49, 0.22);
}

.rating-change-intro::after {
  position: absolute;
  z-index: -1;
  top: -55%;
  right: -4%;
  width: min(34vw, 390px);
  aspect-ratio: 1;
  border: clamp(30px, 4vw, 58px) solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  content: "";
}

.rating-change-intro__shape {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

.rating-change-intro__shape--lime {
  top: -175px;
  left: 52%;
  width: 250px;
  height: 250px;
  background: rgba(201, 242, 76, 0.48);
}

.rating-change-intro__shape--coral {
  bottom: -240px;
  left: -70px;
  width: 350px;
  height: 350px;
  background: rgba(255, 112, 93, 0.5);
}

.rating-change-intro__copy {
  min-width: 0;
}

.rating-change-intro__meta {
  margin-bottom: 0.55rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
  font-weight: 700;
}

.rating-change-intro h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.75rem);
  font-weight: 930;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.rating-change-intro__rating {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.rating-change-intro__rating span {
  color: var(--rating-page-lime);
  font-weight: 850;
}

.rating-change-intro__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px 16px 16px 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.82rem;
  font-weight: 780;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.rating-change-intro__back:hover,
.rating-change-intro__back:focus-visible {
  border-color: var(--rating-page-lime);
  color: var(--rating-page-navy);
  background: var(--rating-page-lime);
  outline: none;
}

.rating-change-config-panel {
  position: relative;
  z-index: 2;
  width: calc(100% - clamp(1rem, 5vw, 4.5rem));
  margin: -1.6rem auto 0;
  padding: 0.8rem;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px 7px 18px 18px;
  background: rgba(255, 254, 251, 0.95);
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.12);
  backdrop-filter: blur(16px);
}

.rating-change-config-panel .rating-change-config-tabs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.15rem;
  scrollbar-color: rgba(85, 56, 223, 0.3) transparent;
  scrollbar-width: thin;
}

.rating-change-config-tabs .nav-item {
  flex: 0 0 auto;
}

.rating-change-config-tabs .nav-link {
  min-height: 44px;
  padding: 0.62rem 0.85rem;
  border: 1px solid var(--rating-page-line);
  border-radius: 9px 15px 15px 15px;
  color: var(--rating-page-ink);
  background: #f2f3f7;
  font-size: 0.8rem;
  font-weight: 780;
  white-space: nowrap;
}

.rating-change-config-tabs .nav-link span {
  color: var(--rating-page-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.rating-change-config-tabs .nav-link:hover,
.rating-change-config-tabs .nav-link:focus-visible {
  border-color: rgba(85, 56, 223, 0.42);
  color: var(--rating-page-violet);
  background: #eeeaff;
}

.rating-change-config-tabs .nav-link.active {
  border-color: var(--rating-page-violet);
  color: #fff;
  background: var(--rating-page-violet);
  box-shadow: 0 9px 22px rgba(85, 56, 223, 0.2);
}

.rating-change-config-tabs .nav-link.active span {
  color: rgba(255, 255, 255, 0.72);
}

.rating-change-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: min(100% - clamp(0rem, 2vw, 2rem), 1180px);
  margin: 1.25rem auto 0.55rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(85, 56, 223, 0.13);
  border-radius: 10px 20px 20px 20px;
  color: var(--rating-page-muted);
  background: rgba(255, 254, 251, 0.82);
  font-size: 0.9rem;
  line-height: 1.45;
}

.rating-change-note i {
  flex: 0 0 auto;
  color: var(--rating-page-violet);
  font-size: 1rem;
}

.rating-change-table-shell {
  width: min(100%, 1200px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px 18px 18px 18px;
}

.rating-change-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--rating-page-ink);
  font-size: 1.05rem;
}

.rating-change-table .col-place { width: 4.4rem; }
.rating-change-table .col-place-delta { width: 4.8rem; }
.rating-change-table .col-team { width: auto; }
.rating-change-table .col-rating { width: 6rem; }
.rating-change-table .col-rating-delta { width: 4.8rem; }

.rating-change-table thead th {
  padding: 0.5rem 0.6rem;
  border: 0;
  color: var(--rating-page-muted);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.rating-change-table tbody td {
  padding: 0.68rem 0.6rem;
  border-top: 1px solid var(--rating-page-line);
  border-bottom: 1px solid var(--rating-page-line);
  color: inherit;
  background: var(--rating-page-paper);
  vertical-align: middle;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.rating-change-table tbody td:first-child {
  border-left: 1px solid var(--rating-page-line);
}

.rating-change-table tbody td:last-child {
  border-right: 1px solid var(--rating-page-line);
}

.rating-change-table tbody tr + tr td {
  border-top: 0;
}

.rating-change-table tbody tr:hover td {
  border-color: rgba(85, 56, 223, 0.2);
  background: #faf9ff;
}

.rating-change-row-played {
  background: linear-gradient(90deg, #eeebff, #f8f6ff);
}

.rating-change-row-played > td {
  border-color: rgba(85, 56, 223, 0.18) !important;
  background: transparent !important;
}

.rating-change-row-played > td:first-child {
  border-left: 4px solid var(--rating-page-violet) !important;
  padding-left: calc(0.6rem - 3px);
}

.rating-change-row-inactive-exit > td {
  color: var(--rating-page-muted);
  background: #f0f1f4;
}

.rating-change-row-inactive-exit .rating-change-exit-reason {
  font-size: 0.86em;
}

.rating-change-team-link {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: inherit;
  font-weight: 400;
  line-height: 1.25;
  text-decoration: none;
}

.rating-change-team-link:hover,
.rating-change-team-link:focus-visible {
  color: var(--rating-page-violet);
}

.rating-change-table .text-success {
  color: var(--rating-page-positive) !important;
  font-weight: 700;
}

.rating-change-table .text-danger {
  color: var(--rating-page-negative) !important;
  font-weight: 700;
}

.rating-change-table td:nth-child(2),
.rating-change-table td:nth-child(4),
.rating-change-table td:nth-child(5) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rating-change-table tbody td:nth-child(1),
.rating-change-table tbody td:nth-child(4) {
  font-weight: 400;
}

.rating-change-pagination {
  gap: 0.35rem;
  margin: 1.1rem 0 0;
}

.rating-change-pagination .page-link {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--rating-page-line);
  border-radius: 8px 13px 13px 13px !important;
  color: var(--rating-page-ink);
  background: var(--rating-page-paper);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: none;
}

.rating-change-pagination .page-link:hover,
.rating-change-pagination .page-link:focus-visible,
.rating-change-pagination .active .page-link {
  border-color: var(--rating-page-violet);
  color: #fff;
  background: var(--rating-page-violet);
}

.rating-change-pagination .disabled .page-link {
  color: #a3a8b4;
  background: #eceef2;
}

.rating-change-empty {
  width: min(100%, 1180px);
  margin: 1rem auto 0;
  padding: 1.3rem;
  border: 1px dashed rgba(17, 24, 39, 0.2);
  border-radius: 12px 24px 24px 24px;
  color: var(--rating-page-muted);
  background: rgba(255, 254, 251, 0.8);
  text-align: center;
}

@media (max-width: 767.98px) {
  .rating-change-page {
    padding-top: 0.65rem;
  }

  .rating-change-intro {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 1.1rem;
    min-height: 0;
    padding: 1.45rem;
    border-radius: 25px 9px 25px 25px;
  }

  .rating-change-intro::after {
    top: auto;
    right: -22%;
    bottom: -55%;
    width: 290px;
  }

  .rating-change-intro h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    line-height: 1.07;
  }

  .rating-change-intro__rating {
    margin-top: 0.8rem;
    font-size: 0.82rem;
  }

  .rating-change-intro__back {
    width: fit-content;
    min-height: 40px;
  }

  .rating-change-config-panel {
    width: calc(100% - 1rem);
    margin-top: -0.8rem;
    padding: 0.65rem;
  }

  .rating-change-config-tabs .nav-link {
    min-height: 41px;
    padding: 0.56rem 0.75rem;
  }

  .rating-change-note {
    width: calc(100% - 0.3rem);
    margin-top: 1rem;
  }

  .rating-change-table {
    font-size: 0.95rem;
  }

  .rating-change-table .col-place { width: 2.8rem; }
  .rating-change-table .col-place-delta { width: 3.25rem; }
  .rating-change-table .col-rating { width: 3.8rem; }
  .rating-change-table .col-rating-delta { width: 3.25rem; }

  .rating-change-table thead th {
    padding: 0.4rem 0.2rem;
    font-size: 0.71rem;
    letter-spacing: 0.025em;
  }

  .rating-change-table tbody td {
    padding: 0.58rem 0.2rem;
  }

  .rating-change-row-played > td:first-child {
    padding-left: calc(0.2rem - 3px);
  }

  .rating-change-pagination {
    gap: 0.25rem;
  }

  .rating-change-pagination .page-link {
    min-width: 34px;
    min-height: 36px;
    padding: 0.35rem 0.45rem;
  }
}

@media (max-width: 575.98px) {
  .rating-change-body .app-content.quag-layout-container {
    padding-right: 0.6rem;
    padding-left: 0.6rem;
  }

  .rating-change-intro {
    padding: 1.2rem 1.05rem;
  }

  .rating-change-intro__meta {
    font-size: 0.82rem;
  }

  .rating-change-intro h1 {
    font-size: 1.65rem;
  }

  .rating-change-intro__rating {
    line-height: 1.4;
  }

  .rating-change-note {
    padding: 0.7rem 0.8rem;
    font-size: 0.82rem;
  }

  .rating-change-table {
    font-size: 0.94rem;
  }

  .rating-change-table .col-place { width: 2.55rem; }
  .rating-change-table .col-place-delta { width: 3rem; }
  .rating-change-table .col-rating { width: 3.35rem; }
  .rating-change-table .col-rating-delta { width: 2.9rem; }

}

@media (prefers-reduced-motion: reduce) {
  .rating-change-table tbody td {
    transition: none;
  }
}
