:root{
  /* Clean Gray – világosabb dobozok */
  --bg:transparent;
  
  --content-max: 1320px; /* új: kívánt hasznos szélesség */

  /* Világosított dobozok */
  --panel:#252525;         /* általános panelek, hero-kártya, highlight */
  --card:#2d2d2d;          /* csempék, modális kártyák, speciális dobozok */

  /* Színek */
  --text:#f0f0f0;          /* alap szöveg */
  --muted:#c2c2c2;         /* kísérő szöveg */
  --accent:#9a9a9a;        /* visszafogott kiemelés */
  --accent-2:#7a7a7a;

  /* Keret és árnyék – kompakt, nem terpeszkedő */
  --border:rgba(255,255,255,0.12);
  --shadow:0 4px 10px rgba(0,0,0,0.22);

  /* Gomb és ikon-háttér */
  --btnbg:#2a2a2a;
  --icon1:#575656;
  --icon2:#2b2b2b;

  /* Csempe gomb kék */
  --tile-btn-red:#0D6EFD;

  /* Nav hover színei */
  --nav-hover-bg: #3a3a3a;
  --nav-hover-fg: #ffffff;
  --nav-hover-bd: rgba(255,255,255,.18);
}

/* Középső maszk – az aktív sávban takarja a hátteret */
.bg-mask{
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--content-max), 100vw - 32px);
  background: #1a1a1a;           /* belső sáv alapszíne */
  z-index: 1;
  pointer-events: none;
}

/* Base – tipográfia */
html,body{height:100%}
*{box-sizing:border-box}
html, body {
  margin:0;
  background: #121212 !important;
  color: var(--text);
  font-family: system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a{color:inherit; text-decoration:none}

/* Shell/Layout */
.shell{
  max-width: var(--content-max);
  margin:0 auto;
  padding:16px;
  position:relative;
  z-index:2;
}
.panel{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:16px;
}
.row{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-start}
.col{display:flex;flex-direction:column;gap:6px;min-width:260px}
.mt{margin-top:12px}
.muted{color:var(--muted)}

/* Header / Nav */
.header{
  position:sticky; top:0; z-index:10;
  background:linear-gradient(180deg,rgba(20,20,20,.85),rgba(20,20,20,.75) 60%,transparent);
  backdrop-filter:none; -webkit-backdrop-filter:none; /* blur OFF */
}
.nav{
  display:flex; align-items:center; gap:12px;
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:14px;
  padding:10px 12px;
  box-shadow:var(--shadow);
}
.logo{
  display:flex; align-items:center; gap:.75rem;
  font-weight:700;
  font-size:1.125rem;
  letter-spacing:.025em;
  color: var(--text);
}
.logo-icon{
  width:2rem; height:2rem;
  background:var(--accent);
  border-radius:.5rem;
  display:flex; align-items:center; justify-content:center;
  color:#111;
}
.logo-icon .icon{width:1.25rem; height:1.25rem; color:#111;}
.spacer{flex:1}
.menu{display:flex; gap:10px; flex-wrap:wrap}
.menu a{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--btnbg);
  font-size:14px;
  color:var(--text);
  font-weight:600;
}
.menu a:hover{
  background: var(--nav-hover-bg);
  color: var(--nav-hover-fg);
  border-color: var(--nav-hover-bd);
  filter: none;
}
.menu a.active{color:#111; border-color:var(--accent); background:var(--accent)}

/* Home: Hero */
.hero{
  margin-top:18px;
  display:grid;
  gap:14px;
  grid-template-columns:1fr;   /* a card a .shell teljes hasznos szélességét használja */
  align-items:center;
}

/* HERO KÁRTYA – FLEX: kép balra, szöveg mellette, ne törjön alá */
.hero .card{
  padding:18px;
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:16px;
  box-shadow:var(--shadow);

  display:flex;               /* LÉNYEGES */
  align-items:flex-start;
  gap:12px;
  flex-wrap:nowrap;           /* mindig egy sorban tartjuk */
}

/* Kép – fix szélességű oszlop, ne zsugorodjon nullára */
.hero-ill{
  width:140px;
  height:auto;
  flex:0 0 140px;             /* fix sáv a képnek */
  margin:0;
  display:block;
}

/* Szöveg – rugalmas oszlop, tördelhető */
.card-body{
  flex:1 1 auto;
  min-width:0;                /* engedi a hosszú sorok törését */
}
.hero h1{margin:0 0 6px 0; font-size:28px; color:var(--text)}
.hero p{margin:0; color:var(--muted)}

/* Nagyon keskeny kijelzőn is mellette marad: csökkentjük a kép sávját */
@media (max-width:420px){
  .hero-ill{ width:112px; flex-basis:112px; }
}

/* Home: single highlight panel */
.highlight{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
  box-shadow:var(--shadow);
  min-height:96px; display:flex; flex-direction:column; justify-content:center;
}
.highlight strong{font-size:18px; display:block; margin-bottom:6px; color:var(--text)}
.highlight .muted{color:var(--muted)}

/* Home: cards grid + tiles */
.cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px}

/* Csempék – világosított doboz + gombok kék alap, hover szürke */
.tile{
  display:flex; flex-direction:column; gap:10px;
  border:1px solid var(--border);
  background:var(--card);
  border-radius:16px;
  padding:14px;
  box-shadow: var(--shadow);
}
.tile .head{display:flex; align-items:center; gap:10px}
.tile .icon{
  width:36px; height:36px; border-radius:10px; display:grid; place-items:center;
  background: linear-gradient(135deg, var(--icon1), var(--icon2));
}
.tile h3{margin:0; font-size:16px; color:#f5f5f5}
.tile p{margin:0; color:#cdcdcd; font-size:13px; line-height:1.3}
.tile .actions{margin-top:auto; display:flex; gap:8px}

/* CSEMPE GOMBOK: ALAPBÓL KÉK, HOVERRE SZÜRKE */
.tile .btn,
.tile button{
  background: var(--tile-btn-red);
  color: #fff;
  border: 1px solid rgba(0,0,0,0.22);
  filter: none;
}
.tile .btn:hover,
.tile button:hover{
  background: #3a3a3a;
  color: #efefef;
  border-color: rgba(255,255,255,0.14);
  filter: none;
}

/* Globális gombok */
button, .btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid var(--border); background:var(--btnbg); color:var(--text);
  padding:9px 12px; border-radius:12px; cursor:pointer; font-weight:600; font-size:14px;
}
button:focus, .btn:focus{outline:2px solid var(--accent); outline-offset:2px}
.btn.ghost{background:transparent; color:var(--muted)}
.btn.open, button.open{ color:#fff; } /* „Megnyitás” felirat fehér */

/* Pills */
.pill{
  display:inline-flex; align-items:left; gap:8px; padding:6px 10px;
  border-radius:999px; border:1px solid var(--border); background:var(--btnbg);
  color:var(--muted); font-size:14px;
}

/* Csak a legkisebb mobilnézetben kisebb lekerekítés a pill-eken */
@media (max-width:520px){
  .pill{ border-radius:12px; }   /* ← itt csökkentjük a lekerekítést */
}

/* Sections */
.section{margin:24px 0}
.section h2{margin:0 0 10px 0; font-size:18px; color:var(--text)}

/* Privacy banner – HÁTTÉRKÉP + overlay + előtér */
.privacy{margin:30px 0 52px;border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow);padding:18px;

  /* háttérkép (egyszerű beépítés) */
  position:relative;
  overflow:hidden;                      /* lekerekítés érvényesüljön a képre */
  min-height:220px;                     /* hogy legyen felület a képnek */
  background: transparent;              /* a régi gradient helyett átlátszó */
  background-image: var(--privacy-bg, url("../image/privacy-background.jpg")); /* ← tedd ide a képedet */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
  /* 3) Legyen elég magasság, hogy látszódjon */


  /* 4) A korábbi panelek sötét háttere ne takarjon rá */
  background-color: transparent !important;
}
.privacy::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.35)); /* olvashatóság */
  z-index:0; pointer-events:none;
}
.privacy .prow{display:flex; gap:14px; align-items:flex-start; position:relative; z-index:1;}
.privacy .icon{
  width:44px; height:44px; display:grid; place-items:center; border-radius:12px;
  background:linear-gradient(135deg,#343434,#2a2a2a);
  border:1px solid rgba(255,255,255,.18); color:#e0e0e0;
  position:relative; z-index:1;
}
.privacy .text{font-size:16px; line-height:1.45; color:var(--text); position:relative; z-index:1;}
.privacy .text strong{display:block; font-size:20px; font-weight:800; margin-bottom:4px; color:var(--text)}

/* Modal */
.modal{position:fixed; inset:0; background:rgba(0,0,0,.6); display:none; align-items:center; justify-content:center; z-index:50}
.modal>.card{
  width:min(920px,90vw); max-height:80vh; overflow:auto;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow);
  padding:14px;
}
.toolbar{display:flex; gap:8px; align-items:center; justify-content:space-between; margin-bottom:8px}
.grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px}
@media (max-width:780px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:520px){.grid{grid-template-columns:1fr}}
.lang{
  display:flex; gap:8px; align-items:center; padding:8px; border:1px solid var(--border);
  border-radius:12px; background:var(--panel)
}
.lang input{transform:translateY(1px)}

/* Utility buttons inside modal */
#selectAll,#clearAll{background:var(--btnbg)}
#applyLang{background:var(--accent); border-color:var(--accent); color:#111}

/* Code inline */
code{
  background:rgba(255,255,255,.05);
  border:1px solid var(--border);
  border-radius:6px; padding:0 4px; color:var(--text)
}

.sr-file{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0
}

.drop{
  /* teljes tartalmi szélesség kitöltése */
  width:100%;
  max-width:100%;
  flex:0 0 100%;
  box-sizing:border-box;

  min-height:96px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:6px;
  padding:14px; border:2px dashed rgba(255,255,255,.22); border-radius:14px; color:var(--muted);
  background:linear-gradient(180deg,#262626,#222);
  cursor:pointer; user-select:none; transition:border-color .2s, background .2s, box-shadow .2s
}

.drop:hover{
  border-color:var(--accent);
  background:linear-gradient(180deg,#2a2a2a,#232323);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.06);
}

.drop.highlight{outline:2px dashed var(--accent); outline-offset:4px}
.drop .cta{font-weight:600; text-decoration:underline; display:block; color:var(--text);}
.drop .sub{display:block; margin-top:4px; opacity:.9}

/* radio btn Controls */
.input{display:inline-flex; align-items:center; gap:8px; border:1px solid var(--border); background:#2a2a2a; color:var(--text); padding:8px 10px; border-radius:10px}
.input input{all:unset; color:var(--text)}
.radio{display:flex; gap:8px; flex-wrap:wrap}
.radio label{display:flex; align-items:center; gap:6px; padding:8px 10px; border:1px solid var(--border); border-radius:10px; background:var(--btnbg); color:var(--text); cursor:pointer}
.radio input{accent-color:var(--accent)}

/* File list */
.list{display:grid; gap:10px; margin-top:10px}
.item{display:grid; grid-template-columns: 36px 1fr auto auto; align-items:center; gap:10px; padding:10px; border:1px solid var(--border); border-radius:12px; background:var(--card); cursor:default}
.handle{display:grid; place-items:center; width:36px; height:36px; border-radius:8px; background:linear-gradient(135deg,#ffe88a,#ffc107); border:1px solid rgba(255,193,7,.5); font-size:20px; color:#6a5200; cursor:grab}
.name{font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:default}
.meta{color:var(--muted); font-size:13px}
.actions{display:flex; gap:8px}
.ghost{opacity:.45}

.sr-file{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}


/* Háttér-canvas */
canvas#fx{
  display:block !important;
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:#121212;
}

/* Split „vezérlő sor” – gomb marad egy sorban, statisztika alá kerül */
.row.controls{
  align-items: center;           /* a kontrollok és a gomb függőlegesen igazítva */
  flex-wrap: wrap;               /* törés engedélyezett a stat blokknál */
}
.row.controls #plan{
  order: 99;                     /* a sor végére tesszük → a gomb fölött nem csúsztat */
  flex: 0 0 100%;                /* teljes sor szélesség */
  width: 100%;
  margin-top: 8px;               /* kis légrés a gombsor alatt */
}
.row.controls .spacer{
  flex: 1;                       /* gombot jobbra tolja */
}

/* === Loading dialog – csak a feldolgozás ablakra hat === */
dialog#loadDlg,
dialog.loading{
  border: none;
  padding: 0;
  background: transparent; /* ne legyen fehér téglalap */
  inset: 0;
  margin: auto;
}

dialog.loading::backdrop{
  background: rgba(17,24,39,.45);  /* sötétített háttér */
  backdrop-filter: blur(2px);
}

dialog.loading .panel{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: #111827;            /* diszkrét dark surface */
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  font-weight: 600;
  letter-spacing: .2px;
}

/* Spinner a szöveg előtt – markup nélkül */
dialog.loading .panel::before{
  content: "";
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: loading-spin .8s linear infinite;
}

@keyframes loading-spin { to { transform: rotate(360deg); } }
