/* ═══════════════════════════════════════════════════════
   GENERATOR-PAROLEJ — страничные стили
   Подключается ПОСЛЕ css/common.css
   ═══════════════════════════════════════════════════════ */

/* ── Акцент страницы: зелёный (LITE) + золотой (PRO) ──
   Для этой страницы page-accent = зелёный по умолчанию,
   но PRO-элементы используют --gold из common.css напрямую ── */
:root {
  --page-accent: #00ff88;
  --page-accent-dim: rgba(0,255,136,.10);
  --page-accent-glow: rgba(0,255,136,.28);
  --page-accent-light: #00ff88;
  --err: #ff4466;
}
[data-theme="light"] {
  --page-accent: #00cc66;
  --page-accent-dim: rgba(0,204,102,.10);
  --page-accent-glow: rgba(0,204,102,.28);
  --page-accent-light: #00cc66;
}

/* ── MODE SWITCHER ── */
.mode-switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 36px }
.mode-tab {
  border-radius: 20px; border: 2px solid var(--border);
  padding: 28px 26px 24px; cursor: pointer; position: relative; overflow: hidden;
  background: var(--surface); transition: all .25s; user-select: none;
}
.mode-tab::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none; border-radius: 18px }
.mode-tab.lite::after { background: radial-gradient(ellipse at 80% 20%, rgba(0,255,136,.09), transparent 65%) }
.mode-tab.pro::after { background: radial-gradient(ellipse at 80% 20%, rgba(255,170,0,.09), transparent 65%) }
.mode-tab:hover { transform: translateY(-2px) }
.mode-tab:hover::after { opacity: 1 }
.mode-tab.active::after { opacity: 1 }
.mode-tab.lite.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(0,255,136,.18) }
.mode-tab.pro.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 12px 40px rgba(255,170,0,.18) }
.mt-indicator { position: absolute; top: 18px; right: 18px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border2); transition: all .2s; display: flex; align-items: center; justify-content: center }
.mode-tab.lite.active .mt-indicator { border-color: var(--accent); background: var(--accent) }
.mode-tab.pro.active .mt-indicator { border-color: var(--gold); background: var(--gold) }
.mt-indicator::after { content: '✓'; font-size: .55rem; font-weight: 900; color: #000; opacity: 0; transition: opacity .15s }
.mode-tab.active .mt-indicator::after { opacity: 1 }
.mt-badge { display: inline-flex; align-items: center; gap: 5px; font-family: 'Space Mono', monospace; font-size: .58rem; letter-spacing: .12em; font-weight: 700; padding: 4px 11px; border-radius: 100px; margin-bottom: 12px }
.mode-tab.lite .mt-badge { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,255,136,.25) }
.mode-tab.pro .mt-badge { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(255,170,0,.25) }
.mt-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.06em; margin-bottom: 7px; line-height: 1 }
.mode-tab.lite .mt-title { color: var(--accent) }
.mode-tab.pro .mt-title { color: var(--gold) }
.mt-desc { font-size: .82rem; color: var(--muted); line-height: 1.55; max-width: 300px; margin-bottom: 14px }

/* ── Content views ── */
.view { display: none }
.view.active { display: block }

/* ── Panel overrides (короче радиус, другие классы head) ── */
.ph { padding: 12px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px }
.ph h3 { font-size: .86rem; font-weight: 700 }
.tag { font-family: 'Space Mono', monospace; font-size: .56rem; letter-spacing: .1em; padding: 3px 10px; border-radius: 100px }
.tag.g { border: 1px solid rgba(0,255,136,.25); color: var(--accent); background: var(--accent-dim) }
.tag.o { border: 1px solid rgba(255,170,0,.25); color: var(--gold); background: var(--gold-dim) }
.tag.b { border: 1px solid rgba(56,189,248,.25); color: var(--blue); background: var(--blue-dim) }
.tag.p { border: 1px solid rgba(167,139,250,.3); color: var(--purple); background: var(--purple-dim) }
.tag.m { border: 1px solid var(--border); color: var(--muted) }
.pb { padding: 18px 20px }

/* ── LITE display ── */
.lite-display { display: flex; flex-direction: column; align-items: center; padding: 32px 20px 24px; gap: 0 }
.lite-pw { font-family: 'Space Mono', monospace; font-size: clamp(1.1rem, 2.3vw, 1.55rem); font-weight: 700; letter-spacing: .1em; color: var(--text); word-break: break-all; text-align: center; line-height: 1.5; min-height: 2.8em; transition: filter .3s }
.lite-pw.blur { filter: blur(12px); user-select: none }
.str-wrap { width: 100%; max-width: 380px; margin-top: 18px }
.str-row { display: flex; justify-content: space-between; margin-bottom: 6px }
.str-lbl { font-family: 'Space Mono', monospace; font-size: .58rem; color: var(--muted); letter-spacing: .07em }
.str-val { font-family: 'Space Mono', monospace; font-size: .64rem; font-weight: 700 }
.str-bar { height: 4px; background: var(--border2); border-radius: 2px; overflow: hidden }
.str-fill { height: 100%; border-radius: 2px; transition: width .45s ease, background .45s }
.lite-btns { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; justify-content: center }

/* ── Buttons ── */
.btn-main { display: inline-flex; align-items: center; gap: 7px; font-family: 'Space Mono', monospace; font-size: .75rem; font-weight: 700; letter-spacing: .05em; padding: 12px 22px; border-radius: 10px; border: none; cursor: pointer; transition: all .2s }
.btn-main.green { background: var(--accent); color: #000; box-shadow: 0 0 22px var(--accent-glow) }
.btn-main.green:hover { transform: translateY(-2px); box-shadow: 0 0 36px var(--accent-glow); filter: brightness(1.06) }
.btn-main.gold { background: var(--gold); color: #000; box-shadow: 0 0 22px rgba(255,170,0,.3) }
.btn-main.gold:hover { transform: translateY(-2px); box-shadow: 0 0 36px rgba(255,170,0,.3); filter: brightness(1.06) }
.btn-out { display: inline-flex; align-items: center; gap: 6px; font-family: 'Space Mono', monospace; font-size: .72rem; letter-spacing: .04em; padding: 11px 16px; border-radius: 10px; border: 1px solid var(--border2); background: transparent; color: var(--text); cursor: pointer; transition: all .2s; text-decoration: none }
.btn-out:hover { border-color: var(--accent); color: var(--accent) }
.btn-out.gold:hover { border-color: var(--gold); color: var(--gold) }
.btn-out.shown { border-color: var(--accent); color: var(--accent); background: var(--accent-dim) }
.btn-out.copied { border-color: var(--accent); color: var(--accent); background: var(--accent-dim) }

/* ── Form ── */
.fg { margin-bottom: 14px }
.lbl { display: block; font-family: 'Space Mono', monospace; font-size: .6rem; letter-spacing: .08em; color: var(--muted); margin-bottom: 7px }
.lbl-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px }
.lbl-row .lbl { margin-bottom: 0 }
.lval { font-family: 'Space Mono', monospace; font-size: .74rem; font-weight: 700; color: var(--gold) }
input[type=range] { width: 100%; -webkit-appearance: none; height: 4px; background: var(--border2); border-radius: 2px; outline: none; cursor: pointer }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 8px rgba(255,170,0,.3); transition: transform .15s }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15) }
.rmarks { display: flex; justify-content: space-between; font-family: 'Space Mono', monospace; font-size: .52rem; color: var(--muted); margin-top: 5px }
.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0 }

/* ── Charset grid ── */
.cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px }
.cs-chip { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); cursor: pointer; transition: all .18s; user-select: none }
.cs-chip:hover { border-color: var(--border2) }
.cs-chip.on { border-color: rgba(255,170,0,.4); background: rgba(255,170,0,.07) }
.cs-box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border2); background: var(--surface); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .18s }
.cs-chip.on .cs-box { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 6px rgba(255,170,0,.3) }
.cs-check { width: 9px; height: 9px; opacity: 0; transition: opacity .15s; fill: none; stroke: #000; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.cs-chip.on .cs-check { opacity: 1 }
.cs-label { font-size: .8rem; font-weight: 600 }
.cs-sample { font-family: 'Space Mono', monospace; font-size: .58rem; color: var(--muted) }

/* ── Options ── */
.opt { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface2); cursor: pointer; transition: all .18s; user-select: none; margin-bottom: 7px }
.opt:last-child { margin-bottom: 0 }
.opt:hover { border-color: var(--border2) }
.opt.on { border-color: rgba(255,170,0,.35); background: rgba(255,170,0,.06) }
.opt input { display: none }
.opt-box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border2); background: var(--surface); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .18s }
.opt.on .opt-box { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 6px rgba(255,170,0,.3) }
.opt-lbl { font-size: .8rem; font-weight: 600; flex: 1 }
.opt-hint { font-family: 'Space Mono', monospace; font-size: .58rem; color: var(--muted) }

/* ── PRO results ── */
.pw-list { display: flex; flex-direction: column; gap: 9px }
.pw-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; animation: fadeUp .2s ease both; transition: border-color .2s }
.pw-card:hover { border-color: var(--border2) }
.pw-top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 9px }
.pw-idx { font-family: 'Space Mono', monospace; font-size: .6rem; color: var(--muted); flex-shrink: 0; padding-top: 2px; width: 24px }
.pw-txt { font-family: 'Space Mono', monospace; font-size: .88rem; font-weight: 700; color: var(--text); word-break: break-all; flex: 1; line-height: 1.45; transition: filter .25s }
.pw-txt.blur { filter: blur(8px); user-select: none }
.pw-acts { display: flex; gap: 5px; flex-shrink: 0 }
.ico-btn { width: 29px; height: 29px; border-radius: 7px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: .82rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; flex-shrink: 0 }
.ico-btn:hover { border-color: var(--gold); color: var(--gold) }
.ico-btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-dim) }
.pw-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center }
.mc { font-family: 'Space Mono', monospace; font-size: .57rem; padding: 3px 8px; border-radius: 5px; border: 1px solid }
.mc.ent { border-color: rgba(167,139,250,.3); color: var(--purple); background: var(--purple-dim) }
.mc.crk { border-color: rgba(56,189,248,.25); color: var(--blue); background: var(--blue-dim) }
.analyze-lnk { font-family: 'Space Mono', monospace; font-size: .56rem; color: var(--muted); text-decoration: none; border: 1px solid var(--border); border-radius: 5px; padding: 3px 8px; margin-left: auto; transition: all .15s }
.analyze-lnk:hover { border-color: var(--purple); color: var(--purple) }

/* ── QR ── */
.qr-outer { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px }
.qr-box { width: 176px; height: 176px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,.35) }
.qr-ph { text-align: center; color: #aaa; font-family: 'Space Mono', monospace; font-size: .66rem; padding: 18px; line-height: 1.5 }
.btn-dl { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--text); font-family: 'Space Mono', monospace; font-size: .66rem; letter-spacing: .04em; padding: 9px 15px; border-radius: 8px; border: 1px solid var(--border2); cursor: pointer; transition: all .2s }
.btn-dl:hover { border-color: var(--accent); color: var(--accent) }
.btn-dl:disabled { opacity: .3; cursor: not-allowed; pointer-events: none }

/* ── Preview ── */
.preview-pw { font-family: 'Space Mono', monospace; font-size: .78rem; word-break: break-all; line-height: 1.5; min-height: 24px; filter: blur(3px); user-select: none; opacity: .7 }
.preview-row { display: flex; justify-content: space-between; font-family: 'Space Mono', monospace; font-size: .61rem; margin-bottom: 4px }
.preview-row span:first-child { color: var(--muted) }

/* ── Strength legend ── */
.sl-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px }
.sl-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0 }

/* ── Empty state ── */
.empty { text-align: center; padding: 28px; font-family: 'Space Mono', monospace; font-size: .74rem; color: var(--muted); line-height: 1.6 }
.empty-ico { font-size: 1.8rem; display: block; margin-bottom: 9px }

/* ── Mobile "100% local" duplicate ── */
.local-duplicate { display: none }
@media (max-width: 640px) {
  .local-original { display: none }
  .local-duplicate { display: block; margin-top: 16px }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .mode-switcher { gap: 10px }
}
@media (max-width: 640px) {
  .mode-switcher { grid-template-columns: 1fr }
  .cs-grid { grid-template-columns: 1fr }
  .mt-title { font-size: 1.3rem }
}
