/* * {
  outline:1px red solid;
} */

html {
  box-sizing: border-box;
  margin: 0;
}

body {
  font-family: sans-serif;
}

body.dark {
  background-color: #222;
  color: #aaa;
}

* {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  /* iOS Safari */
  -webkit-user-select: none;
  /* Safari */
  -khtml-user-select: none;
  /* Konqueror HTML */
  -moz-user-select: none;
  /* Old versions of Firefox */
  -ms-user-select: none;
  /* Internet Explorer/Edge */
  user-select: none;
  /* Non-prefixed version, currently
                                supported by Chrome, Edge, Opera and Firefox */
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}

.sb-hive {
  width: 90%;
  margin: 25px auto;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

div {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

*,
*:before,
*:after {
  box-sizing: inherit;
  /* touch-action: manipulation; */
}

.sb-controls-box {
  flex-grow: 4;
  position: relative;
}

.sb-controls {
  width: 100%;
  max-width: 290px;
  position: relative;
  /* position:absolute; */
  /* top:50%; */
  /* left:50%; */
  /* transform:translate(-50%, -50%); */
  z-index: 1;
  /* padding-bottom:45px; */
}

.hive-cell {
  position: absolute;
  -webkit-touch-callout: none;
  top: calc(100% / 3);
  left: 30%;
  width: 40%;
  height: calc(100% / 3);
  opacity: 1;
}

.hive {
  position: relative;
  width: 100%;
  padding-bottom: 103.92305%;
}

.hive-cell .cell-fill {
  cursor: pointer;
  fill: #e6e6e6;
  transition: all 100ms
}

.hive-cell>.cell-fill.push-active {
  fill: #d9d9d9
}

.hive-cell:first-child .cell-fill {
  cursor: pointer;
  fill: #f8cd05;
  transition: all 100ms
}

.hive-cell:first-child .cell-fill.push-active {
  fill: #dfb804
}

.hive-cell>.cell-fill.push-active {
  transform: scale3d(0.86, 0.86, 1);
  transform-origin: center center
}

.hive-cell:nth-child(1) {
  transform: translate(0, 0);
}

.hive-cell:nth-child(2) {
  transform: translate(-75%, -50%);
}

.hive-cell:nth-child(3) {
  transform: translate(0, -100%);
}

.hive-cell:nth-child(4) {
  transform: translate(75%, -50%)
}

.hive-cell:nth-child(5) {
  transform: translate(75%, 50%)
}

.hive-cell:nth-child(6) {
  transform: translate(0, 100%)
}

.hive-cell:nth-child(7) {
  transform: translate(-75%, 50%)
}

body.dark .hive-cell:nth-child(n+2)>.cell-fill.push-active {
  fill: #444;
}

body.dark .hive-cell:nth-child(n+2) .cell-fill {
  fill: #666;
  stroke: #222;
}

body.dark .hive-cell:first-child .cell-fill {
  fill: #a08305;
  stroke: #222;
}

body.dark .hive-cell:first-child .cell-fill.push-active {
  fill: #886f04;
  stroke: #222;
}

.sb-hive-input {
  text-transform: uppercase;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: .5px;
  text-rendering: optimizeLegibility;
  line-height: 40px;
  height: 40px;
  padding-top: 2px;
  padding-right: 14px;
  text-align: center;
}

.sb-hive-input-content {
  display: inline-block;
  position: relative;
  transform: translateY(0%)
}

.sb-hive-input-content.non-empty {
  padding-left: 14px
}

.sb-hive-input-content.has-error {
  -webkit-animation: shake 0.9s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  animation: shake 0.9s cubic-bezier(0.36, 0.07, 0.19, 0.97) both
}

.cell-letter {
  font-weight: 700;
  font-size: 30px;
  text-anchor: middle;
  text-transform: uppercase;
  pointer-events: none;
  -webkit-touch-callout: none;
}

body.dark .cell-letter {
  color: #ccc !important;
}

.hive-actions {
  text-align: center;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.hive-action {
  padding: 15px 20px;
  min-width: 90px;
  flex: 1;
  background-color: white;
  font-size: 18px;
  margin: 0 12px;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 40px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
}

.hive-action:focus,
.settings-button:focus,
.stats-button:focus {
  outline: none;
  box-shadow: none;
}

.hive-action.push-active,
.hive-action.action-active,
.settings-button.push-active,
.stats-button.push-active {
  background-color: #ededed;
  outline: none;
  box-shadow: none;
}

.hive-action__shuffle {
  background: url("shuffle.svg") center no-repeat;
  background-size: 30px;
  height: 50px;
  min-width: 50px;
}

body.dark .hive-action,
body.dark .settings-button,
body.dark .stats-button {
  background-color: #222;
  border: 1px solid #666;
  color: #aaa;
}

body.dark .hive-action.push-active,
body.dark .hive-action.action-active,
body.dark .settings-button.push-active,
body.dark .stats-button.push-active {
  background-color: #555;
  outline: none;
  box-shadow: none;
}

body.dark .hive-action__shuffle {
  background: url("shuffle_dark.svg") center no-repeat;
  background-size: 30px;
}

@media (max-width: 375.98px) {
  .sb-hive {
    width: 70%;
    margin: 4vh auto;
  }
}

.sb-progress {
  padding: 6px;
}

body.dark .sb-progress {
  color: #222;
}

@media (min-width: 768px) {
  .sb-progress {
    padding: 12px 12px 12px 0
  }
}

.sb-progress,
.sb-progress-dots {
  cursor: pointer;
  display: flex
}

.sb-progress-rank {
  width: 90px;
  font-weight: 700
}

.sb-progress-line {
  flex-grow: 1;
  position: relative;
  height: 9px;
  height: 1px;
  background: #dcdcdc;
  margin-top: 8px
}

body.dark .sb-progress-line {
  background: #666;
}

.sb-progress-marker {
  width: 0;
  height: 0;
  position: absolute;
  left: 0%;
  transition: left 200ms ease
}

.sb-progress-marker .sb-progress-value {
  position: absolute;
  width: 30px;
  height: 30px;
  line-height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #f8cd05;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.5px
}

body.dark .sb-progress-value {
  background: #a08305;
}

.sb-progress-marker.final .sb-progress-value {
  border-radius: 0%
}

.sb-progress-dots {
  width: 100%;
  justify-content: space-between
}

.sb-progress-dot {
  display: block;
  width: 0;
  position: relative
}

.sb-progress-dot::after {
  content: '';
  display: block;
  position: absolute;
  left: -4.5px;
  top: -4.5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #dcdcdc;
  transition: background-color 200ms 100ms ease
}

body.dark .sb-progress-dot::after {
  background-color: #666;
}

.sb-progress-dot:last-child::after {
  border-radius: 0%
}

.sb-progress-dot.completed::after {
  background-color: #f8cd05
}

body.dark .sb-progress-dot.completed::after {
  background-color: #a08305;
}

.sb-status-box {
  width: 50%;
  max-width: 290px;
}

.sb-wordlist-window {
  overflow-x: auto
}

.sb-status-box,
.sb-wordlist-box,
.sb-wordlist-drawer {
  display: flex;
  flex-direction: column
}

.sb-wordlist-box,
.sb-progress-box {
  margin: 12px
}


/* .sb-progress-box {
margin-bottom:0
} */

.sb-info {
  display: flex;
}

.sb-info-col {
  flex: 50%;
}

.sb-input-bright {
  color: #f8cd05;
}

body.dark .sb-input-bright {
  color: #a08305;
}

.highlight {
  animation: highlight-text 5s;
}

body.dark .highlight {
  animation: highlight-text-dark 5s;
}

@media only screen and (max-device-width: 640px) {

  /* Styles */
  .sb-controls {
    max-width: initial;
  }

  .sb-status-box {
    width: 100%;
    max-width: initial;
  }

  #top-frame.hide-words {
    position: relative;
    min-height: 100vh;
  }
}

#game {
  opacity: 0;
}

.loaded {
  opacity: 1;
}

.sb-alert-wrapper {
  position: absolute;
  width: 100%;
  text-align: center;
}

body.dark .sb-alert,
.sb-alert {
  display: inline-flex;
  padding: 5px 10px;
  color: #222;
  background-color: #f8cd05;
  opacity: 0;
  transition: opacity .15s ease-in;
}

body.dark .sb-alert {
  background-color: #a08305;
}

body.dark .sb-alert:empty,
.sb-alert:empty {
  background-color: transparent;
  opacity: 0;
}

.footer-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  column-gap: 20px;
  margin-block-end: 2em;
}

.settings-button,
.stats-button {
  padding: 15px 20px;
  min-width: 120px;
  background-color: white;
  font-size: 18px;
  /* margin:0 auto; */
  color: #333;
  border: 1px solid #ccc;
  border-radius: 40px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  text-align: center;
  max-width: 150px;
}

.settings-control {
  position: relative;
  display: flex;
  flex-direction: row;
  margin: 10px 0;
}

.settings-version {
  color: #ccc;
  padding-top: 10px;
  text-align: center;
}

body.dark .settings-version {
  color: #555;
}

.settings-descriptor {
  flex: 2;
  display: flex;
  align-items: center;
}

.settings-switch {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  flex-direction: row;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.dark-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.dark-switch {
  align-self: center;
}

.dark-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.dark-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.dark-switch .slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: #fff;
  -webkit-transition: .4s;
  transition: .4s;
}

body.dark .dark-switch .slider:before {
  background-color: #333;
}

body.dark input:checked+.slider {
  background-color: #a08305;
}

body.dark input:focus+.slider {
  box-shadow: 0 0 1px #a08305;
}

input:checked+.slider {
  background-color: #f8cd05;
}

input:focus+.slider {
  box-shadow: 0 0 1px #f8cd05;
}

input:checked+.slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}


/* Rounded sliders */

.dark-switch .slider.round {
  border-radius: 34px;
}

.dark-switch .slider.round:before {
  border-radius: 50%;
}

@keyframes highlight-text {
  0% {
    color: #f8cd05;
  }

  100% {
    color: #000;
  }
}

@keyframes highlight-text-dark {
  0% {
    color: #a08305;
  }

  100% {
    color: #aaa;
  }
}

@keyframes outer-press {
  0% {
    fill: #d34079;
  }

  100% {
    fill: #17c76f;
  }
}


/* The Modal (background) */

.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 2;
  /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgb(0, 0, 0);
  /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4);
  /* Black w/ opacity */
  -webkit-animation-name: fadeIn;
  /* Fade in the background */
  -webkit-animation-duration: 0.4s;
  animation-name: fadeIn;
  animation-duration: 0.4s
}


/* Modal Content */

.modal-content {
  position: fixed;
  bottom: 0;
  background-color: #fefefe;
  width: 100%;
  -webkit-animation-name: slideIn;
  -webkit-animation-duration: 0.4s;
  animation-name: slideIn;
  animation-duration: 0.4s
}

body.dark .modal-content,
body.dark .rank-modal-content {
  background-color: #222;
  color: #fff;
}

/* The Close Button */

.settings-close,
.rank-close {
  color: black;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.stats-close {
  position: absolute;
  top: 10px;
  right: 16px;
  color: black;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

#stats-modal .modal-header {
  padding: 2px 10px;
}

#stats-modal .modal-body {
  padding: 2px 10px 20px 10px;
}

#stats-modal .found {
  color: #f8cd05
}

body.dark #stats-modal .found {
  color: #a08305;
}

#stats-modal ul.word-list {
  display: flex;
  flex-direction: column;
  list-style-type: none;
  list-style-position: inside;
  padding: 0;
  margin: 0.2em 2% 0 0;
}

#stats-modal li.pangram {
  font-weight: bold;
}

#stats-modal ul.word-list li {
  width: 100%;
  text-transform: capitalize;
  /* border-bottom: 1px #888 solid; */
  padding-top: 2px;
}

#stats-modal ul.word-list li {
  /* list-style-type: none !important; */
  list-style-image: url('dot2.svg');
  /* list-style-image: url('rocket_.svg'); */
}

body.dark #stats-modal ul.word-list li {
  /* list-style-type: none !important; */
  list-style-image: url('dot_dark2.svg');
  /* list-style-image: url('rocket_.svg'); */
}

#stats-modal ul.word-list li.found {
  /* list-style-type: none !important; */
  list-style-image: url('check2.svg');
  /* list-style-image: url('rocket_.svg'); */
}

body.dark #stats-modal ul.word-list li.found {
  /* list-style-type: none !important; */
  list-style-image: url('check_dark2.svg');
  /* list-style-image: url('rocket_.svg'); */
}

#stats-modal ul.word-list li.found::before {
  /* content: '✓'; */
  /* margin-right: 13px;
  margin-left: -4px; */
}

/* body.dark #stats-modal ul.word-list li {
  border-bottom: 1px #aaa solid;
} */

#stats-modal ul.word-list .found span {
  /* display: inline-block; */
  /* margin-left: -0.65em; */
  /* position: relative; */
  /* left: 0px; */
  /* padding-left: 3%; */
}

#stats-modal .top-shade {
  position: absolute;
  top: 9px;
  height: 10%;
  width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  content: '';
}

#stats-modal .bottom-shade {
  position: absolute;
  bottom: 9px;
  height: 10%;
  width: 100%;
  background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  content: '';
}

body.dark #stats-modal .top-shade {
  background: linear-gradient(180deg, rgba(34, 34, 34, 1) 0%, rgba(34, 34, 34, 0) 100%);
}

body.dark #stats-modal .bottom-shade {
  background: linear-gradient(0deg, rgba(34, 34, 34, 1) 0%, rgba(34, 34, 34, 0) 100%);
}

body.dark .settings-close,
body.dark .stats-close,
body.dark .rank-close {
  color: #aaa;
}

.settings-close:hover,
.settings-close:focus,
.stats-close:hover,
.stats-close:focus,
.rank-close:hover,
.rank-close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.modal-header,
.rank-modal-header {
  padding: 2px 20px;
}

.modal-body {
  padding: 2px 20px 20px 20px;
}

/* The Modal (background) */

.rank-modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 2;
  /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgb(0, 0, 0);
  /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4);
  /* Black w/ opacity */
  -webkit-animation-name: fadeIn;
  /* Fade in the background */
  -webkit-animation-duration: 0.4s;
  animation-name: fadeIn;
  animation-duration: 0.4s
}


/* Modal Content */

.rank-modal-content {
  position: fixed;
  top: 0;
  background-color: #fefefe;
  width: 100%;
  -webkit-animation-name: rank-slideIn;
  -webkit-animation-duration: 0.4s;
  animation-name: rank-slideIn;
  animation-duration: 0.4s
}

#stats-body tr {
  display: flex;
  flex-direction: row;
  width: 100%;
}

#stats-body td {
  flex: 1;
}

#stats-body table {
  width: 100%;
  table-layout: fixed;
  border-spacing: 0;
}

#stats-body td {
  width: 50%
}


/* Add Animation */

@-webkit-keyframes slideIn {
  from {
    bottom: -300px;
    opacity: 0
  }

  to {
    bottom: 0;
    opacity: 1
  }
}

@keyframes slideIn {
  from {
    bottom: -300px;
    opacity: 0
  }

  to {
    bottom: 0;
    opacity: 1
  }
}


/* Add Animation */

@-webkit-keyframes rank-slideIn {
  from {
    top: -300px;
    opacity: 0
  }

  to {
    top: 0;
    opacity: 1
  }
}

@keyframes rank-slideIn {
  from {
    top: -300px;
    opacity: 0
  }

  to {
    top: 0;
    opacity: 1
  }
}

@-webkit-keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes alert-appear {
  0% {
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}