/* ═══ Ingatlan Videó — közös stílus (mobile-first, prémium dark) ═══ */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0c0d10;
  --bg-soft: #14161b;
  --card: #1a1d24;
  --border: #2a2e38;
  --text: #f2f3f5;
  --muted: #9aa1ad;
  --accent: #d4af37;
  --accent-ink: #171308;
  --ok: #4ade80;
  --err: #f87171;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ── Nav ── */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.nav .logo { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; text-decoration: none; }
.nav .logo em { color: var(--accent); font-style: normal; }
.nav-links { display: flex; gap: 18px; align-items: center; font-size: 0.92rem; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }

/* ── Gombok ── */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  font: inherit; font-weight: 700; border-radius: 999px; transition: transform .12s ease, opacity .15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); padding: 14px 28px; }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); padding: 13px 26px; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ── Kártyák, űrlapok ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
label { display: block; font-size: 0.86rem; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
input, select {
  width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font: inherit; font-size: 1rem;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.hint { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }
.error { color: var(--err); font-size: 0.9rem; margin-top: 10px; min-height: 1.2em; }
.success { color: var(--ok); }

/* ── Badge, státusz ── */
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.pill-gold { background: var(--accent); color: var(--accent-ink); }
.pill-dim { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border); }
.pill-ok { background: rgba(74, 222, 128, .12); color: var(--ok); }
.pill-err { background: rgba(248, 113, 113, .12); color: var(--err); }

/* ── Wizard (app) ── */
.steps { display: flex; gap: 8px; margin: 22px 0; }
.steps .s { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.steps .s.on { background: var(--accent); }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 34px 18px;
  text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s;
}
.dropzone.drag, .dropzone:hover { border-color: var(--accent); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-top: 14px; }
.thumbs .th { position: relative; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.thumbs .th img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .th .rm {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff; border: 0; cursor: pointer; font-size: 13px; line-height: 1;
}
.thumbs .th .idx { position: absolute; bottom: 4px; left: 6px; font-size: 0.72rem; font-weight: 800; text-shadow: 0 1px 3px #000; }

.tpl-grid { display: grid; gap: 14px; margin-top: 8px; }
@media (min-width: 640px) { .tpl-grid { grid-template-columns: repeat(3, 1fr); } }
.tpl {
  border: 2px solid var(--border); border-radius: var(--radius); padding: 18px; cursor: pointer;
  background: var(--bg-soft); transition: border-color .15s;
}
.tpl:hover { border-color: var(--muted); }
.tpl.sel { border-color: var(--accent); background: rgba(212, 175, 55, .06); }
.tpl h4 { margin-bottom: 6px; }
.tpl p { font-size: 0.85rem; color: var(--muted); }

/* ── Videóim lista ── */
.vidlist { display: grid; gap: 12px; }
.vidrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.vidrow .meta { font-size: 0.85rem; color: var(--muted); }

/* ── Progress ── */
.spinner {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 16px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Landing ── */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero .sub { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin: 18px auto 30px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.section { padding: 56px 0; }
.section h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; text-align: center; margin-bottom: 10px; }
.section .lead { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 36px; }

.grid3 { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.feature .num {
  width: 40px; height: 40px; border-radius: 12px; background: rgba(212, 175, 55, .12);
  color: var(--accent); font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.feature h3 { margin-bottom: 8px; font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: 0.92rem; }

.price-card { text-align: center; }
.price-card .amount { font-size: 2rem; font-weight: 800; margin: 10px 0 2px; }
.price-card .per { color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }
.price-card ul { list-style: none; text-align: left; margin: 0 0 20px; color: var(--muted); font-size: 0.9rem; }
.price-card li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.price-card li:last-child { border: 0; }

footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 40px; color: var(--muted); font-size: 0.85rem; text-align: center; }

.hidden { display: none !important; }

/* ── Before/after slider (staging studio) ── */
.ba { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); max-width: 560px; margin: 0 auto; user-select: none; }
.ba img { width: 100%; display: block; }
.ba .ba-after-wrap { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.ba .ba-after-wrap img { width: 100%; height: 100%; object-fit: cover; }
.ba .ba-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 8px rgba(0,0,0,.5); pointer-events: none; }
.ba .ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba .ba-tag { position: absolute; bottom: 10px; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; pointer-events: none; }

/* ── Per-fotó staging kapcsoló (videókészítő) ── */
.thumbs .th .stg { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 8px; border: none; cursor: pointer; font-size: .8rem; background: rgba(0,0,0,.55); }
.thumbs .th .stg.on { background: var(--accent); }
.thumbs .th.staged { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ═══ Studio — 3-panelés generátor (app.html) ═══ */
.studio-shell { display: flex; height: 100vh; overflow: hidden; }

/* ── Bal: eszköz-sáv ── */
.rail {
  width: 92px; flex: 0 0 92px; background: var(--bg-soft); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; padding: 18px 0; gap: 4px;
}
.rail-logo { font-weight: 800; font-size: 0.78rem; letter-spacing: -0.01em; margin-bottom: 20px; text-align: center; text-decoration: none; color: var(--text); }
.rail-logo em { color: var(--accent); font-style: normal; display: block; }
.rail-item {
  width: 72px; padding: 12px 4px 10px; border-radius: 14px; display: flex; flex-direction: column;
  align-items: center; gap: 6px; color: var(--muted); cursor: pointer; font-size: 0.68rem; font-weight: 700;
  background: transparent; border: 1px solid transparent; text-decoration: none;
}
.rail-item .ic { font-size: 22px; line-height: 1; }
.rail-item:hover { color: var(--text); background: rgba(255,255,255,.03); }
.rail-item.active { color: var(--accent); background: rgba(212,175,55,.1); border-color: rgba(212,175,55,.25); }
.rail-spacer { flex: 1; }
.rail-credit { font-size: 0.66rem; color: var(--muted); text-align: center; padding-bottom: 6px; line-height: 1.4; }
.rail-credit b { display: block; color: var(--text); font-size: 0.82rem; }

/* ── Közép: beállítások panel ── */
.panel-config { width: 380px; flex: 0 0 380px; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.cfg-head { padding: 22px 24px 16px; border-bottom: 1px solid var(--border); }
.cfg-head h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }
.cfg-head p { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.cfg-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cfg-section { margin-bottom: 22px; }
.cfg-section:last-child { margin-bottom: 0; }
.cfg-section .sec-title { font-size: 0.72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.cfg-foot { padding: 16px 24px 20px; border-top: 1px solid var(--border); }

/* Kompaktabb form-elemek a szűk (380px) config panelen belül */
.cfg-body label { margin: 14px 0 6px; font-size: 0.8rem; }
.cfg-body label:first-child { margin-top: 0; }
.cfg-body input, .cfg-body select { padding: 11px 12px; font-size: 0.92rem; }
.cfg-foot .btn-primary { padding: 13px 22px; }
.cfg-body .dropzone { padding: 22px 14px; font-size: 0.82rem; }
.cfg-body .thumbs { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cfg-body .thumbs .th { border-radius: 8px; }

.check-row { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; font-size: 0.82rem; color: var(--text); cursor: pointer; }
.check-row input { width: auto; margin-top: 2px; accent-color: var(--accent); }
.check-row:first-child { margin-top: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.opt-grid.opt-3 { grid-template-columns: repeat(3, 1fr); }
.opt {
  border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 8px; text-align: center;
  font-size: 0.76rem; font-weight: 700; color: var(--muted); cursor: pointer; background: var(--bg-soft);
}
.opt:hover { border-color: var(--muted); }
.opt.sel { border-color: var(--accent); color: var(--accent); background: rgba(212,175,55,.08); }
.opt-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: baseline; border: 1px solid var(--border);
}
.opt-desc { font-size: 0.68rem; font-weight: 500; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.opt.sel .opt-desc { color: var(--accent); opacity: 0.8; }

.mode-hint { font-size: 0.76rem; color: var(--muted); margin-top: 8px; line-height: 1.4; }

.detect-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.detect-row { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; }
.detect-row b { color: var(--accent); }
.detect-ic { font-size: 16px; }
.detect-fix {
  display: inline-block; margin-top: 10px; background: none; border: none; padding: 0;
  color: var(--muted); font-size: 0.78rem; text-decoration: underline; cursor: pointer; font-weight: 600;
}
.detect-fix:hover { color: var(--text); }

/* ── Jobb: eredmény-galéria ── */
.panel-results { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.res-head { padding: 22px 28px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.res-head h2 { font-size: 1.05rem; font-weight: 800; }
.res-head .pill { padding: 3px 10px; font-size: 0.72rem; }
.res-body { flex: 1; overflow-y: auto; padding: 24px 28px; }

.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.res-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.res-card .thumb { aspect-ratio: 9/16; background: var(--bg-soft); position: relative; overflow: hidden; }
.res-card .thumb video, .res-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.res-card .thumb.processing { display: flex; align-items: center; justify-content: center; }
.res-card .thumb .play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); opacity: .9; pointer-events: none;
}
.panel-results .spinner { width: 30px; height: 30px; border-width: 3px; margin: 0; }
.res-card .meta { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.res-card .meta .loc { font-size: 0.8rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-card .meta .pill { padding: 3px 10px; font-size: 0.72rem; white-space: nowrap; }
.res-card .actions { display: flex; gap: 6px; padding: 0 12px 12px; flex-wrap: wrap; }
.res-card .actions .btn { padding: 6px 10px; font-size: 0.72rem; }
.pill-accent { background: rgba(212,175,55,.14); color: var(--accent); }

.empty-state {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--muted); gap: 10px; padding: 40px;
}
.empty-state .ic { font-size: 34px; margin-bottom: 4px; }
.empty-state h3 { color: var(--text); font-size: 1.02rem; font-weight: 800; }
.empty-state p { font-size: 0.85rem; max-width: 280px; }

/* ── Generálás overlay (a korábbi „4. lépés" helyett) ── */
.gen-overlay {
  position: fixed; inset: 0; background: rgba(8,9,11,.72); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gen-card { max-width: 380px; width: 100%; text-align: center; }

@media (max-width: 880px) {
  .studio-shell { flex-direction: column; height: auto; overflow: visible; }
  .rail { width: 100%; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 14px; overflow-x: auto; }
  .rail-logo, .rail-spacer, .rail-credit { display: none; }
  .rail-item { flex-direction: row; width: auto; white-space: nowrap; }
  .panel-config { width: 100%; flex: none; border-right: 0; border-bottom: 1px solid var(--border); }
  .cfg-body { max-height: 60vh; }
  .panel-results { height: auto; }
  .res-body { max-height: none; }
}
