.seq-Challenge {
  max-width: 560px;
  margin: 10px auto 0 auto;
  padding: 28px 22px;
  background: #FAE9D5;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.74);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.seq-Challenge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 40%);
  pointer-events: none;
  opacity: 0.55;
}

.seq-grid {
  display: grid;
  grid-template-rows: repeat(6, 64px);
  gap: 10px;
  padding: 8px
}

.seq-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  perspective: 700px
}

.seq-tile {
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Clash";
  font-weight: 800;
  font-size: 18px;
  color: #1a1a1b;
  border: 4px solid #686868;
  height: 50px;
  width: 50px;
  margin: 4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s
}

.seq-tile:hover {
  background-color: #f0f0f0
}

.seq-tile.flip {
  animation: seqFlip 420ms ease-in-out forwards;
  transform-origin: center bottom
}

@keyframes seqFlip {
  0% {
    transform: rotateX(0deg);
  }

  50% {
    transform: rotateX(90deg);
  }

  100% {
    transform: rotateX(0deg);
  }
}

.seq-tile.filled {
  background: #eef2ff
}

/* Wordle-like coloring (use both names to stay compatible with logic) */
.seq-tile.correct,
.seq-tile.green {
  background-color: #6aaa64;
  border-color: #6aaa64;
  color: #fff
}

.seq-tile.found,
.seq-tile.yellow {
  background-color: #c9b458;
  border-color: #c9b458;
  color: #fff
}

.seq-tile.wrong,
.seq-tile.gray {
  background-color: #787c7e;
  border-color: #787c7e;
  color: #fff
}

/* container-like adjustments for the grid area (keeps page background) */
.seq-Challenge {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  height: 100%;
  flex-direction: column;
  margin-top: 40px;
  font-family: 'Clear Sans', 'Helvetica Neue', Arial, sans-serif;
  font-weight: bold
}

.seq-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px
}

.seq-buttons {
  display: flex;
  gap: 8px;
  justify-content: center
}

.seq-action {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(11, 17, 32, 0.06);
  background: #fff;
  cursor: pointer
}

.seq-action.primary {
  background: #0b84ff;
  color: #fff;
  border: none
}

/* Enter button wider (map to #seq-submit) */
#seq-submit {
  width: 60px
}

.seq-instruction {
  margin-bottom: 16px;
  text-align: center;
  color: #7c4b01;
  font-family: "Clash";
  font-weight: 500;
  font-size: 1rem;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.seq-instruction.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

/* small colored dot indicators used in the instruction text */
.seq-instruction .dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 20%;
  margin: 0 6px 0 2px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06) inset;
}

.seq-instruction .dot.green {
  background: #5ab452;
}

.seq-instruction .dot.yellow {
  background: #f0c60d;
}

.seq-instruction .dot.gray {
  background: #787c7e;
}

.seq-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

@media (max-width: 1000px) {
  .seq-Challenge {
    max-width: 560px;
    margin: 10px auto 0 auto;
    padding: 20px 18px;
  }

  .seq-grid {
    grid-auto-rows: 60px;
  }

  .seq-row {
    gap: 8px;
  }

  .seq-tile {
    height: 48px;
    width: 48px;
    font-size: 16px;
  }

  .seq-action {
    padding: 0.8rem 0.3rem;
  }

  .seq-instruction {
    margin-bottom: 14px;
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  /* layout for action buttons container */
  .seq-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 800px) {
  .seq-Challenge {
    max-width: 540px;
    margin: 10px auto 0 auto;
    padding: 18px 16px;
  }

  .seq-grid {
    grid-auto-rows: 60px;
  }

  .seq-row {
    gap: 8px;
  }

  .seq-tile {
    height: 46px;
    width: 46px;
    font-size: 15px;
  }

  .seq-action {
    padding: 0.8rem 0.3rem;
  }

  .seq-overlay-card {
    padding: 14px 14px 12px;
    width: min(380px, calc(100% - 32px));
  }

  .seq-overlay-title {
    font-size: 1.3rem;
  }

  .seq-instruction {
    margin-bottom: 12px;
    font-size: 0.85rem;
    padding: 6px 10px;
  }
}

@media (max-width: 600px) {
  .seq-Challenge {
    max-width: 90%;
    margin: 10px auto 0 auto;
    padding: 12px 14px;
  }

  .seq-grid {
    grid-auto-rows: 5px;
  }

  .seq-row {
    gap: 3px;
  }

  .seq-tile {
    height: 44px;
    width: 40px;
    font-size: 14px;
  }

  .seq-action {
    padding: 8px 10px;
  }

  .seq-overlay-card {
    padding: 12px 12px 10px;
    width: min(360px, calc(100% - 30px));
  }

  .seq-overlay-title {
    font-size: 1.2rem;
  }

  .seq-instruction {
    margin-bottom: 10px;
    font-size: 0.6rem;
    padding: 5px 8px;
  }

  .seq-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
  }
}