:root {
	--default: #121213;
	--empty: #3a3a3c;
	--wrong: #b59f3b;
	--right: #538d4e;
	--grey: lightgray;
	--tone1: #d3d6da;
}
/* dark mode */
.dark-mode {
  /*background-image: url(../images/nature.jpg)!important;
  background-size: cover;
  background-repeat: no-repeat;*/
  background: black!important;
}
.dark-mode #words-container > .bottom-info {
  background: black;
}
.dark-mode .bottom-info .like button, 
.dark-mode .bottom-info .dislike button, 
.dark-mode .bottom-info .comment i {
  background: black;
}
.dark-mode #words-container #wordle #board .grid .box.write-letter {
  background: var(--empty);
  box-shadow: 2px 3px 3px var(--tone1);
}
.dark-mode #words-container #wordle #board .grid .box.empty,
.dark-mode #words-container #wordle #board .grid .box.wrong,
.dark-mode #words-container #wordle #board .grid .box.right {
  box-shadow: 2px 3px 3px var(--tone1);
}

#words-container {
  position: relative;
	font-family: Arial, Helvetica, sans-serif;
	display: flex;
	justify-content: center;
	margin: 20px auto; 
	width: 1000px;
	height: 650px;
	box-shadow: 2px 6px 12px 6px rgba(0,0,0,0.26);
	background: #3394a5;
	flex-wrap: wrap;
}

#words-container #wordle {
  position: relative;
	width: 95%;
	max-width: 500px;
	height: 100%;
	display: flex;
	flex-direction: column;
}

#words-container #wordle #board-container {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-grow: 1;
	overflow: hidden;
	flex-direction: column;
}
#words-container #wordle #board-container #board {
	padding: 10px;
}
#words-container #wordle #board .grid {
 	display: grid;
	grid-template-rows: repeat(6, auto);
	grid-template-columns: repeat(5, auto);
}
#words-container #wordle #board .grid .box {
  position: relative;
	width: 55px;
	height: 55px;
	border: 2px solid var(--grey);
	margin: 4px;
	text-transform: uppercase;
	display: grid;
	place-items: center;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 2.4rem;
	font-weight: 600;
  box-shadow: 2px 3px 3px black;
}

/* setting hint */
#words-container #wordle #board .grid .box .double {
  font-size: .5em;
  position: absolute;
  top: 0;
  left: 2px;
}
#words-container #wordle #board .grid .box.empty {
	background: var(--empty);
	border: 2px solid var(--empty);
	color: white;
}
#words-container #wordle .keyboard-row button.incorrect-letter {
	background: var(--empty);
	color: white;
}

#words-container #wordle #board .grid .box.wrong {
	background: var(--wrong);
	border: 2px solid var(--wrong);
	color: white;
}
#words-container #wordle .keyboard-row button.correct-letter {
	background: var(--wrong);
	color: white;
}

#words-container #wordle #board .grid .box.right {
	background: var(--right);
	border: 2px solid var(--right);
	color: white;
}
#words-container #wordle .keyboard-row button.correct-letter-in-place {
	background: var(--right);
	color: white;
}

#words-container #wordle #board .grid .box.write-letter {
	border: 2px solid var(--empty);
  color: white;
}

#words-container #wordle #board .grid .animated {
	animation: flip 0.5s ease;
}

@keyframes flip {
	0% {
    transform: scaleY(1);
  } 
	50% {
  	transform: scaleY(0);
	}
	100% {
  	transform: scaleY(1);
	}
}

#words-container .stats .title-word-oblic {
  position: absolute;
  left: calc(0% + 135px);
  top: 15px;
/*  transform: rotate(12deg);*/
  color: #77B254;
  font-size: 2rem;
  animation: bounce 2s ease;
}
@keyframes bounce {
  0% {
    transform: rotate(0deg);
  } 
  50% {
    transform: rotate(17deg);
  }
  100% {
    transform: rotate(-17deg);
  }
}


/* kyboard */
#wordle #keyboard-container {
  height: 170px;
}
#wordle #keyboard-container .keyboard-row {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 0 auto 8px;
	touch-action: manipulation;
}
#wordle #keyboard-container .keyboard-row button {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	border: 0;
	padding: 0;
	font-size: 1.25em;
	margin: 0 2px;
	height: 45px;
	border-radius: 4px;
	cursor: pointer;
	user-select: none;
	color: var(--default);
	background-color: var(--tone1);
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	text-transform: uppercase;
  box-shadow: 2px 3px 3px black;
}

#wordle #keyboard-container .keyboard-row button.wide-button {
	flex: 2.3;
	font-size: 16px;
}
#wordle #keyboard-container .keyboard-row button:not(.incorrect-letter, .correct-letter, .correct-letter-in-place):hover {
  background-color: #EFF3EA;
  color: var(--default);
}

/* right side */
#words-container .stats {
  display: flex;
  justify-content: space-between;
  margin: 20px 0 0 0;
  width: 100%;
  text-shadow: 2px 2px 4px #601414;
  user-select: none;
}
#words-container .stats .settings {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: white;
}
#words-container .stats .settings i,
#words-container .stats .settings a {
  margin: 0 5px;
  font-size: 1.2em;
  color: white;
}
#words-container .stats .settings i:hover {
  cursor: pointer;
  color: var(--grey);
}

#words-container .stats .words-title h1 {
  color: white;  
}

#words-container.modal-content hr {
  border: 1px solid var(--tone1);
}

/* The modal */
#words-container .modal,
#words-container .small-modal,
#words-container .start-modal {
  display: none;
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.7);
}

/* start modal */
#words-container .start-modal .modal-content {
  position: absolute; 
  left: 50%;
  top: 0;
  transform: translate(-50%, 0);
  background-color: white;
  border: 2px solid var(--grey);
  margin: 9% auto;
  padding: 2em 1em;
  width: 80%;
  color: var(--default);
  text-align: center;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  align-content: center;
  flex-wrap: wrap;
  justify-content: center;
}

#words-container .start-modal .modal-content .game-btn {
  font-family: Arial, Helvetica, sans-serif;
  padding: 8px 25px;
  font-size: 1.2em;
  color: white;
  background: #10ab10;
  font-weight: 600;
  border: none;
  border-radius: 20px;
  margin-top: 20px;
} 
#words-container .start-modal .modal-content .game-btn:hover {
  background: #15c915;
  cursor: pointer;
}
#words-container .start-modal .modal-content img  {
  width: 20%;
  margin: 0 auto;
}
#words-container .start-modal .modal-content .title-text {
  padding: 2em;
  font-weight: bold;
}
#words-container .start-modal .modal-content .title-word {
  padding: 10px;
  display: block;
  color: var(--right);
}

#words-container .modal .modal-content {
  position: absolute; 
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  background-color: white;
  border: 2px solid var(--grey);
  margin: 5% auto;
  padding: 20px;
  width: 80%;
  color: #2e3239;
  max-width: 450px;
  user-select: none;
}
/*#words-container #stats-modal .modal-content {
  top: 40%;
}*/
#words-container .modal .modal-content h2 {
  text-align: center;
}
#words-container #stats-modal .stats-elem {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
#words-container #stats-modal .stats-elem .box-elem {
  padding: 10px;
  margin: 10px;
  background: #F5F7F8;
  border-radius: 10px;
  text-align: center;
  flex: 1 0 150px;
}
#words-container #stats-modal .stats-elem .box-elem span {
  font-size: 2em;
  font-weight: 600;
}

#words-container #stats-modal .stats-elem .box-elem-tries {
  display: flex;
  flex-direction: column;
  width: 100%;
  font-weight: bold;
}
#words-container #stats-modal .stats-elem .box-elem-tries h4 {
  padding: 5px 0;
  text-align: center;
}
#words-container #stats-modal .stats-elem .box-elem-tries .tries {
  display: flex;
  margin: 3px 15px;
}
#words-container #stats-modal .stats-elem .box-elem-tries .tries .percent {
  display: flex;
  justify-content: flex-end;
  width: 20px;
}
#words-container #stats-modal .stats-elem .box-elem-tries .tries .box-bar {
  background: #e5e9eb;
  width: 100%;
  margin: 0 7px;
  border-radius: 20px;
}
#words-container #stats-modal .stats-elem .box-elem-tries .tries .bar { 
  border-radius: 20px;  
  font-size: 0.75em;
}
#words-container #stats-modal .stats-elem .box-elem-tries .tries .box-bar span {
  display: block;
  border-radius: 20px;
  padding: 2px 5px;
  min-width: 15px;
}

#words-container #stats-modal .stats-elem .box-elem-tries .tries p {
  display: inline-block;
}

/* how to play modal */

#words-container #help-modal h3 {
  text-align: center;
  padding-bottom: 10px;
}
#words-container #help-modal p, 
#words-container #help-modal ul {
  padding-bottom: 8px;
}
#words-container #help-modal .example-box .default,
#words-container #help-modal .explanation .default {
  padding: 10px;
  margin: 5px 0;
  font-weight: bold;
  background: var(--empty);
  color: white;
  border-radius: 4px;
  width: 30px;
  margin-right: 3px;
  display: inline-block;
}
#words-container #help-modal .example-box .right,
#words-container #help-modal .explanation .right {
  text-align: center;
  padding: 10px;
  margin: 5px 0;
  font-weight: bold;
  background: var(--right);
  color: white;
  border-radius: 4px;
  width: 30px;
  margin-right: 3px;
  display: inline-block;
}
#words-container #help-modal .example-box .not-right,
#words-container #help-modal .explanation .not-right {
  padding: 10px;
  margin: 5px 0;
  font-weight: bold;
  background: var(--wrong);
  color: white;
  border-radius: 4px;
  width: 30px;
  margin-right: 3px;
  display: inline-block;
}
#words-container .small-modal .modal-content {
  position: absolute; 
  left: 50%;
  top: 20%;
  transform: translate(-50%, 0);
  background-color: white;
  border: 2px solid var(--grey);
  margin: 5% auto;
  padding: 20px;
  width: 80%;
  color: var(--default);
  text-align: center;
  max-width: 300px;
}

#words-container .small-modal .modal-content .fa-trophy {
  font-size: 3em;
  color: gold;
  padding: 0 0 20px 0;
  text-shadow: 2px 2px 5px #601414;
}
#words-container .small-modal .modal-content .fa-times-circle {
  font-size: 3em;
  color: firebrick;
  padding: 0 0 20px 0;
  text-shadow: 2px 2px 5px #601414;
}
#words-container .small-modal .modal-content .game-btn {
  font-family: Arial, Helvetica, sans-serif;
  padding: 8px 20px;
  font-size: 1.2em;
  color: white;
  background: #10ab10;
  font-weight: 600;
  border: none;
  border-radius: 20px;
  margin-top: 20px;
} 
#words-container .small-modal .modal-content .game-btn:hover {
  background: #15c915;
  cursor: pointer;
}
#words-container .small-modal .modal-content .win-stats {
  margin: 10px;
  background: var(--tone1);
  font-weight: 600;
  padding: 5px;
  border-radius: 10px;
  cursor: pointer;
}
#words-container .small-modal .modal-content .win-stats:hover {
  background: #e3e5e9;
}

#words-container .modal-content .guessed-text {
  font-weight: bold;
}
#words-container .modal-content .text {
  font-weight: bold;
  padding-bottom: 10px;
}
#words-container .modal-content #guessed-word {
  color: #d71d1d;
  text-transform: uppercase;
}
#words-container .modal-content #word,
#words-container .modal-content #word-in {
  color: #77B254;
  text-transform: uppercase;
}

#words-container .modal-content .win-stats img {
  width: 24px;
}
#words-container .modal-content .win-stats a {
  color: black;
}
#words-container .modal-content .link-dex {
  margin-top: 10px;
  color: #8a9097;
  font-size: .9em;
  font-style: italic;
}
#words-container .modal-content .link-dex a {
  color: #8a9097;
  font-style: normal;
}



/* The Close Button */
#words-container .close {
  float: right;
  font-size: 2em;
  font-weight: bold;
  margin: -10px;
  color: firebrick;
}

#words-container .close:hover,
#words-container .close:focus {
  color: #e91313;
  text-decoration: none;
  cursor: pointer;
}
#words-container .hidden {
  	display: none;
}

/* bottom */
#words-container > .bottom-info {
  flex: 0 0 100%;
  background: white;
  height: 10%;
}
.bottom-info .like,
.bottom-info .dislike {
  padding: 5px 10px;
  display: inline-block;
  float: left;
  text-align: center;
}
.bottom-info .like {
  margin-left: 15px;
}
.bottom-info .comment,
.bottom-info .leaderboard {
  padding: 5px 20px;
  display: inline-block;
  float: left;
}
.bottom-info .like button,
.bottom-info .dislike button,
.bottom-info .comment i {
  font-size: 1.2em;
  color: #4e666a;
  padding: 4px 8px;
  text-shadow: 2px 2px 4px grey;
  background: white;
  border: none;
}

.bottom-info .leaderboard i {
  padding: 7px 5px;
  font-size: 1.2em;
  color: #4e666a;
  text-shadow: 2px 2px 4px grey;
}
.bottom-info .like button:hover,
.bottom-info .dislike button:hover,
.bottom-info .leaderboard i:hover,
.bottom-info .comment i:hover {
  cursor: pointer;
  border-radius: 50%;
  background: #e3e2e2;
}
.bottom-info .dislike span,
.bottom-info .like span {
  display: block;
  text-align: center;
}

.bottom-info .version {
  padding: 10px 30px;
  display: inline-block;
  float: right;
}

/* ON / OFF */
#settings-modal .dark-theme, 
#settings-modal .difficulty, 
#settings-modal .daily-theme,
#settings-modal .sound-theme {
  display: flex;
  padding: 10px 5px;
  border-bottom: 2px solid var(--tone1);
  justify-content: space-between;
}
#settings-modal .dark-theme .switch, 
#settings-modal .difficulty .switch,
#settings-modal .daily-theme .switch,
#settings-modal .sound-theme .switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;

}
#settings-modal .dark-theme .switch input, 
#settings-modal .difficulty .switch input,
#settings-modal .daily-theme .switch input,
#settings-modal .sound-theme .switch input {
  display:none;
}

#settings-modal .dark-theme .slider, 
#settings-modal .difficulty .slider, 
#settings-modal .daily-theme .slider,
#settings-modal .sound-theme .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #dbe0ed;
  -webkit-transition: .4s;
  transition: .4s;
}
#settings-modal .dark-theme .slider:before, 
#settings-modal .difficulty .slider:before,
#settings-modal .daily-theme .slider:before,
#settings-modal .sound-theme .slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 2px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}
#settings-modal .dark-theme .slider.round, 
#settings-modal .difficulty .slider.round,
#settings-modal .daily-theme .slider.round,
#settings-modal .sound-theme .slider.round {
  border-radius: 34px;
}
#settings-modal .dark-theme .slider.round:before,
#settings-modal .difficulty .slider.round:before,
#settings-modal .daily-theme .slider.round:before,
#settings-modal .sound-theme .slider.round:before {
  border-radius: 50%;
}

#settings-modal .dark-theme input:checked + .slider,
#settings-modal .difficulty input:checked + .slider,
#settings-modal .daily-theme input:checked + .slider,
#settings-modal .sound-theme input:checked + .slider {
  background-color: #2ab934;
}

#settings-modal .dark-theme input:checked + .slider:before,
#settings-modal .difficulty input:checked + .slider:before,
#settings-modal .daily-theme input:checked + .slider:before,
#settings-modal .sound-theme input:checked + .slider:before {
  -webkit-transform: translateX(19px);
  -ms-transform: translateX(19px);
  transform: translateX(19px);
}

#settings-modal .dark-theme .dark-theme-toggler, 
#settings-modal .difficulty .difficulty-toggler,
#settings-modal .daily-theme .daily-theme-toggler,
#settings-modal .sound-theme .sound-theme-toggler  {
  display: inline-block;
  float: right;
}
#settings-modal .dark-theme .box-elem,
#settings-modal .difficulty .box-elem,
#settings-modal .daily-theme .box-elem,
#settings-modal .sound-theme .box-elem {
  display: inline-block;
}
#settings-modal .dark-theme .box-elem p,
#settings-modal .difficulty .box-elem p,
#settings-modal .daily-theme .box-elem p,
#settings-modal .sound-theme .box-elem p {
  font-size: .9em;
  color: #8a9097;
  display: inline-block;
} 
#settings-modal .daily-theme .box-elem p #word-date {
  font-weight: bold;
  color: var(--empty);
}

@media only screen and (min-width: 767px) and (max-width: 1024px) {
  #words-container {
      width: 90%;
  }
}

@media only screen and (max-width: 767px) {
	#words-container {
		width: 100%;
    height: 100%;
    margin: auto;
	} 
  #words-container .stats .title-word-oblic {
    left: calc(0% + 115px);
  }
  #wordle #keyboard-container .keyboard-row button {
    height: 35px;
    font-size: 1.1em;
    font-weight: 600;
  }
  #wordle #keyboard-container .keyboard-row button.wide-button {
    flex: 2.3;

  }
  @keyframes bounce {
    0% {
      transform: rotate(0deg);
    } 
    50% {
      transform: rotate(17deg);
    }
    100% {
      transform: rotate(-17deg);
    }
  }
  #words-container #stats-modal .stats-elem .box-elem {
    flex: 1 0 100px;
  }
  #words-container #wordle #board .grid .box {
    width: 50px;
    height: 50px;
  }
   #wordle #keyboard-container .keyboard-row button.wide-button {
    flex: 2.3;
    font-size: 14px;
    font-weight: 600;
  }
}
@media only screen and (max-width: 375px) {
  #words-container #stats-modal .stats-elem .box-elem span {
    font-size: 1.5em;
  }
  #words-container #stats-modal .stats-elem .box-elem {
    margin: 5px;
  }
}

@media only screen and (max-width: 320px) {  
  #wordle #keyboard-container .keyboard-row button {
    height: 30px;
  }
  #wordle #keyboard-container .keyboard-row button.wide-button {
    flex: 2.3;
    font-size: 13px;
    font-weight: 600;
  }
  #words-container .stats {
    font-size: .8em;
  }
    #words-container .stats .title-word-oblic {
      left: calc(0% + 96px);
      font-size: 1em;
  }
}

