/* Word Finder & Wordle Solver */
.wf-wrap { max-width: 860px; display: flex; flex-direction: column; gap: 16px; }

/* Tabs */
.wf-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.wf-tab {
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 700;
  cursor: pointer; border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted);
  transition: all .15s;
}
.wf-tab:hover { border-color: var(--accent); color: var(--text); }
.wf-tab.active { background: var(--accent-grad); color: #fff; border-color: transparent; }

/* DB status */
.wf-db-status {
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: .85rem;
  background: rgba(108,139,255,.1); color: #6c8bff; border: 1px solid rgba(108,139,255,.25);
}

/* Panel */
.wf-panel { padding: 20px; }

/* Wordle hint text */
.wf-hint { color: var(--muted); font-size: .88rem; margin: 0 0 16px; line-height: 1.6; }
.wf-demo { padding: 1px 6px; border-radius: 3px; font-weight: 700; font-size: .82rem; }
.wf-demo.green { background: #538d4e; color: #fff; }
.wf-demo.yellow { background: #b59f3b; color: #fff; }
.wf-demo.gray { background: #3a3a3c; color: #fff; }

/* Wordle grid */
.wf-grid { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.wf-row { display: flex; gap: 6px; }
.wf-tile {
  width: 52px; height: 52px; border: 2px solid var(--line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0;
  cursor: pointer; user-select: none; transition: background .12s, border-color .12s;
  position: relative; background: var(--bg-soft); color: var(--text);
}
.wf-tile input {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
  border: none; background: none; cursor: pointer; font-size: 0;
}
.wf-tile--empty { border-color: var(--line); }
.wf-tile--white { background: var(--bg-soft); border-color: var(--line); color: var(--text); }
.wf-tile--green { background: #538d4e; border-color: #538d4e; color: #fff; }
.wf-tile--yellow { background: #b59f3b; border-color: #b59f3b; color: #fff; }
.wf-tile--gray  { background: #3a3a3c; border-color: #3a3a3c; color: #fff; }

.wf-wordle-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

/* Word Finder grid */
.wf-finder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-bottom: 16px; }
.wf-field-hint { margin: 4px 0 0; font-size: .78rem; color: var(--muted-2); line-height: 1.5; }

/* Anagram */
.wf-anagram-opts { margin-top: 12px; }

/* Results */
.wf-result { margin-top: 16px; }
.wf-result-meta { font-size: .85rem; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wf-copy-btn { background: none; border: 1px solid var(--line); color: var(--muted-2); font: inherit; font-size: .78rem;
  padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.wf-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.wf-words {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.wf-word {
  padding: 6px 12px; border-radius: 6px; font-size: .92rem; font-weight: 600;
  font-family: 'Courier New', monospace; letter-spacing: .08em;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  cursor: pointer;
}
.wf-word:hover { border-color: var(--accent); color: var(--accent); }

.wf-no-match { color: var(--muted); font-size: .9rem; padding: 12px 0; }
.wf-loading { color: #6c8bff; font-size: .9rem; padding: 12px 0; }

@media (max-width: 600px) {
  .wf-tile { width: 42px; height: 42px; font-size: 1.1rem; }
  .wf-finder-grid { grid-template-columns: 1fr; }
}

.wf-full { margin-left: auto; }

/* Full-screen mode (native Fullscreen API on .wf-wrap) — big, clean display for a projector/TV */
.wf-wrap:fullscreen { max-width: none; width: 100%; height: 100%; background: var(--bg); padding: 6vh 6vw;
  overflow: auto; display: flex; flex-direction: column; align-items: center; }
.wf-wrap:fullscreen .wf-tabs { position: absolute; top: 20px; left: 20px; right: 20px; }
.wf-wrap:fullscreen .wf-panel.tool-card { width: 100%; max-width: 900px; margin-top: 64px; }
.wf-wrap:fullscreen .wf-tile { width: min(13vw, 92px); height: min(13vw, 92px); font-size: clamp(1.6rem, 4vw, 2.6rem); }
.wf-wrap:fullscreen .wf-word { font-size: 1.05rem; padding: 9px 15px; }
.wf-wrap:fullscreen .wf-hint { font-size: 1rem; }
