/* /assets/mots-meles.css */
.word-search-page {
  --ws-accent: var(--primary-color, #6c5ce7);
  --ws-accent-soft: rgba(108, 92, 231, .11);
  --ws-gold: var(--gold-color, #f0b429);
  --ws-ink: #282433;
  --ws-muted: #6e6878;
  --ws-line: rgba(44, 38, 58, .12);
  --ws-surface: #fff;
  --ws-soft: #f7f5fb;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(240, 180, 41, .12), transparent 26rem),
    radial-gradient(circle at 96% 8%, rgba(108, 92, 231, .13), transparent 28rem),
    #fbfafc;
  color: var(--ws-ink);
}

.word-search-hero {
  padding: clamp(2rem, 5vw, 4.5rem) 0 1.75rem;
  text-align: center;
}

.word-search-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--ws-line);
  box-shadow: 0 10px 30px rgba(31, 25, 48, .06);
  color: var(--ws-accent);
  font-weight: 800;
  font-size: .82rem;
}

.word-search-hero h1 {
  max-width: 980px;
  margin: 1rem auto .8rem;
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.word-search-hero p {
  max-width: 800px;
  margin: 0 auto;
  color: var(--ws-muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.ws-language-switcher .dropdown-toggle {
  border-radius: 999px;
  font-weight: 800;
}

.ws-app-shell {
  padding-bottom: 4rem;
}

.ws-panel,
.ws-preview-card,
.ws-seo-card {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--ws-line);
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(31, 25, 48, .08);
}

.ws-panel {
  position: sticky;
  top: 92px;
  padding: 1.15rem;
}

.ws-preview-card {
  overflow: hidden;
}

.ws-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--ws-line);
  background: rgba(250,248,253,.92);
}

.ws-statbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--ws-line);
}

.ws-stat {
  padding: .75rem;
  border-radius: 16px;
  background: var(--ws-soft);
  text-align: center;
}

.ws-stat strong {
  display: block;
  font-size: 1.15rem;
}

.ws-stat span {
  color: var(--ws-muted);
  font-size: .78rem;
  font-weight: 700;
}

.ws-preview-stage {
  --ws-board-bg: #fff8e8;
  position: relative;
  padding: clamp(.8rem, 2.2vw, 1.5rem);
  background: var(--ws-board-bg);
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.ws-preview-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--ws-bg-image, none);
  background-position: center;
  background-size: cover;
  opacity: var(--ws-bg-opacity, 0);
  z-index: -1;
}

.ws-board {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(.8rem, 2vw, 1.5rem);
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(35, 28, 48, .10);
  backdrop-filter: blur(7px);
}

.ws-board-title {
  margin: 0 0 .9rem;
  text-align: center;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
}

.ws-grid-wrap {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overscroll-behavior: contain;
}

.ws-grid {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid rgba(40,36,51,.2);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.94);
}

.ws-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid rgba(40,36,51,.09);
  border-bottom: 1px solid rgba(40,36,51,.09);
  font-family: var(--ws-letter-font, Arial, Helvetica, sans-serif);
  font-weight: 900;
  line-height: 1;
  color: #272331;
  font-size: var(--ws-cell-font-size, clamp(.72rem, 2.2vw, 1.55rem));
  position: relative;
  z-index: 2;
}

.ws-cell.is-preview {
  background: rgba(108,92,231,.16);
}

.ws-cell.is-flashing {
  animation: wsPulse .7s ease 3;
}

.ws-cell.is-zone {
  animation: wsZone .7s ease 3;
}

@keyframes wsPulse {
  50% { background: rgba(240,180,41,.72); transform: scale(1.08); }
}
@keyframes wsZone {
  50% { background: rgba(108,92,231,.26); }
}

.ws-selection-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.ws-selection-layer line {
  stroke: rgba(108,92,231,.30);
  stroke-linecap: round;
  stroke-width: 3.5%;
}

.ws-selection-layer line.is-current {
  stroke: rgba(240,180,41,.54);
}

.ws-selection-layer line.is-found {
  stroke: rgba(61, 184, 139, .42);
}

.ws-selection-layer line.is-revealed {
  stroke: rgba(240, 180, 41, .46);
  stroke-dasharray: 3 2;
}

.ws-word-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .55rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.ws-word-item,
.ws-word-group {
  padding: .6rem .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(40,36,51,.1);
  font-weight: 750;
  text-align: center;
  overflow-wrap: anywhere;
}

.ws-word-item.is-found {
  color: var(--ws-word-text, #23785b);
  background: var(--ws-word-bg, rgba(61,184,139,.12));
  border-color: var(--ws-word-border, rgba(61,184,139,.35));
  text-decoration: line-through;
  box-shadow: inset 4px 0 0 var(--ws-word-border, rgba(61,184,139,.35));
}

.ws-word-group.is-complete {
  border-color: rgba(61,184,139,.45);
  box-shadow: 0 0 0 2px rgba(61,184,139,.10);
}

.ws-word-group__part {
  display: inline-block;
  padding: .12rem .28rem;
  border-radius: 7px;
}

.ws-word-group__part.is-found {
  color: var(--ws-word-text, #23785b);
  background: var(--ws-word-bg, rgba(61,184,139,.12));
  box-shadow: inset 0 -2px 0 var(--ws-word-border, rgba(61,184,139,.35));
  text-decoration: line-through;
}

.ws-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  padding: 1rem 1.1rem 1.2rem;
  border-top: 1px solid var(--ws-line);
}

.ws-section-title {
  font-size: 1rem;
  margin: 0 0 .75rem;
}

.ws-fieldset {
  padding: .9rem;
  margin-bottom: .9rem;
  border: 1px solid var(--ws-line);
  border-radius: 16px;
  background: rgba(250,248,253,.68);
}

.ws-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
}

.ws-mode-option {
  position: relative;
}

.ws-mode-option input {
  position: absolute;
  opacity: 0;
}

.ws-mode-option label {
  display: grid;
  min-height: 78px;
  place-items: center;
  align-content: center;
  gap: .2rem;
  padding: .5rem;
  text-align: center;
  border: 1px solid var(--ws-line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
}

.ws-mode-option input:checked + label {
  border-color: var(--ws-accent);
  color: var(--ws-accent);
  background: var(--ws-accent-soft);
  box-shadow: 0 0 0 2px rgba(108,92,231,.08);
}

.ws-mode-option.is-locked label,
.ws-locked-control {
  opacity: .62;
}

.ws-lock {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #8a6420;
  font-size: .76rem;
  font-weight: 800;
}

.ws-premium-preview-note {
  display: flex;
  align-items: flex-start;
  gap: .25rem;
  padding: .75rem;
  border: 1px dashed rgba(108,92,231,.34);
  border-radius: 12px;
  background: rgba(108,92,231,.08);
  color: #514585;
  font-size: .82rem;
  line-height: 1.35;
}

.ws-premium-preview-note strong,
.ws-premium-preview-note span {
  display: block;
}

.ws-premium-preview-note strong {
  margin-bottom: .12rem;
}

.ws-font-preview {
  padding: .7rem;
  border: 1px solid var(--ws-line);
  border-radius: 12px;
  background: #fff;
  color: #272331;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.ws-mode-option.is-locked label {
  cursor: pointer;
}

.ws-mode-option.is-locked label:hover {
  opacity: .82;
  border-color: rgba(108,92,231,.42);
}

.ws-premium-box {
  padding: 1rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.28), transparent 10rem),
    linear-gradient(135deg, #2f2745, #6c5ce7);
  color: #fff;
}

.ws-premium-box p {
  color: rgba(255,255,255,.78);
}

.ws-premium-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: .65rem .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  font-size: .84rem;
}

.ws-custom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .65rem;
}

.ws-custom-tag {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .42rem .62rem;
  border-radius: 999px;
  background: var(--ws-accent-soft);
  color: var(--ws-accent);
  font-size: .82rem;
  font-weight: 800;
}

.ws-custom-tag button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  line-height: 1;
}

.ws-advice {
  margin-top: .65rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  background: #fff8e8;
  color: #765922;
  font-size: .82rem;
}

.ws-color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.ws-color-swatch {
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(40,36,51,.18);
  cursor: pointer;
}

.ws-color-swatch.is-active {
  box-shadow: 0 0 0 3px var(--ws-accent);
}

.ws-progress {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #ece9f2;
}

.ws-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ws-accent), #ff7ab8);
  transition: width .25s ease;
}

.ws-empty {
  display: grid;
  min-height: 540px;
  place-items: center;
  padding: 2rem;
  text-align: center;
  color: var(--ws-muted);
}

.ws-result-card {
  display: none;
  margin: 1rem 1.1rem;
  padding: 1.2rem;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(135deg, rgba(61,184,139,.13), rgba(108,92,231,.10));
  border: 1px solid rgba(61,184,139,.22);
}

.ws-result-card.is-visible {
  display: block;
}

.ws-alert {
  display: none;
}

.ws-alert.is-visible {
  display: block;
}

.ws-seo {
  padding: 1rem 0 4rem;
}

.ws-seo-card {
  padding: clamp(1.15rem, 3vw, 2.2rem);
}

.ws-seo-card h2,
.ws-seo-card h3 {
  letter-spacing: -.025em;
}

.ws-faq .accordion-button {
  font-weight: 800;
}

@media (max-width: 991.98px) {
  .ws-panel { position: static; }
}

@media (max-width: 767.98px) {
  .ws-statbar { grid-template-columns: repeat(2, 1fr); }
  .ws-word-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ws-mode-tabs { grid-template-columns: 1fr; }
  .ws-mode-option label { min-height: 58px; grid-template-columns: auto 1fr auto; justify-content: start; text-align: left; }
}

@media (max-width: 420px) {
  .ws-preview-stage { padding: .45rem; }
  .ws-board { padding: .55rem; border-radius: 16px; }
  .ws-grid { border-radius: 12px; }
  .ws-cell { font-size: var(--ws-cell-font-size, clamp(.58rem, 3.5vw, 1rem)); }
  .ws-word-list { grid-template-columns: 1fr; }
}
