:root {
  --wp-admin-theme-color: #198fd9;
  --wp-admin-theme-color--rgb: 25, 143, 217;
  --wp-admin-theme-color-darker-10: #336699;
  --wp-admin-theme-color-darker-10--rgb: 51, 102, 153;
  --wp-admin-theme-color-darker-20: #244b73;
  --brand-blue: #336699;
  --brand-sky: #198fd9;
  --orange: #ff8a00;
  --orange-hot: #ffb000;
  --green: #00e463;
  --dark: #061829;
  --light: #f8fcff;
  --glass: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 70px rgba(3, 32, 58, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--light);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #198fd9;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

#confetti {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.dashboard {
  width: min(1180px, calc(100% - clamp(24px, 5vw, 56px)));
  margin: 0 auto;
  padding: clamp(18px, 4vw, 36px) 0 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)),
    linear-gradient(115deg, rgba(25, 143, 217, 0.92), rgba(51, 102, 153, 0.92) 58%, rgba(255, 138, 0, 0.58));
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 240px;
  height: 240px;
  content: "";
  border: 28px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  animation: float 7s ease-in-out infinite;
}

.hero__eyebrow,
.section-heading p {
  margin: 0 0 10px;
  color: #d9f4ff;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 0.95;
}

h1 {
  max-width: 840px;
  font-size: clamp(2.15rem, 5.7vw, 5.05rem);
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 0 6px 0 rgba(51, 102, 153, 0.72), 0 20px 42px rgba(0, 0, 0, 0.28);
}

h1 span {
  display: block;
}

.hero__subtitle {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.hero__stats div {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  background: rgba(51, 102, 153, 0.36);
  backdrop-filter: blur(14px);
}

.hero__stats span {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 950;
}

#generated-at {
  max-width: 100%;
  font-size: clamp(1.2rem, 2vw, 1.78rem);
  letter-spacing: -0.055em;
}

.next-update {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scoreboard-roll {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.hero__stats .scoreboard-roll,
.score strong .scoreboard-roll,
.score small .scoreboard-roll,
.points .scoreboard-roll {
  display: inline-flex;
}

.scoreboard-roll__char {
  display: inline-block;
  min-width: 0.48em;
  transform: translateY(-115%) rotateX(72deg);
  transform-origin: 50% 100%;
  animation: scoreboardRoll 780ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--roll-delay);
  opacity: 0;
  text-align: center;
  text-shadow: 0 0 10px rgba(127, 219, 255, 0.35);
}

.hero__stats .scoreboard-roll__char,
.score strong .scoreboard-roll__char,
.score small .scoreboard-roll__char,
.points .scoreboard-roll__char {
  display: inline-block;
}

.scoreboard-roll--date {
  white-space: nowrap;
}

.scoreboard-roll--date .scoreboard-roll__char {
  min-width: auto;
}

.hero__stats small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  text-transform: uppercase;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: end;
  margin: 34px 0 30px;
}

.podium-card,
.ranking-card,
.match-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.podium-card {
  display: flex;
  height: 286px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 20px 0;
  border-radius: 30px;
  text-align: center;
  transform: translateY(20px);
  animation: popIn 700ms ease forwards;
}

.podium-card--1 {
  order: 2;
  height: 455px;
  border-color: rgba(255, 176, 0, 0.75);
}

.podium-card--2 {
  order: 1;
  height: 415px;
}

.podium-card--3 {
  order: 3;
  height: 380px;
}

.podium-card__shine {
  position: absolute;
  top: -80px;
  width: 170px;
  height: 170px;
  border: 28px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.podium-card__portrait {
  position: relative;
  z-index: 1;
  display: grid;
  width: 136px;
  height: 136px;
  place-items: center;
  margin-top: 12px;
  border-radius: 42px;
  background: linear-gradient(135deg, rgba(255, 138, 0, 0.35), rgba(25, 143, 217, 0.38));
}

.podium-card--1 .podium-card__portrait {
  width: 164px;
  height: 164px;
  border-radius: 50px;
}

.podium-card__body {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 12px 0 16px;
}

.rank-badge {
  position: relative;
  z-index: 2;
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: #082032;
  background: linear-gradient(135deg, var(--brand-sky), #cceeff);
  font-size: 1.4rem;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(25, 143, 217, 0.36);
}

.avatar {
  width: 88px;
  height: 88px;
  margin: 18px 0 12px;
  border: 5px solid var(--orange);
  border-radius: 28px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--brand-sky), var(--orange));
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.14), 0 18px 30px rgba(0, 0, 0, 0.28);
}

.podium-card .avatar {
  width: 112px;
  height: 112px;
  margin: 0;
  border-width: 6px;
  border-radius: 34px;
}

.podium-card--1 .avatar {
  width: 138px;
  height: 138px;
  border-radius: 42px;
}

.player-name {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
}

.username {
  margin-top: 4px;
  color: #bdeeff;
  font-weight: 850;
}

.points {
  margin-top: 10px;
  color: #7fdbff;
  font-size: clamp(2rem, 3vw, 2.4rem);
  font-weight: 950;
}

.podium-base {
  position: relative;
  z-index: 1;
  width: calc(100% + 40px);
  padding: 16px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #06263b;
  background: linear-gradient(135deg, #d8f2ff, var(--brand-sky));
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.podium-card--1 .podium-base {
  padding-block: 24px;
  background: linear-gradient(135deg, #fff0b7, var(--orange-hot));
}

.podium-card--2 .podium-base {
  padding-block: 19px;
  background: linear-gradient(135deg, #f7fbff, #a9c4da);
}

.podium-card--3 .podium-base {
  padding-block: 14px;
  background: linear-gradient(135deg, #ffd5a5, #c27a35);
}

.ranking-panel,
.matches-panel {
  margin-top: 26px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  text-transform: uppercase;
}

.ranking-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ranking-card {
  display: grid;
  grid-template-columns: 70px 76px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 24px;
  animation: slideUp 550ms ease both;
}

.ranking-card::before,
.match-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  content: "";
  background: linear-gradient(var(--orange), var(--brand-sky), var(--brand-blue));
}

.ranking-card .avatar {
  width: 62px;
  height: 62px;
  margin: 0;
  border-width: 4px;
  border-radius: 20px;
}

.ranking-number {
  font-size: 1.8rem;
  font-weight: 950;
}

.identity strong {
  display: block;
  font-size: 1.15rem;
}

.identity span {
  display: inline-block;
  margin-top: 4px;
  color: #bdeeff;
  font-weight: 780;
}

.score {
  min-width: 110px;
  padding: 12px 16px;
  border-radius: 18px;
  color: #06263b;
  text-align: center;
  background: linear-gradient(135deg, #d8f2ff, var(--brand-sky));
  box-shadow: 0 12px 26px rgba(25, 143, 217, 0.28);
}

.score strong {
  display: block;
  font-size: 1.8rem;
}

.score small {
  font-weight: 950;
  text-transform: uppercase;
}

.matches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.match-card {
  padding: 22px;
  border-radius: 26px;
}

.match-date {
  color: #7fdbff;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.teams {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 950;
}

.versus {
  color: #bdeeff;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
}

@keyframes float {
  50% {
    transform: translate(-22px, 24px) rotate(16deg);
  }
}

@keyframes popIn {
  to {
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scoreboardRoll {
  0% {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(-115%) rotateX(72deg) scale(0.92);
  }
  58% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(8%) rotateX(-10deg) scale(1.04);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) rotateX(0deg) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scoreboard-roll__char {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 820px) {
  .hero {
    border-radius: 28px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.85rem, 6.8vw, 3rem);
    letter-spacing: -0.035em;
  }

  .hero__stats,
  .podium,
  .matches {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    font-size: clamp(2rem, 10vw, 3.3rem);
  }

  .podium-card,
  .podium-card--1 {
    order: unset;
    height: auto;
  }

  .podium-card--2,
  .podium-card--3 {
    height: auto;
  }

  .ranking-card {
    grid-template-columns: 46px 62px 1fr;
  }

  .score {
    grid-column: 2 / -1;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .dashboard {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero {
    padding: 22px;
    border-radius: 24px;
  }

  .hero::after {
    width: 150px;
    height: 150px;
    border-width: 18px;
  }

  .hero__subtitle {
    font-size: 0.98rem;
  }

  h1 {
    font-size: clamp(1.35rem, 7.6vw, 1.95rem);
    letter-spacing: -0.025em;
    text-shadow: 0 4px 0 rgba(51, 102, 153, 0.72), 0 14px 28px rgba(0, 0, 0, 0.24);
  }

  .hero__stats {
    gap: 10px;
    margin-top: 22px;
  }

  .hero__stats div {
    padding: 14px 16px;
    border-radius: 18px;
  }

  .podium-card {
    padding: 18px;
    border-radius: 24px;
  }

  .podium-card,
  .podium-card--1 {
    padding: 18px 16px 0;
  }

  .podium-card__portrait,
  .podium-card--1 .podium-card__portrait {
    width: 116px;
    height: 116px;
    border-radius: 36px;
  }

  .podium-card .avatar,
  .podium-card--1 .avatar {
    width: 94px;
    height: 94px;
    border-radius: 29px;
  }

  .podium-base {
    width: calc(100% + 32px);
  }

  .ranking-card {
    grid-template-columns: 40px 56px 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
  }

  .ranking-card .avatar {
    width: 52px;
    height: 52px;
    border-radius: 17px;
  }

  .ranking-number {
    font-size: 1.25rem;
  }

  .identity strong {
    font-size: 1rem;
  }

  .score {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .match-card {
    padding: 18px;
  }
}
