:root {
  --font-main: "Helvetica Neue", Arial, Helvetica, sans-serif;
  --board-width: min(1200px, 96vw);
  --rank-width: 46px;
  --score-width: 220px;
  --point-width: 150px;
  --row-height: 58px;
  --row-gap: 6px;
  --line-light: #ececec;
  --line-mid: #cfcfcf;
  --line-dark: #707070;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #020507;
  font-family: var(--font-main);
}

.scene {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 42px;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 42%, rgba(24, 37, 52, 0.42) 0%, rgba(2, 5, 7, 0) 42%),
    radial-gradient(circle at 20% 12%, rgba(70, 87, 104, 0.2) 0%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(180deg, #071015 0%, #020507 48%, #010203 100%);
}

.scene::before,
.scene::after,
.ranking-board::before {
  content: "";
  position: absolute;
  pointer-events: none;
}

.scene::before {
  inset: -12%;
  z-index: -3;
  opacity: 0.96;
  background:
    linear-gradient(132deg,
      transparent 0%, transparent 6%,
      rgba(203, 211, 219, 0.96) 6.2%,
      rgba(255, 255, 255, 0.98) 8.1%,
      rgba(119, 129, 142, 0.94) 9.6%,
      rgba(20, 45, 86, 0.9) 10.3%,
      rgba(24, 58, 112, 0.92) 14.7%,
      transparent 15%, transparent 32%,
      rgba(9, 14, 22, 0.82) 32.3%,
      rgba(28, 36, 48, 0.86) 45%,
      rgba(6, 9, 14, 0.82) 45.3%,
      transparent 45.7%, transparent 66%,
      rgba(41, 83, 151, 0.82) 66.2%,
      rgba(24, 54, 105, 0.88) 76.8%,
      rgba(123, 134, 149, 0.86) 77.2%,
      rgba(225, 230, 235, 0.92) 78.2%,
      transparent 78.8%
    );
}

.scene::after {
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(132deg,
      transparent 0%, transparent 20%,
      rgba(255, 255, 255, 0.08) 20.2%,
      rgba(255, 255, 255, 0.2) 20.8%,
      rgba(255, 255, 255, 0.05) 21.6%,
      transparent 22.2%, transparent 58%,
      rgba(255, 255, 255, 0.06) 58.2%,
      rgba(130, 146, 166, 0.15) 59.5%,
      transparent 60.5%
    ),
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.56) 0%,
      rgba(0, 0, 0, 0.18) 25%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(0, 0, 0, 0.22) 74%,
      rgba(0, 0, 0, 0.5) 100%);
}

.ranking-board {
  position: relative;
  width: var(--board-width);
  overflow: visible;
  background: linear-gradient(180deg, rgba(9, 12, 16, 0.9) 0%, rgba(3, 5, 8, 0.84) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 26px 84px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(1px);
}

.ranking-board::before {
  inset: 0;
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.03) 0%,
      rgba(255, 255, 255, 0.01) 22%,
      rgba(255, 255, 255, 0.08) 50%,
      rgba(255, 255, 255, 0.01) 78%,
      rgba(255, 255, 255, 0.03) 100%);
}

.leader-header {
  position: relative;
  z-index: 2;
  height: 78px;
  display: flex;
  align-items: center;
  padding: 0 56px;
  background: linear-gradient(180deg, #0a0a0a 0%, #171717 45%, #050505 72%, #171717 100%);
  border-top: 2px solid #5f6468;
  border-left: 2px solid #5f6468;
  border-right: 2px solid #222;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.leader-title {
  margin: 0;
  color: #f4f4f4;
  font-size: clamp(30px, 4.15vw, 49px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 0.82),
    0 0 1px rgba(255, 255, 255, 0.35);
  transform: scaleX(0.98);
  transform-origin: left center;
}

.header-emblem {
  position: absolute;
  top: 6px;
  right: 54px;
  width: 66px;
  height: 66px;
  border: 2px solid #111;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #f8f8f8 0 19%, #111 20% 26%, transparent 27%),
    conic-gradient(#fff 0 11%, #111 11% 17%, #fff 17% 28%, #111 28% 36%, #fff 36% 47%, #111 47% 55%, #fff 55% 66%, #111 66% 73%, #fff 73% 84%, #111 84% 91%, #fff 91% 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.65);
}

.header-emblem::after {
  content: "POKER";
  position: absolute;
  inset: 19px 10px auto;
  height: 18px;
  display: grid;
  place-items: center;
  color: #1a1a1a;
  background: #fff;
  border-top: 2px solid #b91c1c;
  border-bottom: 2px solid #b91c1c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.event-strip {
  position: relative;
  z-index: 2;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 56px;
  color: #d7d7d7;
  background: linear-gradient(90deg, #3a3a3a 0%, #303030 28%, #6b6b6b 56%, #3b3b3b 82%, #161616 100%);
  border-top: 2px solid #b08a2a;
  border-left: 2px solid #303030;
  border-right: 2px solid #222;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9);
}

.column-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--rank-width) 1fr var(--score-width) var(--point-width);
  align-items: center;
  height: 52px;
  color: #ededed;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(6, 6, 6, 0.94) 45%, rgba(28, 28, 28, 0.9) 76%, rgba(4, 4, 4, 0.96) 100%);
  text-shadow: 0 3px 2px rgba(0, 0, 0, 0.92);
}

.column-header span {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.085em;
}

.label-player {
  grid-column: 2;
  padding-left: 28px;
}

.label-chips,
.label-bbs {
  text-align: right;
  padding-right: 28px;
}

.rows {
  position: relative;
  z-index: 2;
}

.rank-row {
  display: grid;
  grid-template-columns: var(--rank-width) 1fr var(--score-width) var(--point-width);
  align-items: stretch;
  height: var(--row-height);
  margin-bottom: var(--row-gap);
  color: #050505;
}

.rank-row:last-child {
  margin-bottom: 0;
}

.rank-number {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f1f1f1;
  background: linear-gradient(#030303 0%, #090909 68%, #4d4d4d 69%, #111111 100%);
  border-top: 2px solid #2c2c2c;
  border-right: 1px solid #2b2b2b;
  border-bottom: 2px solid #070707;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.8);
}

.rank-number::before,
.rank-number::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.rank-number::before {
  top: calc(68% - 1px);
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.rank-number::after {
  top: 68%;
  bottom: -2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.08) 18%, rgba(0, 0, 0, 0.62) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -7px 8px rgba(0, 0, 0, 0.85);
}

.player-cell,
.score-cell,
.point-cell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  background: linear-gradient(#fff 0%, #fff 68%, #d9d9d9 69%, #bcbcbc 100%);
  border-top: 2px solid var(--line-light);
  border-bottom: 2px solid var(--line-dark);
}

.player-cell {
  gap: 14px;
  overflow: hidden;
  padding: 0 24px 0 20px;
  border-left: 1px solid var(--line-mid);
}

.player-cell::after {
  content: "";
  position: absolute;
  left: 48%;
  right: 24%;
  top: 64%;
  bottom: 3px;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: screen;
  filter: blur(0.6px);
  background:
    radial-gradient(ellipse at 50% 64%,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0.98) 16%,
      rgba(255, 255, 255, 0.76) 30%,
      rgba(248, 244, 236, 0.42) 46%,
      rgba(255, 255, 255, 0) 72%),
    linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.36) 26%,
      rgba(255, 255, 255, 0.95) 52%,
      rgba(255, 255, 255, 0.32) 74%,
      rgba(255, 255, 255, 0) 100%);
}

.player-cell > * {
  position: relative;
  z-index: 2;
}

.score-cell,
.point-cell {
  justify-content: flex-end;
  padding-right: 28px;
  border-left: 2px solid var(--line-mid);
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.8);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.point-cell {
  border-right: 2px solid var(--line-mid);
  box-shadow:
    inset 2px 0 0 rgba(255, 255, 255, 0.8),
    inset -2px 0 0 rgba(255, 255, 255, 0.8);
}

.flag {
  flex: 0 0 auto;
  width: 34px;
  height: 23px;
  background: #fff;
  border: 1px solid #d5d5d5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.flag.finland {
  background:
    linear-gradient(to bottom, transparent 0 38%, #1453a4 38% 62%, transparent 62%),
    linear-gradient(to right, transparent 0 31%, #1453a4 31% 48%, transparent 48%),
    #fff;
}

.flag.japan {
  position: relative;
}

.flag.japan::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e6002d;
  transform: translate(-50%, -50%);
}

.flag.lithuania {
  background: linear-gradient(to bottom, #f7c600 0 33.33%, #168b62 33.33% 66.66%, #c52739 66.66% 100%);
}

.flag.bulgaria {
  background: linear-gradient(to bottom, #fff 0 33.33%, #00966e 33.33% 66.66%, #d62612 66.66% 100%);
}

.flag.usa {
  position: relative;
  background:
    linear-gradient(to bottom,
      #b22234 0 7.69%, #fff 7.69% 15.38%,
      #b22234 15.38% 23.07%, #fff 23.07% 30.76%,
      #b22234 30.76% 38.45%, #fff 38.45% 46.14%,
      #b22234 46.14% 53.83%, #fff 53.83% 61.52%,
      #b22234 61.52% 69.21%, #fff 69.21% 76.9%,
      #b22234 76.9% 84.59%, #fff 84.59% 92.28%,
      #b22234 92.28% 100%);
}

.flag.usa::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46%;
  height: 54%;
  background: #3c3b6e;
}

.flag.spain {
  background: linear-gradient(to bottom, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%);
}

.flag.france {
  background: linear-gradient(to right, #0055a4 0 33.33%, #fff 33.33% 66.66%, #ef4135 66.66% 100%);
}

.name {
  min-width: 0;
  overflow: hidden;
  color: #050505;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: scaleX(0.98);
  transform-origin: left center;
}

.leader-footer {
  position: relative;
  z-index: 2;
  height: 58px;
  margin-top: 140px;
  display: grid;
  grid-template-columns: 180px 1fr 220px;
  align-items: center;
  padding: 0 48px;
  color: #f4f4f4;
  background: linear-gradient(90deg, #111 0%, #202020 16%, #5f5f5f 45%, #2c2c2c 72%, #d9d9d9 100%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 -18px 40px rgba(0, 0, 0, 0.4);
}

.footer-brand-left,
.footer-brand-right,
.footer-average {
  font-family: var(--font-main);
  text-shadow: 0 3px 2px rgba(0, 0, 0, 0.86);
}

.footer-brand-left {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.06em;
  transform: scaleX(0.9);
  transform-origin: left center;
}

.footer-average {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.footer-brand-right {
  display: inline-flex;
  justify-self: end;
  align-items: flex-end;
  justify-content: flex-end;
  color: #111;
  line-height: 1;
  text-align: right;
  text-shadow: none;
  white-space: nowrap;
}

.footer-brand-right .g-black,
.footer-brand-right .g-red {
  display: inline-block;
  font-size: 32px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.08em;
  transform: skewX(-8deg) scaleX(0.96);
  transform-origin: center bottom;
}

.footer-brand-right .g-black {
  color: #111;
}

.footer-brand-right .g-red {
  margin-left: -2px;
  color: #cf2027;
}

.footer-brand-right .poker-text {
  display: inline-block;
  margin-left: 5px;
  color: #111;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  transform: scaleX(0.98);
  transform-origin: left bottom;
}

@media (max-width: 900px) {
  :root {
    --rank-width: 42px;
    --score-width: 170px;
    --point-width: 95px;
    --row-height: 62px;
  }

  .name {
    font-size: 23px;
  }

  .score-cell,
  .point-cell {
    padding-right: 20px;
    font-size: 25px;
  }
}

@media (max-width: 640px) {
  :root {
    --rank-width: 34px;
    --score-width: 116px;
    --point-width: 58px;
    --row-height: 52px;
    --row-gap: 4px;
  }

  .ranking-board {
    width: 100vw;
    border-left: 0;
    border-right: 0;
  }

  .rank-number {
    font-size: 20px;
  }

  .player-cell {
    gap: 8px;
    padding-left: 10px;
    padding-right: 12px;
  }

  .flag {
    width: 30px;
    height: 20px;
  }

  .name {
    font-size: 17px;
  }

  .score-cell,
  .point-cell {
    padding-right: 12px;
    font-size: 18px;
  }
}
