/* ===================================================================
 * 牛牛云 官网后台检测页 — 样式
 * 极光渐变背景 + 玻璃拟态卡片 + 渐变标题
 * =================================================================== */

:root {
  --brand-1: #23b79c;
  --brand-2: #2a8bf9;
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --txt: rgba(255, 255, 255, 0.92);
  --txt-dim: rgba(255, 255, 255, 0.55);
  --txt-faint: rgba(255, 255, 255, 0.3);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--txt);
  background: #0a0a0f;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- 极光背景 ---------- */
.aurora-bg {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0f, #1a1a2e 50%, #0a0a0f);
  display: flex;
  flex-direction: column;
}
.aurora-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(99, 102, 241, 0.15) 0, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(139, 92, 246, 0.12) 0, transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 80%, rgba(236, 72, 153, 0.10) 0, transparent 50%),
    radial-gradient(ellipse 50% 30% at 10% 90%, rgba(6, 182, 212, 0.08) 0, transparent 50%);
  animation: aurora-flow 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes aurora-flow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
  33%      { transform: translate(2%, -2%) scale(1.05); opacity: 0.85; }
  66%      { transform: translate(-2%, 2%) scale(0.97); opacity: 0.9; }
}

.content-layer { position: relative; z-index: 1; }

/* ---------- 玻璃卡片 ---------- */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
}
.glass-hover { transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.glass-hover:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

/* ---------- 渐变标题 ---------- */
.gradient-text {
  background: linear-gradient(135deg, #fff, #c4b5fd 25%, #f9a8d4 50%, #67e8f9 75%, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 8s ease infinite;
}
@keyframes gradient-shift {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

/* ---------- 布局 ---------- */
.layout {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-content: center;
  flex: 1;
}
@media (min-width: 1024px) {
  .layout {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    padding: 48px;
    min-height: 100vh;
    align-items: center;
  }
}

/* ---------- 顶部品牌 ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.brand img { width: 38px; height: 38px; display: block; }
.brand__name { font-size: 20px; font-weight: 600; letter-spacing: 0.5px; }

/* ---------- Hero / 标题 ---------- */
.hero h1 {
  font-size: clamp(30px, 6vw, 56px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.hero .sub {
  color: var(--txt-dim);
  font-size: 15px;
  line-height: 1.7;
  max-width: 460px;
}

/* ---------- 检测状态卡 ---------- */
.detect {
  margin-top: 26px;
  padding: 22px;
}
.detect__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.detect__title { font-size: 15px; font-weight: 600; }
.detect__sub { font-size: 12px; color: var(--txt-faint); margin-top: 2px; }

/* spinner */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status-icon { width: 22px; height: 22px; flex-shrink: 0; }

/* 线路列表 */
.lines { display: flex; flex-direction: column; gap: 8px; }
.line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
}
.line__left { display: flex; align-items: center; gap: 10px; }
.line__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--txt-faint); flex-shrink: 0; }
.line__name { font-weight: 500; }
.line__url { color: var(--txt-faint); font-size: 11px; }
.line__meta { font-size: 12px; color: var(--txt-dim); font-variant-numeric: tabular-nums; }

.line.is-testing .line__dot { background: var(--cyan); animation: pulse 1s ease-in-out infinite; }
.line.is-ok       { border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.06); }
.line.is-ok .line__dot { background: #22c55e; }
.line.is-ok .line__meta { color: #4ade80; }
.line.is-fail     { border-color: rgba(239, 68, 68, 0.3); }
.line.is-fail .line__dot { background: #ef4444; }
.line.is-fail .line__meta { color: #f87171; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- 跳转条 ---------- */
.jump {
  margin-top: 18px;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(35, 183, 156, 0.12), rgba(42, 139, 249, 0.12));
  border: 1px solid rgba(42, 139, 249, 0.25);
  display: none;
}
.jump.show { display: block; animation: rise 0.4s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.jump__text { font-size: 14px; margin-bottom: 14px; line-height: 1.6; }
.jump__text b { color: #67e8f9; font-variant-numeric: tabular-nums; }
.jump__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}
.btn--primary {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 6px 20px rgba(42, 139, 249, 0.3);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(42, 139, 249, 0.4); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }

.fail-note {
  margin-top: 14px;
  font-size: 13px;
  color: #f87171;
  display: none;
}
.fail-note.show { display: block; }

/* ---------- 公告卡 ---------- */
.panel { display: flex; flex-direction: column; gap: 18px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.card-head h3 { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.9); }
.card-head svg { color: var(--violet); }

.announce { padding: 8px; max-height: 300px; overflow-y: auto; }
.announce__item {
  padding: 14px;
  border-radius: 10px;
  transition: background 0.2s;
}
.announce__item:hover { background: rgba(255, 255, 255, 0.03); }
.announce__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.announce__title { font-size: 14px; font-weight: 600; }
.announce__date { font-size: 11px; color: var(--txt-faint); flex-shrink: 0; }
.announce__body { font-size: 13px; color: var(--txt-dim); line-height: 1.6; }
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 16px; color: var(--txt-faint); gap: 10px;
}
.empty svg { opacity: 0.4; }
.empty span { font-size: 13px; }

/* ---------- 客户端 / 联系 ---------- */
.clients { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px; }
.client {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-decoration: none;
  color: var(--txt);
}
.client svg { width: 26px; height: 26px; opacity: 0.85; }
.client span { font-size: 12px; color: var(--txt-dim); }

.contact { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; }
.contact a, .contact button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--txt-dim); font-size: 13px; cursor: pointer;
  text-decoration: none; font-family: inherit;
}
.contact a:hover, .contact button:hover { background: rgba(255, 255, 255, 0.08); color: var(--txt); }

/* ---------- 配置错误 ---------- */
.cfg-error {
  margin-top: 22px; padding: 18px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.cfg-error h3 { color: #f87171; font-size: 14px; margin-bottom: 10px; }
.cfg-error li { color: rgba(248, 113, 113, 0.85); font-size: 12px; list-style: none; margin: 4px 0; }
.cfg-error li::before { content: "• "; color: #f87171; }

/* ---------- 页脚 ---------- */
.foot {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--txt-faint);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 20, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: #fff; font-size: 13px;
  padding: 10px 20px; border-radius: 10px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* scrollbar */
.announce::-webkit-scrollbar { width: 6px; }
.announce::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }
