/* ============================================================
   WordTool Hub — styles.css
   Shared stylesheet for all pages
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:      #09090b;
  --bg2:     #0f1014;
  --bg3:     #16181e;
  --bg4:     #1c1f27;
  --border:  rgba(255,255,255,.07);
  --border2: rgba(255,255,255,.12);
  --text:    #e4e2dc;
  --muted:   #5c5c6b;
  --muted2:  #8a8a9a;
  --gold:    #d4a843;
  --gold-d:  rgba(212,168,67,.1);
  --gold-d2: rgba(212,168,67,.2);
  --teal:    #3ecfbe;
  --teal-d:  rgba(62,207,190,.1);
  --red:     #e05252;
  --nav-h:   56px;
  --max-w:   1100px;
  --r:       10px;
  --r-sm:    6px;
  --ff:      'Syne', sans-serif;
  --fm:      'JetBrains Mono', monospace;
  --fb:      'DM Sans', sans-serif;
  --shadow:  0 8px 40px rgba(0,0,0,.5);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--fb);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--fb); }
input, select { font-family: var(--fb); }
img { display: block; max-width: 100%; }
::selection { background: var(--gold-d2); color: var(--gold); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

/* ── NAV ─────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 900;
  height: var(--nav-h);
  background: rgba(9,9,11,.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 20px; gap: 0;
}
.nav-logo {
  font-family: var(--ff);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
  margin-right: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo span { color: var(--gold); }
.nav-links {
  display: flex; align-items: center;
  gap: 2px; overflow-x: auto;
  flex: 1; scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--muted2);
  font-size: .76rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; background: var(--bg3); }
.nav-links a.active { color: var(--gold); border-color: var(--gold-d2); background: var(--gold-d); }
.nav-links .badge {
  display: inline-block; margin-left: 3px;
  background: var(--gold); color: #09090b;
  font-size: .52rem; font-weight: 800;
  padding: 1px 5px; border-radius: 3px;
  vertical-align: middle; text-transform: uppercase;
  letter-spacing: .06em;
}
.hamburger {
  display: none;
  background: none; border: none;
  color: var(--muted2); font-size: 1.2rem;
  padding: 6px; margin-left: 8px;
}
.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  z-index: 899; background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 16px;
  flex-direction: column; gap: 3px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--muted2); font-size: .9rem;
  padding: 9px 14px; border-radius: var(--r-sm);
  transition: color .14s, background .14s;
}
.mobile-menu a:hover { color: var(--text); background: var(--bg3); text-decoration: none; }
.mobile-menu a.active { color: var(--gold); }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
}

/* ── LAYOUT ──────────────────────────────────────────────── */
.page-wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.page-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
  padding: 36px 0 80px;
}
@media (max-width: 860px) { .page-grid { grid-template-columns: 1fr; } }

/* ── HERO ─────────────────────────────────────────────────── */
.tool-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.tool-hero-tag {
  font-family: var(--fm);
  font-size: .65rem; color: var(--gold);
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 10px; opacity: .85;
}
.tool-hero h1 {
  font-family: var(--ff);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.tool-hero h1 em { font-style: italic; color: var(--gold); font-weight: 400; }
.tool-hero p {
  font-size: .95rem; color: var(--muted2);
  font-weight: 300; max-width: 540px; line-height: 1.7;
}
.tool-hero-pills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px;
}
.tool-pill {
  font-family: var(--fm);
  font-size: .65rem; font-weight: 500;
  color: var(--muted2);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 12px;
  letter-spacing: .04em;
}

/* ── INPUT ZONE ──────────────────────────────────────────── */
.input-zone {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 22px;
  margin-bottom: 20px;
}
.input-row {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
}
.input-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 180px; }
.input-group label {
  font-size: .68rem; font-weight: 600;
  color: var(--muted); letter-spacing: .08em;
  text-transform: uppercase;
}
.main-input {
  width: 100%;
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: var(--r-sm); color: var(--text);
  padding: 11px 14px; font-size: .95rem;
  font-family: var(--fm); letter-spacing: .04em;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.main-input::placeholder { color: var(--muted); font-family: var(--fb); letter-spacing: 0; font-size: .88rem; }
.main-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,168,67,.1); }
.main-input.has-error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(224,82,82,.1); }
.num-input {
  width: 100px;
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: var(--r-sm); color: var(--text);
  padding: 11px 14px; font-size: .95rem;
  outline: none; transition: border-color .15s;
}
.num-input:focus { border-color: var(--gold); }
.input-error {
  font-size: .73rem; color: var(--red);
  margin-top: 4px; display: none;
}
.input-error.show { display: block; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  border: none; border-radius: var(--r-sm);
  font-weight: 600; font-size: .87rem;
  padding: 11px 22px; transition: all .15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold); color: #09090b;
  box-shadow: 0 2px 12px rgba(212,168,67,.25);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,168,67,.3); }
.btn-primary:active { transform: none; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border2);
  color: var(--muted2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border); background: var(--bg3); }
.btn-sm { padding: 6px 14px; font-size: .78rem; }
.btn-icon {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted); padding: 6px 10px;
  border-radius: var(--r-sm); font-size: .78rem;
  transition: all .14s;
}
.btn-icon:hover { color: var(--gold); border-color: var(--gold-d2); background: var(--gold-d); }
.btn-icon.copied { color: var(--teal); border-color: var(--teal-d); }

/* ── RESULTS TOOLBAR ─────────────────────────────────────── */
.results-bar {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  margin-bottom: 14px;
}
.results-count {
  font-family: var(--fm); font-size: .8rem; color: var(--muted2);
}
.results-count strong { color: var(--gold); font-size: 1rem; }
.results-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sort-tabs { display: flex; gap: 4px; }
.sort-tab {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 999px; color: var(--muted);
  font-size: .7rem; padding: 4px 12px;
  transition: all .13s;
}
.sort-tab.active { background: var(--gold-d); border-color: var(--gold-d2); color: var(--gold); }
.len-filters { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 12px; }
.len-btn {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; color: var(--muted);
  font-family: var(--fm); font-size: .68rem;
  padding: 3px 10px; transition: all .13s;
}
.len-btn:hover { color: var(--muted2); border-color: var(--border2); }
.len-btn.active { background: var(--gold-d); border-color: var(--gold-d2); color: var(--gold); }

/* ── WORD GRID ────────────────────────────────────────────── */
.word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 7px;
}
.word-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 5px;
  transition: border-color .14s, background .14s, transform .14s;
  animation: card-in .18s ease both;
}
.word-card:hover {
  border-color: var(--border2);
  background: var(--bg3);
  transform: translateY(-1px);
}
@keyframes card-in {
  from { opacity: 0; transform: scale(.96) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.word-text {
  font-family: var(--fm);
  font-size: .86rem; font-weight: 500;
  color: var(--text); letter-spacing: .02em;
  word-break: break-all;
}
.word-len {
  font-family: var(--fm); font-size: .58rem;
  color: var(--muted); background: var(--bg);
  border-radius: 4px; padding: 1px 6px; flex-shrink: 0;
}
.copy-word-btn {
  background: none; border: none; color: var(--muted);
  font-size: .72rem; padding: 2px 5px;
  border-radius: 4px; opacity: 0;
  transition: color .13s, background .13s, opacity .13s;
  flex-shrink: 0;
}
.word-card:hover .copy-word-btn { opacity: 1; }
.copy-word-btn:hover { color: var(--gold); background: var(--gold-d); }
.copy-word-btn.done { color: var(--teal); opacity: 1; }

/* ── STATES ──────────────────────────────────────────────── */
.state-panel {
  display: none;
  flex-direction: column; align-items: center;
  justify-content: center; gap: 12px;
  padding: 56px 24px; text-align: center;
}
.state-panel.show { display: flex; }
.state-icon { font-size: 2rem; opacity: .35; }
.state-msg { font-size: .88rem; color: var(--muted); line-height: 1.65; }
.state-msg strong { color: var(--muted2); }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border2); border-top-color: var(--gold);
  animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 16px; padding-top: 36px; }
@media (max-width: 860px) { .sidebar { padding-top: 0; } }

.sidebar-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px;
}
.sidebar-card h4 {
  font-family: var(--fm); font-size: .65rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 0; border-bottom: 1px solid var(--border);
  color: var(--muted2); font-size: .82rem;
  transition: color .13s; cursor: pointer;
}
.sidebar-link:last-child { border-bottom: none; }
.sidebar-link:hover { color: var(--gold); text-decoration: none; }
.sidebar-link-icon { font-size: .9rem; flex-shrink: 0; }
.sidebar-link-arr { margin-left: auto; color: var(--muted); font-size: .75rem; transition: color .13s; }
.sidebar-link:hover .sidebar-link-arr { color: var(--gold); }

/* ── AD BLOCKS ───────────────────────────────────────────── */
.ad-banner {
  width: 100%;
  background: repeating-linear-gradient(-45deg, var(--bg2) 0, var(--bg2) 6px, var(--bg) 6px, var(--bg) 12px);
  border: 1px dashed var(--border2);
  border-radius: var(--r);
  padding: 16px; text-align: center;
  font-family: var(--fm); font-size: .6rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
}
.ad-box {
  background: repeating-linear-gradient(-45deg, var(--bg2) 0, var(--bg2) 6px, var(--bg) 6px, var(--bg) 12px);
  border: 1px dashed var(--border2);
  border-radius: var(--r);
  padding: 24px 16px; text-align: center;
  font-family: var(--fm); font-size: .6rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  min-height: 250px; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
}
.ad-mid {
  background: repeating-linear-gradient(-45deg, var(--bg2) 0, var(--bg2) 6px, var(--bg) 6px, var(--bg) 12px);
  border: 1px dashed var(--border2);
  border-radius: var(--r);
  padding: 20px; text-align: center;
  font-family: var(--fm); font-size: .6rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 24px 0;
  min-height: 120px; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
}

/* ── SEO CONTENT ─────────────────────────────────────────── */
.seo-content { padding: 48px 0 80px; border-top: 1px solid var(--border); }
.seo-content h2 {
  font-family: var(--ff); font-size: 1.5rem; font-weight: 700;
  letter-spacing: -.02em; margin-bottom: 14px; margin-top: 36px;
  color: var(--text);
}
.seo-content h2:first-child { margin-top: 0; }
.seo-content h3 {
  font-family: var(--ff); font-size: 1.05rem; font-weight: 600;
  margin-bottom: 8px; margin-top: 20px; color: var(--text);
}
.seo-content p {
  font-size: .9rem; color: var(--muted2); line-height: 1.8;
  margin-bottom: 12px; max-width: 720px;
}
.seo-content a { color: var(--gold); }
.faq-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px 20px; margin-bottom: 10px;
}
.faq-q { font-weight: 600; color: var(--text); font-size: .9rem; margin-bottom: 6px; }
.faq-a { font-size: .85rem; color: var(--muted2); line-height: 1.7; }
.internal-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px; margin-top: 16px;
}
.internal-link-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  transition: border-color .14s, background .14s;
}
.internal-link-card:hover {
  border-color: var(--gold-d2); background: var(--bg3);
  text-decoration: none;
}
.internal-link-card .ilc-icon { font-size: 1.1rem; margin-bottom: 6px; }
.internal-link-card .ilc-name { font-size: .84rem; font-weight: 600; color: var(--text); }
.internal-link-card .ilc-desc { font-size: .74rem; color: var(--muted); margin-top: 2px; }

/* ── STATIC WORD LIST (SEO pages) ────────────────────────── */
.static-word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px; margin-top: 20px; margin-bottom: 28px;
}
.static-word {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 7px 10px;
  font-family: var(--fm); font-size: .8rem;
  color: var(--text); text-align: center;
  transition: border-color .13s, color .13s;
}
.static-word:hover { border-color: var(--gold-d2); color: var(--gold); }

/* ── HOME PAGE ───────────────────────────────────────────── */
.home-hero {
  padding: 72px 20px 56px;
  text-align: center;
  background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(212,168,67,.07) 0%, transparent 65%),
              var(--bg);
}
.home-hero-eyebrow {
  font-family: var(--fm); font-size: .67rem;
  color: var(--gold); letter-spacing: .15em;
  text-transform: uppercase; opacity: .8;
  margin-bottom: 22px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.home-hero-eyebrow::before,
.home-hero-eyebrow::after {
  content: ''; height: 1px; width: 30px;
  background: var(--gold); opacity: .3;
}
.home-hero h1 {
  font-family: var(--ff); font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.08; letter-spacing: -.03em;
  margin-bottom: 20px;
}
.home-hero h1 em { font-style: italic; color: var(--gold); font-weight: 400; }
.home-hero-sub {
  font-size: 1rem; color: var(--muted2); font-weight: 300;
  max-width: 480px; margin: 0 auto 36px; line-height: 1.7;
}
.home-status {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 16px;
  font-family: var(--fm); font-size: .7rem; color: var(--muted2);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80; flex-shrink: 0;
  animation: pulse-dot 2.5s ease infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.home-status span { color: var(--gold); font-weight: 600; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; max-width: var(--max-w); margin: 56px auto 0; padding: 0 20px 80px;
}
.tool-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 20px;
  display: block; color: var(--text);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.tool-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 0 0, rgba(212,168,67,.05), transparent 60%);
  opacity: 0; transition: opacity .25s;
}
.tool-card:hover::after { opacity: 1; }
.tool-card:hover {
  border-color: rgba(212,168,67,.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(212,168,67,.06);
  text-decoration: none; color: var(--text);
}
.tool-card.featured { border-color: rgba(212,168,67,.25); background: linear-gradient(135deg, rgba(212,168,67,.05), transparent); }
.tc-num { font-family: var(--fm); font-size: .6rem; color: var(--muted); letter-spacing: .1em; margin-bottom: 10px; }
.tc-icon { font-size: 1.4rem; margin-bottom: 9px; display: block; }
.tc-name { font-family: var(--ff); font-size: 1rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.tc-desc { font-size: .77rem; color: var(--muted); line-height: 1.55; }
.tc-arr { position: absolute; right: 16px; bottom: 18px; color: var(--muted); font-size: .82rem; transition: color .15s, right .15s; }
.tool-card:hover .tc-arr { color: var(--gold); right: 12px; }

.home-seo { max-width: var(--max-w); margin: 0 auto; padding: 0 20px 80px; }
.home-seo h2 { font-family: var(--ff); font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; }
.home-seo p { font-size: .9rem; color: var(--muted2); line-height: 1.8; margin-bottom: 12px; max-width: 720px; }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 40px 20px 28px;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-logo { font-family: var(--ff); font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 5px; }
.footer-logo span { color: var(--gold); }
.footer-sub { font-size: .78rem; color: var(--muted); margin-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; margin-bottom: 28px; }
.footer-col h5 { font-family: var(--fm); font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: 7px; }
.footer-col a { color: var(--muted2); font-size: .8rem; transition: color .13s; }
.footer-col a:hover { color: var(--gold); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 18px;
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: space-between;
  font-size: .7rem; color: var(--muted); font-family: var(--fm);
}

/* ── UTILITIES ───────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--muted2); }
.mono { font-family: var(--fm); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }

@media (max-width: 480px) {
  .word-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .tools-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .input-row { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
}
@media (max-width: 360px) {
  .tools-grid { grid-template-columns: 1fr; }
}
