/**
 * 主站门户首页样式（各子站入口聚合页）
 * 精简列表布局：一行一个站点，LOGO 完整显示
 */
:root {
  --bg: #f2f5fb;
  --ink: #16233b;
  --muted: #6b7a94;
  --line: #e3e9f2;
  --brand: #1e6fd9;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(640px 320px at 12% -8%, rgba(30, 111, 217, .16), transparent 62%),
    radial-gradient(560px 300px at 88% -12%, rgba(46, 158, 91, .13), transparent 60%),
    radial-gradient(520px 280px at 50% 112%, rgba(200, 16, 46, .07), transparent 65%);
}

/* ---------- 顶栏 ---------- */
.portal-head {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(227, 233, 242, .8);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.portal-head-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e6fd9, #4f9cf7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(30, 111, 217, .35);
}

/* ---------- 主体 ---------- */
.portal-main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  flex: 1;
}

.site-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 10px rgba(23, 43, 77, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}

.site-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--c);
}

.site-row:hover {
  transform: translateX(4px);
  border-color: var(--c);
  box-shadow: 0 10px 26px rgba(23, 43, 77, .11);
}

/* LOGO 完整显示（contain 不裁剪） */
.site-logo {
  flex: none;
  height: 54px;
  min-width: 54px;
  max-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-logo img {
  display: block;
  max-height: 54px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

.site-logo.is-letter {
  width: 54px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c), #8fb4e6);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(23, 43, 77, .15);
}

.site-info {
  flex: 1;
  min-width: 0;
}

.site-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-domain {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-arrow {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f2f5fb;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.site-row:hover .row-arrow {
  background: var(--c);
  color: #fff;
  transform: translateX(2px);
}

/* ---------- 空状态 ---------- */
.empty-portal {
  text-align: center;
  padding: 64px 20px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 页脚 ---------- */
.portal-foot {
  border-top: 1px solid var(--line);
  padding: 22px 24px 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 12.5px;
}

@media (max-width: 640px) {
  .portal-main { padding: 28px 16px 56px; }
  .portal-head-inner { padding: 12px 16px; }
  .site-row { padding: 12px 14px; gap: 12px; }
  .site-logo, .site-logo img { max-width: 120px; }
}
