/* ===== 条码地带 Barcode Zone - 主样式 ===== */
:root {
  --bg: #f5f0e6;
  --bg-2: #ede4d3;
  --ink: #2b2418;
  --ink-soft: #5a4e3c;
  --gold: #b8860b;
  --gold-light: #e8b84b;
  --copper: #a0522d;
  --steel: #3d4a5c;
  --steel-dark: #232d3b;
  --glow: rgba(232, 184, 75, 0.6);
  --card: #fffdf8;
  --border: #c9b99a;
  --radius: 12px;
  --shadow-3d: 0 6px 0 #b9a88a, 0 12px 24px rgba(43, 36, 24, 0.25);
  --shadow-inset: inset 0 2px 4px rgba(0,0,0,0.08), inset 0 -2px 4px rgba(255,255,255,0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(232,184,75,0.08), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(160,82,45,0.08), transparent 40%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.75;
  min-height: 100vh;
}

a { color: var(--copper); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(245,240,230,0.97), rgba(237,228,211,0.95));
  border-bottom: 3px solid var(--copper);
  box-shadow: 0 4px 20px rgba(43,36,24,0.15);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 16px; }
.brand-logo { width: 64px; height: 64px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }

.site-name {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff4c8 0%, #e8b84b 40%, #b8860b 70%, #7a5c08 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    1px 1px 0 #7a5c08,
    2px 2px 0 #6b4f06,
    3px 3px 0 #5c4305,
    4px 4px 6px rgba(0,0,0,0.35),
    0 0 18px var(--glow),
    0 0 36px rgba(232,184,75,0.35);
  transform: perspective(600px) rotateX(8deg);
  transition: transform .3s, text-shadow .3s;
}
.site-name:hover {
  transform: perspective(600px) rotateX(0deg) scale(1.02);
  text-shadow:
    1px 1px 0 #7a5c08, 2px 2px 0 #6b4f06, 3px 3px 0 #5c4305,
    4px 4px 6px rgba(0,0,0,0.4), 0 0 24px var(--glow), 0 0 48px rgba(232,184,75,0.5);
}

.site-url {
  font-size: 15px;
  letter-spacing: 4px;
  color: var(--steel);
  font-weight: 700;
  text-transform: lowercase;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.lang-switch {
  padding: 8px 18px;
  background: linear-gradient(180deg, #5a6b80, var(--steel));
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  border: 2px solid var(--steel-dark);
  box-shadow: 0 3px 0 var(--steel-dark), 0 5px 10px rgba(0,0,0,0.3);
  transition: all .15s;
}
.lang-switch:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--steel-dark), 0 8px 14px rgba(0,0,0,0.35);
  color: #fff;
  text-decoration: none;
}
.lang-switch:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--steel-dark); }

/* ===== Nav ===== */
.main-nav { width: 100%; }

.nav-list {
  list-style: none;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 0 0;
  border-top: 1px dashed rgba(160,82,45,0.3);
  margin-top: 6px;
}

.nav-list li a {
  display: block;
  padding: 8px 16px;
  font-weight: 700;
  color: var(--ink);
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  transition: all .2s;
}
.nav-list li a:hover {
  background: linear-gradient(180deg, #fff8e6, #f0e6cc);
  border-color: var(--border);
  color: var(--copper);
  text-decoration: none;
  transform: translateY(-2px);
}
.nav-list li a.active {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #fff;
  border-color: #7a5c08;
  box-shadow: 0 2px 8px var(--glow), inset 0 1px 0 rgba(255,255,255,0.5);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.nav-toggle {
  display: none;
  background: var(--steel);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--steel-dark);
}

/* ===== Main content ===== */
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

h1 {
  font-size: 34px;
  color: var(--ink);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 4px solid var(--gold);
  text-shadow: 0 2px 4px rgba(184,134,11,0.25);
}
h2 { font-size: 26px; color: var(--copper); margin: 28px 0 14px; }
h3 { font-size: 20px; color: var(--steel); margin: 20px 0 10px; }
p { margin-bottom: 14px; color: var(--ink-soft); }
ul, ol { margin: 0 0 16px 24px; color: var(--ink-soft); }
li { margin-bottom: 6px; }

.content-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow-3d);
  margin-bottom: 28px;
}

/* ===== 3D Industrial Card / Generator ===== */
.generator-card {
  background: linear-gradient(160deg, #fffdf8 0%, #f5ecd8 100%);
  border: 3px solid var(--copper);
  border-radius: 18px;
  padding: 32px;
  margin-bottom: 40px;
  position: relative;
  box-shadow:
    0 8px 0 #8b5a2b,
    0 16px 40px rgba(160,82,45,0.35),
    inset 0 1px 0 rgba(255,255,255,0.8);
  overflow: hidden;
}
.generator-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 14px,
    rgba(184,134,11,0.04) 14px,
    rgba(184,134,11,0.04) 28px
  );
  pointer-events: none;
}
.generator-card > * { position: relative; z-index: 1; }

.generator-title {
  font-size: 30px;
  color: var(--steel-dark);
  text-align: center;
  margin-bottom: 26px;
  letter-spacing: 1px;
  text-shadow:
    1px 1px 0 rgba(255,255,255,0.9),
    2px 2px 0 rgba(184,134,11,0.5),
    3px 3px 8px rgba(0,0,0,0.2);
}

/* ===== Form ===== */
.barcode-form { display: flex; flex-direction: column; gap: 18px; }

.form-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

.form-field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
.form-field.half { flex: 0 1 50%; max-width: 50%; }

.form-field label, .form-row > label.group-label {
  font-weight: 700;
  color: var(--ink);
  font-size: 15px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.form-field input[type="text"],
.form-field textarea,
.form-field select {
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, #f2e9d5);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  box-shadow: var(--shadow-inset);
  transition: border-color .2s, box-shadow .2s;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--shadow-inset), 0 0 0 3px rgba(232,184,75,0.35), 0 0 12px var(--glow);
}
.form-field textarea { min-height: 100px; resize: vertical; }

.form-field.inline { flex-direction: row; align-items: center; gap: 8px; }
.form-field.inline input,
.form-field.inline select { flex: 1; min-width: 80px; }
.form-field.inline .unit-label { white-space: nowrap; font-weight: 600; }

.radio-group {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 6px 0;
}
.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: linear-gradient(180deg, #fffdf8, #f0e6cc);
  box-shadow: 0 2px 0 #c9b99a;
  transition: all .15s;
}
.radio-group label:hover { transform: translateY(-1px); box-shadow: 0 3px 0 #c9b99a; }
.radio-group input[type="radio"] { accent-color: var(--copper); width: 16px; height: 16px; }
.radio-group input[type="radio"]:checked + span { color: var(--copper); }
.radio-group label:has(input:checked) {
  border-color: var(--copper);
  background: linear-gradient(180deg, #ffe9c2, #f3d79a);
  box-shadow: 0 2px 0 var(--copper), 0 0 12px rgba(232,184,75,0.4);
}

.btn-submit {
  align-self: center;
  margin-top: 12px;
  padding: 16px 60px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(180deg, #e8b84b 0%, #b8860b 55%, #7a5c08 100%);
  border: 3px solid #5c4305;
  border-radius: 14px;
  cursor: pointer;
  text-shadow: 0 2px 3px rgba(0,0,0,0.45);
  box-shadow:
    0 6px 0 #5c4305,
    0 12px 24px rgba(184,134,11,0.5),
    inset 0 2px 0 rgba(255,255,255,0.5),
    inset 0 -3px 6px rgba(0,0,0,0.2);
  transition: all .15s ease;
}
.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow:
    0 9px 0 #5c4305,
    0 16px 32px rgba(184,134,11,0.6),
    inset 0 2px 0 rgba(255,255,255,0.6),
    inset 0 -3px 6px rgba(0,0,0,0.2),
    0 0 24px var(--glow);
}
.btn-submit:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 #5c4305,
    0 4px 10px rgba(184,134,11,0.4),
    inset 0 2px 0 rgba(255,255,255,0.4);
}

/* ===== Barcode output page ===== */
.output-area {
  min-height: 400px;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 12px, rgba(184,134,11,0.03) 12px, rgba(184,134,11,0.03) 24px),
    linear-gradient(160deg, #fffdf8, #f0e6cc);
  border: 3px dashed var(--copper);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  box-shadow: inset 0 0 30px rgba(160,82,45,0.08);
  margin: 20px 0;
}
.output-placeholder {
  max-width: 380px;
  margin: 0 auto;
  opacity: 0.6;
}
.output-hint {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 15px;
  font-style: italic;
}

.back-link {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 26px;
  background: linear-gradient(180deg, var(--steel), var(--steel-dark));
  color: #fff !important;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 3px 0 #141b24, 0 6px 12px rgba(0,0,0,0.3);
  text-decoration: none;
}
.back-link:hover { transform: translateY(-2px); text-decoration: none; }

/* ===== Cards grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin: 24px 0;
}
.info-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 4px 0 var(--border), 0 8px 18px rgba(43,36,24,0.12);
  transition: transform .2s, box-shadow .2s;
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 0 var(--border), 0 14px 28px rgba(43,36,24,0.2);
}
.info-card h3 { margin-top: 0; display: flex; align-items: center; gap: 10px; }
.info-card .icon { width: 32px; height: 32px; }

table.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--card);
  box-shadow: var(--shadow-3d);
  border-radius: var(--radius);
  overflow: hidden;
}
table.spec-table th, table.spec-table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
}
table.spec-table th {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
table.spec-table tr:nth-child(even) td { background: #faf5ea; }

/* ===== Footer ===== */
.site-footer {
  background: linear-gradient(180deg, var(--steel) 0%, var(--steel-dark) 100%);
  color: #d6cdb8;
  padding: 44px 24px 20px;
  margin-top: 40px;
  border-top: 4px solid var(--gold);
  box-shadow: inset 0 6px 20px rgba(0,0,0,0.3);
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}
.footer-col h4 {
  color: var(--gold-light);
  font-size: 16px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(232,184,75,0.35);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.footer-col ul { list-style: none; margin: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #d6cdb8; }
.footer-col a:hover { color: var(--gold-light); }

.footer-brand {
  text-align: center;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(232,184,75,0.25);
}
.footer-brand .site-name {
  font-size: 34px;
  display: inline-block;
}
.footer-brand .site-url {
  color: var(--gold-light);
  display: block;
  margin-top: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.footer-copy {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: #9a8f7a;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .site-name { font-size: 36px; }
  .brand-logo { width: 48px; height: 48px; }
  .nav-toggle { display: block; }
  .nav-list { display: none; flex-direction: column; }
  .nav-list.open { display: flex; }
  .form-field.half { flex: 1 1 100%; max-width: 100%; }
  h1 { font-size: 26px; }
  .generator-title { font-size: 22px; }
  .generator-card { padding: 20px; }
  .btn-submit { padding: 14px 36px; font-size: 18px; width: 100%; }
}