@charset "UTF-8";

body {
  margin: 0;
  padding: 0;
  width: 100%;
  --bg-grid-color: #476d79;
  --text-default-color: rgba(63, 63, 255, 0.8);
  --text-lock-color: #212121;
  --text-focus-color: #fff;
  --text-note-color: rgba(63, 63, 255, 1);
  --bg-default-color: #fff;
  --bg-adjacent-color: rgb(195, 230, 238);
  --bg-focus-color: rgba(195, 230, 238, 0.7);
  --bg-wrong-color: #ff4d5a;
  --bg-same-color: #9ede54;
  user-select: none;
}

/*所有涉及vw、max的都要适配*/
.sudoku-grid {
  width: 99vw;
  height: 99vw;
  max-width: 604px;
  max-height: 604px;
  margin: 3px auto;
  font-size: 0;
  cursor: default;
  background-color: var(--bg-grid-color, #476d79);
  text-align: center;
  vertical-align: middle;
}

.sudoku-cell {
  position: relative;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: inline-block;
  width: calc((99vw - 28px) / 9);
  /*11vw 边框：28px = 4px * 4 - 2px * 6*/
  height: calc((99vw - 28px) / 9);
  max-height: 64px;
  max-width: 64px;
  margin: 1px;
  font-size: 7.85vw;
  line-height: calc((99vw - 28px) / 9);
  text-align: center;
  vertical-align: middle;
  cursor: default;
  color: transparent;
  background-color: var(--bg-default-color, #fff);
  text-shadow: 0 0 0 var(--text-default-color, rgba(63, 63, 255, 0.8));
  overflow: hidden;
}

.sudoku-cell:nth-child(-n + 9) {
  /*第1行*/
  margin-top: 4px;
}

.sudoku-cell:nth-child(9n + 3) {
  /*第3列*/
  margin-right: 3px;
}

.sudoku-cell:nth-child(9n + 7) {
  margin-left: 3px;
}

.sudoku-cell:nth-child(-n + 27):nth-child(n + 19) {
  /*第3行*/
  margin-bottom: 3px;
}

.sudoku-cell:nth-child(-n + 63):nth-child(n + 55) {
  margin-top: 3px;
}

.sudoku-cell:hover {
  box-shadow: 0 0 3px #607d8b inset;
}

.sudoku-cell-note {
  text-shadow: 0 0 0 var(--text-note-color, #3f3fff);
  position: absolute;
  display: inline-block;
  box-sizing: border-box;
  text-align: center;
  vertical-align: center;
  width: 33.33%;
  height: 33.33%;
  font-size: calc((99vw - 28px) / 27);
  line-height: calc((99vw - 28px) / 27);
}

.sudoku-cell-note:nth-child(n + 1) {
  top: 0;
}

.sudoku-cell-note:nth-child(n + 4) {
  top: 33.33%;
}

.sudoku-cell-note:nth-child(n + 7) {
  top: 66.66%;
}

.sudoku-cell-note:nth-child(3n + 1) {
  left: 0;
}

.sudoku-cell-note:nth-child(3n + 2) {
  left: 33.33%;
}

.sudoku-cell-note:nth-child(3n + 3) {
  left: 66.66%;
}

.sudoku-cell-adjacent {
  text-shadow: 0 0 0 var(--text-default-color, rgba(63, 63, 255, 0.8));
  background-color: var(--bg-adjacent-color, #c3e6ee);
}

.sudoku-cell-same {
  text-shadow: 0 0 0 var(--text-focus-color, #fff);
  background-color: var(--bg-same-color, #9ede54);
}

.sudoku-cell-focus {
  text-shadow: 0 0 0 var(--text-focus-color, #fff);
  background-color: var(--bg-focus-color, rgba(195, 230, 238, 0.7));
}

.sudoku-cell-wrong {
  background-color: var(--bg-wrong-color, #ff4d5a);
}

.sudoku-cell-lock {
  text-shadow: 0 0 0 var(--text-lock-color, #212121);
}

#sudoku-bar {
  font-size: 0;
  text-align: center;
  margin: 0;
}

#sudoku-bar a {
  display: inline-block;
  cursor: pointer;
  font-size: 16px;
  line-height: 16px;
  background-color: #2855b6;
  color: #fff;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 2px;
  margin: 3px;
  box-shadow: 0 1px 1px #3c3c3c;
}

#sudoku-bar a:hover,
#sudoku-bar a.sudoku-a-hover {
  background-color: rgba(40, 85, 182, 0.5);
}

#sudoku-bar a i.fa {
  margin: 0 3px;
}

#share-qrcode,
#share-qrcode>* {
  position: fixed;
  left: calc(50% - 70px);
  width: 140px;
  height: 140px;
  top: calc(50% - 40px);
  font-size: 10vw;
  text-align: center;
  line-height: 60px;
  color: #fff;
}

.sudoku-belt {
  display: -webkit-flex;
  /* Safari */
  display: flex;
  width: 99vw;
  max-width: 604px;
  margin: 5px auto;
  padding: 0;
  font-size: 0;
  /*background-color: red;*/
}

.sudoku-belt a {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  flex-grow: 1;
  /*background-color: blue;*/
  color: #fff;
  font-size: 10vw;
  height: 10vw;
  line-height: 10vw;
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  cursor: pointer;
  border-radius: 4px;
  text-decoration: none;
}

.sudoku-belt a:before,
.sudoku-belt a:link,
.sudoku-belt a:visited {
  color: #fff;
}

.sudoku-belt a .sudoku-belt-a-disabled,
.sudoku-belt a .sudoku-belt-a-disabled:hover {
  cursor: default;
  color: #828689;
  background-color: inherit;
}

.sudoku-belt .sudoku-belt-note-mode-a,
.sudoku-belt .sudoku-belt-note-mode-a:before,
.sudoku-belt .sudoku-belt-note-mode-a:link,
.sudoku-belt .sudoku-belt-note-mode-a:visited {
  color: #03acf9;
}

.sudoku-belt a:hover,
.sudoku-belt .sudoku-belt-a-select {
  background-color: #607d8b;
}

#sudoku-belt-numbers a:not(:last-child) {
  /*间隔*/
  margin-right: 1vw;
}

#sudoku-belt-handle a {
  height: 14vw;
  font-size: 5vw;
  line-height: 3vw;
  /*2x*/
  margin-right: 11vw;
  /*间隔*/
}

#sudoku-belt-handle a:first-child {
  margin-left: 11vw;
  /*间隔*/
}

.sudoku-belt-handle-text {
  vertical-align: top;
  margin: 0;
  padding: 0;
  font-size: 3vw;
}

.sudoku-bar-hr {
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-align: left;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  color: #c4cbd6;
  font-weight: 400;
  font-size: 12px;
  margin: 10px auto 5px auto;
  max-width: 610px;
}

#sudoku-timer {
  font-size: 6vw;
  color: #fff;
  text-align: center;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/*计时器闪烁效果*/
.sudoku-timer-fade {
  border-radius: 4px;
  -webkit-animation: fade 250ms 3;
  -o-animation: fade 250ms 3;
  animation: fade 250ms 3;
}

@keyframes fade {
  from {
    background-color: rgba(96, 125, 139, 0);
  }

  20% {
    background-color: #607d8b;
  }

  to {
    background-color: rgba(96, 125, 139, 0);
  }
}

@-webkit-keyframes fade {
  from {
    background-color: rgba(96, 125, 139, 0);
  }

  20% {
    background-color: #607d8b;
  }

  to {
    background-color: rgba(96, 125, 139, 0);
  }
}

#sudoku-bar a.sudoku-bar-a-disabled {
  cursor: default;
  background-color: #6a6d70;
}

#sudoku-bar a#sudoku-bar-play {
  border-radius: 2px 0 0 2px;
}

#sudoku-bar a#sudoku-bar-hard {
  margin-left: -2px;
  border-radius: 0 2px 2px 0;
  position: relative;
}

#sudoku-bar a#sudoku-bar-hard .sudoku-bar-menu i.fa {
  margin: 0;
  color: #e3dd5f;
}

#sudoku-bar a#sudoku-bar-hard .sudoku-bar-menu i.fa:nth-child(2) {
  margin-right: 9px;
}

#sudoku-bar a#sudoku-bar-hard .sudoku-bar-menu i.fa-check {
  margin-left: 15px;
  color: #00aaaa;
}

#sudoku-bar a#sudoku-bar-hard .sudoku-bar-menu>div {
  padding: 6px 3px 6px 15px;
  display: flex;
  justify-content: start;
}

#sudoku-bar a#sudoku-bar-hard .sudoku-bar-menu>div:hover {
  background-color: #e7e7e7;
}

#sudoku-bar .sudoku-bar-menu {
  display: none;
  position: absolute;
  font-size: 16px;
  background-color: #fff;
  color: #444;
  text-align: left;
  width: 140px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  padding: 3px;
  cursor: pointer;
  top: 36px;
  right: -1px;
  background-clip: padding-box;
}

#sudoku-bar div#sudoku-bar-theme-menu {
  display: none;
  width: 99vw;
  max-width: 604px;
  border-radius: 4px;
  background-color: #c4c4c4;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  margin: 3px auto;
  text-align: left;
  padding: 3px 6px;
}

#sudoku-bar div#sudoku-bar-theme-menu .sudoku-bar-theme-box {
  cursor: pointer;
  display: inline-block;
  border: 2px #c4c4c4 solid;
  width: 100px;
  height: 36px;
  background-size: 100%;
  margin: 3px 6px;
  border-radius: 3px;
}

#sudoku-bar div#sudoku-bar-theme-menu .sudoku-bar-theme-box-select {
  border-color: #607d8b;
}

@media screen and (min-width: 610px) {
  .sudoku-cell {
    font-size: 44px;
    line-height: 64px;
  }

  .sudoku-cell-note {
    font-size: 21px;
    line-height: 21px;
  }

  #sudoku-timer {
    font-size: 36px;
  }

  #sudoku-belt-numbers a {
    height: 66px;
    font-size: 66px;
    line-height: 66px;
  }

  #sudoku-belt-numbers a:not(:last-child) {
    /*间隔*/
    margin-right: 6px;
  }

  #sudoku-belt-handle a {
    height: 84px;
    font-size: 30px;
    line-height: 18px;
    /*2x*/
    margin-right: 65px;
    /*间隔11vw*/
  }

  #sudoku-belt-handle a:first-child {
    margin-left: 65px;
    /*间隔11vw*/
  }

  .sudoku-belt-handle-text {
    font-size: 18px;
  }
}