/* NebulaMail · 深色科技感主题 */
:root {
  --bg: #04060d;
  --bg-2: #070b16;
  --ink: #e8effc;
  --muted: #8593ad;
  --dim: #58657d;
  --line: rgba(125, 170, 255, 0.16);
  --line-2: rgba(125, 170, 255, 0.32);
  --cyan: #46e6ff;
  --violet: #8b6bff;
  --pink: #ff4d9d;
  --green: #38e8a8;
  --amber: #ffc45c;
  --glass: rgba(16, 23, 38, 0.72);
  --glass-2: rgba(22, 31, 50, 0.55);
  --radius: 14px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html, body { min-height: 100%; }

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

/* 背景层：星云光晕 + 网格 */
.bg-layer { position: fixed; inset: 0; z-index: -3; pointer-events: none; overflow: hidden; }
.bg-layer::before {
  content: "";
  position: absolute; inset: -20%;
  background:
    radial-gradient(38% 34% at 12% 8%, rgba(70, 230, 255, 0.16), transparent 70%),
    radial-gradient(40% 36% at 88% 6%, rgba(139, 107, 255, 0.20), transparent 72%),
    radial-gradient(46% 40% at 50% 108%, rgba(255, 77, 157, 0.10), transparent 70%),
    linear-gradient(180deg, #05070f 0%, #04060d 60%, #03040a 100%);
}
.bg-layer::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(110, 160, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 160, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 78%);
}
.scanline {
  position: fixed; left: 0; right: 0; height: 1px; z-index: -2; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(70, 230, 255, 0.35), transparent);
  animation: scan 9s linear infinite;
}
@keyframes scan { 0% { top: -2%; opacity: 0; } 12% { opacity: .7; } 88% { opacity: .5; } 100% { top: 102%; opacity: 0; } }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); }

/* 通用外壳 */
.wrap { width: min(1180px, 92vw); margin: 0 auto; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: rgba(4, 6, 13, 0.72);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 26px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .12em; font-size: 15px; }
.brand-mark {
  width: 30px; height: 30px; position: relative; flex: none;
  background: conic-gradient(from 200deg, var(--cyan), var(--violet), var(--pink), var(--cyan));
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
  filter: drop-shadow(0 0 9px rgba(70, 230, 255, .55));
}
.brand-mark::after {
  content: ""; position: absolute; inset: 5px;
  background: #050810;
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
}
.brand span { background: linear-gradient(92deg, #fff, #a9d6ff 50%, #c9b7ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 13px;
  border: 1px solid transparent; transition: .25s;
}
.nav-links a:hover { color: var(--ink); border-color: var(--line-2); background: rgba(90, 140, 255, .08); }
.nav-links a.primary {
  color: #041018; font-weight: 700;
  background: linear-gradient(100deg, var(--cyan), #7fe9ff 45%, #a78bfa);
  box-shadow: 0 6px 22px rgba(70, 230, 255, .28);
}
.nav-links a.primary:hover { filter: brightness(1.08); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(120, 165, 255, .07); color: var(--ink);
  transition: .2s; font-size: 13.5px; white-space: nowrap;
}
.btn:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(70, 230, 255, .18); transform: translateY(-1px); }
.btn.primary {
  border: 0; color: #04121a; font-weight: 700;
  background: linear-gradient(100deg, var(--cyan), #6ee7ff 40%, #a78bfa);
  box-shadow: 0 8px 26px rgba(70, 230, 255, .25);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255, 90, 120, .45); color: #ff9fb2; background: rgba(255, 70, 100, .08); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn.icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: .06em; font-family: var(--mono); text-transform: uppercase; }
.input, select.input {
  height: 46px; padding: 0 14px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(8, 12, 22, .85);
  color: var(--ink); outline: none; transition: .2s; width: 100%;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(70, 230, 255, .10); background: rgba(10, 16, 28, .95); }
select.input { appearance: none; cursor: pointer; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 11px 0 0 11px; }
.input-group .suffix {
  display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--line);
  border-left: 0; border-radius: 0 11px 11px 0; background: rgba(20, 30, 50, .6);
  color: var(--muted); font-family: var(--mono); font-size: 12.5px;
}

/* 卡片 */
.card {
  background: linear-gradient(160deg, rgba(20, 29, 48, .78), rgba(9, 13, 24, .72));
  border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(130, 200, 255, .5), transparent);
  opacity: .6;
}
.card-pad { padding: 26px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(80, 130, 220, .08);
  font-size: 12px; color: var(--muted); font-family: var(--mono);
}
.chip b { color: var(--cyan); font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); flex: none; }

.kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .28em; color: var(--cyan); text-transform: uppercase; }

/* 落地页 */
.hero { padding: 72px 0 40px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 {
  font-size: clamp(34px, 4.4vw, 58px); line-height: 1.1; letter-spacing: -.02em; font-weight: 800;
  margin: 18px 0 20px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--cyan), #a5b4ff 48%, #d78bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(90, 190, 255, .18);
}
.hero p.lead { color: var(--muted); font-size: 15.5px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.stat b { display: block; font-size: 22px; font-family: var(--mono); color: var(--ink); letter-spacing: -.02em; }
.stat span { font-size: 11px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; font-family: var(--mono); }

/* 雷达视觉 */
.radar {
  aspect-ratio: 1; width: 100%; max-width: 420px; margin-left: auto;
  position: relative; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(70, 230, 255, .10), transparent 62%);
  border: 1px solid rgba(90, 170, 255, .25);
}
.radar::before, .radar::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(90, 170, 255, .18);
}
.radar::before { inset: 14%; }
.radar::after { inset: 30%; }
.radar .cross-h, .radar .cross-v { position: absolute; background: rgba(90, 170, 255, .14); }
.cross-h { left: 6%; right: 6%; top: 50%; height: 1px; }
.cross-v { top: 6%; bottom: 6%; left: 50%; width: 1px; }
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(70, 230, 255, .0) 0deg, rgba(70, 230, 255, .05) 40deg, rgba(70, 230, 255, .32) 68deg, transparent 70deg);
  animation: sweep 4.6s linear infinite;
  mask-image: radial-gradient(circle, #000 62%, transparent 63%);
  -webkit-mask-image: radial-gradient(circle, #000 62%, transparent 63%);
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(70, 230, 255, .4);
  box-shadow: 0 0 40px rgba(70, 230, 255, .16) inset, 0 0 40px rgba(70, 230, 255, .10);
  background: rgba(6, 12, 22, .7);
  font-family: var(--mono); font-size: 11px; color: var(--cyan); letter-spacing: .18em; text-align: center;
}
.blip { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: blip 4.6s ease-out infinite; }
.blip.b2 { left: 32%; top: 46%; animation-delay: 1.4s; background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.blip.b3 { left: 62%; top: 68%; animation-delay: 3.1s; background: var(--pink); box-shadow: 0 0 12px var(--pink); }
@keyframes blip { 0%, 12% { opacity: 0; transform: scale(.4); } 18% { opacity: 1; transform: scale(1.2); } 40%, 100% { opacity: 0; transform: scale(.6); } }

.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; letter-spacing: -.01em; }
.section-head h2::before { content: "// "; color: var(--cyan); font-family: var(--mono); font-size: 13px; vertical-align: middle; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 24px; border-radius: 13px; border: 1px solid var(--line); background: rgba(12, 18, 32, .55); transition: .28s; }
.feature:hover { border-color: var(--line-2); transform: translateY(-3px); background: rgba(18, 26, 44, .7); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.feature .ico {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(70, 230, 255, .18), rgba(139, 107, 255, .16));
  border: 1px solid rgba(110, 190, 255, .25); color: var(--cyan); font-size: 16px; margin-bottom: 14px;
}
.feature h3 { font-size: 14.5px; margin-bottom: 6px; }
.feature p { font-size: 12.5px; color: var(--muted); line-height: 1.65; }

.domain-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.domain-pill {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(10, 16, 28, .6); font-family: var(--mono); font-size: 13px;
}
.domain-pill .mono-tag { font-size: 10px; color: var(--dim); letter-spacing: .12em; border-left: 1px solid var(--line); padding-left: 10px; }

footer { padding: 34px 0 46px; color: var(--dim); font-size: 12px; border-top: 1px solid var(--line); margin-top: 30px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 认证页 */
.auth-shell { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: min(430px, 100%); padding: 34px 30px 30px; }
.auth-card .kicker { margin-bottom: 10px; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; letter-spacing: -.01em; }
.auth-card p.sub { color: var(--muted); font-size: 12.5px; margin-bottom: 26px; }
.auth-alt { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; gap: 8px; }
.auth-alt a { color: var(--cyan); }
.alert { padding: 10px 14px; border-radius: 9px; font-size: 12.5px; margin-bottom: 16px; border: 1px solid rgba(255, 90, 120, .35); background: rgba(255, 70, 100, .10); color: #ffb3c2; }
.alert.ok { border-color: rgba(56, 232, 168, .35); background: rgba(56, 232, 168, .1); color: #9df7d3; }

/* 网页邮箱 */
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); height: calc(100vh - 66px); }
.sidebar {
  border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 18px;
  background: linear-gradient(180deg, rgba(10, 15, 27, .92), rgba(5, 8, 16, .92));
  overflow-y: auto;
}
.account { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 11px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.avatar {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: #04121a;
  background: linear-gradient(140deg, var(--cyan), #9b8bff);
}
.account .meta { min-width: 0; }
.account .meta b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .meta span { font-size: 10.5px; color: var(--dim); font-family: var(--mono); }
.folder-nav { display: flex; flex-direction: column; gap: 3px; }
.folder-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  color: var(--muted); cursor: pointer; border: 1px solid transparent; transition: .18s; width: 100%; text-align: left; background: transparent;
}
.folder-item:hover { background: rgba(90, 140, 255, .07); color: var(--ink); }
.folder-item.active { background: linear-gradient(90deg, rgba(70, 230, 255, .12), rgba(139, 107, 255, .07)); border-color: var(--line-2); color: var(--ink); }
.folder-item .badge { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--cyan); background: rgba(70, 230, 255, .12); border-radius: 999px; padding: 1px 7px; }
.folder-item .badge.mute { color: var(--dim); background: transparent; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.usage { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.usage-bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .06); margin-top: 6px; overflow: hidden; }
.usage-bar i { display: block; height: 100%; width: 12%; background: linear-gradient(90deg, var(--cyan), var(--violet)); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.toolbar {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 17, .6); backdrop-filter: blur(12px); flex-wrap: wrap;
}
.search-box { position: relative; flex: 1; min-width: 180px; }
.search-box .input { height: 38px; padding-left: 36px; font-size: 13px; }
.search-box .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 13px; }
.filter-chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 12px; cursor: pointer; transition: .18s;
}
.filter-chip.active { color: var(--cyan); border-color: rgba(70, 230, 255, .5); background: rgba(70, 230, 255, .09); }

.content { flex: 1; display: grid; grid-template-columns: minmax(300px, 42%) minmax(0, 1fr); min-height: 0; }
.msg-list { overflow-y: auto; border-right: 1px solid var(--line); }
.list-head { display: flex; justify-content: space-between; padding: 10px 16px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; border-bottom: 1px solid var(--line); }
.msg-item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid rgba(120, 170, 255, .07); cursor: pointer; transition: .16s; position: relative;
}
.msg-item:hover { background: rgba(90, 140, 255, .06); }
.msg-item.active { background: linear-gradient(90deg, rgba(70, 230, 255, .10), rgba(90, 140, 255, .02)); }
.msg-item.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--cyan), var(--violet)); }
.msg-item.unread .subject { color: #fff; font-weight: 650; }
.msg-item.unread .dot-unread { display: block; }
.msg-avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-family: var(--mono); color: var(--ink);
  background: radial-gradient(circle at 30% 25%, rgba(70, 230, 255, .35), rgba(139, 107, 255, .22));
  border: 1px solid rgba(120, 190, 255, .28); flex: none;
}
.msg-main { min-width: 0; }
.msg-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.msg-top .from { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-top .time { font-size: 10.5px; color: var(--dim); font-family: var(--mono); flex: none; }
.subject { font-size: 13px; margin: 2px 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snippet { font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-flags { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 11px; color: var(--dim); }
.star { background: none; border: 0; cursor: pointer; color: var(--dim); font-size: 14px; padding: 0 2px; }
.star.on { color: var(--amber); text-shadow: 0 0 10px rgba(255, 196, 92, .5); }
.dot-unread { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

.reader { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: rgba(5, 8, 16, .55); }
.reader-empty { flex: 1; display: grid; place-items: center; color: var(--dim); font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-align: center; gap: 14px; }
.reader-empty .glyph { font-size: 40px; color: rgba(70, 230, 255, .25); }
.reader-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.reader-head h2 { font-size: 17px; line-height: 1.4; margin-bottom: 10px; }
.reader-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.reader-meta .addr { color: var(--cyan); }
.reader-actions { display: flex; gap: 8px; padding: 10px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.reader-tabs { display: flex; gap: 6px; padding: 10px 22px 0; }
.tab { font-size: 12px; padding: 6px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; border: 1px solid transparent; background: none; }
.tab.active { color: var(--ink); border-color: var(--line-2); background: rgba(90, 140, 255, .08); }
.reader-body { flex: 1; overflow: auto; padding: 16px 22px 26px; }
.mail-frame { width: 100%; border: 0; min-height: 320px; background: transparent; }
.mail-text { white-space: pre-wrap; font-size: 13px; color: #ccd8ee; line-height: 1.75; font-family: var(--sans); }
.attachment-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.attachment-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(20, 30, 50, .5); font-size: 12px; transition: .18s;
}
.attachment-chip:hover { border-color: var(--cyan); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 60; background: rgba(2, 4, 9, .72);
  backdrop-filter: blur(6px); display: none; place-items: center; padding: 20px;
}
.modal-mask.show { display: grid; }
.modal { width: min(520px, 100%); padding: 26px; max-height: 86vh; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h3 { font-size: 16px; }
.close-x { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; font-size: 12.5px; align-items: center; }
.kv dt { color: var(--dim); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.kv dd { color: var(--ink); word-break: break-all; }
.copy-line { display: flex; align-items: center; gap: 8px; }
.copy-line .val { flex: 1; font-family: var(--mono); font-size: 12.5px; background: rgba(8, 12, 22, .8); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hint { font-size: 11.5px; color: var(--dim); line-height: 1.7; margin-top: 12px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0;
  background: rgba(12, 20, 34, .95); border: 1px solid var(--line-2); color: var(--ink);
  padding: 10px 18px; border-radius: 10px; font-size: 12.5px; z-index: 90;
  transition: .28s; pointer-events: none; box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 临时邮箱 */
.temp-hero { padding: 54px 0 10px; text-align: center; }
.temp-hero h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.02em; }
.temp-hero p { color: var(--muted); margin-top: 10px; }
.temp-box { width: min(720px, 100%); margin: 28px auto 0; padding: 24px; }
.address-row { display: flex; align-items: center; gap: 10px; background: rgba(6, 11, 20, .8); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px 6px 6px 18px; }
.address-row .addr { flex: 1; font-family: var(--mono); font-size: clamp(15px, 2.4vw, 20px); color: var(--cyan); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.temp-controls { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.temp-controls select { height: 40px; min-width: 140px; }
.temp-field select { width: 100%; height: 40px; }
.address-row .addr.muted { color: var(--dim); font-size: 14px; font-family: inherit; letter-spacing: 0; }
.temp-field { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 6px; }
.temp-field span { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); padding-left: 2px; }
.countdown { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.temp-list { margin-top: 22px; border-top: 1px solid var(--line); }
.temp-item { padding: 14px 6px; border-bottom: 1px solid rgba(120, 170, 255, .08); cursor: pointer; }
.temp-item:hover { background: rgba(90, 140, 255, .06); }
.temp-item b { font-size: 13px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.temp-item span { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.temp-empty { padding: 30px 0; text-align: center; color: var(--dim); font-size: 12px; }

/* 管理后台 */
.admin-head { padding: 34px 0 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: 24px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat-card { padding: 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(12, 18, 32, .55); }
.stat-card b { display: block; font-size: 22px; font-family: var(--mono); color: var(--cyan); }
.stat-card span { font-size: 10.5px; color: var(--dim); letter-spacing: .12em; text-transform: uppercase; font-family: var(--mono); }
.admin-cols { display: grid; grid-template-columns: 1fr 1.35fr; gap: 16px; align-items: start; }
.admin-card { padding: 20px; border-radius: 13px; border: 1px solid var(--line); background: rgba(10, 16, 28, .6); }
.admin-card h3 { font-size: 14px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th { text-align: left; padding: 8px 10px; color: var(--dim); font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px; border-bottom: 1px solid rgba(120, 170, 255, .07); vertical-align: middle; }
table.data tr:hover td { background: rgba(90, 140, 255, .05); }
.pwd-cell { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
.pwd-cell .mini-btn, table.data .mini-btn { white-space: nowrap; }
.pwd-cell .pwd { color: var(--amber); word-break: break-all; }
table.data td, table.data th { white-space: nowrap; }
table.data td:first-child { white-space: normal; }
table.data .tag { white-space: nowrap; }
table.data td:nth-child(3) { font-variant-numeric: tabular-nums; }
.mini-btn { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 11px; padding: 2px 5px; border-radius: 5px; }
.mini-btn:hover { color: var(--cyan); background: rgba(70, 230, 255, .07); }
.tag { display: inline-block; padding: 2px 7px; border-radius: 5px; font-size: 10px; font-family: var(--mono); border: 1px solid var(--line); color: var(--muted); }
.tag.temp { color: var(--amber); border-color: rgba(255, 196, 92, .35); }
.tag.off { color: var(--pink); border-color: rgba(255, 77, 157, .35); }
.recent-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.recent-row { padding: 9px 6px; border-bottom: 1px solid rgba(120, 170, 255, .06); font-size: 12px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.recent-row b { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 视觉细节 */
input[type="checkbox"] { accent-color: #46e6ff; }
select.input option { background: #0a1020; }
::selection { background: rgba(70, 230, 255, .3); }
*:focus-visible { outline: 1px dashed rgba(70, 230, 255, .6); outline-offset: 2px; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .radar { max-width: 320px; margin: 0 auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-cols { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .topbar-inner { height: 58px; gap: 12px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 7px 9px; font-size: 12px; }
  .app-shell { grid-template-columns: 1fr; height: auto; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; gap: 10px; }
  .account { flex: 1; min-width: 0; }
  .folder-nav { flex-direction: row; overflow-x: auto; width: 100%; }
  .folder-item { white-space: nowrap; }
  .sidebar-foot { flex-direction: row; width: 100%; }
  .usage { display: none; }
  .content { grid-template-columns: 1fr; height: calc(100vh - 210px); }
  .reader { position: fixed; inset: 0; z-index: 50; background: #060a12; display: none; }
  .reader.open { display: flex; }
  .msg-list { border-right: 0; }
  .search-box { order: 3; flex-basis: 100%; }
  .hero { padding: 44px 0 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .temp-controls select { width: 100%; }
}

/* ---------- 主题切换按钮 ---------- */
.theme-toggle {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: rgba(120, 165, 255, .07);
  color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; transition: .2s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--cyan); box-shadow: 0 0 14px rgba(70, 230, 255, .22); }

/* ---------- 浅色主题 ---------- */
html[data-theme="light"] {
  --bg: #f5f8ff;
  --bg-2: #eef4fe;
  --ink: #101c33;
  --muted: #4d5d78;
  --dim: #7b889e;
  --line: rgba(24, 70, 150, .16);
  --line-2: rgba(24, 70, 150, .30);
  --cyan: #0784a3;
  --violet: #6d4df0;
  --pink: #db2777;
  --green: #059669;
  --amber: #b45309;
  --glass: rgba(255, 255, 255, .82);
  --glass-2: rgba(255, 255, 255, .55);
}
html[data-theme="light"] body { background: var(--bg); color: var(--ink); }
html[data-theme="light"] .bg-layer::before {
  background:
    radial-gradient(38% 34% at 12% 8%, rgba(8, 145, 178, .14), transparent 70%),
    radial-gradient(40% 36% at 88% 6%, rgba(109, 77, 240, .14), transparent 72%),
    radial-gradient(46% 40% at 50% 108%, rgba(219, 39, 119, .07), transparent 70%),
    linear-gradient(180deg, #f9fbff 0%, #f4f8ff 60%, #eef4fd 100%);
}
html[data-theme="light"] .bg-layer::after {
  background-image:
    linear-gradient(rgba(24, 80, 160, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 80, 160, .07) 1px, transparent 1px);
}
html[data-theme="light"] .scanline {
  background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .28), transparent);
}
html[data-theme="light"] .topbar { background: rgba(255, 255, 255, .78); }
html[data-theme="light"] .brand-mark::after { background: #0f1c33; }
html[data-theme="light"] .brand span {
  background: linear-gradient(92deg, #0b1a33, #0e7490 52%, #6d4df0);
  -webkit-background-clip: text; background-clip: text;
}
html[data-theme="light"] .nav-links a:hover { background: rgba(8, 145, 178, .08); }
html[data-theme="light"] .nav-links a.primary {
  color: #fff;
  background: linear-gradient(100deg, #0784a3, #12a9c6 45%, #7c6cff);
  box-shadow: 0 6px 20px rgba(8, 145, 178, .22);
}
html[data-theme="light"] .btn { background: rgba(24, 70, 150, .06); }
html[data-theme="light"] .btn.primary {
  color: #fff;
  background: linear-gradient(100deg, #0784a3, #0ea5c6 45%, #7c6cff);
  box-shadow: 0 8px 22px rgba(8, 145, 178, .2);
}
html[data-theme="light"] .btn.danger {
  color: #b91c1c; border-color: rgba(220, 38, 38, .35); background: rgba(220, 38, 38, .07);
}
html[data-theme="light"] .input,
html[data-theme="light"] select.input {
  background: #fff; color: var(--ink); border-color: var(--line);
}
html[data-theme="light"] .input::placeholder { color: #8a97ab; }
html[data-theme="light"] .input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(8, 145, 178, .12); }
html[data-theme="light"] select.input option { background: #fff; color: #101c33; }
html[data-theme="light"] .input-group .suffix { background: #eef4fd; }
html[data-theme="light"] .card {
  background: linear-gradient(160deg, rgba(255, 255, 255, .94), rgba(246, 250, 255, .88));
  box-shadow: 0 12px 32px rgba(20, 60, 120, .08);
}
html[data-theme="light"] .card::before { background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .35), transparent); }
html[data-theme="light"] .chip { background: rgba(8, 145, 178, .08); }
html[data-theme="light"] .radar {
  background: radial-gradient(circle at 50% 50%, rgba(8, 145, 178, .10), transparent 62%);
  border-color: rgba(8, 145, 178, .25);
}
html[data-theme="light"] .radar::before,
html[data-theme="light"] .radar::after { border-color: rgba(8, 145, 178, .18); }
html[data-theme="light"] .radar .cross-h,
html[data-theme="light"] .radar .cross-v { background: rgba(8, 145, 178, .14); }
html[data-theme="light"] .sidebar { background: linear-gradient(180deg, #ffffff, #f3f8ff); }
html[data-theme="light"] .account { background: rgba(255, 255, 255, .7); }
html[data-theme="light"] .usage-bar { background: rgba(20, 60, 120, .08); }
html[data-theme="light"] .toolbar { background: rgba(255, 255, 255, .7); }
html[data-theme="light"] .folder-item:hover { background: rgba(8, 145, 178, .07); }
html[data-theme="light"] .folder-item.active {
  background: linear-gradient(90deg, rgba(8, 145, 178, .12), rgba(109, 77, 240, .06));
}
html[data-theme="light"] .msg-item { border-bottom-color: rgba(24, 70, 150, .10); }
html[data-theme="light"] .msg-item:hover { background: rgba(8, 145, 178, .05); }
html[data-theme="light"] .msg-item.active {
  background: linear-gradient(90deg, rgba(8, 145, 178, .10), rgba(24, 70, 150, .02));
}
html[data-theme="light"] .msg-item.unread .subject { color: #0b1526; font-weight: 700; }
html[data-theme="light"] .msg-avatar {
  color: #0b1526;
  background: radial-gradient(circle at 30% 25%, rgba(34, 211, 238, .35), rgba(139, 107, 255, .18));
  border-color: rgba(8, 145, 178, .25);
}
html[data-theme="light"] .reader { background: rgba(255, 255, 255, .55); }
html[data-theme="light"] .reader-empty .glyph { color: rgba(8, 145, 178, .25); }
html[data-theme="light"] .tab.active { background: rgba(8, 145, 178, .08); }
html[data-theme="light"] .mail-text { color: #26364f; }
html[data-theme="light"] .attachment-chip { background: #fff; }
html[data-theme="light"] .copy-line .val { background: #fff; }
html[data-theme="light"] .temp-item:hover { background: rgba(8, 145, 178, .06); }
html[data-theme="light"] table.data tr:hover td { background: rgba(8, 145, 178, .05); }
html[data-theme="light"] table.data td { border-bottom-color: rgba(24, 70, 150, .10); }
html[data-theme="light"] ::selection { background: rgba(8, 145, 178, .22); }
html[data-theme="light"] *:focus-visible { outline-color: rgba(8, 145, 178, .55); }
html[data-theme="light"] .alert { color: #b91c1c; }
html[data-theme="light"] .alert.ok { color: #047857; }
@media (max-width: 760px) {
  html[data-theme="light"] .reader { background: #f7faff; }
}
html[data-theme="light"] .brand-mark {
  background: conic-gradient(from 200deg, #0784a3, #6d4df0, #db2777, #0784a3);
  filter: drop-shadow(0 3px 7px rgba(8, 145, 178, .35));
}
html[data-theme="light"] .hero h1 em {
  background: linear-gradient(96deg, #0784a3, #4f46e5 48%, #a21caf);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; text-shadow: none;
}
html[data-theme="light"] .feature { background: rgba(255, 255, 255, .78); }
html[data-theme="light"] .feature:hover {
  background: #fff;
  box-shadow: 0 16px 36px rgba(20, 60, 120, .10);
}
html[data-theme="light"] .feature .ico {
  background: linear-gradient(140deg, rgba(8, 145, 178, .12), rgba(109, 77, 240, .10));
  border-color: rgba(8, 145, 178, .22);
}
html[data-theme="light"] .domain-pill { background: #fff; }
html[data-theme="light"] .radar-core {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(8, 145, 178, .45);
  box-shadow: 0 0 34px rgba(8, 145, 178, .12) inset, 0 0 30px rgba(8, 145, 178, .10);
  color: #08748f;
}
html[data-theme="light"] .radar-sweep {
  background: conic-gradient(from 0deg, rgba(8, 145, 178, 0) 0deg, rgba(8, 145, 178, .05) 40deg, rgba(8, 145, 178, .28) 68deg, transparent 70deg);
}
html[data-theme="light"] .stat-card,
html[data-theme="light"] .admin-card {
  background: #fff;
  box-shadow: 0 10px 26px rgba(20, 60, 120, .07);
}
html[data-theme="light"] .recent-row { border-bottom-color: rgba(24, 70, 150, .10); }
html[data-theme="light"] .mini-btn:hover { background: rgba(8, 145, 178, .08); }
html[data-theme="light"] .tag.temp { color: #b45309; border-color: rgba(180, 83, 9, .35); }
html[data-theme="light"] .tag.off { color: #be123c; border-color: rgba(190, 18, 60, .35); }
html[data-theme="light"] input[type="checkbox"] { accent-color: #0784a3; }
