body,
html {
  margin: 0 auto;
  width: 100%;
  height: 100%;
  padding-bottom: 52px;
  background-color: #c7c7c7;
  background-image: url("data:image/svg+xml,%3Csvg width='42' height='44' viewBox='0 0 42 44' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='Page-1' fill='none' fill-rule='evenodd'%3E%3Cg id='brick-wall' fill='%23404040' fill-opacity='0.4'%3E%3Cpath d='M0 0h42v44H0V0zm1 1h40v20H1V1zM0 23h20v20H0V23zm22 0h20v20H22V23z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

#container {
  width: 835px;
  height: 400px;
  padding: 0;
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translate(-48%, 0%);
}

.me {
  position: relative;
  background-size: 800px 400px;
  background-repeat: no-repeat;
  display: inline-block;
  margin: 2.2px;
  margin-top: -0.5px;
  border-radius: 10px;
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.16),
    0 3px 6px rgba(0, 0, 0, 0.23);
  transition: 0.2s;
}

.full {
  height: 400px;
  width: 800px;
  border-radius: 15px;
}

.me_0 {
  height: 133.33px;
  width: 133.33px;
  background-position: -0px -0px;
}

.me_1 {
  height: 133.33px;
  width: 133.33px;
  background-position: -133.33px -0px;
}

.me_2 {
  height: 133.33px;
  width: 133.33px;
  background-position: -266.66px -0px;
}

.me_3 {
  height: 133.33px;
  width: 133.33px;
  background-position: -399.99px -0px;
}

.me_4 {
  height: 133.33px;
  width: 133.33px;
  background-position: -533.32px -0px;
}

.me_5 {
  height: 133.33px;
  width: 133.33px;
  background-position: -666.65px -0px;
}

.me_6 {
  height: 133.33px;
  width: 133.33px;
  background-position: -0px -133.33px;
}

.me_7 {
  height: 133.33px;
  width: 133.33px;
  background-position: -133.33px -133.33px;
}

.me_8 {
  height: 133.33px;
  width: 133.33px;
  background-position: -266.66px -133.33px;
}

.me_9 {
  height: 133.33px;
  width: 133.33px;
  background-position: -399.99px -133.33px;
}

.me_10 {
  height: 133.33px;
  width: 133.33px;
  background-position: -533.32px -133.33px;
}

.me_11 {
  height: 133.33px;
  width: 133.33px;
  background-position: -666.65px -133.33px;
}

.me_12 {
  height: 133.33px;
  width: 133.33px;
  background-position: -0px -266.66px;
}

.me_13 {
  height: 133.33px;
  width: 133.33px;
  background-position: -133.33px -266.66px;
}

.me_14 {
  height: 133.33px;
  width: 133.33px;
  background-position: -266.66px -266.66px;
}

.me_15 {
  height: 133.33px;
  width: 133.33px;
  background-position: -399.99px -266.66px;
}

.me_16 {
  height: 133.33px;
  width: 133.33px;
  background-position: -533.32px -266.66px;
}

.me_17 {
  height: 133.33px;
  width: 133.33px;
  background-position: -666.65px -266.66px;
}

.prevent_click {
  pointer-events: none;
}

.correct {
  border-radius: 0px;
  box-shadow:
    0 0 0 transparent,
    0 0 0 transparent;
  animation: corect 0.5s ease;
  animation-delay: 0.2s;
}

@keyframes corect {
  0% {
    transform: scale(1);
    border-radius: 10px;
    box-shadow:
      0 3px 6px rgba(0, 0, 0, 0.16),
      0 3px 6px rgba(0, 0, 0, 0.23);
  }
  50% {
    transform: scale(1.25);
    border-radius: 5px;
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.25),
      0 10px 10px rgba(0, 0, 0, 0.22);
  }
  100% {
    transform: scale(1);
    border-radius: 0px;
    box-shadow:
      0 0 0 transparent,
      0 0 0 transparent;
  }
}
.pre_img {
  margin-top: 10px;
  width: 100%;
  position: absolute;
  left: 100px;
}

.pre_img li {
  display: inline-block;
  align-items: center;
  list-style: none;
}

.pre_img li img {
  width: 150px;
  height: 75px;
  position: relative;
  cursor: pointer;
}

.cover {
  display: none;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.38);
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.score {
  margin: 13% auto;
  padding: 20px;
  background: #fff;
  border: 1px solid #666;
  width: 300px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  position: relative;
}

#scr_head {
  text-align: center;
  font-weight: 600;
  font-size: 30px;
  font-family: cursive;
  color: #3d3d3d;
}

#scr_time {
  text-align: center;
  font-weight: 600;
  font-size: 22px;
  font-family: cursive;
  color: #3d3d3d;
}

#scr_moves {
  text-align: center;
  font-weight: 600;
  font-size: 22px;
  font-family: cursive;
  color: #3d3d3d;
}

.start {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 18px 45px;
}

.reset {
  position: absolute;
  margin: 0 auto;
  padding: 18px 45px;
  left: 50%;
  transform: translate(-50%, 120px);
}

.OK {
  padding: 8px 25px;
  float: right;
  cursor: pointer;
}

.button {
  margin: 0px 10px 10px 0px;
  border-radius: 10px;
  font-family: cursive;
  font-size: 25px;
  color: #fff;
  text-decoration: none;
  background-color: #e74c3c;
  border-bottom: 5px solid #bd3e31;
  text-shadow: 0px -2px #bd3e31;
  z-index: 999;
  transition: all 0.1s;
  -webkit-transition: all 0.1s;
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.16),
    0 3px 6px rgba(0, 0, 0, 0.23);
}

.button:active {
  border-bottom: 1px solid #bd3e31;
}

.i {
  text-align: center;
  font-family: cursive;
  font-weight: 550;
  color: #3c3c3c;
}

#timer {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  font-family: cursive;
  font-weight: bold;
  color: #e74c3c;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  display: none;
  z-index: 100;
}

#best-score {
  text-align: center;
  font-weight: 600;
  font-size: 18px;
  font-family: cursive;
  color: #27ae60;
  margin-top: 15px;
  border-top: 2px solid #ecf0f1;
  padding-top: 15px;
}

.modal-name {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-name-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  text-align: center;
}

.modal-name h2 {
  color: #3d3d3d;
  font-family: cursive;
  margin-bottom: 20px;
  font-size: 28px;
}

.modal-name input {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 2px solid #e74c3c;
  border-radius: 5px;
  font-size: 16px;
  font-family: cursive;
  box-sizing: border-box;
}

.modal-name input:focus {
  outline: none;
  border-color: #bd3e31;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

.btn-start-game {
  padding: 10px 30px;
  background-color: #27ae60;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  font-family: cursive;
  cursor: pointer;
  border-bottom: 3px solid #229954;
  transition: all 0.1s;
}

.btn-start-game:active {
  border-bottom: 1px solid #229954;
}

#time-left {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 20px;
  font-family: cursive;
  font-weight: bold;
  color: #3498db;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 15px;
  border-radius: 8px;
  z-index: 100;
  display: none;
}

#time-left.warning {
  color: #e74c3c;
  background: rgba(255, 255, 255, 0.95);
  animation: blink 0.5s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0.5;
  }
}

.best-score-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 2px solid #a61f17;
  background: linear-gradient(90deg, #cf2f22, #e74c3c, #cf2f22);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.3);
  z-index: 10001;
}

.ticker-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: ticker-scroll 18s linear infinite;
}

.ticker-item {
  color: #ffffff;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding-right: 90px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  body,
  html {
    padding-bottom: 46px;
  }

  .best-score-ticker {
    height: 46px;
  }

  .ticker-item {
    font-size: 15px;
    padding-right: 70px;
  }
}
