/* SzóKaland – szülői felület és telepítő */
:root {
  --ink: #2A2B47;
  --muted: #6F7394;
  --line: #E6E7F2;
  --bg: #F5F4FC;
  --card: #fff;
  --primary: #6C5CE7;
  --primary-2: #8F80FF;
  --ok: #17A65B;
  --bad: #E0435A;
  --warn: #B87800;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body.admin { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; -webkit-text-size-adjust: 100%; }
a { color: var(--primary); }
h1, h2 { margin: 0 0 12px; line-height: 1.2; }
h2 { font-size: 1.15rem; }
p { line-height: 1.5; margin: 0 0 12px; }
code { background: #F0EFFA; padding: 1px 6px; border-radius: 6px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* Fejléc */
.a-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 18px; background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.a-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.a-brand img { width: 34px; height: 34px; }
.a-brand small { color: var(--muted); font-weight: 700; font-size: .8rem; }
.a-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.a-nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 800; }
.a-nav a.on, .a-nav a:hover { background: #EFECFF; color: var(--primary); }
.a-top-r { display: flex; gap: 8px; align-items: center; }

.a-main { max-width: 1180px; margin: 0 auto; padding: 22px 18px 60px; }
.a-main.narrow { max-width: 640px; }
.a-title { font-size: 1.6rem; font-weight: 900; margin-bottom: 16px; }

.a-card { background: var(--card); border-radius: 20px; padding: 20px; box-shadow: 0 6px 20px rgba(54, 40, 140, .07); margin-bottom: 18px; }
.a-card.flush { padding: 0; overflow: hidden; }
.ok-card { border: 2px solid #BDEFD3; }
.warn-card { border: 2px solid #FFE1A6; background: #FFFBF1; }
.cols { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .cols { grid-template-columns: 1.4fr 1fr; } }

/* Gombok */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 10px 18px;
  font: inherit; font-weight: 800; cursor: pointer; text-decoration: none;
  background: #EEEDF8; color: var(--ink);
}
.btn:hover { filter: brightness(.97); }
.btn.primary { background: linear-gradient(180deg, var(--primary-2), var(--primary)); color: #fff; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { background: #FFE8EC; color: var(--bad); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.big { padding: 14px 22px; font-size: 1.05rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }
form.inline { display: inline; margin: 0; }
.row { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.center { justify-content: center; }

/* Üzenetek */
.flash { padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; font-weight: 700; background: #E7FAEF; color: #0F6D3C; }
.flash.bad { background: #FFECEF; color: #B0213A; }
.tag { display: inline-block; font-size: .75rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #EEE; }
.tag.ok { background: #E7FAEF; color: #0F6D3C; }
.tag.warn { background: #FFF3D6; color: var(--warn); }

/* Űrlapok */
.a-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: .9rem; margin-bottom: 14px; }
.a-form label.check { flex-direction: row; align-items: center; gap: 8px; }
.a-form input:not([type=checkbox]):not([type=radio]):not([type=color]), .a-form select, .filters input, .filters select, textarea.code {
  font: inherit; font-weight: 600; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #FBFBFF; color: var(--ink); width: 100%;
}
.a-form input:focus, .a-form select:focus { outline: none; border-color: var(--primary-2); background: #fff; }
.a-form input[type=color] { width: 70px; height: 42px; border: 0; padding: 0; background: none; }
.a-form input[type=file] { font-size: .85rem; }
.a-form small { font-weight: 600; }
.a-form h2 { margin-top: 6px; }
.grid2 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.narrow-form { max-width: 680px; }
.seg { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.seg label { flex-direction: row !important; align-items: center; gap: 8px; margin: 0 !important; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; }
.field-lbl { font-weight: 800; font-size: .9rem; margin-bottom: 6px; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pick-item { margin: 0 !important; cursor: pointer; }
.pick-item input { position: absolute; opacity: 0; pointer-events: none; }
.pick-item span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #F4F4FB; font-size: 26px; border: 3px solid transparent; }
.pick-item.color span { border-radius: 50%; width: 36px; height: 36px; }
.pick-item input:checked + span { border-color: var(--primary); background-color: #EFECFF; }
.pick-item.color input:checked + span { box-shadow: 0 0 0 3px #fff inset; }

/* Szűrő */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.filters select, .filters input { width: auto; min-width: 180px; }

/* Táblázat */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #FAFAFE; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.inactive td { opacity: .45; }
.tbl .alt { font-size: .8rem; color: var(--muted); font-weight: 600; }
.tbl td.right .btn, .tbl td.right form { margin-left: 4px; }
.stars-txt { color: #F2A900; letter-spacing: 2px; }
.cat-dot { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 22px; }

/* Előnézetek */
.prev-emoji.sm { font-size: 30px; line-height: 1; }
.prev-emoji.lg { font-size: 140px; line-height: 1; }
.prev-img.sm { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.prev-img.lg { max-width: 100%; max-height: 260px; border-radius: 16px; }
.prev-color { display: inline-block; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, .08); }
.prev-color.sm { width: 30px; height: 30px; }
.prev-color.lg { width: 160px; height: 160px; }
.prev-text { font-weight: 900; color: var(--primary); }
.prev-text.sm { font-size: 22px; }
.prev-text.lg { font-size: 120px; line-height: 1; }
.big-prev { display: grid; place-items: center; min-height: 180px; background: #F8F7FF; border-radius: 16px; margin-bottom: 12px; padding: 12px; }
.aud { border: 0; background: #EFECFF; color: var(--primary); font: inherit; font-weight: 800; font-size: .8rem; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.aud.missing { background: #F3F3F7; color: #AAA; cursor: default; display: inline-block; }
.aud.playing { background: var(--primary); color: #fff; }
.aud-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.aud-row .lbl { flex: 1 1 160px; }

/* Csempék */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 18px; }
.tile { background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 6px 20px rgba(54, 40, 140, .06); }
.tile b { display: block; font-size: 1.8rem; font-weight: 900; color: var(--primary); }
.tile span { color: var(--muted); font-weight: 700; font-size: .85rem; }

/* Tömeges generálás */
.bar { height: 14px; background: #EEEDF8; border-radius: 999px; overflow: hidden; margin: 8px 0 10px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary-2), var(--primary)); transition: width .3s; }
.log { max-height: 220px; overflow: auto; background: #FAFAFE; border-radius: 12px; padding: 10px; font-size: .8rem; white-space: pre-wrap; margin: 0; }

/* Telepítő */
.install .a-main { padding-top: 40px; }
.install-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.install-head h1 { font-size: 1.7rem; font-weight: 900; margin: 0; }
.install-head p { margin: 2px 0 0; }
.req { list-style: none; margin: 0; padding: 0; }
.req li { padding: 6px 0; font-weight: 700; }
.req li.ok { color: var(--ok); }
.req li.bad { color: var(--bad); }
.req li.warn { color: var(--warn); }

@media (max-width: 640px) {
  .a-top { padding: 8px 12px; }
  .a-nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .a-nav a { white-space: nowrap; }
  .a-main { padding: 16px 12px 50px; }
}
