:root {
  --bg: #0f1221;
  --panel: #191d33;
  --panel-2: #222747;
  --text: #e8eaf2;
  --muted: #9aa0bf;
  --brand: #6c8cff;
  --brand-2: #8a6cff;
  --ok: #37d399;
  --warn: #ffb020;
  --err: #ff6b6b;
  --border: #2b315a;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #23294d 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header.site {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(15,18,33,.75);
  border-bottom: 1px solid var(--border);
}
header.site .inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: .3px; }
.logo span { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav a { color: var(--muted); margin-left: 18px; font-size: 14px; }
nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 56px 0 28px; }
.hero h1 { font-size: 34px; margin: 0 0 8px; }
.hero p { color: var(--muted); margin: 0; font-size: 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; padding: 24px 0 60px; }
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--brand); }
.card .cover { height: 150px; background: #12152a center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 40px; }
.card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card .summary { color: var(--muted); font-size: 14px; flex: 1; }
.card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.price { color: var(--ok); font-weight: 800; font-size: 20px; }
.badge { font-size: 12px; color: var(--muted); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; }

.btn {
  display: inline-block; cursor: pointer;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff; border: 0; border-radius: 10px;
  padding: 10px 18px; font-size: 15px; font-weight: 600;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.ok { background: var(--ok); color: #05281c; }
.btn.danger { background: transparent; border: 1px solid var(--err); color: var(--err); }
.btn.sm { padding: 6px 12px; font-size: 13px; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 24px 0; box-shadow: var(--shadow); }
.detail { display: grid; grid-template-columns: 300px 1fr; gap: 28px; padding: 30px 0; }
.detail .cover { height: 220px; border-radius: var(--radius); background: #12152a center/cover no-repeat; display:flex; align-items:center; justify-content:center; font-size:64px; color:var(--muted); border:1px solid var(--border);}
.detail h1 { margin: 0 0 6px; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.desc { white-space: pre-wrap; color: #cfd3ea; }

label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; background: #0e1120; color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 15px;
}
textarea { min-height: 120px; resize: vertical; }
.row { display: flex; gap: 16px; }
.row > div { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.check input { width: auto; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
code.key { background: #0e1120; border: 1px solid var(--border); padding: 4px 8px; border-radius: 6px; font-size: 14px; letter-spacing: 1px; }

.flash { padding: 12px 16px; border-radius: 10px; margin: 14px 0; }
.flash.ok { background: rgba(55,211,153,.12); border: 1px solid var(--ok); color: var(--ok); }
.flash.error { background: rgba(255,107,107,.12); border: 1px solid var(--err); color: var(--err); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 16px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat .n { font-size: 28px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 13px; }

.state { font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.state.paid { background: rgba(55,211,153,.15); color: var(--ok); }
.state.pending { background: rgba(255,176,32,.15); color: var(--warn); }
.state.unused { background: rgba(108,140,255,.15); color: var(--brand); }
.state.sold { background: rgba(55,211,153,.15); color: var(--ok); }
.state.revoked { background: rgba(255,107,107,.15); color: var(--err); }

.center { text-align: center; }
.muted { color: var(--muted); }
.qr { max-width: 260px; border-radius: 12px; border: 1px solid var(--border); }
footer.site { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; padding: 24px 0; margin-top: 40px; }
.admin-nav { display:flex; gap:6px; flex-wrap:wrap; margin: 16px 0 8px; }
.admin-nav a { padding:8px 14px; border:1px solid var(--border); border-radius:10px; color:var(--text); font-size:14px; }
.admin-nav a:hover { border-color: var(--brand); text-decoration:none; }

/* ===== 图片/动图轮播 ===== */
.slideshow { position: relative; width: 100%; background: #12152a; overflow: hidden; }
.card .slideshow { height: 180px; }
.detail .slideshow { height: 260px; border-radius: var(--radius); border: 1px solid var(--border); }
.slideshow .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.slideshow .slide.active { opacity: 1; }
.slideshow img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slideshow .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 46px; color: var(--muted); }
.slideshow .dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; z-index: 2; }
.slideshow .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45); display: inline-block; }
.slideshow .dots i.on { background: #fff; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
.thumbs img:hover { border-color: var(--brand); }

/* ===== 顶部导航按钮 ===== */
.nav-btn { color: var(--muted); margin-left: 16px; font-size: 14px; cursor: pointer; background: none; border: 0; font-family: inherit; }
.nav-btn:hover { color: var(--text); }

/* ===== 弹窗（联系客服） ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; max-width: 380px; width: calc(100% - 40px); box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 14px; }
.modal .kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.modal .kv b { color: var(--muted); font-weight: 500; }
.modal .close { float: right; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; }

/* 更新提醒徽标 */
.update-flag { background: rgba(255,176,32,.15); color: var(--warn); border: 1px solid var(--warn); font-size: 12px; padding: 3px 10px; border-radius: 999px; }

@media (max-width: 720px) {
  .detail { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
  nav a, .nav-btn { margin-left: 10px; font-size: 13px; }
}
