/* ================================================条形码格============
   条码人 Barcode.ren —— 全站统一样式表
   设计：浅色科技风 + 霓虹点缀，响应式，尊重减少动画偏好
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #F5F8FF;
  --bg-grad-1: #EEF4FF;
  --bg-grad-2: #F7FAFF;
  --card: #FFFFFF;
  --text: #17233D;
  --text-2: #61708A;
  --blue: #246BFD;
  --cyan: #00D9FF;
  --purple: #8B5CF6;
  --border: #DCE5F5;
  --shadow: 0 8px 30px rgba(36, 107, 253, 0.10);
  --shadow-hover: 0 14px 40px rgba(36, 107, 253, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --header-h: 84px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Consolas", "SFMono-Regular", "Menlo", monospace;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 12% -8%, rgba(0, 217, 255, 0.10), transparent 60%),
    radial-gradient(900px 520px at 88% 0%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2) 40%, var(--bg));
  background-attachment: fixed;
  min-height: 100vh;
}
/* 淡网格装饰 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(36, 107, 253, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 107, 253, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
}

img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; color: var(--text); }
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
  position: relative;
  z-index: 1;
}
.section { padding: 64px 0; }
.section-head { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 12px; }
.section-head p { color: var(--text-2); margin: 0; }

/* ---------- 品牌渐变文字 ---------- */
.grad-text {
  background: linear-gradient(92deg, var(--blue) 0%, #1B8BFF 40%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.neon {
  text-shadow: 0 0 18px rgba(0, 217, 255, 0.35), 0 0 6px rgba(36, 107, 253, 0.25);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.brand:hover { text-decoration: none; }
.brand-logo { width: 46px; height: 46px; flex: 0 0 auto; filter: drop-shadow(0 4px 10px rgba(36,107,253,.25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-name:hover .grad-text { filter: brightness(1.08); }
.brand-domain {
  font-size: 0.82rem;
  color: var(--text-2);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* 导航 */
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background .18s, color .18s, box-shadow .18s;
  white-space: nowrap;
}
.nav a:hover { background: rgba(36, 107, 253, 0.08); color: var(--blue); text-decoration: none; }
.nav a[aria-current="page"] {
  background: linear-gradient(92deg, rgba(36,107,253,.14), rgba(0,217,255,.14));
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(36,107,253,.25);
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { width: 22px; height: 22px; }

/* 语言切换 */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  margin-left: 8px;
}
.lang-switch a {
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-2);
  text-decoration: none;
  transition: all .18s;
}
.lang-switch a:hover { color: var(--blue); background: rgba(36,107,253,.06); text-decoration: none; }
.lang-switch a[aria-current="true"] {
  color: #fff;
  background: linear-gradient(92deg, var(--blue), #1B8BFF);
}

/* 移动端 */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 18px 18px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 10px; }
  .lang-switch { margin-left: 0; margin-top: 6px; align-self: flex-start; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 56px 0 24px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  margin: 0 0 18px;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.hero p.lead {
  color: var(--text-2);
  font-size: 1.08rem;
  margin: 0 0 28px;
  max-width: 560px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(92deg, var(--blue) 0%, #1B8BFF 55%, var(--cyan) 100%);
  box-shadow: 0 10px 24px rgba(36,107,253,.35), 0 0 0 1px rgba(0,217,255,.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 16px 34px rgba(36,107,253,.45), 0 0 22px rgba(0,217,255,.5);
}
.btn-ghost {
  color: var(--blue);
  background: #fff;
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* Hero 装饰 */
.hero-visual { position: relative; min-height: 260px; display: grid; place-items: center; }
.barcode-art {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 16/10;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.barcode-art .bars {
  height: 96px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--text) 0 2px, transparent 2px 4px,
    var(--text) 4px 5px, transparent 5px 8px,
    var(--text) 8px 11px, transparent 11px 13px,
    var(--text) 13px 14px, transparent 14px 18px
  );
  opacity: .9;
  border-radius: 3px;
}
.barcode-art .code-line { font-family: var(--font-mono); letter-spacing: .35em; color: var(--text-2); text-align: center; font-size: .82rem; }
.barcode-art .scanline {
  position: absolute;
  left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 16px var(--cyan);
  animation: scan 3s ease-in-out infinite;
  top: 30%;
}
@keyframes scan {
  0%, 100% { top: 22%; opacity: .4; }
  50% { top: 76%; opacity: 1; }
}
.hero-badge {
  position: absolute;
  top: 14px; right: 14px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--blue);
  background: rgba(36,107,253,.1);
  padding: 4px 10px;
  border-radius: 999px;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 210px; }
}

/* ============================================================
   卡片 / 通用
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 28px; }
@media (max-width: 600px) { .card-pad { padding: 20px; } }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 880px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }

.feature-card { padding: 26px; transition: transform .18s, box-shadow .18s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(36,107,253,.14), rgba(0,217,255,.14));
  color: var(--blue);
  margin-bottom: 16px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.feature-card p { margin: 0; color: var(--text-2); font-size: .95rem; }

/* ============================================================
   条码生成器表单
   ============================================================ */
.generator-card { overflow: hidden; margin-top: 8px; }
.generator-head {
  padding: 22px 28px;
  background: linear-gradient(120deg, rgba(36,107,253,.10), rgba(0,217,255,.10) 60%, rgba(139,92,246,.10));
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.generator-head h2 { margin: 0; font-size: 1.35rem; }
.generator-head p { margin: 6px 0 0; color: var(--text-2); font-size: .92rem; }
.generator-head .deco-bars {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 120px; height: 34px; opacity: .5;
  background-image: repeating-linear-gradient(90deg, var(--blue) 0 2px, transparent 2px 5px);
  border-radius: 3px;
}

.form-grid { display: grid; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 700; font-size: .92rem; color: var(--text); }
.field .hint { font-size: .8rem; color: var(--text-2); font-weight: 400; }
.field input[type="text"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-size: .96rem;
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 110px; resize: vertical; font-family: var(--font-mono); font-size: .9rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36,107,253,.15);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #E5484D;
  box-shadow: 0 0 0 3px rgba(229,72,77,.12);
}
.field .error-msg { color: #C9262B; font-size: .82rem; display: none; }
.field .error-msg.is-visible { display: block; }

.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .row-3, .row-2 { grid-template-columns: 1fr; } }

/* 单选组 */
.radio-group { display: flex; gap: 22px; flex-wrap: wrap; padding-top: 2px; }
.radio-group label {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .95rem;
  cursor: pointer;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all .16s;
}
.radio-group label:hover { border-color: var(--blue); }
.radio-group input[type="radio"] { accent-color: var(--blue); width: 17px; height: 17px; }
.radio-group input[type="radio"]:checked + span { color: var(--blue); }
.radio-group label:has(input:checked) {
  border-color: var(--blue);
  background: rgba(36,107,253,.07);
  box-shadow: 0 0 0 1px rgba(36,107,253,.2);
}

/* 提交按钮 */
.form-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding-top: 4px; }
.btn-submit {
  font-size: 1.02rem;
  padding: 14px 34px;
  color: #fff;
  background: linear-gradient(92deg, var(--blue) 0%, #1B8BFF 50%, var(--purple) 100%);
  border: none;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(36,107,253,.38), 0 0 0 1px rgba(139,92,246,.35);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 16px 36px rgba(36,107,253,.5), 0 0 24px rgba(139,92,246,.55);
}
.mode-note {
  font-size: .82rem;
  color: var(--text-2);
  background: rgba(36,107,253,.06);
  border: 1px dashed rgba(36,107,253,.3);
  padding: 8px 14px;
  border-radius: 10px;
}

/* 结果预留区 */
.results-placeholder {
  margin-top: 26px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 42px 24px;
  text-align: center;
  color: var(--text-2);
  background: rgba(36,107,253,.03);
}
.results-placeholder strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 6px; }

/* ============================================================
   内容页 / 文章
   ============================================================ */
.page-head {
  padding: 46px 0 20px;
  text-align: center;
}
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: 0 0 14px; }
.page-head p { color: var(--text-2); max-width: 720px; margin: 0 auto; }

.breadcrumb { font-size: .85rem; color: var(--text-2); margin-bottom: 10px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--blue); }

.article { max-width: 860px; margin: 0 auto; }
.article h2 { font-size: 1.5rem; margin: 40px 0 14px; padding-top: 8px; }
.article h3 { font-size: 1.18rem; margin: 26px 0 10px; }
.article p, .article li { color: #2a3752; }
.article ul, .article ol { padding-left: 24px; }
.article li { margin: 6px 0; }
.article .callout {
  border-left: 4px solid var(--blue);
  background: rgba(36,107,253,.06);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 18px 0;
  color: #26324d;
  font-size: .95rem;
}
.article a { text-decoration: underline; text-underline-offset: 2px; }

/* 比较表 */
.table-wrap { overflow-x: auto; margin: 20px 0; border-radius: 12px; border: 1px solid var(--border); }
table.compare { width: 100%; border-collapse: collapse; min-width: 620px; background: #fff; }
table.compare th, table.compare td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: .92rem; }
table.compare thead th { background: rgba(36,107,253,.08); color: var(--blue); font-weight: 700; }
table.compare tbody tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--blue);
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--text-2); font-size: .95rem; }

/* CTA */
.cta-band {
  background: linear-gradient(120deg, #17233D, #24345C 55%, #2A2F66);
  border-radius: var(--radius);
  color: #fff;
  padding: 44px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; margin: 0 0 12px; font-size: 1.5rem; }
.cta-band p { color: #C6D2EC; margin: 0 0 24px; }
.cta-band .btn-ghost { background: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: 70px;
  background: linear-gradient(160deg, #131C33, #1B2648 55%, #232A5C);
  color: #C6D2EC;
  position: relative;
  z-index: 1;
}
.site-footer a { color: #C6D2EC; text-decoration: none; }
.site-footer a:hover { color: var(--cyan); text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 34px;
  padding: 52px 0 34px;
}
.footer-brand .brand-name { color: #fff; font-size: 1.5rem; font-weight: 800; }
.footer-brand .brand-domain { color: var(--cyan); font-family: var(--font-mono); font-size: .85rem; margin-top: 4px; }
.footer-brand p { font-size: .9rem; color: #9FB0D4; margin: 14px 0 0; line-height: 1.7; }
.footer-col h3 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 8px 0; font-size: .9rem; }
.footer-col .muted { color: #8497C0; font-size: .85rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px 0 26px;
  font-size: .85rem;
  color: #8497C0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   减少动画偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .barcode-art .scanline { display: none; }
}

.form-row .field.field-format{
  display: block;            /* 取消 flex 拉伸 */
}
.field-format select{
  width: 50%;
  max-width: 100%;
  box-sizing: border-box;
}