/* ============================================
   E2EE Calls · tempmail 黑白统一设计系统 (shell.css)
   供 app / faq / privacy / terms 复用，
   与首页 index.html 的页头·页脚·组件 1:1 同源。
   黑白灰 · 46px 无边框顶栏(时钟+橙公告) · 方角细线卡片
   ============================================ */

/* ─── 设计令牌 ─── */
:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #fafafa;
  --bg-4: #ebebee;
  --border: rgba(0, 0, 0, 0.08);
  --border-2: rgba(0, 0, 0, 0.14);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --text-muted: #86868b;
  --text-dim: #6e6e73;
  --ink: rgb(51, 54, 57);
  --accent: #1d1d1f;
  --accent-dim: #1d1d1f;
  --red: #e5484d;
  --green: #1a7d3c;
  --amber: #c96800;
  --orange: #f0a020;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
button, input { font-family: var(--font); }
.container { width: min(100% - 32px, 1600px); margin: 0 auto; padding: 0; }

/* ─── 顶栏 46px 无边框（黑 logo + 时钟 + 橙公告 + 导航）─── */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: none;
}
/* min-height:系统字号放大时自然长高,不与相邻元素重叠(A3) */
.hd2 { min-height: 46px; display: flex; align-items: center; gap: 14px; padding: 0; }
.header-title-row { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; }
.brand2 { display: flex; align-items: center; gap: 9px; text-decoration: none; color: rgb(51, 54, 57); flex-shrink: 0; }
.brand2 svg { width: auto; height: 40px; display: block; }

/* ═══ Logo 动效（全站统一）═══
   波纹只做 opacity 脉冲、不动 transform/stroke，所以「页头 currentColor」与
   「通话页白描边/深描边」共用同一套规则。整站 11 处 logo + favicon 全覆盖，
   不留 prefers-reduced-motion 静态回退。 */
@keyframes lk-wave { 0%, 100% { opacity: .14; } 42% { opacity: .92; } }
@keyframes lk-lock { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
.lk-anim .w1, .lk-anim .w2, .lk-anim .w3, .lk-anim .w4 { animation: lk-wave 1.6s ease-in-out infinite; }
.lk-anim .w2 { animation-delay: .18s; }
.lk-anim .w3 { animation-delay: .36s; }
.lk-anim .w4 { animation-delay: .54s; }
.lk-anim .lk { animation: lk-lock 1.8s ease-in-out infinite; }
.brand-text h3 { font-size: 21px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; color: var(--text); }
.brand-text .tagline { display: block; font-size: 11px; opacity: .6; line-height: 1.2; letter-spacing: .04em; }

/* 后台入口（gate：点击换一次性 token 再进 /admin） */
.admin-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: #1d1d1f; flex-shrink: 0;
  opacity: .45; transition: opacity .15s, transform .15s;
  display: inline-block;
}
.admin-dot:hover { opacity: 1; transform: scale(1.8); }

/* ─── 时钟 ─── */
.header-clock {
  display: flex; flex-direction: column; align-items: center;
  line-height: 1.2; padding: 2px 12px;
  border-left: 1px solid rgba(128, 128, 128, .28);
  text-align: center; flex-shrink: 0;
}
.header-clock-date { font-size: 11px; opacity: .65; white-space: nowrap; }
.header-clock-time {
  font-size: 19px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .5px; white-space: nowrap;
}

/* ─── 橙色公告条（CSS 无缝跑马灯）───
   默认隐藏：与 index.html 同理 —— 由 site.js 确认有公告后显式 display:flex，
   消除「先显示后隐藏」造成的首屏闪现。 */
.announcement {
  display: none; align-items: center; gap: 6px;
  min-width: 0; flex: 1 1 auto; max-width: none;
  font-size: 12px; color: #b06f0a;
  background: none; border: 1px solid rgba(128, 128, 128, .32);
  border-radius: 10px; padding: 0 12px; height: 28px;
  font-family: inherit; text-decoration: none;
  transition: border-color .2s, background .2s;
}
/* 「可点击」外观只给真正的 a/button（首页公告条点了弹公告弹窗）。
   faq/privacy/terms/app 的公告条是 <div>（只滚动、无弹窗），原来 .announcement:hover
   对 div 也生效 —— 边框变深、背景变灰，看起来能点、点了没反应 = 假可点死控件（D2）。
   但「悬停暂停滚动」保留给所有形态：那是阅读辅助，不是点击暗示。 */
a.announcement, button.announcement { cursor: pointer; }
a.announcement:hover, button.announcement:hover { border-color: rgba(128, 128, 128, .5); background: rgba(128, 128, 128, .06); }
a.announcement:hover .announcement-tag, button.announcement:hover .announcement-tag { filter: brightness(1.08); }
.announcement-tag {
  flex-shrink: 0; background: #f0a020; color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  letter-spacing: .06em; transition: filter .15s;
}
.announcement-view { overflow: hidden; min-width: 0; flex: 1 1 auto; display: flex; }
/* ─── 橙色公告条（单条内容从右侧滚入、向左滚出）───
   min-width:100% 保证动画元素不窄于视口：这样 translateX(100%) 的起点一定完全在视口
   之外（右）、translateX(-100%) 的终点一定完全在视口之外（左），短文字也不会在首尾露出。
   时长与「播完一轮换下一条」由 site.js / admin.js 按字数写在行内。 */
.announcement-text {
  display: inline-flex; white-space: nowrap;
  min-width: 100%;
  animation: hd-ann-in 22s linear infinite;
}
.announcement:hover .announcement-text { animation-play-state: paused; }
.ann-copy { padding-right: 56px; }

/* ─── 公告 / 后台入口弹窗（全站统一，index.html 有一份同源副本）─── */
.ann-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.ann-mask[hidden] { display: none; }
/* 后台入口第一步（填动态验证码）：遮罩改成纯色，弹窗背后看不到页面任何信息 */
.ann-mask.opaque { background: var(--bg); }
.ann-dialog {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  width: min(420px, 100%);
  padding: 22px 24px 18px;
  box-shadow: var(--shadow-2);
}
.ann-dialog-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.ann-dialog-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: 0 0 auto; }
.ann-dialog-body { font-size: 14px; line-height: 1.8; color: var(--text-2); }
.ann-dialog-body p + p { margin-top: 8px; }
.ann-dialog-close {
  display: block; width: 100%; margin-top: 18px;
  height: 36px; border-radius: 8px;
  border: none; background: var(--accent); color: var(--bg);
  font-size: 14px; cursor: pointer; font-family: inherit;
}
.ann-dialog-close:hover { opacity: .85; }
.ann-dialog-close[disabled] { opacity: .45; cursor: not-allowed; }
/* 动态验证码输入框（后台入口第一步） */
.gate-code {
  display: block; width: 100%; margin-top: 12px;
  height: 40px; padding: 0 12px;
  border: 1px solid var(--border-2); border-radius: 8px;
  background: var(--bg); color: var(--text);
  font-family: var(--mono); font-size: 16px; letter-spacing: .3em;
  text-align: center;
}
.gate-code:focus { outline: none; border-color: var(--accent); }
.gate-err { margin-top: 10px; font-size: 13px; color: var(--red); }
/* 一次性入口 Token（后台入口第二步） */
.gate-token {
  margin: 12px 0; padding: 12px 14px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  font-family: var(--mono);
  font-size: 12.5px; line-height: 1.6; word-break: break-all; color: var(--text);
  user-select: all; -webkit-user-select: all;
}
.gate-actions { display: flex; gap: 10px; }
.gate-actions .ann-dialog-close { margin-top: 0; }
.gate-actions .gate-ghost { background: var(--bg-2); color: var(--text); border: 1px solid var(--border-2); }

.header-right { display: flex; align-items: center; gap: 16px; margin-left: auto; flex-shrink: 0; }
.header-right nav { display: flex; }
.header-right nav a { color: var(--text-2); text-decoration: none; font-size: 13px; margin-left: 16px; transition: color .15s; }
.header-right nav a:first-child { margin-left: 0; }
.header-right nav a:hover, .header-right nav a.active { color: var(--text); }

/* ─── 按钮（方角黑白）─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  text-decoration: none; border: none; cursor: pointer; border-radius: 8px;
  padding: .72rem 1.45rem;
  transition: background .18s, transform .18s, box-shadow .18s, border-color .18s;
}
.hd2 .btn { padding: 6px 15px; font-size: 13px; border-radius: 8px; }
.btn-primary { background: #1d1d1f; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
.btn-primary:hover { background: #3d3d41; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border-2); }
.btn-ghost:hover { background: var(--bg-2); transform: translateY(-1px); }

/* ─── 细线卡片 ─── */
.card { background: transparent; border: 1px solid rgba(128, 128, 128, .16); border-radius: 12px; }

/* ─── 页脚（左对齐，同首页）─── */
footer {
  border-top: 1px solid #efeff1; background: transparent;
  text-align: left; color: rgb(118, 124, 130);
  padding: 0; margin-top: 24px; font-size: 12.5px;
}
footer .container { padding: 20px 0; }
footer a { color: rgb(118, 124, 130); text-decoration: none; }
footer a:hover { color: rgb(51, 54, 57); }
footer .foot-links { margin-top: 8px; }

@keyframes hd-ann-in { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* 只隐藏时钟;公告条手机/平板必须保留(A2) */
@media (max-width: 1100px) { .header-clock { display: none; } }
@media (max-width: 720px) {
  .header-right nav { display: none; }
  /* 手机端公告独占一行（同 index.html）：否则公告与品牌同行只剩 ~124px、文字被挤没 */
  .header-title-row { flex-wrap: wrap; }
  .announcement { flex: 1 0 100%; }
}
@media (max-width: 640px) { .brand-text .tagline { display: none; } }

/* ═══════════ 深色模式（跟随系统 prefers-color-scheme）═══════════ */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b0b0d;
    --bg-2: #17171a;
    --bg-3: #101013;
    --bg-4: #1e1e22;
    --border: rgba(255, 255, 255, 0.10);
    --border-2: rgba(255, 255, 255, 0.16);
    --text: #f2f2f4;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --text-muted: #8e8e93;
    --text-dim: #a1a1a6;
    --ink: #e8e8ea;
    --accent: #f2f2f4;
    --accent-dim: #f2f2f4;
    --red: #ff6961;
    --green: #4ade80;
    --amber: #fbbf24;
    --orange: #f0a020;
    --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
  body { background: var(--bg); color: var(--ink); }
  header { background: rgba(16, 16, 19, 0.86); }
  .brand2 { color: #e8e8ea; }
  .admin-dot { background: #f2f2f4; }
  .header-clock { border-left-color: rgba(255, 255, 255, 0.2); }
  .announcement { color: #f0c06a; border-color: rgba(255, 255, 255, 0.2); }
  /* 同 D2：dark 下的「可点」高亮也只给真正的 a/button，div 公告条不给假点击暗示 */
  a.announcement:hover, button.announcement:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.3); }
  .btn-primary { background: #f2f2f4; color: #0b0b0d; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
  .btn-primary:hover { background: #d9d9de; }
  .btn-ghost { background: #17171a; color: var(--text); border-color: rgba(255, 255, 255, 0.2); }
  .btn-ghost:hover { background: #1e1e22; }
  footer { border-top-color: rgba(255, 255, 255, 0.1); color: #8e8e93; }
  footer a { color: #8e8e93; }
  footer a:hover { color: #e8e8ea; }
}
