/* ==========================================================================
   Input Service — спільний дизайн сайту. Пурпурний неон, точно під застосунок
   (кольори з clone\src\Ui.cs). Підключається в index / account / admin.
   ========================================================================== */
:root {
  --bg:#0E061E; --panel:#1E0F3A; --field:#28164A; --fg:#F0E2FF; --dim:#9880BC;
  --acc:#DA64FF; --bound:#7E26B0; --danger:#D63A68; --line:#5C3096; --hover:#3C206C;
  --ok:#57E0A0;
  --glow:0 0 24px rgba(218,100,255,.35);
  --radius:14px;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  margin:0; color:var(--fg); font:15px/1.6 "Segoe UI",system-ui,sans-serif;
  background:
    radial-gradient(1100px 600px at 78% -8%, rgba(218,100,255,.16), transparent 60%),
    radial-gradient(900px 500px at 8% 4%, rgba(126,38,176,.20), transparent 55%),
    var(--bg);
  background-attachment:fixed;
  -webkit-font-smoothing:antialiased;
}
a { color:var(--acc); text-decoration:none; }
a:hover { text-decoration:underline; }
h1,h2,h3 { line-height:1.2; }
img { max-width:100%; display:block; }
.wrap { max-width:1040px; margin:0 auto; padding:0 20px; }
.narrow { max-width:660px; }

/* ---- header / nav ---- */
.site-head { position:sticky; top:0; z-index:20; backdrop-filter:blur(10px);
  background:linear-gradient(to bottom, rgba(14,6,30,.92), rgba(14,6,30,.66)); border-bottom:1px solid rgba(92,48,150,.4); }
.site-head .wrap { display:flex; align-items:center; justify-content:space-between; height:60px; }
.logo { font-weight:800; font-size:19px; letter-spacing:.01em; color:var(--fg); display:flex; align-items:center; gap:2px; }
.logo:hover { text-decoration:none; }
.logo .dot { color:var(--acc); text-shadow:0 0 10px var(--acc); }
.nav { display:flex; align-items:center; gap:22px; }
.nav a { color:var(--dim); font-size:14px; font-weight:500; }
.nav a:hover { color:var(--fg); text-decoration:none; }

/* ---- buttons ---- */
.btn { display:inline-flex; align-items:center; gap:8px; justify-content:center;
  background:var(--bound); color:#fff; border:1px solid var(--acc); border-radius:10px;
  padding:11px 20px; font-weight:600; font-size:15px; cursor:pointer; transition:.16s; white-space:nowrap; }
.btn:hover { background:#9333c9; box-shadow:var(--glow); text-decoration:none; transform:translateY(-1px); }
.btn.ghost { background:rgba(40,22,74,.5); color:var(--fg); border-color:var(--line); }
.btn.ghost:hover { background:var(--hover); box-shadow:none; border-color:var(--acc); }
.btn.danger { background:var(--danger); border-color:#e8688e; }
.btn.danger:hover { background:#e34570; }
.btn.lg { padding:14px 26px; font-size:16px; }
.btn.block { width:100%; }
.btn[disabled] { opacity:.55; cursor:default; transform:none; box-shadow:none; }

/* ---- cards / sections ---- */
.card { background:linear-gradient(180deg, rgba(30,15,58,.9), rgba(30,15,58,.6));
  border:1px solid var(--line); border-radius:var(--radius); padding:22px; }
.section { padding:64px 0; }
.section h2 { font-size:30px; margin:0 0 8px; }
.section .lead { color:var(--dim); margin:0 0 34px; font-size:16px; }
.eyebrow { color:var(--acc); font-weight:700; font-size:13px; letter-spacing:.14em; text-transform:uppercase; margin:0 0 10px; }
.divider { height:1px; background:linear-gradient(to right, transparent, var(--line), transparent); border:0; margin:0; }

/* ---- hero ---- */
.hero { text-align:center; padding:84px 0 60px; }
.hero h1 { font-size:clamp(34px,6vw,56px); margin:0 0 18px; letter-spacing:-.01em; }
.hero h1 .grad { background:linear-gradient(120deg,#F0E2FF 10%,var(--acc) 60%,#ff9bf2 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero p { font-size:19px; color:var(--dim); max-width:640px; margin:0 auto 30px; }
.cta { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.sub-note { color:var(--dim); font-size:13px; margin-top:16px; }

/* ---- feature grid ---- */
.grid { display:grid; gap:18px; }
.grid.cols-3 { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.feature { background:linear-gradient(180deg, rgba(30,15,58,.9), rgba(30,15,58,.55));
  border:1px solid var(--line); border-radius:var(--radius); padding:24px; transition:.18s; }
.feature:hover { border-color:var(--acc); box-shadow:var(--glow); transform:translateY(-3px); }
.feature .ico { width:42px; height:42px; margin-bottom:14px; color:var(--acc); }
.feature h3 { margin:0 0 7px; font-size:18px; }
.feature p { margin:0; color:var(--dim); font-size:14.5px; }

/* ---- showcase (screenshots) ---- */
.shot { border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(218,100,255,.08); background:var(--panel); }
.showcase { display:grid; grid-template-columns:1.1fr .9fr; gap:34px; align-items:center; }
.showcase.rev { grid-template-columns:.9fr 1.1fr; }
.showcase .txt h3 { font-size:23px; margin:0 0 10px; }
.showcase .txt p { color:var(--dim); margin:0 0 14px; }
.checklist { list-style:none; padding:0; margin:0; }
.checklist li { padding:5px 0 5px 26px; position:relative; color:var(--fg); }
.checklist li::before { content:"✦"; position:absolute; left:0; color:var(--acc); }

/* ---- steps ---- */
.steps { counter-reset:s; display:grid; gap:14px; }
.step { background:rgba(30,15,58,.6); border:1px solid var(--line); border-radius:12px;
  padding:16px 18px 16px 62px; position:relative; }
.step::before { counter-increment:s; content:counter(s); position:absolute; left:16px; top:50%; transform:translateY(-50%);
  width:32px; height:32px; border-radius:50%; background:var(--bound); color:#fff; display:flex; align-items:center;
  justify-content:center; font-weight:700; box-shadow:0 0 14px rgba(218,100,255,.5); border:1px solid var(--acc); }
.step b { color:var(--fg); }
.step span { color:var(--dim); }

/* ---- FAQ ---- */
.faq details { border:1px solid var(--line); border-radius:12px; background:rgba(30,15,58,.5); margin-bottom:12px; overflow:hidden; }
.faq summary { cursor:pointer; padding:16px 20px; font-weight:600; list-style:none; display:flex; justify-content:space-between; align-items:center; }
.faq summary::-webkit-details-marker { display:none; }
.faq summary::after { content:"+"; color:var(--acc); font-size:22px; font-weight:400; line-height:1; }
.faq details[open] summary::after { content:"–"; }
.faq summary:hover { color:var(--acc); }
.faq .body { padding:0 20px 18px; color:var(--dim); }

/* ---- download band ---- */
.band { background:linear-gradient(135deg, rgba(126,38,176,.3), rgba(218,100,255,.14));
  border:1px solid var(--acc); border-radius:20px; padding:44px; text-align:center; box-shadow:var(--glow); }
.band h2 { margin:0 0 10px; font-size:30px; }
.band p { color:#e7d4ff; margin:0 0 24px; }
.meta { color:var(--dim); font-size:13px; margin-top:14px; display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }

/* ---- footer ---- */
.site-foot { border-top:1px solid rgba(92,48,150,.4); margin-top:40px; padding:30px 0; }
.site-foot .wrap { display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; color:var(--dim); font-size:13px; }
.site-foot a { color:var(--dim); } .site-foot a:hover { color:var(--fg); }

/* ---- forms (account / admin) ---- */
label { display:block; color:var(--dim); font-size:13px; margin-bottom:5px; }
.field { margin:12px 0; }
input,select,textarea { font:inherit; width:100%; background:var(--field); color:var(--fg);
  border:1px solid var(--line); border-radius:8px; padding:10px 12px; transition:.15s; }
input:focus,select:focus,textarea:focus { outline:none; border-color:var(--acc); box-shadow:0 0 0 3px rgba(218,100,255,.18); }
.tabs { display:flex; gap:8px; margin-bottom:16px; }
.tabs button { flex:1; background:rgba(40,22,74,.5); color:var(--fg); border:1px solid var(--line);
  border-radius:9px; padding:10px; cursor:pointer; font:inherit; transition:.15s; }
.tabs button.active { background:var(--bound); border-color:var(--acc); box-shadow:var(--glow); }
.muted { color:var(--dim); }
.err { color:#ff9bb5; min-height:18px; font-size:14px; }
.ok { color:var(--ok); min-height:18px; font-size:14px; }
.pill { display:inline-block; padding:2px 10px; border-radius:999px; font-size:12px; border:1px solid var(--line); }
.pill.ok { color:var(--ok); border-color:#2f6b55; } .pill.no { color:#ffa6c0; border-color:#6b2f45; }
.big { font-size:28px; font-weight:800; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.between { justify-content:space-between; }
code { background:var(--field); padding:2px 7px; border-radius:5px; font-size:13px; }
.hidden { display:none; }
table { width:100%; border-collapse:collapse; }
th,td { text-align:left; padding:9px 10px; border-bottom:1px solid rgba(92,48,150,.35); font-size:14px; }
th { color:var(--dim); font-weight:600; }
tr:hover td { background:rgba(60,32,108,.3); }

/* ---- bare buttons (кабінет / адмінка використовують <button>) ---- */
button { font:inherit; background:rgba(40,22,74,.6); color:var(--fg); border:1px solid var(--line);
  border-radius:8px; padding:9px 14px; cursor:pointer; transition:.15s; }
button:hover { background:var(--hover); border-color:var(--acc); }
button.primary { background:var(--bound); border-color:var(--acc); color:#fff; }
button.primary:hover { background:#9333c9; box-shadow:var(--glow); }
button.danger { background:var(--danger); border-color:#e8688e; color:#fff; }
button.danger:hover { background:#e34570; }
button.nav { background:transparent; border:none; color:var(--dim); padding:9px 4px;
  border-bottom:2px solid transparent; border-radius:0; }
button.nav.active { color:var(--fg); border-bottom-color:var(--acc); }

/* ---- account/admin shared bits ---- */
.app-head { display:flex; justify-content:space-between; align-items:center; padding:16px 0 20px; }
.card h2 { margin:0 0 14px; font-size:17px; }
.card { margin-bottom:16px; }
.dev { display:flex; justify-content:space-between; align-items:center; gap:8px;
  padding:9px 0; border-bottom:1px solid rgba(92,48,150,.35); font-size:13.5px; }
.dev:last-child { border-bottom:none; }
.badge { background:var(--acc); color:#1a0530; border-radius:999px; padding:0 7px;
  font-size:12px; font-weight:800; margin-left:6px; box-shadow:0 0 10px rgba(218,100,255,.5); }
.pill.adm { color:#e0c8ff; border-color:#6a4fae; }

/* ---- modal dialogs (admin) ---- */
dialog { background:linear-gradient(180deg,#241149,#1a0d36); color:var(--fg);
  border:1px solid var(--acc); border-radius:16px; width:min(560px,94vw); padding:0; box-shadow:var(--glow); }
dialog::backdrop { background:rgba(8,3,20,.66); backdrop-filter:blur(2px); }
.dlg-head { padding:16px 20px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
.dlg-head h2 { margin:0; font-size:17px; }
.dlg-body { padding:20px; }
.dlg-body label { margin:12px 0 4px; }
.devs { margin-top:8px; }

/* ---- chat thread (admin) ---- */
.thread { height:48vh; overflow-y:auto; padding:6px 2px; display:flex; flex-direction:column; gap:8px; }
.msg { max-width:78%; padding:9px 12px; border-radius:13px; font-size:13.5px; white-space:pre-wrap; word-break:break-word; }
.msg.them { align-self:flex-start; background:var(--field); border-bottom-left-radius:4px; }
.msg.me { align-self:flex-end; background:var(--bound); border-bottom-right-radius:4px; }
.msg .t { display:block; font-size:11px; color:var(--dim); margin-top:3px; }
.composer { display:flex; gap:8px; margin-top:12px; }
.composer textarea { flex:1; resize:vertical; min-height:42px; max-height:120px; }

/* ---- admin login box ---- */
.login-box { max-width:360px; margin:12vh auto; }

@media (max-width:760px) {
  .showcase, .showcase.rev { grid-template-columns:1fr; }
  .nav { gap:14px; } .nav .hide-sm { display:none; }
  .section { padding:48px 0; } .band { padding:30px 20px; }
}

/* ---- macro library (macros / game / macro pages) ---- */
.nav a.on { color:var(--fg); }
.crumbs { color:var(--dim); font-size:13px; padding:18px 0 8px; }
.crumbs a { color:var(--dim); } .crumbs a:hover { color:var(--acc); }
.page-title { font-size:32px; margin:4px 0 4px; }
.toolbar { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:14px 0 20px; }
.toolbar input[type=search] { flex:1; min-width:220px; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chip { background:rgba(40,22,74,.5); border:1px solid var(--line); color:var(--dim); border-radius:999px;
  padding:6px 13px; font-size:13px; cursor:pointer; user-select:none; transition:.15s; }
.chip:hover { color:var(--fg); border-color:var(--acc); }
.chip.active { background:var(--bound); border-color:var(--acc); color:#fff; }
.games { display:grid; grid-template-columns:repeat(auto-fill,minmax(184px,1fr)); gap:16px; }
.game { display:block; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;
  background:var(--panel); color:var(--fg); transition:.18s; }
.game:hover { border-color:var(--acc); box-shadow:var(--glow); transform:translateY(-3px); text-decoration:none; }
.game .tile { height:104px; display:flex; align-items:center; justify-content:center; font-size:32px; font-weight:800;
  letter-spacing:.05em; color:rgba(255,255,255,.93); text-shadow:0 2px 14px rgba(0,0,0,.5); }
.game .tile.has-cover { padding:0; }
.game .tile img { width:100%; height:100%; object-fit:cover; object-position:center 22%; }
.game .tile.logo { background:linear-gradient(135deg,#d9c8fb,#9a7ae0) !important; }
.game .tile.logo img { object-fit:contain; padding:14px 18px; filter:drop-shadow(0 2px 10px rgba(0,0,0,.55)); }
.game-head { display:flex; align-items:center; gap:22px; }
.game-head img { height:86px; max-width:230px; object-fit:contain; border-radius:10px; box-shadow:0 6px 22px rgba(0,0,0,.45); }
.game .gname { padding:10px 12px 4px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.game .gstat { padding:0 12px; color:var(--dim); font-size:12.5px; display:flex; justify-content:space-between; gap:6px; }
.game .gdate { padding:3px 12px 11px; color:var(--dim); font-size:11.5px; opacity:.8; }
.hit { display:flex; justify-content:space-between; gap:14px; padding:8px 0; border-bottom:1px solid rgba(92,48,150,.35); color:var(--fg); font-size:14px; }
.hit:last-child { border-bottom:none; } .hit:hover { color:var(--acc); text-decoration:none; }
.hit .muted { font-size:12.5px; text-align:right; }
.game-head { border:1px solid var(--line); border-radius:var(--radius); padding:34px 26px; margin-bottom:16px; }
.game-head h1 { margin:0; font-size:30px; text-shadow:0 2px 14px rgba(0,0,0,.55); word-break:break-word; }
.stats { display:flex; gap:34px; flex-wrap:wrap; }
.stat b { display:block; font-size:22px; }
.stat span { font-size:13px; }
.mtable { table-layout:fixed; }
.mtable th { cursor:pointer; user-select:none; white-space:nowrap; }
.mtable th:hover { color:var(--fg); }
.mtable th.sorted { color:var(--acc); } .mtable th.sorted::after { content:" ▾"; } .mtable th.sorted.asc::after { content:" ▴"; }
.mtable td { vertical-align:top; overflow:hidden; text-overflow:ellipsis; word-break:break-word; }
.mtable td.d { color:var(--dim); font-size:13px; }
.mtable tbody tr { cursor:pointer; }
.mtable td a { color:var(--fg); font-weight:600; } .mtable tr:hover td a { color:var(--acc); }
.two { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.kv { display:flex; justify-content:space-between; gap:12px; padding:7px 0; border-bottom:1px solid rgba(92,48,150,.3); }
.kv:last-of-type { border-bottom:none; }
.descr { white-space:pre-wrap; word-break:break-word; }
.stars { letter-spacing:2px; }
.star { color:#4a2f7a; cursor:pointer; font-size:19px; transition:.12s; }
.star.on { color:var(--acc); text-shadow:0 0 8px rgba(218,100,255,.6); }
.star.mine { color:#ffd76a; text-shadow:0 0 8px rgba(255,215,106,.5); }
.star:hover { transform:scale(1.2); display:inline-block; }
.how { margin-top:14px; color:var(--dim); font-size:14px; }
.how summary { cursor:pointer; color:var(--fg); }
.how ol { margin:8px 0 0; padding-left:20px; }
.comment { border-bottom:1px solid rgba(92,48,150,.35); padding:12px 0; }
.comment:last-child { border-bottom:none; }
@media (max-width:760px) {
  .two { grid-template-columns:1fr; }
  .mtable th:nth-child(2), .mtable td:nth-child(2), .mtable th:nth-child(5), .mtable td:nth-child(5) { display:none; }
  .mtable th, .mtable td { width:auto !important; }
}
