:root { --bg:#0d0d0f; --card:#16171a; --line:#c9f24a; --text:#e8e8e8; --muted:#8a8a8a; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:15px/1.5 system-ui, sans-serif; -webkit-text-size-adjust:100%; }
.hidden { display:none !important; }
.err { color:#ff6b6b; min-height:1.2em; }

.login { max-width:320px; margin:15vh auto; display:flex; flex-direction:column; gap:12px; padding:0 16px; }
.login input, .login button { padding:10px 12px; font-size:16px; border-radius:8px; border:1px solid #333; }
.login button { background:var(--line); color:#111; font-weight:600; border:none; cursor:pointer; }

.app header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:14px 18px; border-bottom:1px solid #222; position:sticky; top:0; background:var(--bg); z-index:5; }
.app header h1 { margin:0; font-size:20px; }
.head-right { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.app header select { margin-left:8px; padding:6px 8px; background:var(--card); color:var(--text); border:1px solid #333; border-radius:6px; max-width:60vw; }
#lockBtn { padding:7px 12px; background:transparent; color:var(--text); border:1px solid #333; border-radius:8px; cursor:pointer; font:inherit; }
#lockBtn:hover { border-color:var(--line); }

main { display:grid; gap:16px; padding:18px; grid-template-columns:repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

.card { background:var(--card); border:1px solid #262626; border-radius:12px; padding:14px; }
.card-head { display:flex; align-items:center; gap:8px; flex-wrap:nowrap; }
.who { display:flex; align-items:baseline; gap:6px; min-width:0; flex:1; }
.pname { font-weight:700; white-space:nowrap; }
.phandle { color:var(--muted); font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tabs { margin-left:auto; display:flex; gap:4px; flex-shrink:0; }
.tab { background:transparent; color:var(--muted); border:1px solid #333; border-radius:6px; padding:4px 10px; cursor:pointer; }
.tab.active { background:var(--line); color:#111; border-color:var(--line); font-weight:600; }
.pstyle { color:var(--muted); font-size:12px; margin:6px 0 10px; }

.drop { border:1.5px dashed #3a3a3a; border-radius:8px; padding:14px; text-align:center; color:var(--muted); cursor:pointer; font-size:13px; }
.drop.hot { border-color:var(--line); color:var(--text); }
.preview-wrap { position:relative; margin-top:8px; }
.preview { display:block; max-width:100%; border-radius:8px; }
.rmimg { position:absolute; top:6px; right:6px; width:26px; height:26px; line-height:1; padding:0; border:none; border-radius:50%; background:rgba(0,0,0,.7); color:#fff; cursor:pointer; font-size:14px; display:flex; align-items:center; justify-content:center; }
.rmimg:hover { background:#ff5c5c; }
textarea { width:100%; margin-top:8px; min-height:60px; resize:vertical; background:#0f1012; color:var(--text); border:1px solid #333; border-radius:8px; padding:8px; font:inherit; }
.gen { margin-top:10px; width:100%; padding:11px; background:var(--line); color:#111; font-weight:600; border:none; border-radius:8px; cursor:pointer; }
.gen[disabled] { opacity:.5; cursor:wait; }

.cycle { margin-top:6px; text-align:right; color:var(--muted); font-size:11px; }
.results { margin-top:12px; display:flex; flex-direction:column; gap:8px; }
.opt { display:flex; gap:8px; align-items:flex-start; background:#0f1012; border:1px solid #2a2a2a; border-radius:8px; padding:8px; }
.opt p { margin:0; flex:1; white-space:pre-wrap; overflow-wrap:anywhere; }
.opt button { background:#2a2a2a; color:var(--text); border:none; border-radius:6px; padding:6px 10px; cursor:pointer; font-size:12px; flex-shrink:0; }
.opt button.copied { background:var(--line); color:#111; }

@media (max-width: 480px) {
  main { padding:12px; gap:12px; }
  .card { padding:12px; }
  .app header { padding:12px 14px; }
}
