:root {
    --tile-yellow: #fff67e;
    --tile-yellow-border: #c4b700;
    --tile-green: #7eff9f;
    --tile-green-border: #1fa741;
    --tile-blue: #8ac1ff;
    --tile-blue-border: #1f63b1;
    --tile-red: #ff9c88;
    --tile-red-border: #b93f26;
}

  @media (min-width: 620px) {
    html {
      zoom: 1.75;
    }
  }

body {
    font-family: 'Poppins', sans-serif;
    margin: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
}

#game-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0rem;
  margin-top: 1.2rem;
}

button {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f0f0;
    border: 1px solid #333;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    padding: 1.5px 7px;
    color: black;
}

nav { margin-bottom: 0rem; border-bottom: 1px solid #ccc; padding-bottom: 0; }
nav button { margin-right: 0.25rem; margin-left: 0.25rem; }
.page-section { margin-top: 1rem; }
label { display: block; margin-bottom: 0.5rem; }
#output { margin-top: 1rem; padding: 0.5rem; border: 1px solid #ccc; min-height: 1.5em; }

.navigation-btn {
  background-color: #ececec;
  border-color: #ececec;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.2rem 0.4rem;
  position: relative;
  font-size: 0.6rem;
}

.navigation-btn:hover {
    background-color: #e0e0e0;
    border-color: #e0e0e0;
}
.navigation-btn:active {
    background-color: #d0d0d0;
    border-color: #d0d0d0;
}
.navigation-btn.chosen {
  /* background-color: #ececec;
  border-color: #ececec; */
  border-radius: 0.5rem 0.5rem 0 0;
  color: var(--tile-green-border);
  border: 1px solid var(--tile-green-border);
  background: #f5f5f5;
}

.navigation-btn.chosen::after {
  content: "";
  position: absolute;
  left: -0.5px;
  right: -0.5px;
  bottom: -0.15rem;
  height: 0.15rem;
  background-color: var(--tile-green-border);
}

#stats-section {
  width: min(100%, 68rem);
  background: radial-gradient(circle at 10% 0%, #fffef5 0%, #ffffff 40%);
  border-radius: 14px;
  padding: 0.6rem;
}

.stats-title {
  margin: 0.2rem 0 0.7rem;
  font-size: 1rem;
}

.stats-controls {
  border: 1px solid #d9dee6;
  border-radius: 10px;
  padding: 0.6rem;
  background: linear-gradient(180deg, #fcfcfd 0%, #f7f8fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.stats-controls-top {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.stats-length-label {
  margin: 0.6rem 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.stats-length-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3rem, 1fr));
  gap: 0.35rem;
}

.stats-length-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
  font-size: 0.8rem;
}

.stats-status {
  min-height: 1.2rem;
  font-size: 0.75rem;
  color: #2d3340;
  margin: 0.5rem 0 0;
}

.stats-results {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.stats-block {
  border: 1px solid #d5dce8;
  border-radius: 10px;
  padding: 0.7rem;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(22, 31, 56, 0.06);
}

.stats-block-spotlight {
  border-color: #b8d9ff;
}

.stats-block h4 {
  margin: 0 0 0.5rem;
}

.stats-panel {
  border-top: 1px dashed #e5e5e5;
  padding-top: 0.45rem;
  margin-top: 0.45rem;
}

.stats-panel-title {
  margin: 0 0 0.4rem;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.stats-table th,
.stats-table td {
  border-bottom: 1px solid #ececec;
  padding: 0.3rem;
  text-align: left;
}

.stats-table th {
  background: #f6f8ff;
}

.stats-simple-list {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.75rem;
}

.stats-query-input {
  min-width: 9rem;
  border: 1px solid #b7c7e8;
  border-radius: 7px;
  padding: 0.18rem 0.35rem;
  font-size: 0.75rem;
  background: #ffffff;
}

.stats-query-input:focus {
  outline: 2px solid rgba(31, 99, 177, 0.2);
  border-color: #1f63b1;
}

.stats-query-button {
  background: #e8f2ff;
  border-color: #8eb8ed;
}

.stats-query-button:hover {
  background: #dcebff;
}

.stats-position-chart {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}

.stats-position-row {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  gap: 0.35rem;
  align-items: center;
}

.stats-position-label,
.stats-position-value {
  font-size: 0.72rem;
}

.stats-position-track {
  height: 0.56rem;
  border-radius: 999px;
  background: #edf2fb;
  overflow: hidden;
}

.stats-position-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7fb5ff 0%, #1f63b1 100%);
}

.stats-two-columns,
.stats-three-columns {
  display: grid;
  gap: 0.6rem;
}

.stats-two-columns {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.stats-three-columns {
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.stats-two-columns h5,
.stats-three-columns h5 {
  margin: 0 0 0.25rem;
}

@media (max-width: 700px) {
  .stats-controls {
    padding: 0.45rem;
  }

  .stats-table {
    font-size: 0.7rem;
  }
}

#title {
  /* center the text */
  text-align: center;
  font-size: 0.7rem;
  font-weight: bold;
  margin: 1rem 0rem;
  text-wrap: balance;
}

.title-kids {
  display: flex;
  justify-content: center;
  gap: 0.1rem;
  font-family: 'Modak';
  font-weight: 100;
}

.title-kids.hidden {
  display: none;
}

.kids-letter {
  display: inline-block;
}

#header-panel {
    display: flex;
    justify-content: center;  
    align-items: center;
    display: flex;
    align-content: center;
    flex-direction: row;
    gap: 1rem;
    width: 100%;
}

#game-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-content: center;
    flex-direction: row;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

#started-game-controls,
#points-panel {
  display: flex;
  justify-content: end;
  gap: 0.35rem;
  width: 4rem;
  font-size: 0.6rem;
}

#started-game-controls.hidden,
#points-panel.hidden,
#game-of-the-day-button.hidden,
#game-of-day-overlay.hidden {
  display: none;
}
#congratulations-overlay.hidden {
  display: none;
}

#game-of-the-day-button {
  display: flex;
  flex-direction: column;
  align-self: center;
  align-content: center;
  width: 4rem;
  gap: 0.5rem;
  padding: .1rem 0rem;
  font-size: 0.6rem;
}

/* frame around correct answers */
#correct-section {
    border: 1px solid #000000;
    margin-top: 0.5rem;
    padding-left: 5rem;
    padding-right: 5rem;
    border-radius: 4px;
    background: #f9f9f9;
    width: 7.5rem;
    margin-bottom: 1.5rem;
}

#correct-section.hidden {
    display: none;
}

/* loading overlay */
#loading-overlay {
    font-size: 1.1rem;
}

#loading-overlay h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

#loading-time {
    font-size: 0.5rem;
    color: #666666;
    margin: 0rem;
    font-family: monospace;
}

#letter-display {
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 100%;
    padding-top: 1rem;
    padding-bottom: 0rem;
}

.letter-tile.yellow-letter {
    background-color: var(--tile-yellow);
    border: 1px solid var(--tile-yellow-border);
}

.letter-tile.green-letter {
    background-color: var(--tile-green);
    border: 1px solid var(--tile-green-border);
}

.letter-tile.blue-letter {
    background-color: var(--tile-blue);
    border: 1px solid var(--tile-blue-border);
}

.letter-tile.red-letter {
    background-color: var(--tile-red);
    border: 1px solid var(--tile-red-border);
}

#loadingAnimation {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2rem;
  margin-top: 0rem;
  margin-bottom: 0.9rem;
}

.loading-square {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 3px;
  display: inline-block;
  animation: loading-square-bounce 1.5s ease-in-out infinite;
}

.loading-square-yellow {
  background-color: var(--tile-yellow);
  border: 1px solid var(--tile-yellow-border);
  animation-delay: 0s;
}

.loading-square-green {
  background-color: var(--tile-green);
  border: 1px solid var(--tile-green-border);
  animation-delay: 0.2s;
}

.loading-square-blue {
  background-color: var(--tile-blue);
  border: 1px solid var(--tile-blue-border);
  animation-delay: 0.4s;
}

.loading-square-red {
  background-color: var(--tile-red);
  border: 1px solid var(--tile-red-border);
  animation-delay: 0.6s;
}

@keyframes loading-square-bounce {
  0%,
  40%,
  100% {
    transform: translateY(0);
  }
  15% {
    transform: translateY(-10px);
  }
}

/* interactive letter tiles for game (pointer drag) */
.letter-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    margin: 0.1rem;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: grab;
    background: #fff;
    transition: transform 0.1s, opacity 0.1s;
    font-size: 1.2rem;
    font-weight: normal;
    box-sizing: border-box;
}

.letter-tile.dragging {
    opacity: 0 !important; /* hide original while dragging */
    transition: none;
    pointer-events: none;
}

/* floating clone that follows the pointer */
.letter-tile.floating {
    position: absolute;
    z-index: 10000;
    pointer-events: none;
    transform: scale(1.8);
}

@keyframes shake-horizontal {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-8px); }
  40%  { transform: translateX(8px); }
  60%  { transform: translateX(-5px); }
  80%  { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

.letter-tile.shake {
  /* Apply the animation when the .shake class is present */
  animation: shake-horizontal 350ms ease-in-out;
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

#mix {
  display: flex;
  flex-direction: column;
}
#next-button{
  margin-right: 0;
}
#next {
  display: flex;
  flex-direction: column;
}

#check-button {
  align-self: stretch;
  width: 14rem;
  margin-right: 0.4rem;
}

.controls {
  display: flex;
  flex-direction: row;
  align-items: center;
}

#game-top-controls {
  width: min(100%, 17rem);
  justify-content: space-between;
}

#letter-count-header {
  font-size: 0.6rem;
  color: #333333;
  margin-right: 0.2rem;
}

#letter-count-buttons {
  display:inline-block;
}

.letter-count-button.chosen {
  color: var(--tile-green-border);
  border: 1px solid var(--tile-green-border);
  background: var(--tile-green);
  border-radius: 5px;
  padding: 0.4rem 0.7rem;
}

#possible-count {
  color: #333333;
  font-size: 0.6rem;
  align-self: flex-start;
  margin: 0rem;
  margin-bottom: 0.5rem;
  margin-top: 0.2rem;
  margin-left: 0.4rem;
  display: flex;
  flex-direction: row;
  align-items: center;
}

#solution-count {
  font-size: .8rem;
  margin: 0rem 0.3rem;
}

#guess-list {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column-reverse;
  padding-left: 0.4rem;
  padding-bottom: 0.8rem;
}

.guess-item {
  margin-bottom: 0.15rem;
}

.guess-correct {
  color: #37aa3a;
}

.guess-missed {
  color: #c5183e;
}

.guess-separator {
  margin: 0rem;
  font-size: 0.5rem;
  color: #666666;
}

.hidden {
  display: none;
}

#stop-game {
  background: none;
  border: none;
  cursor: pointer;
  margin: 0rem;
  padding: 0rem;
  font-size: 0.5rem;
}

.green {
  color: #37aa3a;
}

.red {
  color: #c5183e;
}

#congratulations-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10001;
}

#congratulations-modal {
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem 1rem;
  min-width: 280px;
  text-align: center;
  display: flex;
  flex-direction: column;
  margin: 1rem;
  justify-content: center;
  align-items: center;
}

#game-of-day-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10001;
}

#game-of-day-modal {
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem 1rem;
  min-width: 280px;
  text-align: center;
  display: flex;
  flex-direction: column;
  margin: 1rem;
}

#game-of-day-modal h2 {
  margin-top: 0;
}

#game-of-day-words-list {
  display: inline;
}

#game-of-day-words-list a {
  text-decoration: none;
}

#game-of-day-words-list a.guess-correct {
  color: #37aa3a;
}

#game-of-day-words-list a.guess-missed {
  color: #c5183e;
}

#timer-value {
  width: 5ch;
}

.jersey-10-regular {
  font-family: "Jersey 10", sans-serif;
  font-weight: 400;
  font-style: normal;
}