#ttb-word-list { margin-top: 15px; }

.ttb-word-search-generator {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.ttb-word-search-generator textarea {
    width: 100%;
    height: 150px;
    margin-bottom: 10px;
}
.ttb-word-search-generator button {
    margin-left: 10px;
    padding: 5px 10px;
}

.ttb-grid {
    position: relative;
    display: inline-block;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.ttb-grid-row {
  display: flex;
  flex-wrap: nowrap;
}

.ttb-grid-cell {
    aspect-ratio: 1 / 1;
    width: clamp(20px, 100% / var(--grid-size), 40px);
    box-sizing: border-box;
    text-align: center;
    line-height: 1;
    border: 1px solid #ccc;
    font-size: clamp(12px, 2vw, 18px);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Grid cell when dragging/selected */
.ttb-grid-cell.selected {
  background-color: #add8e6; /* light blue */
  border-color: #007bff;
}

/* Grid cell for a found word */
.ttb-grid-cell.found {
  background-color: #90ee90; /* light green */
  border-color: #2e8b57;
  color: #000;
}

/* Crossed off word in the list */
#ttb-word-list-output li.found-word {
  text-decoration: line-through;
  color: #555;
}

#ttb-word-list-output ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
  margin-top: 20px;
  column-gap: 30px;
  column-width: 140px;
  max-width: 100%;
}

#ttb-word-list-output li {
  padding: 4px 0;
  border-bottom: 1px dashed #ccc;
  font-size: 16px;
  color: #333;
}

#ttb-word-list-output li.found-word {
  text-decoration: line-through;
  color: #999;
}


@keyframes ttb-flash {
    from { background-color: #ffff99; } /* light yellow */
    to { background-color: transparent; }
}

.ttb-grid-cell.flash {
    animation: ttb-flash 0.6s ease-in-out;
}

.ttb-grid-wrapper {
    position: relative;
    display: inline-block;
}

.ttb-draw-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 5;
    width: 100%;
    height: 100%;
}

.ttb-print-controls { margin-top: 20px; }