:root {
  --bg: #030712;
  --card: rgba(9, 18, 38, .72);
  --text: #eef6ff;
  --muted: rgba(216, 230, 255, .72);
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --green: #34d399;
  --border: rgba(148, 210, 255, .22);
  --shadow: 0 30px 100px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,"PingFang SC","Microsoft YaHei",sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 18% 12%, rgba(34, 211, 238, .20), transparent 28%),
              radial-gradient(circle at 84% 18%, rgba(139, 92, 246, .22), transparent 30%),
              radial-gradient(circle at 50% 90%, rgba(52, 211, 153, .14), transparent 32%),
              var(--bg);
  overflow-x: hidden;
}

.portal-body { min-height: 100vh; }
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .36;
  background-image:
    linear-gradient(rgba(96, 165, 250, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, .12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000 0 44%, transparent 78%);
  animation: gridMove 9s linear infinite;
}
@keyframes gridMove { to { transform: translate3d(42px, 42px, 0); } }

.orb {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(24px);
  opacity: .42;
  pointer-events: none;
}
.orb-a { left: -80px; top: 8%; background: rgba(34,211,238,.55); animation: floatA 8s ease-in-out infinite; }
.orb-b { right: -90px; top: 18%; background: rgba(139,92,246,.55); animation: floatB 9s ease-in-out infinite; }
.orb-c { left: 38%; bottom: -130px; background: rgba(52,211,153,.38); animation: floatC 10s ease-in-out infinite; }
@keyframes floatA { 50% { transform: translate(40px, 60px) scale(1.08); } }
@keyframes floatB { 50% { transform: translate(-55px, 45px) scale(.95); } }
@keyframes floatC { 50% { transform: translate(30px, -60px) scale(1.12); } }

.portal {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 16px;
  position: relative;
  z-index: 2;
}
.hero-card {
  width: min(460px, 100%);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, .82), rgba(2, 8, 23, .70));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(22px);
  border-radius: 30px;
  padding: 30px 24px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(120deg, transparent, rgba(34,211,238,.34), transparent, rgba(139,92,246,.30), transparent);
  transform: translateX(-60%);
  animation: shine 4.8s linear infinite;
  pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }
@keyframes shine { to { transform: translateX(60%); } }

.scan-ring {
  width: 132px;
  height: 132px;
  margin: 2px auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(circle, rgba(34,211,238,.24), rgba(59,130,246,.08) 54%, transparent 56%);
}
.scan-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(125, 211, 252, .42);
  box-shadow: 0 0 32px rgba(34,211,238,.28), inset 0 0 26px rgba(59,130,246,.20);
}
.scan-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  border: 1px dashed rgba(167, 243, 208, .45);
  animation: spin 8s linear infinite;
}
.scan-ring span {
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(34,211,238,.20);
  animation: pulse 2.2s ease-out infinite;
}
.scan-ring span:nth-child(2) { animation-delay: .45s; }
.scan-ring span:nth-child(3) { animation-delay: .9s; }
.ring-core {
  width: 74px;
  height: 74px;
  border-radius: 23px;
  display: grid;
  place-items: center;
  color: #e0fbff;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, rgba(34,211,238,.36), rgba(139,92,246,.26));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 0 30px rgba(34,211,238,.26);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { to { transform: scale(1.35); opacity: 0; } }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(226, 245, 255, .92);
  background: rgba(15, 23, 42, .62);
  border: 1px solid rgba(125,211,252,.24);
  font-size: 13px;
}
.status-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

h1 {
  margin: 16px 0 0;
  font-size: clamp(30px, 8vw, 46px);
  line-height: 1.05;
  letter-spacing: -1.8px;
  background: linear-gradient(90deg, #fff, #a5f3fc 42%, #c4b5fd 78%, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin: 14px auto 0;
  max-width: 340px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.line-panel {
  margin: 22px 0 20px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(2, 8, 23, .46);
  border: 1px solid rgba(148, 210, 255, .14);
}
.line-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(226, 245, 255, .78);
  margin: 2px 0 8px;
}
.line-row b {
  color: #a7f3d0;
  font-size: 12px;
  letter-spacing: .5px;
}
.line-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .14);
  margin-bottom: 12px;
}
.line-track:last-child { margin-bottom: 0; }
.line-track em {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
  box-shadow: 0 0 18px rgba(34,211,238,.35);
  animation: breathe 2s ease-in-out infinite;
}
@keyframes breathe { 50% { filter: brightness(1.25); } }

.enter-btn {
  width: 100%;
  border: 0;
  border-radius: 18px;
  min-height: 58px;
  cursor: pointer;
  color: white;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(100deg, #06b6d4, #2563eb 48%, #8b5cf6);
  box-shadow: 0 18px 40px rgba(37,99,235,.32), 0 0 28px rgba(34,211,238,.20);
  position: relative;
  overflow: hidden;
}
.enter-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.30), transparent);
  transform: translateX(-100%);
  animation: btnLight 2.4s ease-in-out infinite;
}
.enter-btn span, .enter-btn i { position: relative; z-index: 1; }
.enter-btn i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.75);
  border-left-color: transparent;
  animation: spin 1.2s linear infinite;
}
.enter-btn:active { transform: translateY(1px) scale(.99); }
.enter-btn:disabled { opacity: .82; cursor: wait; }
@keyframes btnLight { 45%, 100% { transform: translateX(100%); } }

.mini-text {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(226,245,255,.48);
  letter-spacing: .9px;
}

.loading-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: .28s ease;
}
.loading-mask.show { opacity: 1; visibility: visible; }
.loading-card {
  width: min(420px, 100%);
  padding: 28px 22px 22px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(2,8,23,.86));
  border: 1px solid rgba(125,211,252,.24);
  box-shadow: 0 28px 90px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.10);
}
.loader-orbit {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  margin: 0 auto 16px;
  border: 2px solid rgba(125,211,252,.16);
  border-top-color: rgba(34,211,238,.95);
  border-right-color: rgba(139,92,246,.72);
  animation: spin .9s linear infinite;
  position: relative;
}
.loader-orbit span {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.75), rgba(59,130,246,.12));
  box-shadow: 0 0 26px rgba(34,211,238,.36);
}
.loading-card h2 {
  margin: 0;
  font-size: 22px;
}
.loading-card p {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.progress-wrap {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, .16);
  border: 1px solid rgba(255,255,255,.08);
}
.progress-bar {
  height: 100%;
  width: 1%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #3b82f6, #8b5cf6, #34d399);
  box-shadow: 0 0 20px rgba(34,211,238,.40);
  transition: width .12s linear;
}
.percent {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 900;
  color: #e0fbff;
}
.route-list {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.route-list span {
  font-size: 12px;
  color: rgba(226,245,255,.72);
  border: 1px solid rgba(125,211,252,.18);
  background: rgba(15,23,42,.58);
  border-radius: 999px;
  padding: 7px 10px;
}

/* 后台页面继续复用这些基础样式 */
.wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.card {
  width: min(560px, 100%);
  background: rgba(15,23,42,.88);
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 26px 26px 18px;
  color: var(--text);
}
.hd { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.badge {
  width: 20px; height: 20px; border-radius: 999px;
  background: rgba(34,211,238,.16);
  border: 1px solid rgba(34,211,238,.42);
  display: grid; place-items: center;
}
.badge::after {
  content: "";
  width: 9px; height: 5px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
  margin-top: -1px;
}
.card h1 { font-size: 20px; margin: 0; color: var(--text); background: none; -webkit-background-clip: initial; background-clip: initial; letter-spacing: 0; }
p { margin: 10px 0 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
.hr { height: 1px; background: rgba(148,210,255,.16); margin: 16px 0; }
.btn {
  width: 100%; border: 0; border-radius: 999px; padding: 14px 16px;
  font-size: 16px; font-weight: 800; cursor: pointer; color: white;
  background: linear-gradient(100deg, #06b6d4, #2563eb, #8b5cf6);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 25px rgba(37,99,235,.28);
}
.dot { width: 14px; height: 14px; border-radius: 999px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.65); }
.small { margin-top: 10px; font-size: 12px; color: rgba(216,230,255,.62); text-align: center; }
.field { margin-top: 12px; display: grid; gap: 8px; }
input[type="text"], input[type="password"], input[type="url"], textarea {
  width: 100%; padding: 12px 12px; border-radius: 12px;
  border: 1px solid rgba(148,210,255,.20); outline: none; font-size: 14px;
  color: var(--text); background: rgba(2,8,23,.55);
}
input:focus, textarea:focus { border-color: rgba(34,211,238,.6); box-shadow: 0 0 0 4px rgba(34,211,238,.12); }
.alert { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(251,146,60,.14); border: 1px solid rgba(251,146,60,.36); color: #fed7aa; font-size: 13px; }

a { color: #67e8f9; }

@media (max-width: 420px) {
  .hero-card { padding: 26px 18px 20px; border-radius: 26px; }
  .scan-ring { width: 116px; height: 116px; }
  .ring-core { width: 66px; height: 66px; border-radius: 20px; }
  .line-panel { padding: 14px; }
}
