:root{
  --bg:#0b0f14;
  --text:#e8eef7;
  --muted:#9fb0c6;
  --line:rgba(255,255,255,.08);
  --acc:#3aa0ff;
  --good:#3bd27f;
  --bad:#ff5c7a;
  --shadow: 0 10px 40px rgba(0,0,0,.35);
  --r:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 20% -10%, rgba(58,160,255,.18), transparent 60%),
              radial-gradient(900px 600px at 90% 0%, rgba(59,210,127,.10), transparent 55%),
              var(--bg);
  color:var(--text);
}

.app{min-height:100%; display:flex; flex-direction:column}
.topbar{
  position:sticky; top:0; z-index:10;
  padding:14px 14px 12px;
  background: linear-gradient(to bottom, rgba(11,15,20,.92), rgba(11,15,20,.65));
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar__title{font-weight:800; margin-bottom:10px}

.segmented{
  display:flex; gap:8px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  padding:6px;
  border-radius: 999px;
  margin-bottom:10px;
}
.segmented__btn{
  flex:1; border:0; background:transparent;
  color:var(--muted);
  padding:10px 10px;
  border-radius:999px;
  font-weight:700;
}
.segmented__btn.is-active{
  background: rgba(58,160,255,.18);
  color:var(--text);
  border:1px solid rgba(58,160,255,.35);
}

.filters{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:10px;
}
.select{
  width:100%;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text);
  padding:12px 12px;
  border-radius: 14px;
  font-size:14px;
  outline:none;
}
.select:disabled{opacity:.5}

.miniBar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.miniBar__item{
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  padding:8px 10px;
  border-radius:999px;
}

.main{flex:1; padding:14px; padding-bottom:86px; max-width:720px; width:100%; margin:0 auto}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding:16px;
}
.card__label{color:var(--muted); font-size:13px; margin-bottom:10px}
.card__word{
  font-size:34px;
  line-height:1.1;
  font-weight:900;
  letter-spacing:.2px;
  margin-bottom:14px;
  word-break:break-word;
}

.hint{
  background: rgba(255,255,255,.03);
  border:1px dashed rgba(255,255,255,.14);
  border-radius: 14px;
  padding:12px;
  margin-bottom:12px;
}
.hint__title{font-size:12px; color:var(--muted); margin-bottom:8px}
.hint__actions{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px}
.hint__text{font-size:14px; color:var(--text); min-height:18px}

.inputRow{display:flex; gap:10px}
.input{
  flex:1;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text);
  padding:14px 14px;
  border-radius: 14px;
  font-size:16px;
  outline:none;
}
.input:focus{
  border-color: rgba(58,160,255,.55);
  box-shadow: 0 0 0 4px rgba(58,160,255,.15);
}

.btn{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:12px 14px;
  border-radius: 14px;
  font-weight:800;
  cursor:pointer;
  user-select:none;
}
.btn:active{transform: translateY(1px)}
.btn-primary{
  border-color: rgba(58,160,255,.45);
  background: rgba(58,160,255,.16);
}
.btn-ghost{background: transparent}
.btn-chip{padding:10px 12px; border-radius:999px; font-weight:800}

.after{margin-top:14px; border-top:1px solid var(--line); padding-top:14px}
.result{font-weight:900; margin-bottom:8px}
.result.good{color:var(--good)}
.result.bad{color:var(--bad)}
.expected{color:var(--muted); font-size:14px; margin-bottom:12px}
.after__actions{display:flex; gap:10px; flex-wrap:wrap}

.quality{margin:10px 0 12px}
.quality__title{font-size:12px; color:var(--muted); margin-bottom:8px}
.quality__buttons{display:flex; gap:8px; flex-wrap:wrap}

.empty{
  margin-top:14px;
  border-top:1px solid var(--line);
  padding-top:14px;
}
.empty__title{font-weight:900; margin-bottom:6px}
.empty__text{color:var(--muted); margin-bottom:10px}

.stats__head{display:flex; align-items:center; justify-content:space-between; margin:14px 2px 10px}
.stats__title{font-weight:900}
.statsGrid{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.statBox{
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius: var(--r);
  padding:12px;
}
.statBox__label{color:var(--muted); font-size:12px; margin-bottom:6px}
.statBox__value{font-size:20px; font-weight:900}
.statBox__sub{color:var(--muted); font-size:12px; margin-top:4px}

.hard{margin-top:12px}
.hard__title{color:var(--muted); font-size:12px; margin:0 2px 8px}
.hard__list{display:flex; flex-direction:column; gap:8px}
.hardItem{
  display:flex; justify-content:space-between; gap:10px;
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius: 14px;
  padding:10px 12px;
}
.hardItem__main{min-width:0}
.hardItem__en{font-weight:900}
.hardItem__ru{color:var(--muted); font-size:12px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.hardItem__meta{color:var(--muted); font-size:12px; white-space:nowrap}

.bottombar{
  position:fixed; left:0; right:0; bottom:0; z-index:12;
  background: linear-gradient(to top, rgba(11,15,20,.92), rgba(11,15,20,.55));
  backdrop-filter: blur(10px);
  border-top:1px solid var(--line);
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  display:flex; gap:10px;
}
.bottombar__btn{
  flex:1;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color:var(--muted);
  border-radius: 14px;
  padding:12px 10px;
  font-weight:900;
}
.bottombar__btn.is-active{
  color:var(--text);
  border-color: rgba(58,160,255,.35);
  background: rgba(58,160,255,.12);
}
.select{
  width:100%;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  padding:12px 44px 12px 12px;
  border-radius: 14px;
  font-size:14px;
  outline:none;

  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(232,238,247,.75) 50%),
    linear-gradient(135deg, rgba(232,238,247,.75) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat:no-repeat;
}

.select:focus{
  border-color: rgba(58,160,255,.55);
  box-shadow: 0 0 0 4px rgba(58,160,255,.15);
}
.select:disabled{opacity:.5}

