:root {
  --ink: #172033;
  --muted: #667085;
  --line: #dbe3ee;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --surface: #ffffff;
  --bg: #f4f7fb;
  --success: #047857;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: linear-gradient(180deg, #eef5fb 0, #f8fafc 380px); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(12px);
}
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  color: #fff; background: linear-gradient(135deg, #60a5fa, #2563eb); font-size: 20px;
}
.nav-links { display: flex; align-items: center; gap: 24px; color: #475467; font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: var(--blue); }
.menu-button { display: none; border: 0; background: transparent; font-size: 23px; }

.ad-slot {
  min-height: 78px; margin: 18px auto; display: grid; place-items: center; max-width: 900px;
  border: 1px dashed #b9c5d5; border-radius: 10px; color: #98a2b3; background: rgba(255,255,255,.55);
  font-size: 12px; letter-spacing: .04em;
}
.ad-slot.compact { min-height: 70px; }

.hero { text-align: center; padding: 42px 0 30px; }
.eyebrow {
  display: inline-flex; gap: 7px; align-items: center; padding: 7px 12px; border-radius: 999px;
  color: var(--blue-dark); background: var(--blue-soft); font-size: 13px; font-weight: 700;
}
h1 { margin: 18px 0 10px; font-size: clamp(31px, 5vw, 50px); line-height: 1.08; letter-spacing: -.045em; }
.hero p, .lead { max-width: 700px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.7; }
.gradient-text { color: var(--blue); }

.section { padding: 28px 0 56px; }
.section-title { text-align: center; margin-bottom: 26px; }
.section-title h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.025em; }
.section-title p { margin: 0; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool-card {
  display: flex; min-height: 202px; flex-direction: column; padding: 20px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); box-shadow: 0 4px 18px rgba(31,49,79,.05);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tool-card:hover { transform: translateY(-3px); border-color: #9bbcf8; box-shadow: 0 12px 28px rgba(31,49,79,.10); }
.tool-icon {
  width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 14px;
  border-radius: 11px; background: var(--blue-soft); color: var(--blue); font-size: 21px;
}
.tool-card h3 { margin: 0 0 7px; font-size: 17px; }
.tool-card p { flex: 1; margin: 0 0 16px; color: var(--muted); line-height: 1.5; font-size: 13px; }
.card-link { color: var(--blue); font-weight: 700; font-size: 13px; }

.trust-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.trust-item { text-align: center; padding: 20px 10px; }
.trust-item span { display: block; margin-bottom: 8px; font-size: 22px; }
.trust-item strong { font-size: 14px; }

.tool-hero { padding: 34px 0 18px; text-align: center; }
.tool-hero h1 { font-size: clamp(30px, 4vw, 43px); }
.tool-panel {
  max-width: 900px; margin: 20px auto 46px; padding: 28px; border: 1px solid var(--line);
  border-radius: 18px; background: #fff; box-shadow: 0 16px 42px rgba(31,49,79,.08);
}
.drop-zone {
  min-height: 190px; display: grid; place-items: center; text-align: center; padding: 28px;
  border: 2px dashed #9db5d7; border-radius: 14px; background: #f8fbff; transition: .2s;
}
.drop-zone.dragging { border-color: var(--blue); background: #eff6ff; transform: scale(1.005); }
.drop-icon { font-size: 35px; margin-bottom: 7px; }
.drop-zone h2 { margin: 0 0 7px; font-size: 20px; }
.drop-zone p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px;
  padding: 0 17px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; font-size: 14px;
}
.button.primary { color: #fff; background: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { color: #344054; background: #fff; border-color: #cfd8e6; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.options {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0;
}
.field { display: flex; flex-direction: column; gap: 7px; color: #344054; font-size: 13px; font-weight: 700; }
.field input, .field select {
  width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cfd8e6; border-radius: 8px;
  color: var(--ink); background: #fff; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #dbeafe; }
.check-field { justify-content: end; }
.check-row { min-height: 42px; display: flex; align-items: center; gap: 9px; font-weight: 500; }
.check-row input { width: auto; min-height: auto; }
.file-list { display: grid; gap: 9px; margin: 20px 0; }
.file-row {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center;
  padding: 9px; border: 1px solid #e3e9f1; border-radius: 10px;
}
.file-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 7px; background: #eef2f6; }
.file-thumb.contain { object-fit: contain; }
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
.file-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.remove-file { border: 0; color: #98a2b3; background: transparent; font-size: 20px; }
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.status { min-height: 22px; margin: 14px 0 0; text-align: center; color: var(--success); font-size: 13px; font-weight: 650; }
.status.error { color: #b42318; }
.progress { height: 7px; overflow: hidden; margin-top: 12px; border-radius: 999px; background: #e7edf5; }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: var(--blue); transition: width .2s; }

.gif-frame-list { display: grid; gap: 9px; margin: 20px 0; }
.gif-frame {
  display: grid; grid-template-columns: auto 62px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px; border: 1px solid #e3e9f1; border-radius: 11px; background: #fff;
  cursor: grab; transition: border-color .18s ease, opacity .18s ease;
}
.gif-frame:hover { border-color: #9bbcf8; }
.gif-frame.dragging { opacity: .45; }
.gif-frame-handle { color: #98a2b3; font-size: 18px; letter-spacing: -4px; }
.gif-frame img { width: 62px; height: 62px; object-fit: contain; border-radius: 8px; background: #eef2f6; }
.gif-frame-info { min-width: 0; display: grid; gap: 5px; }
.gif-frame-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.gif-frame-info span { color: var(--muted); font-size: 12px; }
.gif-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gif-warning {
  margin: 12px 0; padding: 12px 14px; border: 1px solid #fedf89; border-radius: 9px;
  color: #93370d; background: #fffaeb; font-size: 13px; line-height: 1.5;
}
.gif-preview { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); text-align: center; }
.gif-preview h2 { margin: 0 0 14px; font-size: 21px; }
.gif-preview-stage {
  min-height: 220px; display: grid; place-items: center; overflow: hidden; padding: 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background-color: #fff; background-image:
    linear-gradient(45deg, #eef2f6 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f6 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f6 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.gif-preview-stage img { display: block; max-width: 100%; max-height: 540px; object-fit: contain; }
.gif-preview > p { margin: 11px 0 0; color: var(--muted); font-size: 12px; }

.border-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.border-options input[type="color"] { padding: 4px; cursor: pointer; }
.border-preview { margin: 24px 0; text-align: center; }
.border-preview h2 { margin: 0 0 14px; font-size: 21px; }
.border-preview-stage {
  min-height: 220px; display: grid; place-items: center; overflow: auto; padding: 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background-color: #fff; background-image:
    linear-gradient(45deg, #eef2f6 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f6 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f6 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.border-preview-stage canvas { display: block; max-width: 100%; height: auto; box-shadow: 0 8px 24px rgba(31,49,79,.12); }
.border-preview > p { margin: 11px 0 0; color: var(--muted); font-size: 12px; }

.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.content-card { padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.content-card h2 { margin: 0 0 12px; font-size: 21px; }
.content-card p, .content-card li { color: #596579; line-height: 1.7; font-size: 14px; }
.steps { padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; padding-left: 38px; margin: 14px 0; }
.steps li::before {
  counter-increment: steps; content: counter(steps); position: absolute; left: 0; top: -1px;
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  color: #fff; background: var(--blue); font-size: 12px; font-weight: 800;
}
.faq { max-width: 900px; margin: 0 auto; }
.faq details { padding: 17px 0; border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 750; }
.faq p { color: var(--muted); line-height: 1.65; font-size: 14px; }
.page-content { max-width: 820px; min-height: 58vh; padding: 52px 0 70px; }
.page-content h1 { font-size: 39px; }
.page-content h2 { margin-top: 32px; font-size: 22px; }
.page-content p, .page-content li { color: #596579; line-height: 1.75; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.blog-card {
  display: flex; min-height: 225px; flex-direction: column; padding: 22px;
  border: 1px solid var(--line); border-radius: 13px; background: #fff;
  box-shadow: 0 4px 18px rgba(31,49,79,.04); transition: transform .18s ease, border-color .18s ease;
}
.blog-card:hover { transform: translateY(-3px); border-color: #9bbcf8; }
.blog-card small { color: var(--blue); font-weight: 750; }
.blog-card h2 { margin: 10px 0; font-size: 18px; line-height: 1.35; }
.blog-card p { flex: 1; color: var(--muted); font-size: 13px; line-height: 1.55; }
.blog-card-meta { display: flex; justify-content: space-between; gap: 12px; color: #667085; font-size: 12px; font-weight: 700; }
.blog-card-meta span:last-child { color: var(--blue); }
.empty-state { grid-column: 1 / -1; padding: 50px; text-align: center; color: var(--muted); }

.article { max-width: 820px; padding-top: 34px; padding-bottom: 70px; }
.article-back { display: inline-block; margin-bottom: 30px; color: var(--blue); font-size: 14px; font-weight: 700; }
.article-header { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.article-header h1 { margin-top: 16px; font-size: clamp(35px, 6vw, 54px); }
.article-description { max-width: 720px; color: var(--muted); font-size: 19px; line-height: 1.65; }
.article-meta { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 22px; color: #7b8798; font-size: 13px; }
.article-body { padding: 28px 0 16px; font-family: Georgia, "Times New Roman", serif; color: #344054; font-size: 18px; line-height: 1.85; }
.article-body h2, .article-body h3, .article-body h4 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink); line-height: 1.25; letter-spacing: -.02em;
}
.article-body h2 { margin: 44px 0 14px; font-size: 29px; }
.article-body h3 { margin: 32px 0 12px; font-size: 22px; }
.article-body p { margin: 0 0 22px; }
.article-body ul, .article-body ol { margin: 0 0 24px; padding-left: 28px; }
.article-body li { margin: 8px 0; }
.article-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote { margin: 28px 0; padding: 16px 22px; border-left: 4px solid var(--blue); background: var(--blue-soft); }
.article-body code { padding: 2px 5px; border-radius: 4px; background: #edf1f6; font-size: .88em; }
.article-body pre { overflow-x: auto; padding: 18px; border-radius: 10px; color: #e5e7eb; background: #172033; }
.article-body pre code { padding: 0; color: inherit; background: transparent; }
.article-cta {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 30px;
  padding: 24px; border: 1px solid #bfd3f6; border-radius: 14px; background: var(--blue-soft);
}
.article-cta strong { font-size: 18px; }
.article-cta p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { padding: 32px 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 13px; }
.copyright { color: #98a2b3; font-size: 12px; }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 22px, 1120px); }
  .menu-button { display: block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 68px; padding: 18px;
    flex-direction: column; align-items: flex-start; background: #fff; border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .hero { padding-top: 28px; }
  .tool-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card { min-height: 190px; padding: 15px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .options, .content-grid, .gif-options { grid-template-columns: 1fr; }
  .tool-panel { padding: 15px; border-radius: 13px; }
  .drop-zone { min-height: 165px; }
  .gif-frame { grid-template-columns: auto 50px minmax(0, 1fr) auto; gap: 8px; }
  .gif-frame img { width: 50px; height: 50px; }
  .article-cta { align-items: stretch; flex-direction: column; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 420px) {
  .brand { font-size: 14px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 0; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
}
