/* ============ 星际怪兽 · 科技蓝游戏风 ============ */
:root {
  --bg-0: #04060d;
  --bg-1: #070b1a;
  --bg-2: #0b1230;
  --line: rgba(0, 200, 255, .15);
  --line-2: rgba(0, 200, 255, .35);
  --cyan: #00e5ff;
  --cyan-2: #18ffff;
  --blue: #2196f3;
  --violet: #7c4dff;
  --pink: #ff4081;
  --green: #00e676;
  --red: #ff3d57;
  --text: #e6f4ff;
  --text-dim: #7aa6c4;
  --glow: 0 0 12px rgba(0, 229, 255, .55), 0 0 28px rgba(0, 229, 255, .25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: "Orbitron", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(33,150,243,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(124,77,255,.18), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(0,229,255,.15), transparent 60%),
    linear-gradient(180deg, #02050d 0%, #050a1a 50%, #02040b 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
/* 网格 + 扫描线 */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,200,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,.06) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  mask-image: radial-gradient(circle at 50% 30%, #000 30%, transparent 80%);
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,229,255,.04) 0,
    rgba(0,229,255,.04) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
}

/* ============ 顶栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(180deg, rgba(7,11,26,.92), rgba(7,11,26,.7));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
  box-shadow: 0 1px 0 rgba(0,229,255,.15), 0 8px 24px rgba(0,0,0,.4);
}
.brand {
  font-weight: 800; letter-spacing: 2px; font-size: 18px;
  background: linear-gradient(90deg, #00e5ff, #7c4dff, #00e5ff);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
  text-shadow: 0 0 18px rgba(0,229,255,.25);
}
@keyframes shine { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }
.topbar nav { display: flex; align-items: center; gap: 6px; }
.topbar nav a {
  color: var(--text-dim); text-decoration: none;
  padding: 6px 12px; border-radius: 6px; font-size: 14px;
  border: 1px solid transparent; transition: all .2s;
}
.topbar nav a:hover {
  color: var(--cyan-2); border-color: var(--line-2);
  background: rgba(0,229,255,.06); box-shadow: var(--glow);
}
.me { color: var(--cyan); font-size: 13px; margin: 0 8px; text-shadow: 0 0 8px rgba(0,229,255,.5); }
.me.me-guest { padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--cyan-2); text-decoration: none; }
.me.me-guest:hover { background: rgba(0,229,255,.12); color: #18ffff; box-shadow: 0 0 8px rgba(0,229,255,.4); }

/* ============ 卡片（霓虹边框） ============ */
.card {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 28px auto; padding: 22px 26px;
  background: linear-gradient(180deg, rgba(11,18,48,.78), rgba(7,11,26,.78));
  border: 1px solid var(--line-2);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  box-shadow:
    0 0 0 1px rgba(0,229,255,.05) inset,
    0 0 30px rgba(0,150,255,.08),
    0 30px 60px rgba(0,0,0,.5);
}
.card::before {
  /* 4 角发光角 */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 12px;
  background:
    linear-gradient(90deg, var(--cyan) 0, transparent 14px) top left/14px 1px no-repeat,
    linear-gradient(0deg, var(--cyan) 0, transparent 14px) top left/1px 14px no-repeat,
    linear-gradient(90deg, var(--cyan) 0, transparent 14px) top right/14px 1px no-repeat,
    linear-gradient(0deg, var(--cyan) 0, transparent 14px) top right/1px 14px no-repeat,
    linear-gradient(90deg, var(--cyan) 0, transparent 14px) bottom left/14px 1px no-repeat,
    linear-gradient(0deg, var(--cyan) 0, transparent 14px) bottom left/1px 14px no-repeat,
    linear-gradient(90deg, var(--cyan) 0, transparent 14px) bottom right/14px 1px no-repeat,
    linear-gradient(0deg, var(--cyan) 0, transparent 14px) bottom right/1px 14px no-repeat;
  opacity: .85; filter: drop-shadow(0 0 4px var(--cyan));
}
.card.narrow { max-width: 420px; margin-top: 80px; }

h1, h2 {
  margin: 0 0 18px; letter-spacing: 1.5px;
  color: #fff; text-shadow: 0 0 10px rgba(0,229,255,.4);
}
h1 {
  font-size: 22px; text-align: center;
  background: linear-gradient(90deg, #00e5ff, #7c4dff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 4s linear infinite;
}
h2 {
  font-size: 16px; padding-left: 12px; position: relative;
}
h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  box-shadow: 0 0 8px var(--cyan);
}

.muted { color: var(--text-dim); font-size: 13px; }
.err   { color: var(--red);   font-size: 13px; }
.ok    { color: var(--green); font-size: 13px; }

/* ============ 表单 ============ */
form label {
  display: block; font-size: 12px; color: var(--text-dim);
  margin: 8px 0 4px; letter-spacing: 1px; text-transform: uppercase;
}
input, select, textarea {
  font: inherit; padding: 8px 12px; border-radius: 6px;
  background: rgba(2,6,16,.7); color: var(--text);
  border: 1px solid var(--line-2);
  transition: all .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,229,255,.15), 0 0 14px rgba(0,229,255,.35);
  background: rgba(2,6,16,.9);
}
input::placeholder { color: rgba(122,166,196,.6); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }

/* ============ 按钮 ============ */
button, .btn-link {
  position: relative; overflow: hidden;
  font: inherit; cursor: pointer; letter-spacing: 1px;
  padding: 9px 18px; border-radius: 6px;
  background: linear-gradient(180deg, #0a3d62, #062847);
  color: var(--cyan-2);
  border: 1px solid rgba(0,229,255,.45);
  text-shadow: 0 0 6px rgba(0,229,255,.5);
  box-shadow:
    0 0 0 1px rgba(0,229,255,.1) inset,
    0 0 10px rgba(0,150,255,.25);
  transition: all .2s;
}
button:hover, .btn-link:hover {
  color: #fff; border-color: var(--cyan);
  background: linear-gradient(180deg, #0e5689, #093a66);
  box-shadow:
    0 0 0 1px rgba(0,229,255,.25) inset,
    0 0 18px rgba(0,229,255,.55),
    0 0 36px rgba(0,150,255,.35);
  transform: translateY(-1px);
}
button:active { transform: translateY(0); filter: brightness(.9); }
/* 按钮扫光 */
button::after {
  content: ""; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transition: left .6s;
}
button:hover::after { left: 120%; }
button.ghost {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--line-2); text-shadow: none;
}
button.ghost:hover { color: var(--cyan-2); border-color: var(--cyan); background: rgba(0,229,255,.06); }
button.danger {
  background: linear-gradient(180deg, #5a0d18, #3a0a12);
  color: #ffb3be; border-color: rgba(255,61,87,.55); text-shadow: 0 0 6px rgba(255,61,87,.5);
}
button.danger:hover { color: #fff; box-shadow: 0 0 18px rgba(255,61,87,.6); }
.btn-link { display: inline-block; text-decoration: none; }

/* ============ 录入表单布局 ============ */
.grid {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px 16px;
}
.grid .full { grid-column: 1 / -1; }
.grid .actions {
  grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; margin-top: 6px;
}
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.row label { display: flex; flex-direction: column; }

/* ============ 筛选条 ============ */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: end;
  margin-bottom: 14px; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(0,229,255,.04), transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.filters label { display: flex; flex-direction: column; font-size: 12px; color: var(--text-dim); }
.filters input, .filters select { min-width: 130px; }

/* ============ 表格 ============ */
.table-wrap {
  overflow: auto; border: 1px solid var(--line-2);
  border-radius: 8px; max-height: 70vh;
  background: linear-gradient(180deg, rgba(0,8,20,.6), rgba(0,4,12,.6));
  box-shadow: inset 0 0 20px rgba(0,150,255,.06);
}
table { width: 100%; border-collapse: collapse; min-width: 1100px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; text-align: left; }
th {
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(180deg, #0a1d3a, #06122a);
  color: var(--cyan-2);
  letter-spacing: 1.5px; text-transform: uppercase; font-size: 12px;
  text-shadow: 0 0 8px rgba(0,229,255,.4);
  border-bottom: 1px solid var(--line-2);
}
tbody tr { transition: all .15s; }
tbody tr:hover {
  background: linear-gradient(90deg, rgba(0,229,255,.08), rgba(124,77,255,.06));
  box-shadow: inset 0 0 0 1px rgba(0,229,255,.18);
}
td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--cyan-2); }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
}
.tag.ok      { background: rgba(0,230,118,.12); color: #6cf2a8; border: 1px solid rgba(0,230,118,.4); box-shadow: 0 0 8px rgba(0,230,118,.25); }
.tag.pending { background: rgba(255,170,0,.10);  color: #ffc36b; border: 1px solid rgba(255,170,0,.4);  box-shadow: 0 0 8px rgba(255,170,0,.2); }
.tag.danger  { background: rgba(255,68,68,.14);  color: #ff7878; border: 1px solid rgba(255,68,68,.45); box-shadow: 0 0 8px rgba(255,68,68,.25); }
.ops button { padding: 4px 10px; font-size: 12px; margin-right: 4px; }

/* ============ 统计条 ============ */
#summary {
  display: inline-block; padding: 6px 12px; margin-left: auto;
  background: linear-gradient(90deg, rgba(0,229,255,.12), rgba(124,77,255,.12));
  border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--cyan-2); font-size: 13px;
  text-shadow: 0 0 6px rgba(0,229,255,.4);
  box-shadow: 0 0 12px rgba(0,150,255,.2);
}

/* ============ 链接 ============ */
a { color: var(--cyan-2); }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; gap: 8px; align-items: stretch; }
  .topbar nav { flex-wrap: wrap; justify-content: center; }
}

/* ============ 入场动画 ============ */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card { animation: slideIn .35s ease both; }

/* ============ 粒子背景 ============ */
.particle-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}

/* --- 单个粒子（用一个 div 装 60 个子元素） --- */
.stars { position: absolute; inset: 0; }
.stars span {
  position: absolute; bottom: -10px; left: var(--x);
  width: var(--s); height: var(--s);
  background: var(--c, var(--cyan));
  border-radius: 50%;
  box-shadow: 0 0 calc(var(--s) * 3) var(--c, var(--cyan));
  opacity: 0;
  animation: float var(--d) linear infinite;
  animation-delay: var(--delay);
}
@keyframes float {
  0%   { transform: translateY(0)      translateX(0)     scale(.6); opacity: 0; }
  10%  {                                                    opacity: .9; }
  50%  { transform: translateY(-50vh)  translateX(20px)  scale(1); }
  90%  {                                                    opacity: .7; }
  100% { transform: translateY(-110vh) translateX(-10px) scale(.4); opacity: 0; }
}

/* --- 流星 --- */
.meteor { position: absolute; top: var(--y); left: var(--x); width: 2px; height: 2px; background: #fff; border-radius: 50%; box-shadow: 0 0 6px #fff; opacity: 0; }
.meteor::after {
  content: ""; position: absolute; top: 0; left: 0;
  width: 140px; height: 1px; transform-origin: left center;
  transform: rotate(215deg);
  background: linear-gradient(90deg, rgba(255,255,255,.9), rgba(0,229,255,.5), transparent);
  box-shadow: 0 0 6px rgba(0,229,255,.6);
  filter: drop-shadow(0 0 4px rgba(0,229,255,.8));
}
.meteor:nth-child(1) { animation: shoot 7s linear infinite; animation-delay:  0s; }
.meteor:nth-child(2) { animation: shoot 9s linear infinite; animation-delay:  2s; --y: 20%; --x: 10%; }
.meteor:nth-child(3) { animation: shoot 11s linear infinite; animation-delay:  5s; --y: 35%; --x: 70%; }
.meteor:nth-child(4) { animation: shoot 8s linear infinite; animation-delay:  3s; --y: 55%; --x: 30%; }
.meteor:nth-child(5) { animation: shoot 13s linear infinite; animation-delay: 7s; --y: 10%; --x: 85%; }
@keyframes shoot {
  0%   { transform: translate(0,0) rotate(0); opacity: 0; }
  3%   { opacity: 1; }
  15%  { transform: translate(700px, 700px) rotate(35deg); opacity: 0; }
  100% { transform: translate(700px, 700px) rotate(35deg); opacity: 0; }
}

