:root {
  --blue: #334093;
  --green: #32A67D;
  --gray: #202328;
  --danger: #a94442;
  --bg: var(--blue);
  --pd-m: calc(5px + 2vw);
  --br-m: calc(5px + 1.1vw); /* 1440px ≈ 20px */

  --sp-s: calc(5px + 0.4vw); /* 1440px ≈ 10px */
  --sp-m: calc(5px + 0.7vw); /* 1440px ≈ 15px */
  --sp-l: calc(5px + 1.8vw); /* 1440px ≈ 30px */

  --fs-xs: calc(5px + 1.2vw); /* 1440px ≈ 16px */
  --fs-s: calc(5px + 1.6vw); /* 1440px ≈ 27px */
  --fs-m: calc(5px + 1.8vw); /* 1440px ≈ 30px */
  --fs-l: calc(5px + 2.6vw); /* 1440px ≈ 42px */
  --fs-xl: calc(5px + 3.1vw); /* 1440px ≈ 50px */
  --fs-xxl: calc(5px + 5.6vw); /* 1440px ≈ 85px */
  --fs-xxxl: calc(5px + 17vw); /* 1440px ≈ 250px */
}

* {
  box-sizing: border-box;
  outline: none;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  line-height: 1;
  font-family: "Montserrat", sans-serif;
}

body,
html {
  min-height: 100vh;
  height: 100vh;
  min-width: 320px;
  max-width: 100%;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  color: #FFFFFF;
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: normal;
}

body {
  position: relative;
  background-color: var(--bg);
}

.body__bg,
.body__bg2 {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.body__bg {
  opacity: 0.3;
  filter: blur(10px);
  background-image: conic-gradient(from 0deg at 50% 100%, transparent 6%, #ffffff78 0 8%, transparent 0 92%, #ffffff78 0 94%, transparent 0);
}

p {
  font-weight: inherit;
  font-size: inherit;
  color: inherit;
}

/* scrollbar */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* scoreboard */
.scoreboard {
  position: relative;
  height: fit-content;
  min-height: 100vh;
  width: 100vw;
  margin: 0 auto;
  display: grid;
  grid-template-rows: max-content max-content;
  align-content: center;
  overflow: scroll;
}

.scoreboard__table {
  height: fit-content;
  width: fit-content;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--fs-l);
}

.scoreboard__table-txt {
  position: relative;
  padding: calc(var(--br-m) / 1.5) var(--br-m);
}

.scoreboard__table-bg {
  width: 200%;
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  transform: skew(-35deg);
  background:var(--green);
  border-radius: 0 calc(var(--br-m) / 1.5) calc(var(--br-m) / 1.5) 0;
}

.extensional-time {
  position: absolute;
  bottom: 0;
  font-size: var(--fs-l);
  margin-left: auto;
  padding: 10px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.extensional-time--valid {
  background-color:  var(--green);
}

.extensional-time--exp {
  background-color:  var(--danger);
}
/* top */
.scoreboard__header {
  padding: var(--pd-m) var(--pd-m) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--sp-m);
}

.scoreboard__title {
  text-align: center;
  font-size: var(--fs-m);
  font-weight: 500;
  max-width: calc(100vw - ((5px + 17vw) * 2));
}

.scoreboard__timer {
  font-size: var(--fs-xxl) !important;
  font-weight: 600 !important;
  letter-spacing: 8px;
}

/* content */
.scoreboard__content {
  align-self: center;
  padding: 0 var(--pd-m) calc(var(--pd-m) * 2);
  display: grid;
  grid-template-columns: 1fr min-content 1fr;
  justify-content: center;
  align-items: flex-start;
  gap: var(--sp-l);
}

.scoreboard__content-center {
  display: grid;
  grid-template-rows: 1fr repeat(2, max-content);
  height: 100%;
  justify-content: center;
  align-items: center;
  gap: var(--sp-l);
  text-align: center;
}

.scoreboard__score-total {
  width: 100%;
  display: grid;
  align-items: center;
  grid-template-columns: 1fr max-content 1fr;
  gap: var(--sp-s);
  font-size: var(--fs-xxl);
  font-weight: 600;
}

.scoreboard__bestOf {
  font-size: var(--fs-xl);
}

.scoreboard__date {
  font-size: var(--fs-l);
}

.scoreboard__bo {
  margin-top: 15px;
  font-size: var(--fs-m);
}

.scoreboard__referee {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  direction: ltr;
  font-size: var(--fs-m);
}

.scoreboard__referee-title {
  font-size: var(--fs-s);
}

.scoreboard__participant {
  position: relative;
}

.participant {
  height: 100%;
  display: grid;
  justify-items: center;
  /*align-items: center;*/
  direction: ltr;
  grid-template-rows: repeat(2, max-content) 1fr;
  gap: var(--sp-m);
}

.participant__flag {
  display: flex;
  align-items: center;
  gap: var(--sp-s);
  font-size: var(--fs-m);
}

.participant__flag.second {
  flex-direction: row-reverse;
}

.participant__flag img {
  width: calc(5px + 4.5vw);
  min-width: calc(5px + 4.5vw);
  height: calc(5px + 4.5vw);
  object-fit: contain;
  overflow: hidden;
}

.scoreboard__participant .participant__info {
  text-align: end;
}

.participant__info {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  align-items: center;
  text-transform: uppercase;
  font-size: var(--fs-xl);
  line-height: 1.15;
}

.participant__info.second {
  flex-direction: row-reverse;
}

.participant__isActive {
  width: 20px;
  height: 150%;
  background-color: var(--green);
}

.participant__scoreboard {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.swap {
  direction: rtl;
}

.participant__score {
  font-size: var(--fs-xxxl);
  text-align: center;
  font-weight: 600;
}

.participant__break {
  font-size: var(--fs-xl);
  display: flex;
}

@media (min-width: 1220px) {
  .scoreboard__content {
    grid-template-columns: 1fr minmax(400px, max-content) 1fr;
  }
}

@media (max-width: 400px), (max-height: 250px) {
  .scoreboard__header {
    padding: 5px 5px 0;
  }

  .scoreboard__content {
    padding: 0 5px;
  }

  .participant__score {
    font-size: var(--fs-xxl);
  }

  .participant {
    gap: 3px;
  }

  .participant__isActive {
    width: 5px;
  }

  .participant__info {
    font-size: 12px;
  }

  .scoreboard__timer {
    font-size: 16px !important;
  }

  .scoreboard__content {
    gap: 5px;
  }

  .scoreboard__date {
    font-size: var(--fs-m);
  }
}