:root {
  --felt: #0d4938;
  --felt2: #083729;
  --gold: #e2bd70;
  --cream: #f5f1e8;
  --ink: #17251f;
  --muted: #a9c2b7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  padding: 32px 16px;
  font-family: Inter, Arial, sans-serif;
  color: var(--cream);
  background: radial-gradient(ellipse at top, #17634b 0, #0a352a 58%, #061f19 100%);
}
.wrap {
  width: min(960px, 100%);
  margin: auto;
}
header {
  text-align: center;
  margin-bottom: 18px;
}
.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 11px;
  font-weight: 700;
}
h1 {
  margin: 8px 0 7px;
  font-family: Georgia, serif;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 500;
}
header p {
  margin: 0;
  color: #c4d7cf;
  font-size: 14px;
}
.panel {
  background: rgba(4, 31, 24, 0.78);
  border: 1px solid rgba(226, 189, 112, 0.27);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 18px 50px #00150f55;
}
.scores {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
}
.scores .player {
  border: 2px solid rgba(187, 187, 187, 0.25);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}
.scores .player label {
  position: relative;
  padding-right: 25px;
  cursor: pointer;
}
.scores .player label::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: 2px 2px 3px #323232;
  background-color: rgba(114, 114, 114, 0.5);
}
.scores .player.active {
  border-color: #41ff00;
}
.scores .player.active label::after {
  background-color: #41ff00;
  box-shadow: 0 0 12px #41ff00, 0 0 60px #41ff00;
}
.scores .midPlace {
  text-align: center;
}
.scores .midPlace .breakWrapper {
  margin-bottom: 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(204, 204, 204, 0.3);
  cursor: pointer;
}
.scores .midPlace .breakWrapper .breaktitle {
  font-size: 12px;
  margin-bottom: 5px;
}
.scores .midPlace .breakWrapper .break {
  font-weight: 600;
  font-size: 18px;
}
.player label,
.field-label {
  display: block;
  margin-bottom: 9px;
  color: #c6d8d0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
input[type="number"],
input[type="text"] {
  width: 100%;
  min-width: 0;
  border: 1px solid #477564;
  border-radius: 10px;
  padding: 15px 13px;
  background: #f8f6ef;
  color: #14271f;
  font-size: 27px;
  font-weight: 700;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #e2bd702b;
}
.vs {
  padding-bottom: 17px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 18px;
}
.section {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid #ffffff20;
}
.section h2 {
  margin: 0 0 6px;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 500;
}
.hint {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.table-fields {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: start;
}
.reds input {
  max-width: 180px;
}
.balls {
  display: grid;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  gap: 8px;
}
.ball-option {
  position: relative;
}
.ball-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ball-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 5px;
  border: 1px solid #ffffff2a;
  border-radius: 10px;
  cursor: pointer;
  color: #d6e4de;
  font-size: 11px;
  transition: 0.15s;
}
.ball-option input:checked + label {
  border-color: var(--gold);
  background: #e2bd7018;
  color: #fff;
  box-shadow: inset 0 0 0 1px #e2bd7055;
}
.ball {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  box-shadow: inset -4px -5px 7px #0005, inset 3px 3px 5px #fff6, 0 2px 4px #0006;
}
.ball.yellow {
  background: #f3d52f;
}
.ball.green {
  background: #178346;
}
.ball.brown {
  background: #75432a;
}
.ball.blue {
  background: #2675c9;
}
.ball.pink {
  background: #ee91b5;
}
.ball.black {
  background: #171717;
}
.settings {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
select {
  border: 1px solid #477564;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8f6ef;
  color: #14271f;
  font-size: 14px;
}
.results {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.metric {
  padding: 16px 12px;
  border: 1px solid #ffffff20;
  border-radius: 12px;
  background: #ffffff09;
  text-align: center;
}
.metric .value {
  display: block;
  color: var(--gold);
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.2;
}
.metric .name {
  display: block;
  margin-top: 7px;
  color: #c4d7cf;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.status {
  margin-top: 15px;
  padding: 17px 18px;
  border-radius: 12px;
  background: #f4f0e6;
  color: #17251f;
}
.status strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 600;
}
.status span {
  display: block;
  margin-top: 5px;
  color: #52635b;
  font-size: 13px;
  line-height: 1.5;
}
.status.warning {
  background: #fff0d7;
}
.status.safe {
  background: #dff2e5;
}
.footnote {
  margin: 18px 2px 0;
  color: #a9c2b7;
  font-size: 11px;
  line-height: 1.6;
}
.reset {
  border: 1px solid #d5bd82;
  border-radius: 8px;
  padding: 9px 15px;
  color: #f1d89d;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}
.reset:hover {
  background: #ffffff12;
}
/*
.buttonsWrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  .selectplayerbtn {
    flex: 1;
    padding: 5px;
    border: 1px solid #d5bd82;
    color: #f1d89d;
    border-radius: 5px;
    font-weight: 500;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.5;
    &.active {
      background-color: #ffcb4d;
      color: #000;
      opacity: 1;
    }
    @media(min-width: 768px) {
      padding: 10px 5px;
    }
  }
}
*/
.ballsWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}
.ballsWrapper .ballSingle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset -4px -5px 7px #0005, inset 3px 3px 5px #fff6, 0 2px 4px #0006;
}
.ballsWrapper .ballSingle.red {
  background-color: red;
}
.ballsWrapper .ballSingle.yellow {
  background-color: #f3d52f;
}
.ballsWrapper .ballSingle.green {
  background-color: #178346;
}
.ballsWrapper .ballSingle.brown {
  background-color: #75432a;
}
.ballsWrapper .ballSingle.blue {
  background-color: #2675c9;
}
.ballsWrapper .ballSingle.pink {
  background-color: #ee91b5;
}
.ballsWrapper .ballSingle.black {
  background-color: #171717;
}
@media (min-width: 768px) {
  .ballsWrapper .ballSingle {
    width: 25px;
    height: 25px;
  }
}
.ballsWrapper .undoConfirmationBtn {
  border: 1px solid #d5bd82;
  border-radius: 8px;
  padding: 9px 15px;
  color: #f1d89d;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  border-radius: 5px;
  font-size: 12px;
  padding: 6px 12px;
  font-weight: 400;
}
.ballsWrapper .undoConfirmationBtn:hover {
  background: #ffffff12;
}
@media (min-width: 768px) {
  .ballsWrapper {
    gap: 20px;
  }
}
.framesituation .resetBtnWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 16px;
}
.framesituation .resetBtnWrapper button {
  min-width: 135px;
  transition: all 0.3s ease;
}
.framesituation .resetBtnWrapper .btnShare {
  min-width: 135px;
  height: 35px;
  font-size: 13px;
}
.framesituation .resetBtnWrapper .btnShare.hide {
  display: none;
}
.framesituation .resetBtnWrapper button.game {
  border: 1px solid #d5bd82;
  border-radius: 8px;
  padding: 9px 15px;
  color: #000;
  background: #f1d89d;
  cursor: pointer;
  font-weight: 700;
}
.framesituation .resetBtnWrapper button.game:hover {
  background: #f1d89dba;
}
@media (max-width: 767px) {
  body {
    padding: 22px 12px;
  }
  .panel {
    padding: 18px 14px;
  }
  .table-fields {
    grid-template-columns: 1fr;
  }
  .reds input {
    max-width: none;
  }
  .balls {
    grid-template-columns: repeat(3, 1fr);
  }
  .results {
    grid-template-columns: 1fr 1fr;
  }
  .metric:last-child {
    grid-column: span 2;
  }
  .hint,
  .status span {
    display: none;
  }
  .status strong {
    font-size: 16px;
    text-align: center;
  }
  .resetBtnWrapper {
    text-align: center;
  }
  .section h2 {
    margin-bottom: 11px;
  }
  .panel {
    display: flex;
    flex-direction: column;
  }
  .panel .scoresWrapper {
    order: 1;
  }
  .panel .framesituation {
    order: 2;
  }
  .panel .whatsleftonthetable {
    order: 3;
  }
  .panel .footnotesection {
    order: 4;
  }
  input[type="number"],
  input[type="text"] {
    padding: 8px 13px;
    border-radius: 6px;
    font-size: 22px;
  }
  .results {
    margin-top: 10px;
  }
  .metric {
    padding: 9px 12px;
  }
  .metric .value {
    font-size: 22px;
  }
}
.messageToast {
  background-color: #ffffff;
  color: #000000;
  padding: 10px 20px;
  border-radius: 6px;
  text-align: center;
  position: fixed;
  min-width: 300px;
  font-size: 14px;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 5px 15px 5px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}
.hidden {
  pointer-events: none;
  bottom: -10%;
}
.screenonswitchWrapper {
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.screenonswitchWrapper .screenOnOuter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.screenonswitchWrapper .screenOnOuter .title {
  font-size: 12px;
  font-weight: 400;
}
.screenonswitchWrapper .screenOnOuter .switchOuter .hk-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.screenonswitchWrapper .screenOnOuter .switchOuter .hk-toggle input {
  display: none;
}
.screenonswitchWrapper .screenOnOuter .switchOuter .hk-toggle label {
  width: 42px;
  height: 22px;
  border-radius: 40px;
  position: relative;
  cursor: pointer;
  background: #10261e;
  box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
}
.screenonswitchWrapper .screenOnOuter .switchOuter .hk-toggle label::after {
  content: "";
  width: 16px;
  height: 16px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  transition: 0.35s;
  background: #9aa0a6;
}
.screenonswitchWrapper .screenOnOuter .switchOuter .hk-toggle input:checked + label {
  background: #008d23;
}
.screenonswitchWrapper .screenOnOuter .switchOuter .hk-toggle input:checked + label::after {
  transform: translateX(20px);
  background: #fff;
}
.screenonswitchWrapper .settingsBtn {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.screenonswitchWrapper .settingsBtn .title {
  font-size: 12px;
  font-weight: 400;
}
.screenonswitchWrapper .settingsBtn .iconSetting img {
  display: block;
  width: 28px;
}
@media (min-width: 992px) {
  .screenonswitchWrapper .settingsBtn {
    flex-direction: row-reverse;
  }
}
/*
.customBtnStyle {
  cursor: pointer;
  border: 1px solid #d5bd82;
  border-radius: 5px;
  font-size: 12px;
  padding: 6px 12px;
  color: #f1d89d;
  background: transparent;
  cursor: pointer;
  &:hover {
    background: #ffffff12;
  }
}
  */
.customBtnStyle {
  border: 1px solid #d5bd82;
  border-radius: 8px;
  padding: 9px 15px;
  color: #f1d89d;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}
.customBtnStyle:hover {
  background: #ffffff12;
}
.customModalWrapper {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.customModalWrapper .customModal {
  position: absolute;
  max-width: 340px;
  width: 100%;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  color: #000;
  border-radius: 15px;
  padding: 42px 25px 30px;
  text-align: center;
  z-index: 9;
  max-height: calc(100% - 25%);
  overflow-y: auto;
}
.customModalWrapper .customModal .closePopupBtn {
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 9px;
  right: 10px;
  cursor: pointer;
  background-color: #d8d8d8;
  border-radius: 50%;
  padding: 6px;
}
.customModalWrapper .customModal .closePopupBtn img {
  max-width: 100%;
}
.customModalWrapper .customModal .custompopuptitle {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.customModalWrapper .customModal .custompopuptext {
  margin-bottom: 18px;
  line-height: 1.4;
}
.customModalWrapper .customModal .btnWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.customModalWrapper .customModal .btnWrapper .btnCustom {
  border: 1px solid #d5bd82;
  border-radius: 8px;
  padding: 9px 15px;
  color: #f1d89d;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  min-width: 110px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.customModalWrapper .customModal .btnWrapper .btnCustom:hover {
  background: #ffffff12;
}
.customModalWrapper .customModal .btnWrapper .btnCustom.btnCancel {
  border-color: #000;
  color: #000;
}
.customModalWrapper .customModal .btnWrapper .btnCustom.btnCancel:hover {
  background-color: #d9d9d9;
}
.customModalWrapper .customModal .btnWrapper .btnCustom.btnSave {
  border-color: #17634b;
  background-color: #17634b;
  color: #fff;
}
.customModalWrapper .customModal .btnWrapper .btnCustom.btnSave.hide {
  display: none;
}
.customModalWrapper .customModal .btnWrapper .btnCustom.btnSave:hover {
  background-color: #1e7b5e;
}
@media (min-width: 576px) {
  .customModalWrapper .customModal {
    max-width: 550px;
  }
}
.customModalWrapper .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}
.customModalWrapper .overlay.pointernone {
  pointer-events: none;
}
.customModalWrapper.show {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}
.frameHistoryWrapper .frameHistoryPopup .custompopuptext {
  max-height: 300px;
  overflow-y: auto;
}
.frameHistoryWrapper .frameHistoryPopup .custompopuptext .frameHistoryItem h4 {
  margin-bottom: 5px;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .undoText span {
  position: relative;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .undoText span::after {
  content: '';
  display: inline-block;
  vertical-align: top;
  margin-left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset -4px -5px 7px #0005, inset 3px 3px 5px #fff6, 0 2px 4px #0006;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .undoText span.red::after {
  background-color: red;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .undoText span.yellow::after {
  background-color: #f3d52f;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .undoText span.green::after {
  background-color: #178346;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .undoText span.brown::after {
  background-color: #75432a;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .undoText span.blue::after {
  background-color: #2675c9;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .undoText span.pink::after {
  background-color: #ee91b5;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .undoText span.black::after {
  background-color: #171717;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .btnWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .btnWrapper .btnCustom {
  border: 1px solid #d5bd82;
  border-radius: 8px;
  padding: 9px 15px;
  color: #f1d89d;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  min-width: 110px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .btnWrapper .btnCustom:hover {
  background: #ffffff12;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .btnWrapper .btnCustom.btnYes {
  border-color: #17634b;
  background-color: #17634b;
  color: #fff;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .btnWrapper .btnCustom.btnYes:hover {
  background-color: #1e7b5e;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .btnWrapper .btnCustom.btnNo {
  border-color: #000;
  color: #000;
}
.undoConfirmationPopupWrapper .undoConfirmationPopup .btnWrapper .btnCustom.btnNo:hover {
  background-color: #d9d9d9;
}
.breakHistoryPopupWrapper .breakHistoryPopup .custompopuptext .ballsWrapper {
  flex-wrap: wrap;
  gap: 15px;
  padding-top: 10px;
}
.breakHistoryPopupWrapper .breakHistoryPopup .custompopuptext .ballsWrapper .ballSingle {
  font-size: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scoresWrapper .gameScore {
  display: none;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.scoresWrapper .gameScore .gameof {
  margin: 0 15px;
}
.scoresWrapper .gameScore.show {
  display: flex;
}
.settingsPopupWrapper .settingsPopup .custompopuptext .sidebyside {
  display: flex;
  align-items: center;
  gap: 10px;
}
.settingsPopupWrapper .settingsPopup .custompopuptext .formGroup {
  margin-bottom: 10px;
}
.settingsPopupWrapper .settingsPopup .custompopuptext .formGroup .formText {
  text-align: left;
  margin-bottom: 3px;
}
.settingsPopupWrapper .settingsPopup .custompopuptext .formGroup .formField input[type="number"],
.settingsPopupWrapper .settingsPopup .custompopuptext .formGroup .formField input[type="text"] {
  font-weight: 400;
  font-size: 18px;
}
.btnWrapper .btnShare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  padding: 9px 15px;
  min-width: 110px;
  font-weight: 500;
  text-decoration: none;
  color: white;
  background-color: #1bd741;
  border-color: #1bd741;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btnWrapper .btnShare .iconHolder {
  display: flex;
  align-items: center;
}
.btnWrapper .btnShare .iconHolder img {
  width: 23px;
}
.btnWrapper .btnShare:hover {
  background-color: #13a12f;
  border-color: #13a12f;
}
.noticeWrapper .custompopuptext .text {
  font-weight: 500;
  color: #7d7d7d;
  font-size: 16px;
  margin-bottom: 5px;
}
.noticeWrapper .custompopuptext .playername {
  margin-bottom: 5px;
}
.noticeWrapper .custompopuptext .playerScores {
  font-weight: 600;
  font-size: 20px;
}
.noticeWrapper .btnWrapper .btnShare {
  height: 40px;
}
