/* ================================================================
   Anagram Word Tool — Mobile-First CSS
   Plugin: anagram-word-tool  v1.0.0
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800;900&display=swap');

/* ── Reset inside our wrapper only ─────────────────────────── */
.awt-wrap *,
.awt-wrap *::before,
.awt-wrap *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* ── Root variables ─────────────────────────────────────────── */
.awt-wrap {
  --awt-g1:     #1a6b3a;
  --awt-g2:     #238a4a;
  --awt-g3:     #2db05e;
  --awt-gold:   #f5c842;
  --awt-gold2:  #e6b52e;
  --awt-soft:   #f0faf4;
  --awt-border: #c8e6d0;

  font-family: 'Nunito', sans-serif;
  background:  var(--awt-soft);
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--awt-border);
  max-width: 600px;
  margin: 20px auto;
}

/* ── Top bar ────────────────────────────────────────────────── */
.awt-topbar {
  background: var(--awt-g1);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.awt-brand {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}
.awt-brand span { color: var(--awt-gold); }

.awt-lang-row {
  display: flex;
  background: rgba(255,255,255,.18);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.28);
}
.awt-lbtn {
  padding: 6px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  border-radius: 20px;
  transition: all .15s;
  line-height: 1;
}
.awt-lbtn.awt-on {
  background: var(--awt-gold);
  color: var(--awt-g1);
}

/* ── Hero ───────────────────────────────────────────────────── */
.awt-hero {
  background: var(--awt-g2);
  padding: 14px 16px 12px;
  text-align: center;
}
.awt-hero-title {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 3px;
}
.awt-hero-sub {
  font-size: 12px;
  color: rgba(255,255,255,.72);
  font-weight: 600;
}

/* ── Body ───────────────────────────────────────────────────── */
.awt-body { padding: 14px; }

.awt-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.awt-mpill {
  padding: 12px 0;
  border-radius: 10px;
  border: 2px solid var(--awt-border);
  background: #fff;
  color: #5a8a6a;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
  touch-action: manipulation;
}
.awt-mpill.awt-on {
  background: var(--awt-g1);
  border-color: var(--awt-g1);
  color: #fff;
}

.awt-flabel {
  font-size: 11px;
  font-weight: 800;
  color: var(--awt-g1);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

/* ── Inputs ─────────────────────────────────────────────────── */
.awt-word-input,
.awt-guess-input {
  width: 100%;
  height: 52px;
  border: 2px solid var(--awt-border);
  border-radius: 12px;
  padding: 0 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--awt-g1);
  background: #fff;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 3px;
  transition: border-color .15s;
  display: block;
  -webkit-appearance: none;
}
.awt-word-input  { margin-bottom: 10px; }
.awt-guess-input { margin-bottom: 8px; }
.awt-word-input:focus,
.awt-guess-input:focus { border-color: var(--awt-g2); }
.awt-word-input::placeholder,
.awt-guess-input::placeholder {
  color: #b0d8be;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 600;
}

/* ── Button rows ────────────────────────────────────────────── */
.awt-btn-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 8px;
  margin-bottom: 4px;
}
.awt-action-row {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 8px;
  margin-bottom: 10px;
}

.awt-btn-start,
.awt-btn-check {
  height: 52px;
  border-radius: 12px;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity .15s, transform .1s;
}
.awt-btn-start {
  background: var(--awt-gold);
  color: var(--awt-g1);
}
.awt-btn-start:active { transform: scale(.96); background: var(--awt-gold2); }

.awt-btn-check {
  background: var(--awt-g1);
  color: #fff;
}
.awt-btn-check:active { transform: scale(.96); background: var(--awt-g2); }

.awt-btn-clear {
  height: 52px;
  width: 52px;
  border-radius: 12px;
  border: 2px solid var(--awt-border);
  background: #fff;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s;
  line-height: 1;
}
.awt-btn-clear:active { background: var(--awt-soft); }

.awt-btn-hint {
  height: 52px;
  border-radius: 12px;
  border: 2px solid var(--awt-gold);
  background: #fff;
  color: var(--awt-gold2);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s;
}
.awt-btn-hint:active { background: #fffbec; }

/* ── Divider ─────────────────────────────────────────────────── */
.awt-divider {
  border: none;
  border-top: 2px solid #e0f0e6;
  margin: 12px 0;
}

/* ── Tiles ───────────────────────────────────────────────────── */
.awt-tiles-box {
  background: #fff;
  border: 2px solid var(--awt-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 58px;
  align-items: center;
  margin-bottom: 12px;
}
.awt-tile {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  border: 2px solid var(--awt-g3);
  background: var(--awt-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--awt-g1);
  transition: all .15s;
}
.awt-tile.awt-used {
  border-color: #ddd;
  background: #f5f5f5;
  color: #ccc;
  text-decoration: line-through;
}

/* ── Stats ───────────────────────────────────────────────────── */
.awt-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.awt-stat {
  background: #fff;
  border: 2px solid var(--awt-border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
}
.awt-stat-n {
  font-size: 24px;
  font-weight: 900;
  color: var(--awt-g1);
}
.awt-stat-l {
  font-size: 10px;
  color: #7aaa8a;
  font-weight: 800;
  margin-top: 1px;
}

/* ── Toast ───────────────────────────────────────────────────── */
.awt-toast {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
  display: none;
  line-height: 1.4;
}
.awt-toast.awt-show    { display: block; }
.awt-toast.awt-ok      { background:#e6f9ee; color:#1a6b3a; border:2px solid #a8ddb8; }
.awt-toast.awt-err     { background:#fdeaea; color:#a32d2d; border:2px solid #f5b0b0; }
.awt-toast.awt-warn    { background:#fffbea; color:#7a5800; border:2px solid #f5d87a; }

/* ── Section label ───────────────────────────────────────────── */
.awt-sec-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--awt-g1);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

/* ── Word chips ──────────────────────────────────────────────── */
.awt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 30px;
}
.awt-chip {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 20px;
  background: #e6f9ee;
  color: #1a6b3a;
  border: 2px solid #a8ddb8;
  animation: awt-pop .18s ease;
}
.awt-chip.awt-all-chip {
  background: #e8f4ff;
  color: #185fa5;
  border-color: #99c5f0;
}
@keyframes awt-pop {
  0%  { transform: scale(.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100%{ transform: scale(1);   opacity: 1; }
}

.awt-empty-txt {
  font-size: 13px;
  color: #aac8b4;
  font-weight: 700;
}
.awt-all-cnt {
  font-size: 12px;
  color: #7aaa8a;
  font-weight: 700;
  margin-bottom: 7px;
}

/* ── Responsive tweaks (small phones) ───────────────────────── */
@media (max-width: 360px) {
  .awt-hero-title { font-size: 17px; }
  .awt-word-input,
  .awt-guess-input,
  .awt-btn-start,
  .awt-btn-check  { height: 48px; font-size: 15px; }
  .awt-tile       { width: 36px; height: 36px; font-size: 16px; }
}
