/* ============================================================
   温州赛德斯安科技有限公司 · 企业门户
   设计语言：深色 + 渐变光晕 + 玻璃拟态 + 流畅动效
   ============================================================ */
:root {
  --bg: #08090f;
  --bg-2: #0e1018;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eef0f7;
  --muted: #9aa1b8;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --grad: linear-gradient(120deg, #7c5cff 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(124,92,255,.18), rgba(34,211,238,.18));
  --danger: #ff5c7c;
  --ok: #34d399;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  --maxw: 1180px;
  --font: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.ta-right { text-align: right; }
.req { color: var(--danger); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* 背景光晕 */
.bg-mesh {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(50% 45% at 88% 12%, rgba(34,211,238,.18), transparent 60%),
    radial-gradient(60% 60% at 50% 110%, rgba(124,92,255,.14), transparent 60%),
    var(--bg);
}
.bg-mesh::after {
  content: ""; position: absolute; inset: -50%;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  animation: drift 24s linear infinite;
}
@keyframes drift { to { transform: translate(46px, 46px); } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: .25s ease;
  background: var(--surface-2); color: var(--text);
}
.btn-primary { background: var(--grad); color: #0a0a12; box-shadow: 0 10px 30px -10px rgba(124,92,255,.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -10px rgba(124,92,255,.85); }
.btn-ghost { background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }
.btn-danger { background: rgba(255,92,124,.14); color: var(--danger); border: 1px solid rgba(255,92,124,.35); }
.btn-danger:hover { background: rgba(255,92,124,.24); }
.btn-sm { padding: 8px 14px; font-size: .83rem; }
.btn-block { width: 100%; }

/* ---------- 头部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8,9,15,.6);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; background: var(--grad); color: #0a0a12; font-weight: 900;
  box-shadow: 0 6px 18px -6px rgba(124,92,255,.8);
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-weight: 500; transition: .2s; }
.nav-links a:hover { color: var(--text); }
.nav-admin {
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px; color: var(--text) !important;
}
.nav-admin:hover { background: var(--surface-2); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 60px; }
.hero-inner { max-width: 880px; }
.eyebrow { letter-spacing: .35em; font-size: .72rem; color: var(--accent-2); font-weight: 700; margin-bottom: 18px; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 850; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--text); font-weight: 600; margin-top: 12px; }
.hero-desc { color: var(--muted); max-width: 640px; font-size: 1.02rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,.02), transparent); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--muted); }

/* ---------- 项目网格 ---------- */
.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1180px) { .project-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .project-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px)  { .project-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: .3s ease; display: flex; flex-direction: column;
  backdrop-filter: blur(8px); position: relative;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(124,92,255,.06));
}
.card:hover { transform: translateY(-8px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.card:hover .card-media img { transform: scale(1.06); }
.card-ph { width: 100%; height: 100%; display: grid; place-items: center; background: var(--grad-soft); }
.card-ph span { font-size: 3rem; font-weight: 900; color: rgba(255,255,255,.4); }
.card-go {
  position: absolute; left: 14px; bottom: 14px; padding: 7px 13px; border-radius: 999px;
  background: rgba(10,10,18,.7); backdrop-filter: blur(6px); font-size: .78rem; font-weight: 600;
  opacity: 0; transform: translateY(8px); transition: .3s;
}
.card:hover .card-go { opacity: 1; transform: translateY(0); }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.card-tags, .detail-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-size: .72rem; padding: 3px 10px; border-radius: 999px; background: var(--grad-soft); color: var(--accent-2); border: 1px solid rgba(124,92,255,.25); }
.tag.sm { font-size: .7rem; padding: 3px 9px; }
.card-body h3 { font-size: 1.08rem; margin: 0; line-height: 1.3; }
.card-body h3 a:hover { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-summary { color: var(--muted); font-size: .86rem; line-height: 1.55; margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; gap: 8px; margin-top: 2px; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-ico { font-size: 3rem; margin-bottom: 10px; }
.center-screen { text-align: center; padding: 90px 20px; }

/* ---------- About / Contact ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 50px; align-items: center; }
.about-grid h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.about-grid .lead { font-size: 1.1rem; color: var(--text); }
.check-list { list-style: none; padding: 0; margin: 18px 0 0; }
.check-list li { padding: 8px 0 8px 30px; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 8px; color: var(--ok); font-weight: 800; }
.about-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.about-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.about-row:last-child { border-bottom: 0; }
.about-row span { color: var(--muted); }
.contact { text-align: center; }
.contact h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* ---------- 详情页 ---------- */
.detail { padding-top: 40px; }
.back-link { color: var(--muted); font-size: .9rem; display: inline-block; margin-bottom: 26px; }
.back-link:hover { color: var(--text); }
.detail-head { max-width: 760px; }
.detail-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.detail-summary { color: var(--muted); font-size: 1.15rem; }
.detail-actions { display: flex; gap: 14px; margin: 22px 0 40px; flex-wrap: wrap; }
.gallery { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
.gallery-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); aspect-ratio: 16/9; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 12px; flex-wrap: wrap; }
.thumb { width: 110px; height: 70px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: var(--bg-2); cursor: pointer; padding: 0; transition: .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--accent); }
.gallery-empty { padding: 50px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.detail-body { max-width: 820px; margin-bottom: 36px; }
.detail-body h2 { font-size: 1.5rem; }
.detail-body p { color: var(--muted); }
.detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; border-top: 1px solid var(--border); padding-top: 28px; }
.detail-meta div { display: flex; flex-direction: column; }
.detail-meta span { color: var(--muted); font-size: .82rem; }
.detail-meta b { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 50px 0 40px; background: rgba(8,9,15,.5); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.footer-intro { color: var(--muted); max-width: 480px; margin-top: 14px; }
.footer-meta { color: var(--muted); font-size: .9rem; }
.footer-meta p { margin: 4px 0; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 6px; padding: 18px 0; }
.footer-bottom .icp { text-align: center; color: var(--muted); font-size: .82rem; letter-spacing: .03em; margin: 0; }
.footer-bottom .icp a { color: inherit; text-decoration: none; transition: color .2s ease, opacity .2s ease; }
.footer-bottom .icp a:hover { color: var(--text); opacity: .9; text-decoration: underline; }

/* ============================================================
   后台管理
   ============================================================ */
.admin-login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-wrap { width: 100%; max-width: 420px; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 38px 32px; backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.login-brand { justify-content: center; margin-bottom: 18px; }
.login-card h1 { text-align: center; font-size: 1.6rem; }
.login-sub { text-align: center; color: var(--muted); margin-bottom: 24px; }
.login-card label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.login-card input { width: 100%; margin-top: 7px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font-size: .95rem; }
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-back { display: block; text-align: center; margin-top: 18px; color: var(--muted); font-size: .85rem; }
.login-back:hover { color: var(--text); }

.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-side { background: var(--bg-2); border-right: 1px solid var(--border); padding: 22px 18px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.admin-brand { font-size: 1.1rem; }
.admin-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.admin-nav a { padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 500; transition: .2s; }
.admin-nav a:hover { background: var(--surface); color: var(--text); }
.admin-nav a.active { background: var(--grad-soft); color: var(--text); border: 1px solid rgba(124,92,255,.3); }
.admin-side-foot { border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.admin-user { font-size: .85rem; color: var(--muted); }
.admin-main { display: flex; flex-direction: column; }
.admin-top { display: flex; align-items: center; gap: 16px; padding: 18px 26px; border-bottom: 1px solid var(--border); background: rgba(8,9,15,.5); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); }
.admin-top h2 { margin: 0; font-size: 1.25rem; flex: 1; }
.admin-menu { display: none; background: none; border: 0; color: var(--text); font-size: 1.4rem; cursor: pointer; }
.admin-badge { font-size: .75rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.admin-content { padding: 26px; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: .9rem; }
.alert-success { background: rgba(52,211,153,.14); color: var(--ok); border: 1px solid rgba(52,211,153,.3); }
.alert-danger { background: rgba(255,92,124,.14); color: var(--danger); border: 1px solid rgba(255,92,124,.3); }

.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; background: rgba(255,255,255,.02); }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: rgba(255,255,255,.025); }
.row-sub { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.row-sub a { color: var(--accent-2); word-break: break-all; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.thumb-sm { width: 56px; height: 38px; border-radius: 8px; object-fit: cover; }
.thumb-ph { width: 56px; height: 38px; border-radius: 8px; background: var(--grad-soft); display: grid; place-items: center; font-weight: 800; color: rgba(255,255,255,.5); }
.cell-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.status { font-size: .74rem; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.status.ok { background: rgba(52,211,153,.15); color: var(--ok); }
.status.off { background: rgba(255,255,255,.08); color: var(--muted); }

.pwd-card { margin-top: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; max-width: 520px; }
.pwd-card h3 { font-size: 1.1rem; }
.pwd-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pwd-form input { flex: 1; min-width: 160px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); }
.pwd-form input:focus { outline: none; border-color: var(--accent); }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.card-soft { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font-size: .95rem; font-family: inherit; resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,92,255,.18); }
.field-row { display: grid; grid-template-columns: 1fr 140px; gap: 14px; }

.dropzone { border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 20px; text-align: center; transition: .2s; }
.dropzone.over { border-color: var(--accent); background: var(--grad-soft); }
.dropzone .btn { margin-bottom: 10px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 10px; margin-top: 14px; }
.preview { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(10,10,18,.75); color: #fff; cursor: pointer; font-size: .9rem; line-height: 1; }
.preview input[type=radio] { position: absolute; bottom: 4px; left: 4px; }
.form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* ---------- 滚动揭示动画 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bg-mesh::after { animation: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 16px 22px; background: rgba(8,9,15,.96); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 60px 0 40px; }
  .hero-stats { gap: 26px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; z-index: 60; transform: translateX(-100%); transition: .3s; }
  .admin-side.open { transform: none; }
  .admin-menu { display: block; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 14px; padding: 8px; }
  .admin-table td { border: 0; padding: 8px 12px; }
  .admin-table td::before { content: attr(data-label); color: var(--muted); font-size: .75rem; display: block; }
  .row-actions { justify-content: flex-start; }
}
