:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #17212b;
  --muted: #667685;
  --line: #e6ebf0;
  --blue: #229ed9;
  --blue-dark: #168ac0;
  --blue-soft: #eaf7fd;
  --green: #1aa06d;
  --danger: #c23a3a;
  --shadow: 0 18px 50px rgba(24, 45, 70, .08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(34,158,217,.12), transparent 30%),
    radial-gradient(circle at 95% 0%, rgba(34,158,217,.07), transparent 28%),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
}
button, input, textarea { font: inherit; }
a { color: var(--blue-dark); }

.container { width: min(1060px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 70px; gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, #36b4eb, #168bc3); color: #fff; box-shadow: 0 8px 22px rgba(34,158,217,.22);
}
.brand-mark svg { width: 19px; height: 19px; }
.lang-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line); background: rgba(255,255,255,.78); border-radius: 12px; }
.lang-switch a { min-width: 42px; padding: 7px 10px; border-radius: 9px; text-decoration: none; text-align: center; color: var(--muted); font-size: 14px; font-weight: 700; }
.lang-switch a.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(20,40,60,.08); }

.hero { text-align: center; padding: 48px 0 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; background: var(--blue-soft); color: #137cae; font-size: 13px; font-weight: 750; }
h1 { max-width: 760px; margin: 15px auto 12px; font-size: clamp(34px, 5.2vw, 58px); line-height: 1.06; letter-spacing: -.035em; }
.hero p { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 18px; }

.tool-card { width: min(720px, 100%); margin: 28px auto 0; background: var(--surface); border: 1px solid rgba(219,227,235,.9); box-shadow: var(--shadow); border-radius: 26px; padding: 26px; text-align: left; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 22px; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 10px 12px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.tab.active { background: #fff; color: var(--text); box-shadow: 0 2px 10px rgba(20,40,60,.08); }
.field { margin-bottom: 17px; }
.field label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 14px; font-weight: 700; }
.optional { color: var(--muted); font-weight: 500; }
.input, .message {
  width: 100%; border: 1px solid #d9e1e8; background: #fff; border-radius: 13px; color: var(--text);
  padding: 13px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.message { min-height: 92px; resize: vertical; }
.input:focus, .message:focus { border-color: #65bce3; box-shadow: 0 0 0 4px rgba(34,158,217,.1); }
.hint { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.error { margin: 8px 0 0; color: var(--danger); font-size: 13px; font-weight: 650; }
.message-toggle {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--blue-dark);
  padding: 2px 0 13px; font-weight: 750; cursor: pointer; text-align: left;
}
.message-toggle:hover { text-decoration: underline; }
.message-field[hidden] { display: none; }
.message-field { margin-top: 0; animation: messageReveal .16s ease-out; }
@keyframes messageReveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.primary { width: 100%; border: 0; border-radius: 13px; background: var(--blue); color: #fff; padding: 14px 18px; font-weight: 800; cursor: pointer; box-shadow: 0 9px 23px rgba(34,158,217,.2); transition: transform .15s, background .15s; }
.primary:hover { background: var(--blue-dark); transform: translateY(-1px); }

.result { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.result[hidden] { display: none; }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 10px; }
.result-title { margin: 0; font-size: 16px; }
.success { color: var(--green); font-size: 13px; font-weight: 750; }
.link-box { display: flex; gap: 8px; align-items: stretch; }
.link-output { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px 13px; overflow-wrap: anywhere; font-size: 14px; }
.icon-btn, .secondary { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 12px; padding: 10px 13px; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center; }
.icon-btn:hover, .secondary:hover { border-color: #bfd4df; background: #fbfdfe; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.qr-wrap { display: grid; place-items: center; margin-top: 17px; padding: 18px; background: var(--surface-2); border-radius: 15px; }
#qrcode { width: 168px; height: 168px; display: grid; place-items: center; padding: 9px; background: #fff; border-radius: 12px; }
#qrcode img, #qrcode canvas { max-width: 150px !important; max-height: 150px !important; }
.download { margin-top: 10px; font-size: 13px; font-weight: 750; }

.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); width: min(720px,100%); margin: 18px auto 0; gap: 9px; }
.trust-item { color: var(--muted); font-size: 13px; text-align: center; padding: 8px; }
.trust-item strong { color: var(--text); }

.content { padding: 54px 0 70px; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 38px; }
.info-card { background: rgba(255,255,255,.76); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.info-card h3 { margin: 0 0 7px; font-size: 18px; }
.info-card p { margin: 0; color: var(--muted); }
.content h2 { margin: 38px 0 12px; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; letter-spacing: -.02em; }
.content p, .content li { color: #536473; }
.steps { padding-left: 22px; }
.steps li { margin: 8px 0; }
.code-example { display: block; margin: 10px 0; padding: 11px 13px; border-radius: 10px; background: #eaf0f5; color: #20303d; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.faq { margin-top: 18px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); padding: 0; }
summary { cursor: pointer; list-style: none; font-weight: 750; padding: 18px 0; }
summary::-webkit-details-marker { display: none; }
details p { margin: -5px 0 18px; }
.footer { border-top: 1px solid var(--line); padding: 24px 0 34px; color: var(--muted); font-size: 13px; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

@media (max-width: 700px) {
  .container { width: min(100% - 22px, 1060px); }
  .topbar { min-height: 62px; }
  .hero { padding-top: 31px; }
  .hero p { font-size: 16px; }
  .tool-card { padding: 17px; border-radius: 20px; }
  .content-grid, .trust-row { grid-template-columns: 1fr; }
  .trust-row { gap: 0; }
  .result-actions { grid-template-columns: 1fr; }
  .link-box { flex-direction: column; }
}
