@charset "utf-8";
/* CSS Document */

/* ==========================
   SAMSUNG SS BODY FONTS
   ========================== */

@font-face {
    font-family: "Samsung SS Body";
    src: url("fonts/samsungssbody-light.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: "Samsung SS Body";
    src: url("fonts/samsungssbody-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Samsung SS Body";
    src: url("fonts/samsungssbody-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
}

/* ==========================
   SAMSUNG SS HEAD FONTS
   ========================== */

@font-face {
    font-family: "Samsung SS Head";
    src: url("fonts/samsungsshead-light.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: "Samsung SS Head";
    src: url("fonts/samsungsshead-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Samsung SS Head";
    src: url("fonts/samsungsshead-medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "Samsung SS Head";
    src: url("fonts/samsungsshead-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
}

/* Splash Screen */

.splash-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow-y: auto;
  box-sizing: border-box;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  max-width: 360px;
  width: 100%;
}

.splash-logo {
  width: 160px;
  height: auto;
  padding-bottom: 30px;
}

.splash-graphic {
  width: 200px;
  height: auto;
  margin-bottom: 28px;
}

.splash-content h1 {
  font-family: "Samsung SS Head";
  font-weight: 700;
  font-size: 44px;
  color: #8093da;
  margin: 0 0 8px 0;
  line-height: 1.1;
  letter-spacing: -0.5px;
  padding-bottom: 16px;
}

.splash-content p {
  font-family: "Samsung SS Body";
  font-size: 20px;
  color: #000;
  margin: 0 0 32px 0;
}

#lets-play-btn {
  width: 100%;
  max-width: 280px;
  padding: 15px;
  font-size: 18px;
  font-weight: 700;
  background-color: #8093dc;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 30px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.title p {
  margin: 0 auto;
  text-align: center;
  padding-bottom: 20px;
  padding-top: 20px;
  font-family: "Samsung SS Body";
  font-size: 18px;
  color: #5a594e;
}

.title h1 {
  margin: 0 auto;
  text-align: left;
  padding-bottom: 20px;
  font-family: "Samsung SS Head";
  font-weight: 700;
  font-size: 24px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background-color: #fff;
  padding: 4px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.card {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  aspect-ratio: 1/1;
  background-color: #efefe5;
  padding: 10px;
  font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  border: 0px solid;
  border-radius: 6px;
  transition: transform 0.8s ease, opacity 0.8s ease;
  text-transform: uppercase;
  word-break: break-word;
  hyphens: auto;
  text-align: center;
}

.card.selected {
  background-color: #5a595e;
  color: #ffffff;
}

.solved-banner {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  text-transform: uppercase;
  height: 100px;
  box-sizing: border-box;
  max-height: 100px;
  transition: max-height 0.8s ease-in-out;
  animation: slideDown 0.8s ease-in-out forwards;
}

.solved-banner h3 {
  margin: 0 0 5px 0;
  font-size: 1.1rem;
  font-family: "Samsung SS Head";
  font-weight: 700;
}

.solved-banner p {
  margin: 0;
  font-size: 0.9rem;
  font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.level-1 {
  background-color: #ffb546;
  color: #352511;
  font-family: "Samsung SS Head";
}

.level-2 {
  background-color: #97D653;
  color: #273517;
  font-family: "Samsung SS Head";
}

.level-3 {
  background-color: #06b2e2;
  color: #02303a;
  font-family: "Samsung SS Head";
}

.level-4 {
  background-color: #8093DC;
  color: #1b1f2d;
  font-family: "Samsung SS Head";
}

.card.fade-out {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out !important;
}

.card.collapse {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
  transition: all 0.8s ease-in-out;
}

.card.smooth-move {
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }
  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%, 60% {
    transform: translate3d(4px, 0, 0);
  }
}

.guesses {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  color: #5a594e;
  font-family: "Samsung SS Head";
}

#mistake-tokens {
  display: flex;
  gap: 8px;
}

.dot {
  width: 14px;
  height: 14px;
  background-color: #5a594e;
  border-radius: 50%;
  display: inline-block;
  transition: opacity 0.3s ease;
}

.dot.lost {
  opacity: 0.2;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-family: "Samsung SS Head";
}

.modal-content h2 {
  margin-top: 0;
  color: #333;
  font-family: "Samsung SS Head";
  font-weight: 700;
}

#try-again-btn {
  margin-top: 15px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#try-again-btn:hover {
  background-color: #333;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.button-group button {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.shuffle {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

#shuffle-btn {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  background-color: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 24px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  max-width: 500px;
}

#shuffle-btn:hover {
  background-color: #000;
  border-color: #000;
  border: 2px solid #000;
  color: #fff;
}

.submit {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}


#submit-btn {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  background-color: #000;
  color: #fff;
  border: 0px solid #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  max-width: 500px;
  font-family: "Samsung SS Head";
  font-weight: 700;
}

#submit-btn:hover {
  background-color: #fff;
  border-color: #000;
  border: 2px solid;
  color: #000;
}

.toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background-color: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  font-family: "Samsung SS Head";
  font-weight: bold;
  text-transform: uppercase;
}

@media (max-width: 500px) {
  .game-grid {
    gap: 4px;
    padding: 2px 4px;
  }

.card {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  aspect-ratio: 1/1;
  background-color: #efefe5;
  padding: 3px; /* Tighter padding leaves more room for the text */
  font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(11px, 3.8vw, 13px); /* Raised the minimum size so it won't shrink too small */
  border: 0px solid;
  border-radius: 6px;
  transition: transform 0.8s ease, opacity 0.8s ease;
  text-transform: uppercase;
  overflow-wrap: break-word;
  hyphens: auto;
  text-align: center;
}
}