:root {
  --bg: #030712;
  --card: rgba(9, 18, 38, .72);
  --text: #eef6ff;
  --muted: rgba(216, 230, 255, .72);
  --cyan: #fb7185;
  --blue: #ef4444;
  --violet: #991b1b;
  --green: #fb7185;
  --border: rgba(255, 122, 122, .26);
  --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(248, 113, 113, .24), transparent 28%),
              radial-gradient(circle at 84% 18%, rgba(220, 38, 38, .20), transparent 30%),
              radial-gradient(circle at 50% 90%, rgba(251, 146, 60, .15), 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(248, 113, 113, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 113, 113, .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(239,68,68,.58); animation: floatA 8s ease-in-out infinite; }
.orb-b { right: -90px; top: 18%; background: rgba(153,27,27,.58); animation: floatB 9s ease-in-out infinite; }
.orb-c { left: 38%; bottom: -130px; background: rgba(251,113,133,.36); 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(248,113,113,.38), transparent, rgba(185,28,28,.34), 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(248,113,113,.28), rgba(185,28,28,.10) 54%, transparent 56%);
}
.scan-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 179, 179, .46);
  box-shadow: 0 0 32px rgba(248,113,113,.32), inset 0 0 26px rgba(185,28,28,.24);
}
.scan-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  border: 1px dashed rgba(254, 202, 202, .48);
  animation: spin 8s linear infinite;
}
.scan-ring span {
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(248,113,113,.24);
  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: #fff1f2;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, rgba(248,113,113,.42), rgba(185,28,28,.30));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 0 30px rgba(248,113,113,.34);
}
@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(255,179,179,.28);
  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: 0;
  background: linear-gradient(90deg, #fff, #fecaca 42%, #f87171 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(255, 122, 122, .16);
}
.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: #fecaca;
  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(248,113,113,.42);
  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, #ff3b30, #e11d48 48%, #7f1d1d);
  box-shadow: 0 18px 40px rgba(225,29,72,.36), 0 0 28px rgba(248,113,113,.24);
  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 .enter-arrow {
  width: auto;
  height: auto;
  display: inline-block;
  border: 0;
  border-radius: 0;
  font-size: 20px;
  line-height: 1;
  transition: transform .2s ease, opacity .2s ease;
  animation: arrowBlink 1.35s ease-in-out infinite;
}
.enter-btn:not(:disabled):hover .enter-arrow { transform: translateX(4px); }
@keyframes arrowBlink { 50% { opacity: .72; } }
.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(255,179,179,.28);
  box-shadow: 0 28px 90px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.10);
}
.loader-arrow {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  color: #fff1f2;
  background: linear-gradient(135deg, rgba(248,113,113,.28), rgba(185,28,28,.22));
  border: 1px solid rgba(254,202,202,.32);
  box-shadow: 0 0 32px rgba(248,113,113,.36), inset 0 0 20px rgba(255,255,255,.08);
}
.loader-arrow i { font-size: 30px; }
.loading-mask.show .loader-arrow i { animation: arrowSlide 1s ease-in-out infinite; }
@keyframes arrowSlide { 50% { transform: translateX(7px); opacity: .72; } }
.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, #fb7185, #ef4444, #b91c1c, #f97316);
  box-shadow: 0 0 20px rgba(248,113,113,.46);
  transition: width .12s linear;
}
.percent {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 900;
  color: #fff1f2;
}
.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(255,179,179,.22);
  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(248,113,113,.16);
  border: 1px solid rgba(248,113,113,.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(255,179,179,.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, #fb7185, #ef4444, #991b1b);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 25px rgba(185,28,28,.30);
}
.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(255,179,179,.20); outline: none; font-size: 14px;
  color: var(--text); background: rgba(2,8,23,.55);
}
input:focus, textarea:focus { border-color: rgba(248,113,113,.62); box-shadow: 0 0 0 4px rgba(248,113,113,.14); }
.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: #fecaca; }

@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; }
}
