/* ============================================================
   操作系统模拟器集群 · 集群控制台样式
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #05070d;
  --panel: rgba(13, 18, 28, 0.72);
  --line: rgba(148, 180, 220, 0.16);
  --text: #e9eef7;
  --sub: #8d9bb0;
  --cyan: #38bdf8;
  --violet: #7c6bff;
  --green: #34d399;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.stage-open {
  overflow: hidden;
}

::selection {
  background: rgba(56, 189, 248, 0.35);
}

/* ---------- 背景 ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(120, 170, 220, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 220, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(900px) rotateX(52deg) translateY(-12%);
  transform-origin: 50% 40%;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 35%, #000 0%, transparent 78%);
  mask-image: radial-gradient(60% 60% at 50% 35%, #000 0%, transparent 78%);
  opacity: 0.8;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite alternate;
}

.g1 {
  width: 620px;
  height: 620px;
  left: -180px;
  top: -230px;
  background: radial-gradient(circle, rgba(56, 132, 255, 0.55), transparent 65%);
}

.g2 {
  width: 720px;
  height: 720px;
  right: -260px;
  top: 4%;
  background: radial-gradient(circle, rgba(124, 107, 255, 0.45), transparent 65%);
  animation-delay: -6s;
}

.g3 {
  width: 560px;
  height: 560px;
  left: 38%;
  bottom: -300px;
  background: radial-gradient(circle, rgba(0, 214, 190, 0.32), transparent 68%);
  animation-delay: -12s;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, 32px, 0) scale(1.12); }
}

#netCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

/* ---------- 顶栏 ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(20px, 4vw, 56px);
  background: rgba(5, 8, 14, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-chip {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #061018;
  background: linear-gradient(135deg, #6ee7ff, #38bdf8 45%, #7c6bff);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-text b {
  font-size: 15px;
  letter-spacing: 3px;
  font-weight: 700;
  background: linear-gradient(90deg, #f1f7ff, #8fd7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--sub);
  font-size: 11px;
  letter-spacing: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.09);
  color: #9df3cf;
  letter-spacing: 0.5px;
}

.live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.nav-net {
  color: var(--sub);
  font-family: var(--mono);
  letter-spacing: 0.5px;
}

/* ---------- 主体 ---------- */
.wrap {
  position: relative;
  z-index: 5;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px) 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 32px;
  align-items: stretch;
  padding: 64px 0 44px;
}

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 4px;
  color: var(--cyan);
  opacity: 0.9;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.16;
  letter-spacing: 1px;
  font-weight: 800;
}

.hero h1 span {
  background: linear-gradient(100deg, #8fe0ff 0%, #5ec8ff 35%, #a08bff 75%, #ff9ac8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.25));
}

.hero-desc {
  max-width: 640px;
  margin: 20px 0 26px;
  color: #a9b6c9;
  font-size: 14.5px;
  line-height: 1.85;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--sub);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.chip b {
  color: #dff3ff;
  font-family: var(--mono);
  margin-right: 2px;
}

/* 网络卡片 */
.net-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(120, 190, 255, 0.22);
  background: linear-gradient(160deg, rgba(15, 25, 40, 0.82), rgba(8, 13, 24, 0.86));
  padding: 20px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.net-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.06), transparent) 0 0 / 100% 1px no-repeat,
    radial-gradient(70% 60% at 100% 0%, rgba(124, 107, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.net-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.net-title {
  font-size: 13px;
  letter-spacing: 2px;
  color: #d7e6f7;
}

.net-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: #7fe9c4;
}

.net-pulse i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
}

.net-rows {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.net-rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(148, 180, 220, 0.14);
  font-size: 12px;
}

.net-rows span {
  color: var(--sub);
}

.net-rows code {
  font-family: var(--mono);
  font-size: 12px;
  color: #bfe9ff;
}

.net-bars {
  display: grid;
  gap: 10px;
}

.net-bar {
  display: grid;
  grid-template-columns: 42px 1fr 38px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--sub);
  font-family: var(--mono);
}

.net-bar i {
  display: block;
  height: 5px;
  border-radius: 4px;
  background: linear-gradient(90deg, #38bdf8, #7c6bff);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.net-bar b {
  text-align: right;
  color: #cfe7fa;
  font-weight: 500;
}

/* ---------- 工具栏 ---------- */
.console {
  margin-top: 8px;
}

.toolbar {
  position: sticky;
  top: 69px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 12px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 13, 22, 0.78);
  backdrop-filter: blur(16px);
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.tab {
  appearance: none;
  border: 0;
  padding: 8px 14px;
  border-radius: 8px;
  background: transparent;
  color: var(--sub);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.tab b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  margin-left: 4px;
  color: #7e8da3;
}

.tab:hover {
  color: #eaf4ff;
}

.tab.active {
  color: #eaf7ff;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(124, 107, 255, 0.22));
  box-shadow: inset 0 0 0 1px rgba(120, 200, 255, 0.28);
}

.tab.active b {
  color: #a9e8ff;
}

.search {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  padding: 0 14px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus-within {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.search svg {
  width: 17px;
  height: 17px;
  color: var(--sub);
  flex: 0 0 auto;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
}

.search input::placeholder {
  color: #6f7d92;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--sub);
  font-family: var(--font);
  font-size: 12.5px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ghost-btn svg {
  width: 16px;
  height: 16px;
}

.ghost-btn:hover {
  color: #eaf7ff;
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.08);
}

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}

.card {
  --accent: #38bdf8;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(150, 185, 225, 0.16);
  background:
    radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.055), transparent 65%),
    linear-gradient(165deg, rgba(17, 24, 38, 0.92), rgba(8, 12, 21, 0.94));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.28s, box-shadow 0.28s;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.65;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -30% -55% -30%;
  height: 140px;
  background: radial-gradient(50% 60% at 50% 50%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 40px color-mix(in srgb, var(--accent) 18%, transparent);
}

.card:hover::after {
  opacity: 1;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #f5fbff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 78%, #ffffff 10%), color-mix(in srgb, var(--accent) 35%, #060a12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 20px color-mix(in srgb, var(--accent) 22%, transparent);
}

.card-title {
  flex: 1;
  min-width: 0;
}

.card-title h3 {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #f2f8ff;
}

.card-title p {
  margin: 0;
  color: var(--sub);
  font-size: 12px;
  font-family: var(--mono);
}

.fam {
  display: inline-block;
  margin-bottom: 6px;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  letter-spacing: 1px;
  color: #9fe4ff;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.fam.domestic {
  color: #ffd6a3;
  background: rgba(251, 146, 60, 0.1);
  border-color: rgba(251, 146, 60, 0.25);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  color: #8ef0cd;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.22);
  white-space: nowrap;
}

.status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.card-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.card-spec span {
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: #93a4ba;
  font-family: var(--mono);
  font-size: 10.5px;
}

.rows {
  display: grid;
  gap: 6px;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(148, 180, 220, 0.11);
  border-radius: 10px;
  background: rgba(4, 7, 12, 0.42);
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  font-size: 12px;
}

.row .k {
  flex: 0 0 52px;
  color: #77869b;
  letter-spacing: 0.5px;
}

.row code {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.4px;
  color: #d5e9f8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row code.masked {
  color: #7f8fa6;
  letter-spacing: 2px;
}

.icon-btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6f8098;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.icon-btn:hover {
  color: #7ee0ff;
  background: rgba(56, 189, 248, 0.1);
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

.launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 9px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), rgba(255, 255, 255, 0.03));
  color: #eef9ff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.launch span {
  font-family: var(--mono);
  color: color-mix(in srgb, var(--accent) 70%, #ffffff);
  transition: transform 0.22s;
}

.launch:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, transparent), color-mix(in srgb, var(--accent) 12%, transparent));
  box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 22%, transparent);
}

.launch:hover span {
  transform: translateX(4px);
}

.empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--sub);
}

.empty span {
  display: block;
  font-size: 38px;
  opacity: 0.4;
}

.disclaimer {
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 18px clamp(20px, 4vw, 56px) 26px;
  border-top: 1px solid var(--line);
  color: #66748a;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.2px;
}

/* ---------- 提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  transform: translate(-50%, 20px);
  padding: 10px 20px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  background: rgba(12, 20, 32, 0.92);
  backdrop-filter: blur(12px);
  color: #cfefff;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 模拟器舞台 ---------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: #000;
}

.stage.open {
  display: block;
}

.stage-load {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(30, 60, 110, 0.35), transparent 70%),
    #05070d;
  color: #cfe7fa;
}

.loader {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: grid;
  place-items: center;
}

.loader::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #38bdf8;
  border-right-color: #7c6bff;
  animation: spin 0.9s linear infinite;
}

.loader span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 18px #38bdf8;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.stage-load p {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: #9fb6cc;
}

.stage-os {
  font-size: 12px;
  color: #5d7590;
  font-family: var(--mono);
  letter-spacing: 1px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 44px;
  }

  .net-card {
    max-width: 520px;
  }

  .toolbar {
    top: 63px;
  }
}

@media (max-width: 640px) {
  .nav-net {
    display: none;
  }

  .brand-text small {
    display: none;
  }

  .hero h1 {
    font-size: 30px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    position: static;
  }

  .ghost-btn {
    width: 100%;
    justify-content: center;
  }

  .search {
    flex-basis: 100%;
  }

  .tabs {
    flex: 1;
    justify-content: space-between;
  }

  .footer {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-glow,
  .live,
  .loader::before {
    animation: none;
  }

  .card,
  .launch span {
    transition: none;
  }
}
