@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/Montserrat-Variable.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  font-family: "Montserrat", Arial, sans-serif;
  color: #f7f7f7;
  --page: #343434;
  --shell: #202124;
  --panel: #27282d;
  --panel-2: #2d2e34;
  --line: #363840;
  --soft-line: #2b2d33;
  --red: #f34145;
  --blue: #2584ed;
  --green: #05760c;
  --green-bright: #078814;
  --yellow: #f2d23c;
  --mint: #36d0a8;
  --cyan: #31b6aa;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: "Montserrat", Arial, sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  height: 100dvh;
  background: var(--page);
  font-family: "Montserrat", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea,
summary,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.player-viewport {
  position: absolute;
  inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  overflow: hidden;
}

.player-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 411px;
  height: var(--player-height, 823px);
  transform: translate(-50%, -50%) scale(var(--player-scale, 1));
  transform-origin: center;
  visibility: hidden;
}

.player-canvas.is-fitted {
  visibility: visible;
}

.player-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: var(--shell);
  box-shadow: 0 22px 70px #0008;
}

.player-shell::-webkit-scrollbar {
  display: none;
}

.player-toolbar {
  position: fixed;
  top: 18px;
  right: 8px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  transform: none;
}

.demo-badge {
  display: none;
}

.toolbar-button,
.player-menu summary {
  height: 25px;
  padding: 0 8px;
  border: 1px solid #4d5058;
  border-radius: 2px;
  background: #23242a;
  color: #c7c9d0;
  font-size: 14px;
  line-height: 23px;
  font-weight: 700;
  text-transform: uppercase;
}

.toolbar-button:disabled {
  color: #aeb1bb;
  opacity: 1;
}

.player-menu {
  position: relative;
}

.player-menu summary {
  display: flex;
  align-items: center;
  gap: 2px;
  border-color: #4d5058;
  background: #23242a;
  color: var(--yellow);
  list-style: none;
}

.player-menu summary::-webkit-details-marker {
  display: none;
}

.menu-options {
  position: absolute;
  top: 23px;
  right: 0;
  min-width: 128px;
  padding: 6px;
  border: 1px solid #44464e;
  border-radius: 3px;
  background: #25262b;
  box-shadow: 0 14px 30px #0008;
}

.menu-options button,
.menu-options a {
  display: block;
  width: 100%;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #f5f5f5;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.menu-options button:hover,
.menu-options a:hover {
  background: #33353d;
}

.event-header {
  position: sticky;
  top: 0;
  z-index: 70;
  order: 0;
  display: flex;
  align-items: center;
  flex: 0 0 61px;
  min-height: 0;
  margin: 0;
  padding: 0 86px 0 9px;
  overflow: hidden;
  background: #28292f;
  border: 1px solid #353741;
  border-bottom: 0;
  border-radius: 0;
}

.event-copy {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  overflow: hidden;
}

.event-copy h1 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0 0 2px;
  overflow: hidden;
  color: var(--yellow);
  font-size: 14px;
  line-height: 1.12;
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.event-copy p {
  margin: 0;
  overflow: hidden;
  color: var(--yellow);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.event-copy p span {
  margin-right: 4px;
}

.event-copy time {
  color: #f4f4f4;
}

.live-stage {
  order: 2;
  position: relative;
  flex: 0 0 247px;
  min-height: 180px;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: #050505;
  border: 1px solid #353741;
}

.video-window {
  position: absolute;
  inset: 0;
}

.video-window iframe,
.video-window video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}

.stream-placeholder {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #f5f5f5;
  text-align: center;
}

.stream-placeholder strong {
  font-size: 23px;
  line-height: 1.2;
  font-weight: 700;
}

.stream-placeholder > span:last-child,
.stream-mark {
  display: none;
}

.round-id-badge {
  position: absolute;
  left: 5px;
  top: 5px;
  z-index: 2;
  max-width: calc(100% - 12px);
  max-height: 24px;
  overflow: hidden;
  padding: 3px 5px;
  background: #000b;
  color: var(--yellow);
  font-size: 9px;
  line-height: 1.25;
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.countdown {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 3;
  min-width: 43px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  background: #ff3138;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.fight-result {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: #000;
  color: var(--blue);
  font-size: 46px;
  line-height: .9;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    -2px -2px 0 #dce6ff,
    2px -2px 0 #dce6ff,
    -2px 2px 0 #dce6ff,
    2px 2px 0 #dce6ff,
    0 5px 10px #000c;
}

.fight-result[data-result="MERON"] {
  color: var(--red);
}

.fight-result[data-result="DRAW"],
.fight-result[data-result="CANCELLED"] {
  color: #e6e6e6;
}

.fight-result small {
  display: block;
  max-width: 88%;
  margin-top: 10px;
  padding: 3px 8px;
  background: #000b;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  text-shadow: none;
}

.betting-panel {
  order: 3;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 0 0 4px;
  background: var(--shell);
}

.fight-info,
.side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fight-info {
  flex: 0 0 58px;
  min-height: 58px;
  border-left: 1px solid var(--soft-line);
  border-right: 1px solid var(--soft-line);
  background: var(--shell);
}

.fight-info > div {
  min-width: 0;
  border-bottom: 1px solid var(--soft-line);
}

.fight-info > div:first-child {
  border-right: 1px solid var(--soft-line);
}

.fight-info h2 {
  margin: 0;
  padding: 8px 4px 4px;
  color: #f0f0f2;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
}

.info-value {
  display: grid;
  min-height: 32px;
  place-items: center;
}

.bet-status {
  min-width: 82px;
  padding: 5px 9px 4px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.bet-status[data-status="OPEN"] {
  background: #0aa04e;
}

.bet-status[data-status="SETTLED"] {
  min-width: 82px;
  padding-inline: 8px;
  background: #61636c;
}

.fight-number {
  color: #fff;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}

.side-grid {
  flex: 0 0 auto;
  border-left: 1px solid var(--soft-line);
  border-right: 1px solid var(--soft-line);
}

.bet-side {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0 5px 7px;
  background: var(--shell);
  text-align: center;
}

.bet-side:first-child {
  border-right: 1px solid var(--soft-line);
}

.bet-side h2 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin: 0 -5px 6px;
  overflow: hidden;
  background: var(--red);
  color: #fff;
  font-size: 23px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.bet-side.wala h2 {
  background: var(--blue);
}

.bet-side.is-winner::after {
  content: "WINNER";
  position: absolute;
  z-index: 2;
  left: calc(50% + 42px);
  top: 15px;
  margin-left: 4px;
  color: var(--yellow);
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  animation: winnerBlink 950ms steps(2, end) infinite;
}

@keyframes winnerBlink {
  0%,
  45% { opacity: 1; }
  46%,
  100% { opacity: .25; }
}

@media (prefers-reduced-motion: reduce) {
  .bet-side.is-winner::after,
  .draw-row.is-winner .bet-button::after {
    animation: none;
  }
}

.pool {
  display: block;
  overflow: hidden;
  color: var(--yellow);
  font-size: 25px;
  line-height: 1.04;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payout {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  margin: 5px 0 6px;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payout span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-bet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 20px;
  margin: 0 0 6px;
  color: var(--mint);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.return-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  max-width: 104px;
  overflow: hidden;
  padding: 2px 4px;
  background: #28769b;
  color: #eaffff;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  background: currentColor;
  mask: var(--google-icon) center / contain no-repeat;
}

.google-icon.add-circle {
  --google-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2Z'/%3E%3C/svg%3E");
}

.google-icon.arrow-circle {
  width: 14px;
  height: 14px;
  --google-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-.2 15L10.4 15.6l2.6-2.6H7v-2h6l-2.6-2.6L11.8 7 17 12l-5.2 5Z'/%3E%3C/svg%3E");
}

.bet-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 33px;
  border: 1px solid #0c8c16;
  border-radius: 2px;
  background: var(--green);
  color: #f6fff7;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
}

.bet-button .google-icon {
  width: 14px;
  height: 14px;
}

.bet-button:hover:enabled {
  background: var(--green-bright);
}

.bet-button:disabled {
  border-color: #075f0d;
  background: #055f0a;
  color: #96b899;
  opacity: 1;
}

.amount-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  background: var(--panel);
  border-left: 1px solid var(--soft-line);
  border-right: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}

.balance {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 26px;
  min-height: 26px;
  margin: 0;
  padding: 4px 8px 4px 4px;
  color: #b8bbc4;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
}

.balance strong {
  margin-left: 4px;
  color: var(--yellow);
  font-size: 14px;
  font-weight: 700;
}

.amount-field {
  display: flex;
  flex: 0 0 40px;
  height: 40px;
  margin: 2px 5px 0;
  overflow: hidden;
  border: 1px solid #4b4d57;
  background: var(--panel-2);
}

.amount-field input {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  border: 0;
  background: var(--panel-2);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  appearance: textfield;
}

.amount-field input::-webkit-inner-spin-button {
  appearance: none;
}

.amount-field input::placeholder {
  color: #858895;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.amount-field button {
  flex: 0 0 66px;
  border: 0;
  border-left: 1px solid #5a5c65;
  background: #282930;
  color: #858895;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.chip-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  flex: 0 0 45px;
  padding: 10px 5px 10px;
}

.chip-row button {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 27px;
  padding: 0 3px;
  border: 1px solid var(--cyan);
  border-radius: 2px;
  background: #2d3035;
  color: #d9fffa;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}

.chip-row button.is-active {
  background: #144941;
  box-shadow: inset 0 0 0 1px #66fff0;
}

.draw-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: center;
  flex: 0 0 42px;
  padding: 0 5px 8px;
}

.draw-row.is-winner .bet-button::after {
  content: "WINNER";
  margin-left: 4px;
  color: var(--yellow);
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  animation: winnerBlink 950ms steps(2, end) infinite;
}

.draw-row .bet-button {
  position: relative;
  height: 32px;
  border-color: #4b4d57;
  border-radius: 2px 0 0 2px;
}

.draw-bet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 32px;
  overflow: hidden;
  border: 1px solid #4b4d57;
  border-left: 0;
  border-radius: 0 2px 2px 0;
  background: var(--panel-2);
  color: var(--mint);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.draw-stake {
  flex: 0 0 auto;
}

.draw-bet .return-value {
  flex: 0 1 auto;
  max-width: 104px;
  padding: 2px 3px;
  font-size: 12px;
}

.draw-bet .google-icon.arrow-circle {
  width: 14px;
  height: 14px;
}

.trend-panel {
  flex: 0 0 346px;
  min-width: 0;
  padding: 0 5px 8px;
}

.trend-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 22px;
  color: #b7bac4;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
}

.trend-scroll {
  height: 312px;
  overflow-x: scroll;
  overflow-y: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  scrollbar-color: #777b87 #2a2b31;
  scrollbar-width: auto;
}

.trend-scroll::-webkit-scrollbar {
  display: block;
  height: 10px;
}

.trend-scroll::-webkit-scrollbar-track {
  background: #2a2b31;
}

.trend-scroll::-webkit-scrollbar-thumb {
  background: #777b87;
  border-radius: 999px;
}

.trend-table {
  width: max-content;
  min-width: max-content;
  border-collapse: collapse;
  table-layout: fixed;
  background: #202126;
}

.trend-table td {
  width: 30px;
  height: 30px;
  min-width: 30px;
  max-width: 30px;
  padding: 0;
  border: 1px solid #343640;
  text-align: center;
  vertical-align: middle;
}

.trend-cell {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #ffffff3d, 0 1px 3px #0008;
}

.trend-cell.meron {
  background: var(--red);
}

.trend-cell.wala {
  background: var(--blue);
}

.trend-cell.draw {
  background: #0aa04e;
}

.trend-cell.cancelled {
  background: #777b87;
}

.trend-empty {
  height: 300px;
  color: #777b87;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
}

.bet-summary,
.bet-hint {
  display: none;
}

.player-footer {
  order: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 0;
  min-height: 0;
  height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.player-footer strong {
  margin-left: 4px;
  color: var(--yellow);
  font-weight: 800;
}

.guide-dialog {
  width: min(390px, calc(100% - 28px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: auto;
  border: 1px solid #4a4d57;
  border-radius: 6px;
  background: #24252a;
  color: #f5f5f5;
  font-family: inherit;
  box-shadow: 0 18px 50px #0009;
}

.guide-dialog::backdrop {
  background: #000a;
}

.guide-dialog header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #1f2025;
  border-bottom: 1px solid #3a3c45;
}

.guide-dialog h2 {
  margin: 0;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 800;
}

.guide-dialog button {
  width: 32px;
  height: 32px;
  border: 1px solid #4c4f59;
  border-radius: 3px;
  background: #ffffff08;
  color: #fff;
  font-size: 22px;
}

.rules {
  padding: 4px 17px 12px;
  font-size: 12px;
  line-height: 1.65;
}

.recent-panel {
  padding: 12px 14px 14px;
}

.recent-panel > span {
  display: block;
  margin-bottom: 8px;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 800;
}

.recent-panel ol {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.result-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  background: #2b2d33;
  border: 1px solid #3d4049;
  border-radius: 4px;
}

.result-cell strong {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.result-cell[data-result="WALA"] strong {
  color: var(--blue);
}

.result-cell[data-result="DRAW"] strong {
  color: var(--mint);
}

.result-cell[data-result="CANCELLED"] strong {
  color: #babdc7;
}

.result-cell small,
.empty-results {
  color: #c8cad2;
  font-size: 11px;
  font-weight: 700;
}

.load-error {
  position: absolute;
  z-index: 30;
  top: 54px;
  left: 12px;
  right: 12px;
  margin: 0;
  padding: 12px;
  border: 1px solid #86434a;
  background: #542b2ff5;
  color: #ffc5c5;
  font-size: 13px;
}

.toast {
  position: absolute;
  bottom: 34px;
  left: 50%;
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 24px);
  transform: translateX(-50%);
  padding: 10px 14px;
  border: 1px solid #5b5e67;
  border-radius: 3px;
  background: #26282ef5;
  box-shadow: 0 8px 40px #0008;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.toast[data-error="true"] {
  border-color: #b8555c;
  background: #542b2b;
}

.toast-side.meron {
  color: var(--red);
}

.toast-side.wala {
  color: var(--blue);
}

.toast-side.draw {
  color: var(--yellow);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
