/* ============================================================
   Stronghold Portal — 站点样式（叠加在 endfield.css 之上）
   设计依据：endfield-ui-design skill（近黑底 + 荧光黄、硬边几何、
   斜纹/刻度/编号/取景框母题、无玻璃拟态、无弥散阴影）
   ============================================================ */

/* ---------- 全局 ---------- */
html { scroll-behavior: smooth; }
body.ef-body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

.page {
  width: min(1080px, 100% - 3rem);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

::selection { background: var(--ef-yellow); color: #191919; }

/* ---------- 导航 ---------- */
.portal-nav {
  position: sticky; top: 0; z-index: 100;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 4vw, 2rem);
}
.nav-brand {
  display: flex; align-items: center; gap: 0.625rem;
  text-decoration: none; color: var(--ef-text);
  font-weight: 800; font-size: 14px; letter-spacing: 0.06em;
  white-space: nowrap; min-width: 0;
}
.nav-logo {
  width: 14px; height: 14px; flex: none;
  background: var(--ef-yellow);
  clip-path: polygon(0 0, 100% 0, 100% 65%, 65% 100%, 0 100%);
}
.nav-links { display: flex; align-items: center; gap: clamp(0.9rem, 3vw, 2rem); }
.nav-links a {
  display: flex; align-items: baseline; gap: 0.4rem;
  white-space: nowrap;
}
.nav-no {
  font-family: var(--ef-font-mono);
  font-size: 10px; color: var(--ef-text-4); letter-spacing: 0.1em;
}
.nav-links a.active .nav-no { color: var(--ef-yellow); }
.nav-links a.active { color: var(--ef-yellow); }

/* ---------- Hero ---------- */
.hero { padding: clamp(1rem, 4vh, 2.5rem) 0 2.25rem; }
.hero .ef-tag { margin: 0 0 1rem; }
.hero .ef-h1 { margin: 0 0 1.1rem; }
.hero-welcome, .hero-sub {
  color: var(--ef-text-2); font-size: 15px; line-height: 1.8;
  max-width: 46em; margin: 1.25rem 0 0;
}
.tricolor-hero { width: min(420px, 100%); }

.game-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.5rem; align-items: center; }
.game-meta .ef-tag { display: inline-flex; align-items: center; gap: 0.5rem; padding-left: 0.75rem; }

/* ---------- 首页状态卡 ---------- */
.status-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.status-card { display: flex; flex-direction: column; gap: 0.5rem; }
.panel-title {
  margin: 0; font-size: 1.05rem; font-weight: 800;
  letter-spacing: -0.02em; text-transform: uppercase; color: var(--ef-text);
}
.status-line {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--ef-font-mono); font-size: 13px;
  letter-spacing: 0.12em; color: var(--ef-green);
  margin: 0.25rem 0 0.75rem;
}
.status-line.is-off { color: var(--ef-text-4); }
.spec-list { margin: 0; display: grid; gap: 0.4rem; }
.spec-list > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--ef-line); padding-bottom: 0.4rem; }
.spec-list dt {
  font-family: var(--ef-font-mono); font-size: 10px;
  letter-spacing: 0.14em; color: var(--ef-text-4); text-transform: uppercase;
}
.spec-list dd { margin: 0; font-size: 12.5px; color: var(--ef-text-2); text-align: right; }
.status-card .ef-btn, .status-card .ef-btn--ghost { margin-top: auto; align-self: flex-start; }

/* ---------- 首页公告卡（GET /api/announcement） ---------- */
.ann-card {
  grid-column: 1 / -1;                /* 占满整行：长文本不被挤进三分之一列 */
  display: flex; flex-direction: column; gap: 0.6rem;
  border-left: 3px solid var(--ef-yellow);
}
.ann-card[hidden] { display: none !important; }   /* hidden 双保险：挡掉 display:flex 的覆盖 */
.ann-card .ef-panel__head { align-items: center; gap: 0.75rem; }
.ann-card__close {
  margin-left: auto; flex: none;
  width: 24px; height: 24px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ef-text-4);
  border: 1px solid var(--ef-line); border-radius: var(--ef-radius-sm);
  font-family: var(--ef-font-mono); font-size: 14px; line-height: 1;
  cursor: pointer;
}
.ann-card__close:hover { color: var(--ef-text); border-color: var(--ef-yellow); }
.ann-card__close:focus-visible { outline: 2px solid var(--ef-yellow); outline-offset: 2px; }
.ann-text {
  margin: 0;
  white-space: pre-line;              /* 保留服务器文本中的换行 */
  overflow-wrap: anywhere; word-break: break-word;
  color: var(--ef-text-2); font-size: 13.5px; line-height: 1.8;
}
.ann-meta {
  margin: 0;
  font-family: var(--ef-font-mono); font-size: 10.5px;
  letter-spacing: 0.14em; color: var(--ef-text-4); text-transform: uppercase;
}
/* urgent：红色系高亮（#ff2d2d 与导航待审批计数的红一致） */
.ann-card--urgent {
  border-color: #ff2d2d;
  background: rgba(255, 45, 45, 0.07);
}
.ann-card--urgent .ef-tag { color: #ff2d2d; border-color: #ff2d2d; }
.ann-card--urgent .ann-text { color: var(--ef-text); }
.ann-card--urgent .ann-card__close:hover { color: #ff2d2d; border-color: #ff2d2d; }
/* 公告卡成为首个网格项后，原有状态卡的入场错峰顺序保持不变 */
.status-grid .ann-card ~ .ef-reveal { animation-delay: 0s; }
.status-grid .ann-card ~ .ef-reveal ~ .ef-reveal { animation-delay: 0.08s; }
.status-grid .ann-card ~ .ef-reveal ~ .ef-reveal ~ .ef-reveal { animation-delay: 0.16s; }

/* ---------- 成员页 ---------- */
.members-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.member-card { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.25rem; }
.member-frame { position: relative; }
.member-avatar--img {
  display: block; width: 100%; height: 150px;
  object-fit: cover; object-position: 50% 40%;
  border: 1px solid var(--ef-line);
}
.member-avatar--img::after { content: none; }
.member-frame::after {
  content: ""; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 38%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.member-avatar {
  height: 150px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ef-font-display); font-weight: 900; font-size: 4rem;
  color: var(--ef-text);
  background:
    repeating-linear-gradient(-45deg, var(--ef-panel) 3px, transparent 3px 6px),
    var(--ef-bg-deep);
  border: 1px solid var(--ef-line);
  position: relative; overflow: hidden;
}
.member-avatar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: linear-gradient(90deg, var(--ef-magenta) 0 18%, var(--ef-yellow) 18% 58%, var(--ef-green) 58% 100%);
}
.member-info { display: flex; flex-direction: column; gap: 0.45rem; }
.member-name { margin: 0.15rem 0 0; font-size: 1.5rem; font-weight: 900; letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.member-badge {
  font-family: var(--ef-font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ef-magenta); border: 1px solid var(--ef-magenta);
  background: rgba(255, 0, 240, 0.07);
  padding: 2px 8px; border-radius: 2px; white-space: nowrap;
}
.member-role { margin: 0; color: var(--ef-yellow); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.member-bio { margin: 0.35rem 0 0; color: var(--ef-text-2); font-size: 13.5px; line-height: 1.75; }

/* 状态点扩展色 */
.ef-status--standby { background: var(--ef-yellow); box-shadow: 0 0 6px var(--ef-yellow); }
.ef-status--off { background: var(--ef-text-4); box-shadow: none; animation: none; }

/* ---------- 游戏页 ---------- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem; margin: 2rem 0;
}
.feature-card { padding: 1rem 1.1rem; border-left-width: 2px; }
.feature-no {
  font-family: var(--ef-font-mono); font-size: 10px;
  letter-spacing: 0.16em; color: var(--ef-text-4);
}
.feature-title { margin: 0.4rem 0 0.3rem; font-size: 0.95rem; font-weight: 800; letter-spacing: 0.02em; }
.feature-desc { margin: 0; color: var(--ef-text-2); font-size: 12.5px; line-height: 1.65; }

/* 准入区 */
.access-panel { padding: 1.5rem; }
.access-desc { color: var(--ef-text-2); font-size: 13.5px; line-height: 1.75; margin: 0.4rem 0 1.1rem; }
.verify-form { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.ef-input {
  flex: 1 1 240px; min-width: 0;
  background: var(--ef-bg-deep); color: var(--ef-text);
  border: 1px solid var(--ef-line); border-radius: var(--ef-radius-sm);
  padding: 0.7rem 0.9rem;
  font-family: var(--ef-font-mono); font-size: 15px; letter-spacing: 0.08em;
  outline: none;
}
.ef-input::placeholder { color: var(--ef-text-4); letter-spacing: 0.12em; }
.ef-input:focus { border-color: var(--ef-yellow); }
.ef-input--error { border-color: var(--ef-magenta); }

.verify-result {
  margin-top: 1rem; padding: 0.8rem 1rem; border-radius: var(--ef-radius-sm);
  font-family: var(--ef-font-mono); font-size: 13px; letter-spacing: 0.1em;
}
.verify-result.ok { border: 1px solid var(--ef-green); color: var(--ef-green); background: rgba(0, 255, 162, 0.06); }
.verify-result.err { border: 1px dashed var(--ef-magenta); color: var(--ef-magenta); background: rgba(255, 0, 240, 0.05); }
.verify-result .result-label { display: block; font-weight: 700; font-size: 14px; }
.verify-result .result-msg { display: block; margin-top: 0.3rem; font-family: var(--ef-font-body); letter-spacing: 0.02em; color: var(--ef-text-2); font-size: 12.5px; }

.game-tips { margin: 1.4rem 0 0; padding: 1rem 1.1rem; list-style: none; background: var(--ef-bg-deep); border: 1px solid var(--ef-line); }
.game-tips li {
  display: flex; gap: 0.6rem; align-items: baseline;
  color: var(--ef-text-2); font-size: 12.5px; line-height: 1.7; padding: 0.2rem 0;
}
.game-tips li::before { content: "▸"; color: var(--ef-yellow); flex: none; }

/* ---------- ArkHub 品牌徽章（仿 Pornhub 结构：第二词置于圆角矩形色块内） ---------- */
.hub-badge {
  display: inline-block;
  background: var(--ef-yellow);
  color: #191919;
  border-radius: 0.16em;              /* 圆角随字号缩放，徽章感 */
  padding: 0 0.16em;
  margin-left: 0.06em;
  line-height: 1.08;
}
.nav-brand .hub-badge {
  font-weight: 800;
  padding: 0.08em 0.3em;
  margin-left: 0.1em;
  border-radius: 4px;                 /* 小字号下固定小圆角 */
  font-size: 13px;
}
@media (max-width: 640px) {
  .nav-brand .hub-badge { font-size: 12px; border-radius: 3px; }
}

/* ---------- 联系我们 ---------- */
.contact-line {
  margin-top: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: none;               /* 邮箱保持原样大小写 */
  letter-spacing: 0.06em;
  color: var(--ef-text-2);
  border-left: 2px solid var(--ef-yellow);
  padding: 0.2rem 0 0.2rem 0.75rem;
}
.contact-line .contact-mail {
  color: var(--ef-yellow);
  text-decoration: none;
  font-family: var(--ef-font-mono);
}
.contact-line .contact-mail:hover { color: var(--ef-text); }

/* ---------- 页脚友站链接 ---------- */
.footer-friends {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem;
  width: 100%;
  border-top: 1px dashed var(--ef-line);
  padding-top: 0.7rem;
}
.footer-friends[hidden] { display: none; }
.friends-label {
  font-family: var(--ef-font-mono); font-size: 10.5px;
  letter-spacing: 0.14em; color: var(--ef-text-4); text-transform: uppercase;
}
.footer-friends a {
  font-size: 12.5px; color: var(--ef-text-2); text-decoration: none;
  border-bottom: 1px solid var(--ef-line); padding-bottom: 1px;
}
.footer-friends a:hover { color: var(--ef-yellow); border-bottom-color: var(--ef-yellow); }

/* ---------- 页脚 ---------- */
.portal-footer { margin-top: auto; }
.footer-inner {
  background: var(--ef-bg-deep); border-top: 1px solid var(--ef-line);
  padding: 1.1rem clamp(1rem, 4vw, 2rem);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  justify-content: space-between; align-items: center;
}
.footer-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-meta span {
  font-family: var(--ef-font-mono); font-size: 10.5px;
  letter-spacing: 0.14em; color: var(--ef-text-4); text-transform: uppercase;
}
.footer-icp { font-size: 11px; color: var(--ef-text-4); }
.footer-icp a { color: var(--ef-text-4); text-decoration: none; }
.footer-icp a:hover { color: var(--ef-text-2); }

/* ---------- 入场动效（错峰扫掠） ---------- */
.ef-reveal:nth-child(2) { animation-delay: 0.08s; }
.ef-reveal:nth-child(3) { animation-delay: 0.16s; }
.features-grid .ef-reveal:nth-child(2) { animation-delay: 0.06s; }
.features-grid .ef-reveal:nth-child(3) { animation-delay: 0.12s; }
.features-grid .ef-reveal:nth-child(4) { animation-delay: 0.18s; }
.features-grid .ef-reveal:nth-child(5) { animation-delay: 0.24s; }
.features-grid .ef-reveal:nth-child(6) { animation-delay: 0.3s; }
.features-grid .ef-reveal:nth-child(7) { animation-delay: 0.36s; }
/* 特性卡数不是 3 的整数倍时，最后一张占满整行，避免落单成孤立一列 */
.features-grid > .ef-reveal:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }

@media (prefers-reduced-motion: reduce) {
  .ef-reveal, .ef-status { animation: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .status-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .members-grid { grid-template-columns: 1fr; }
  .portal-nav { height: 56px; gap: 0.75rem; }
  .nav-brand { font-size: 12px; letter-spacing: 0.02em; }
  .nav-brand #brand-name { max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; }
  .nav-links a { font-size: 11px; letter-spacing: 0.06em; }
  .nav-no { display: none; }
  .page { width: calc(100% - 2rem); padding: 2rem 0 3rem; }
  .member-avatar, .member-avatar--img { height: 120px; }
  .member-avatar { font-size: 3rem; }
  .verify-form .ef-btn { flex: 1 1 100%; }
}
