:root {
  --bg: #0e0a0b;
  --bg-alt: #140f10;
  --panel: #1a1414;
  --panel-2: #241c1c;
  --text: #f4f6fb;
  --muted: #9aa3b2;
  --red: #b3262b;
  --red-soft: #cf4046;
  --amber: #7e1a1e;
  --wine-glow: 179, 38, 43;
  --border: #322828;
  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- 双语显隐 ---------- */
.lang-en-only { display: none; }
html[data-lang="en"] .lang-zh-only { display: none; }
html[data-lang="en"] .lang-en-only { display: inline; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(10, 11, 15, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo-chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 10px; padding: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.brand-logo { height: 30px; width: 30px; display: block; object-fit: contain; }
.brand-name {
  font-size: 22px; font-weight: 700; letter-spacing: .3px; color: var(--text);
}
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 15px; transition: color .2s; }
.nav a:hover { color: var(--text); }
.lang-toggle {
  border: 1px solid var(--border); background: var(--panel);
  color: var(--text); padding: 7px 14px; border-radius: 999px;
  font-size: 13px; cursor: pointer; transition: border-color .2s, background .2s;
}
.lang-toggle:hover { border-color: var(--red); background: var(--panel-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center;
  background: radial-gradient(120% 80% at 50% 40%, #1b1315 0%, var(--bg) 70%);
}
.taillight-stage {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
#taillight { width: 100%; height: 100%; display: block; }
.hero-content { position: relative; z-index: 2; padding: 0 20px; }
.hero-mark {
  width: 88px; height: 88px; display: block; margin: 0 auto 22px;
  filter: none;
}
@media (prefers-reduced-motion: reduce) { .hero-mark { animation: none; } }
.hero-name {
  font-size: clamp(40px, 8vw, 84px); font-weight: 800; letter-spacing: 1px; margin: 0;
  background: linear-gradient(180deg, #fff, #cfd4df);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(179,38,43,.25);
}
.hero-tagline { color: var(--muted); font-size: clamp(15px, 2.4vw, 20px); margin: 14px 0 28px; }
.btn-cta {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--amber));
  color: #fff; font-weight: 600; font-size: 15px;
  box-shadow: 0 8px 30px rgba(179,38,43,.4); transition: transform .2s, box-shadow .2s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(179,38,43,.55); }
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--muted); font-size: 26px; z-index: 2; animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- 通用 section ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 9vw, 110px) clamp(16px, 4vw, 48px); }
.section-alt { max-width: none; background: var(--bg-alt); }
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-title { font-size: clamp(26px, 4vw, 40px); font-weight: 700; text-align: center; margin: 0 0 8px; }
.section-title::after {
  content: ""; display: block; width: 54px; height: 3px; margin: 14px auto 0;
  background: linear-gradient(90deg, var(--red), var(--amber)); border-radius: 3px;
}
.section-intro { text-align: center; color: var(--muted); max-width: 720px; margin: 18px auto 40px; font-size: 17px; }

/* ---------- 业务卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--red); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.card-icon {
  font-size: 30px; width: 58px; height: 58px; display: flex; align-items: center; justify-content: center;
  border-radius: 14px; margin-bottom: 16px; color: var(--red-soft);
  background: rgba(179,38,43,.1); border: 1px solid rgba(179,38,43,.25);
}
.card h3 { margin: 0 0 10px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- 案例网格 ---------- */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.case-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.case-card:hover { transform: translateY(-6px); border-color: var(--red); box-shadow: 0 18px 44px rgba(0,0,0,.45); }
.case-cover { position: relative; aspect-ratio: 4 / 3; background: #0d0f15; overflow: hidden; }
.case-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.case-card:hover .case-cover img { transform: scale(1.06); }
.case-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.case-count {
  position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.65);
  padding: 3px 9px; border-radius: 999px; font-size: 12px; color: #fff;
}
.case-body { padding: 18px 18px 22px; }
.case-body h3 { margin: 0 0 8px; font-size: 18px; }
.case-body p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty-hint { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------- 联系方式 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; max-width: 820px; margin: 0 auto; }
.contact-item {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; font-size: 16px; display: flex; align-items: center; gap: 12px;
}
.contact-label { font-size: 22px; }

/* ---------- 页脚 ---------- */
.site-footer { text-align: center; color: var(--muted); padding: 34px 16px; border-top: 1px solid var(--border); font-size: 14px; }
.site-footer a { color: var(--red-soft); }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.lightbox[hidden] { display: none; }
.lb-img { max-width: 90vw; max-height: 80vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; cursor: pointer; border-radius: 50%; width: 48px; height: 48px; font-size: 24px;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(179,38,43,.5); }
.lb-close { top: 24px; right: 24px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lb-caption { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #fff; padding: 0 20px; }

/* ---------- 后台 ---------- */
.admin-body { background: var(--bg-alt); }
.admin-wrap { max-width: 960px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 40px) 80px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-top h1 { font-size: 24px; margin: 0; }
.admin-top .links a { color: var(--muted); margin-left: 18px; font-size: 14px; }
.admin-top .links a:hover { color: var(--text); }

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; width: 100%; max-width: 380px; text-align: center; }
.login-card h1 { margin: 0 0 6px; font-size: 24px; }
.login-card p { color: var(--muted); margin: 0 0 24px; font-size: 14px; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-bottom: 26px; }
.panel h2 { margin: 0 0 18px; font-size: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input[type=text], .field input[type=password], .field input[type=email], .field input[type=number], .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 11px 13px; font-size: 15px; font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.field textarea { min-height: 76px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.btn {
  display: inline-block; border: none; cursor: pointer; font-size: 15px; font-weight: 600;
  padding: 12px 24px; border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, var(--red), var(--amber)); transition: transform .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(179,38,43,.35); }
.btn-block { width: 100%; }
.btn-ghost { background: var(--panel-2); border: 1px solid var(--border); }
.btn-ghost:hover { box-shadow: none; border-color: var(--red); }
.btn-danger { background: #2a1416; border: 1px solid #5a2024; color: #ff8a8a; }
.btn-danger:hover { background: #3a191c; box-shadow: none; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.case-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.case-row:last-child { border-bottom: none; }
.case-row .thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 7px; background: var(--bg); flex-shrink: 0; }
.case-row .meta { flex: 1; min-width: 0; }
.case-row .meta strong { display: block; }
.case-row .meta span { color: var(--muted); font-size: 13px; }
.case-row .actions { display: flex; gap: 8px; }

.img-manage { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.img-manage figure { margin: 0; position: relative; width: 110px; }
.img-manage img { width: 110px; height: 84px; object-fit: cover; border-radius: 8px; display: block; }
.img-manage .del-img {
  position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.7); color: #fff; border: none;
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 13px;
}
.img-manage .del-img:hover { background: var(--red); }

.logo-preview { height: 40px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; display: inline-flex; align-items: center; margin-bottom: 8px; }
.logo-preview img { height: 32px; }

.flash { padding: 11px 16px; border-radius: 9px; margin-bottom: 16px; font-size: 14px; }
.flash.success { background: rgba(40,180,90,.12); border: 1px solid rgba(40,180,90,.4); color: #7be0a0; }
.flash.error { background: rgba(179,38,43,.12); border: 1px solid rgba(179,38,43,.4); color: #ff9a9a; }

.actions-bar { display: flex; gap: 12px; align-items: center; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- 手机端页头:腾出空间,导航不溢出 ---------- */
@media (max-width: 600px) {
  .site-header { gap: 10px; padding: 10px 14px; }
  .brand-name { display: none; }          /* 窄屏只留 logo 图标 */
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }
  .lang-toggle { padding: 6px 11px; font-size: 12px; }
}
