body {
  font-family: "Inter", sans-serif;
  background: #f9fafb;
  text-align: center;
}

.tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  text-align: left;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  font-family: inherit;
}
.form-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.primary-btn {
  background: #10b981;
  border: 1px solid #059669;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.primary-btn:hover {
  background: #059669;
}
.secondary-btn {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.secondary-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Crossword Grid Styles */
.print-area {
  background: #fff;
  padding: 30px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.puzzle-title-display {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 30px;
  color: #111;
  letter-spacing: 0.5px;
}

.crossword-board {
  display: inline-flex;
  flex-direction: column;
  border: 2px solid #111;
  background-color: #111; /* Acts as the lines between cells */
  gap: 1.5px; /* Grid line thickness */
  margin: 0 auto;
}

.crossword-row {
  display: flex;
  gap: 1.5px;
}

.crossword-cell {
  width: 36px;
  height: 36px;
  background-color: transparent; /* empty cells are black due to board background */
  position: relative;
}

.crossword-cell.active {
  background-color: #fff;
}

.cell-number {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #374151;
  line-height: 1;
}

.cell-letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #111;
  text-transform: uppercase;
  /* Default hidden for playing/printing, toggle to show solution */
  opacity: 0;
}
.show-solution .cell-letter {
  opacity: 1;
}

/* Clues Section */
.clues-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}
@media (min-width: 640px) {
  .clues-container {
    flex-direction: row;
    gap: 40px;
  }
  .clue-col {
    flex: 1;
  }
  .print-area {
    padding: 40px;
  }
}

.clue-header {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.clue-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.clue-item {
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.4;
  color: #374151;
  display: flex;
  gap: 8px;
}
.clue-num {
  font-weight: 700;
  min-width: 24px;
  text-align: right;
  margin-right: 4px;
}

.error-msg {
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  display: none;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #header,
  #footer,
  #backtotop,
  .controls-col,
  .page-header,
  .faq-section {
    display: none !important;
  }
  .print-area,
  .print-area * {
    visibility: visible;
  }
  .print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    padding: 0;
  }

  .crossword-board {
    border-color: #000;
    background-color: #000;
    gap: 1.5px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .crossword-cell.active {
    background-color: #fff !important;
  }
  .cell-letter {
    opacity: 0 !important;
  } /* Never print solution by default */
}
