/* LapakImages — mobile-first */
:root {
  --blue: #1e6fd9;
  --blue-dark: #1558b0;
  --ink: #23344a;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --border: #e3e9f1;
  --green: #22a95c;
  --red: #d94848;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky; top: 0; z-index: 50;
}
.logo {
  font-size: 22px; font-weight: 800; text-decoration: none;
  color: var(--ink); letter-spacing: -0.5px;
  display: flex; align-items: center;
}
.logo img { height: 34px; width: auto; display: block; }
.logo span, .logo-txt span { color: var(--blue); }
@media (max-width: 560px) { .logo img { height: 28px; } }
.langbox select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--ink); font-size: 14px; max-width: 170px;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 56px 20px 40px; }
.hero h1 { font-size: clamp(26px, 5.5vw, 42px); margin: 0 0 14px; letter-spacing: -1px; }
.hero .sub { color: var(--muted); max-width: 620px; margin: 0 auto 6px; font-size: clamp(15px, 2.4vw, 18px); }
.hero .formats { color: var(--muted); font-size: 13px; margin: 0 0 26px; }
.btn-main {
  display: inline-block;
  background: var(--blue); color: #fff; border: 0; cursor: pointer;
  font-size: 16px; font-weight: 700; letter-spacing: 0.5px;
  padding: 15px 34px; border-radius: 10px; text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  touch-action: manipulation;
}
.btn-main:hover { background: var(--blue-dark); }
.btn-main:active { transform: scale(0.98); }
.btn-ghost {
  display: inline-block;
  background: #fff; color: var(--blue); border: 1px solid var(--blue);
  font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 10px 22px; border-radius: 8px; text-decoration: none;
}
.btn-ghost.small { padding: 7px 14px; font-size: 13px; }
.center { text-align: center; margin-top: 18px; }

/* ---------- Drop overlay ---------- */
.drop-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30, 111, 217, 0.92);
  display: flex; align-items: center; justify-content: center;
}
.drop-overlay[hidden] { display: none; }
.drop-inner {
  color: #fff; font-size: clamp(20px, 4vw, 32px); font-weight: 800;
  border: 3px dashed rgba(255,255,255,0.7); border-radius: 20px;
  padding: 40px 60px; pointer-events: none;
}

/* ---------- Results ---------- */
.results { padding: 10px 16px 30px; background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.results-title { text-align: center; font-size: 20px; }
#cards { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: 0 1px 3px rgba(16, 42, 80, 0.06);
}
.card-top { text-align: center; }
.thumb {
  max-width: 100%; max-height: 220px; border-radius: 8px;
  border: 1px solid var(--border); object-fit: contain;
}
.bar-wrap { height: 6px; background: var(--border); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.bar { height: 100%; width: 0%; background: var(--blue); transition: width 0.15s; }
.linkrow { margin-top: 10px; }
.linkrow label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.inputwrap { display: flex; gap: 8px; }
.inputwrap input, .inputwrap textarea {
  flex: 1; min-width: 0;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg-soft); color: var(--ink); resize: vertical;
}
.copybtn {
  flex-shrink: 0;
  background: var(--blue); color: #fff; border: 0; border-radius: 8px;
  font-size: 13px; font-weight: 700; padding: 0 16px; cursor: pointer;
  touch-action: manipulation;
}
.copybtn.ok { background: var(--green); }
.err { color: var(--red); font-weight: 600; text-align: center; }

/* ---------- SEO section ---------- */
.seo { max-width: 900px; margin: 0 auto; padding: 48px 20px; text-align: center; }
.seo h2 { font-size: clamp(22px, 4vw, 30px); margin: 0 0 12px; }
.seo > p { color: var(--muted); max-width: 720px; margin: 0 auto 32px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; text-align: start; }
.feat {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.feat h3 { margin: 0 0 8px; font-size: 17px; color: var(--blue); }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Viewer page ---------- */
.viewer-bg { background: var(--bg-soft); min-height: 100vh; display: flex; flex-direction: column; }
.viewer-main { flex: 1; max-width: 860px; width: 100%; margin: 0 auto; padding: 26px 16px; }
.imgframe { margin: 0 0 22px; text-align: center; }
.imgframe img {
  max-width: 100%; height: auto; border-radius: 10px;
  border: 1px solid var(--border); background: #fff;
  box-shadow: 0 2px 10px rgba(16, 42, 80, 0.08);
}
.imgframe figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }
.embedbox {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; max-width: 640px; margin: 0 auto;
}
.embedbox label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.embedbox select {
  width: 100%; padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  font-size: 14px; color: var(--ink);
}
.nf { text-align: center; margin-top: 60px; }

/* ---------- Footer ---------- */
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 16px; border-top: 1px solid var(--border); }

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  .hero { padding: 40px 16px 32px; }
  .btn-main { width: 100%; max-width: 340px; }
  .inputwrap { flex-direction: column; }
  .copybtn { padding: 10px 16px; }
  .drop-inner { padding: 26px 30px; }
}
