* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #1a1a2e;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 浏览器外框 */
.browser-frame {
  width: 96vw;
  height: 94vh;
  background: #f0f0f0;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* 标题栏 */
.title-bar {
  height: 32px;
  background: linear-gradient(to bottom, #e8e8e8, #d0d0d0);
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid #bbb;
  flex-shrink: 0;
}
.title-bar .dots { display: flex; gap: 6px; }
.title-bar .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.reset-game {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  color: rgba(86, 0, 0, 0.72);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
}
.reset-game:hover {
  color: rgba(60, 0, 0, 0.95);
  filter: brightness(1.04);
}
.title-bar .title {
  flex: 1; text-align: center; font-size: 12px; color: #555;
}

/* 地址栏 */
.address-bar {
  height: 36px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}
.address-bar input {
  flex: 1;
  height: 24px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 12px;
  background: #f9f9f9;
  color: #666;
}

/* 主体 */
.browser-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* 侧边导航 */
.sidebar {
  width: 200px;
  background: #2c3e50;
  color: #ecf0f1;
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-header {
  padding: 16px 12px;
  font-size: 13px;
  font-weight: bold;
  border-bottom: 1px solid #34495e;
  background: #1a252f;
}
.nav-item {
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-item:hover { background: #34495e; }
.nav-item.active {
  background: #34495e;
  border-left-color: #3498db;
}
.nav-item.locked {
  color: #7f8c8d;
  cursor: not-allowed;
}
.nav-item.locked:hover { background: transparent; }
.nav-item .icon { font-size: 14px; }
.nav-item .badge {
  margin-left: auto;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  display: none;
}
.nav-item .badge.show { display: inline; }

/* 主内容区 */
.main-content {
  flex: 1;
  background: #fff;
  overflow-y: auto;
  position: relative;
}
.page { display: none; padding: 24px; }
.page.active { display: block; }
.page h2 {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
}

/* 工作台 */
.workbench-editor {
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 400px;
  padding: 20px;
  background: #fafafa;
}
.workbench-editor .doc-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #333;
}
.workbench-editor .doc-body {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
}

/* 邮件 */
.email-list { list-style: none; }
.email-item {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}
.email-item:hover { background: #f5f8fa; }
.email-item.unread { background: #e8f4fd; font-weight: bold; }
.email-item .sender { width: 140px; font-size: 13px; color: #333; }
.email-item .subject { flex: 1; font-size: 13px; color: #555; }
.email-item .time { font-size: 11px; color: #999; }
.email-detail {
  padding: 20px;
  display: none;
}
.email-detail .back-btn {
  color: #3498db;
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 16px;
  display: inline-block;
}
.email-detail .email-meta {
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}
.email-detail .email-meta div { margin: 4px 0; font-size: 13px; color: #666; }
.email-detail .email-body {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  white-space: pre-wrap;
}

/* 文档中心 */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.doc-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}
.doc-card:hover {
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52,152,219,0.15);
}
.doc-card .doc-icon { font-size: 32px; margin-bottom: 8px; }
.doc-card .doc-name { font-size: 13px; color: #333; margin-bottom: 4px; }
.doc-card .doc-meta { font-size: 11px; color: #999; }

/* 文档查看器 */
.doc-viewer {
  display: none;
  padding: 20px;
}
.doc-viewer .back-btn {
  color: #3498db;
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 16px;
  display: inline-block;
}
.doc-viewer .viewer-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #333;
}
.doc-viewer .viewer-content {
  font-size: 14px;
  line-height: 2;
  color: #444;
  white-space: pre-wrap;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 4px;
  border: 1px solid #eee;
}
.doc-viewer .handwritten {
  font-family: "KaiTi", "STKaiti", cursive;
  color: #8b0000;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #ccc;
}

/* 门禁 */
.access-panel {
  max-width: 500px;
  margin: 0 auto;
}
.access-card {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}
.access-card .ac-title {
  font-size: 15px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 12px;
}
.access-card .status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}
.status.normal { background: #d4edda; color: #155724; }
.status.locked { background: #f8d7da; color: #721c24; }
.status.warning { background: #fff3cd; color: #856404; }
.access-card .unlock-btn {
  margin-top: 12px;
  padding: 8px 20px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.access-card .unlock-btn:hover { background: #2980b9; }
.access-card .unlock-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

/* 公告栏 */
.announcement-list { list-style: none; }
.announcement-item {
  padding: 16px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.announcement-item:hover { background: #f5f8fa; }
.announcement-item .an-title {
  font-size: 14px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 6px;
}
.announcement-item .an-meta {
  font-size: 11px;
  color: #999;
  margin-bottom: 8px;
}
.announcement-item .an-preview {
  font-size: 12px;
  color: #777;
  line-height: 1.6;
}

/* 监控 */
.monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.monitor-cell {
  background: #000;
  border: 2px solid #333;
  border-radius: 4px;
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.monitor-cell .cam-label {
  position: absolute;
  top: 6px;
  left: 6px;
  color: #0f0;
  font-size: 11px;
  font-family: monospace;
  z-index: 2;
}
.monitor-cell .cam-time {
  position: absolute;
  bottom: 6px;
  right: 6px;
  color: #0f0;
  font-size: 10px;
  font-family: monospace;
  z-index: 2;
}
.monitor-cell .noise {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, rgba(0,0,0,0.15) 0px, rgba(0,0,0,0.15) 1px,
    transparent 1px, transparent 3px
  );
  pointer-events: none;
}
.monitor-cell .scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 12px;
}
.monitor-cell.corridor .scene {
  background: linear-gradient(to bottom, #1a1a1a, #0d0d0d);
}
.monitor-cell.corridor .scene::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #222;
}
.monitor-cell.archive .scene {
  background: linear-gradient(to bottom, #2a2a1a, #1a1a0d);
}
.monitor-cell.snow .scene {
  background: #111;
}
.monitor-cell.snow .scene::after {
  content: '信号弱';
  color: #555;
  font-size: 11px;
}
.monitor-cell .shadow-figure {
  position: absolute;
  bottom: 10%;
  left: 30%;
  width: 20px;
  height: 50px;
  background: #000;
  border-radius: 40% 40% 0 0;
  opacity: 0.6;
  animation: sway 4s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(15px); }
}
.monitor-cell .face-jump {
  position: absolute;
  inset: 0;
  background: #1a0000;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  z-index: 3;
}

/* 档案库 */
.archive-folder {
  padding: 12px 16px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.archive-folder:hover { background: #e8f4fd; }
.archive-folder .folder-icon { font-size: 20px; }
.archive-folder .folder-name { font-size: 14px; color: #333; }
.archive-folder.encrypted { color: #999; }

/* 消防系统 */
.fire-panel {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.fire-panel .fire-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.fire-panel .fire-status {
  font-size: 16px;
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 6px;
}
.fire-panel .fire-status.ok { background: #d4edda; color: #155724; }
.fire-panel .fire-status.alert { background: #f8d7da; color: #721c24; }
.fire-panel .control-btn {
  padding: 12px 32px;
  font-size: 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin: 8px;
}
.control-btn.primary { background: #e74c3c; color: #fff; }
.control-btn.primary:hover { background: #c0392b; }
.control-btn:disabled { background: #bdc3c7; cursor: not-allowed; }

/* 8楼旧站点 */
.oldsite-frame {
  background: #c0c0c0;
  border: 2px outset #ddd;
  padding: 0;
  min-height: 500px;
}
.oldsite-header {
  background: #000080;
  color: #fff;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: bold;
}
.oldsite-nav {
  background: #c0c0c0;
  padding: 6px;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #999;
}
.oldsite-nav button {
  background: #c0c0c0;
  border: 2px outset #ddd;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.oldsite-nav button:active { border-style: inset; }
.oldsite-nav button.active {
  background: #a0a0a0;
  border-style: inset;
}
.oldsite-content {
  padding: 20px;
  background: #fff;
  margin: 8px;
  min-height: 400px;
  font-size: 13px;
  color: #000;
}
.oldsite-content h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #000080;
}
.oldsite-content .broken-link {
  color: #666;
  text-decoration: line-through;
  cursor: not-allowed;
}
.oldsite-content .file-item {
  padding: 8px;
  border-bottom: 1px dotted #999;
  cursor: pointer;
}
.oldsite-content .file-item:hover { background: #e8e8ff; }
.oldsite-content .file-item.encrypted { color: #999; }

/* 树洞 */
.treehole-board {
  max-width: 900px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.84);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}
.treehole-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
}
.treehole-board-title {
  color: #1f2933;
  font-size: 14px;
  font-weight: 700;
}
.treehole-board-subtitle {
  margin-top: 4px;
  color: #74808d;
  font-size: 12px;
}
.treehole-board-status {
  flex-shrink: 0;
  padding: 4px 9px;
  border: 1px solid rgba(47, 125, 217, 0.18);
  border-radius: 999px;
  background: rgba(47, 125, 217, 0.08);
  color: #236ab8;
  font-size: 11px;
  font-weight: 650;
}
.treehole-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}
.treehole-post {
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.treehole-post:hover {
  border-color: rgba(47, 125, 217, 0.28);
  box-shadow: 0 12px 28px rgba(47, 125, 217, 0.1);
  transform: translateY(-1px);
}
.treehole-post .post-time {
  margin-bottom: 8px;
  color: #74808d;
  font-size: 11px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
}
.treehole-post .post-content {
  color: #354252;
  font-size: 13px;
  line-height: 1.8;
}

/* 底部状态栏 */
.status-bar {
  height: 28px;
  background: #ecf0f1;
  border-top: 1px solid #bdc3c7;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: #555;
  flex-shrink: 0;
  gap: 20px;
}
.status-bar .clock {
  font-family: monospace;
  font-weight: bold;
  color: #2c3e50;
}
.status-bar .system-status { margin-left: auto; }

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  min-width: 360px;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.modal-box h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #2c3e50;
}
.modal-box p {
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.6;
}
.modal-box input[type="password"],
.modal-box input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 16px;
  font-family: monospace;
  letter-spacing: 4px;
  text-align: center;
}
.modal-box .modal-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-box button {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.btn-confirm { background: #3498db; color: #fff; }
.btn-confirm:hover { background: #2980b9; }
.btn-cancel { background: #ecf0f1; color: #555; }
.btn-cancel:hover { background: #d5dbdb; }

/* 系统通知 */
.toast-container {
  position: absolute;
  top: 80px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #2c3e50;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: slideIn 0.3s ease;
  max-width: 320px;
}
.toast.warning { background: #e67e22; }
.toast.danger { background: #e74c3c; }
.toast.success { background: #27ae60; }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 入侵警告 */
.invasion-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #e74c3c;
  color: #fff;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  z-index: 400;
  display: none;
  animation: blink 0.5s infinite;
}
.invasion-banner.show { display: block; }
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* 乱码弹窗干扰 */
.glitch-popup {
  position: absolute;
  background: #000;
  color: #0f0;
  border: 1px solid #0f0;
  padding: 8px 12px;
  font-family: monospace;
  font-size: 12px;
  z-index: 300;
  pointer-events: none;
  animation: glitchMove 2s linear forwards;
}
@keyframes glitchMove {
  0% { opacity: 0; transform: scale(0.5); }
  20% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.2); }
}

/* 火焰覆盖 */
.fire-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  display: none;
  background: radial-gradient(ellipse at bottom, rgba(255,60,0,0.3), transparent 70%);
}
.fire-overlay.show { display: block; animation: fireFlicker 0.3s infinite; }
@keyframes fireFlicker {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* 扫描线效果 */
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 150;
  background: repeating-linear-gradient(
    0deg, rgba(0,0,0,0.03) 0px, rgba(0,0,0,0.03) 1px,
    transparent 1px, transparent 3px
  );
  opacity: 0;
  transition: opacity 1s;
}
.scanlines.show { opacity: 1; }

/* 焦黑边缘 */
.burn-edges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 140;
  box-shadow: inset 0 0 80px rgba(30,0,0,0.6);
  opacity: 0;
  transition: opacity 0.5s;
}
.burn-edges.show { opacity: 1; }

/* v1.0复古样式覆盖 */
.browser-frame.retro .title-bar {
  background: linear-gradient(to bottom, #000080, #1084d0);
  color: #fff;
}
.browser-frame.retro .title-bar .title { color: #fff; }
.browser-frame.retro .address-bar { background: #c0c0c0; }
.browser-frame.retro .address-bar input {
  background: #fff;
  border: 2px inset #ddd;
  font-family: "MS Sans Serif", sans-serif;
}
.browser-frame.retro .sidebar {
  background: #c0c0c0;
  border-right: 2px inset #ddd;
}
.browser-frame.retro .sidebar-header {
  background: #000080;
  color: #fff;
}
.browser-frame.retro .nav-item {
  color: #000;
  border-bottom: 1px solid #999;
}
.browser-frame.retro .nav-item:hover { background: #a0a0a0; }
.browser-frame.retro .nav-item.active {
  background: #000080;
  color: #fff;
  border-left-color: #fff;
}
.browser-frame.retro .main-content {
  background: #c0c0c0;
  font-family: "MS Sans Serif", "SimSun", sans-serif;
}
.browser-frame.retro .page h2 {
  color: #000080;
  border-bottom: 2px solid #000080;
}
.browser-frame.retro .status-bar {
  background: #c0c0c0;
  border-top: 2px outset #ddd;
}

/* 结局画面 */
.ending-screen {
  position: absolute;
  inset: 0;
  z-index: 2000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
.ending-screen.show { display: flex; }
.ending-screen.good {
  background: linear-gradient(to bottom, #87ceeb, #fff);
  color: #333;
}
.ending-screen.normal {
  background: #2c2c2c;
  color: #ccc;
}
.ending-screen.bad {
  background: #000;
  color: #444;
}
.ending-screen h1 {
  font-size: 32px;
  margin-bottom: 24px;
}
.ending-screen .ending-text {
  font-size: 15px;
  line-height: 2;
  max-width: 600px;
  margin-bottom: 32px;
  white-space: pre-wrap;
}
.ending-screen .restart-btn {
  padding: 12px 32px;
  font-size: 15px;
  border: 2px solid currentColor;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  border-radius: 4px;
}
.ending-screen .restart-btn:hover { background: rgba(255,255,255,0.1); }
.ending-screen .badge-img {
  font-size: 80px;
  margin-bottom: 20px;
}

/* 光标闪烁 */
.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #333;
  animation: cursorBlink 1s infinite;
  vertical-align: middle;
}
@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }

/* 开场页面 */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  color: #e0e0e0;
}
.intro-screen.hide {
  animation: introFadeOut 0.8s forwards;
}
@keyframes introFadeOut {
  to { opacity: 0; visibility: hidden; }
}
.intro-title {
  font-size: 42px;
  font-weight: bold;
  letter-spacing: 8px;
  margin-bottom: 8px;
  color: #fff;
  text-shadow: 0 0 20px rgba(100,100,255,0.5);
}
.intro-subtitle {
  font-size: 14px;
  color: #8888aa;
  letter-spacing: 4px;
  margin-bottom: 40px;
}
.intro-content {
  max-width: 640px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}
.intro-content h3 {
  font-size: 15px;
  color: #aabbff;
  margin-bottom: 10px;
  letter-spacing: 2px;
}
.intro-content p {
  font-size: 13px;
  line-height: 2;
  color: #bbb;
  margin-bottom: 16px;
}
.intro-content p:last-child { margin-bottom: 0; }
.intro-tips {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.intro-tip {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 12px;
  color: #99aacc;
  text-align: center;
  min-width: 120px;
}
.intro-tip .tip-icon { font-size: 20px; display: block; margin-bottom: 6px; }
.start-btn {
  padding: 14px 48px;
  font-size: 16px;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #4a4a8a, #6a6aba);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}
.start-btn:hover {
  background: linear-gradient(135deg, #5a5a9a, #7a7aca);
  box-shadow: 0 0 30px rgba(100,100,200,0.4);
  transform: translateY(-2px);
}
.intro-warning {
  margin-top: 20px;
  font-size: 11px;
  color: #666;
  letter-spacing: 1px;
}

/* 引导气泡 */
.guide-bubble {
  position: absolute;
  background: #fff;
  border: 2px solid #3498db;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #333;
  max-width: 240px;
  z-index: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: guidePulse 1.5s infinite;
}
.guide-bubble::after {
  content: '';
  position: absolute;
  border: 8px solid transparent;
}
.guide-bubble.left::after {
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: #3498db;
}
.guide-bubble.right::after {
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: #3498db;
}
.guide-bubble.top::after {
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: #3498db;
}
.guide-bubble.bottom::after {
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: #3498db;
}
@keyframes guidePulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(52,152,219,0.3); }
  50% { box-shadow: 0 4px 24px rgba(52,152,219,0.6); }
}
.guide-bubble .guide-step {
  font-size: 10px;
  color: #3498db;
  font-weight: bold;
  margin-bottom: 4px;
}
.guide-bubble .guide-text { line-height: 1.6; }
.guide-highlight {
  position: relative;
  z-index: 599;
  box-shadow: 0 0 0 3px #3498db, 0 0 20px rgba(52,152,219,0.5);
  border-radius: 4px;
}
.guide-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 598;
  display: none;
  pointer-events: none;
}
.guide-overlay.show { display: block; }

/* Apple-inspired polish pass: visible app first, focused floating intro, direct feedback. */
:root {
  color-scheme: light;
  --bg-deep: #15161b;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #f7f8fa;
  --ink: #20242b;
  --muted: #66707d;
  --blue: #2f7dd9;
  --teal: #0a8f8a;
  --red: #c93a36;
  --amber: #a66a00;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)),
    #15161b;
  color: var(--ink);
}

.browser-frame {
  width: min(1440px, 96vw);
  height: min(900px, 94vh);
  border-radius: 14px;
  background: rgba(246, 247, 249, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255,255,255,0.14);
}

.title-bar,
.address-bar,
.status-bar {
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.title-bar {
  height: 36px;
  background: rgba(245, 246, 248, 0.78);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.address-bar {
  height: 42px;
  background: rgba(255,255,255,0.72);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.address-bar input {
  height: 28px;
  border-radius: 7px;
  border-color: rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.82);
}

.sidebar {
  width: 218px;
  background: rgba(28, 35, 43, 0.92);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.sidebar-header {
  background: rgba(7, 10, 14, 0.32);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-item {
  margin: 4px 8px;
  padding: 10px 12px;
  border-left: 0;
  border-radius: 8px;
  transition: transform 120ms ease, background 180ms ease, color 180ms ease;
}

.nav-item:hover { background: rgba(255,255,255,0.10); }
.nav-item:active { transform: scale(0.98); }
.nav-item.active {
  background: rgba(47, 125, 217, 0.26);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.main-content {
  background: linear-gradient(180deg, #fff, #f3f5f7);
}

.page { padding: 26px 28px; }
.page h2 {
  color: #1f2933;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 18px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0;
}

.workbench-editor,
.access-card,
.doc-card,
.viewer-content,
.oldsite-frame,
.intro-panel,
.modal-box {
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.workbench-editor,
.access-card,
.doc-card,
.viewer-content {
  background: rgba(255,255,255,0.88);
  border-color: rgba(15, 23, 42, 0.08);
}

button,
.doc-card,
.email-item,
.announcement-item,
.archive-folder,
.monitor-cell {
  transition: transform 120ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

button:active,
.doc-card:active,
.email-item:active,
.announcement-item:active,
.archive-folder:active,
.monitor-cell:active {
  transform: scale(0.985);
}

.unlock-btn,
.btn-confirm,
.control-btn.primary,
.start-btn {
  background: var(--blue);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(47, 125, 217, 0.24);
}

.control-btn.primary,
.invasion-banner,
.toast.danger { background: var(--red); }
.status.warning { background: #fff4d8; color: var(--amber); }
.status.normal { background: #dff6ef; color: #086b57; }

.intro-screen {
  position: fixed;
  inset: auto max(24px, 3vw) auto auto;
  top: max(24px, 4vh);
  z-index: 3000;
  width: min(420px, calc(100vw - 48px));
  height: auto;
  padding: 0;
  display: block;
  background: transparent;
  color: #eef3f6;
  pointer-events: none;
}

.intro-screen.hide { animation: introFadeOut 420ms ease forwards; }

.intro-panel {
  overflow: hidden;
  background: rgba(19, 24, 31, 0.82);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  pointer-events: auto;
}

.intro-panel-bar {
  height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(238,243,246,0.82);
  background: rgba(255,255,255,0.07);
}

.intro-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #30d158;
  box-shadow: 0 0 14px rgba(48, 209, 88, 0.6);
}

.intro-version {
  margin-left: auto;
  color: rgba(238,243,246,0.56);
}

.intro-panel-body { padding: 24px; }
.intro-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: 0;
  text-shadow: none;
}
.intro-subtitle {
  margin: 4px 0 18px;
  font-size: 15px;
  color: rgba(238,243,246,0.62);
  letter-spacing: 0;
}
.intro-panel p {
  margin: 0 0 10px;
  color: rgba(238,243,246,0.78);
  font-size: 13px;
  line-height: 1.75;
}
.intro-tips {
  margin: 18px 0 20px;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}
.intro-tips span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: rgba(238,243,246,0.78);
  font-size: 12px;
}
.start-btn {
  width: 100%;
  padding: 12px 18px;
  font-size: 15px;
  letter-spacing: 0;
  border: 0;
}
.start-btn:hover {
  background: #3a89e6;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(47, 125, 217, 0.30);
}
.intro-warning {
  margin-top: 12px;
  color: rgba(238,243,246,0.48);
  letter-spacing: 0;
  text-align: center;
}

.monitor-grid { gap: 14px; }
.monitor-cell {
  border: 1px solid rgba(0,0,0,0.34);
  border-radius: 8px;
  background: #030405;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}
.monitor-footage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.82);
}
.monitor-cell .scene { display: none; }
.monitor-cell .cam-label,
.monitor-cell .cam-time {
  color: #78ff9b;
  text-shadow: 0 0 8px rgba(120,255,155,0.7);
}
.monitor-cell .face-jump {
  background: rgba(38, 0, 0, 0.92);
  backdrop-filter: blur(2px);
}

.guide-bubble {
  background: rgba(19, 24, 31, 0.88);
  border: 1px solid rgba(255,255,255,0.16);
  color: #eef3f6;
  border-radius: 8px;
  padding: 14px;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 18px 42px rgba(0,0,0,0.32);
  animation: none;
}
.guide-bubble::after { display: none; }
.guide-bubble .guide-step {
  color: rgba(238,243,246,0.58);
  letter-spacing: 0;
}
.guide-bubble .guide-text {
  color: rgba(238,243,246,0.86);
}
.guide-next {
  width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}
.guide-highlight {
  z-index: 599;
  box-shadow: 0 0 0 3px rgba(47, 125, 217, 0.86), 0 0 24px rgba(47,125,217,0.55);
}

.modal-overlay { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-box {
  background: rgba(19, 24, 31, 0.90);
  border: 1px solid rgba(255,255,255,0.16);
  color: #eef3f6;
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
}
.modal-box h3 {
  color: #eef3f6;
}
.modal-box p {
  color: rgba(238,243,246,0.72);
}
.modal-box input[type="password"],
.modal-box input[type="text"] {
  border-radius: 8px;
  letter-spacing: 0;
  color: #eef3f6;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}
.btn-cancel {
  background: rgba(255,255,255,0.10);
  color: rgba(238,243,246,0.82);
}
.btn-cancel:hover { background: rgba(255,255,255,0.16); }
.btn-confirm {
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .browser-frame,
  .title-bar,
  .address-bar,
  .sidebar,
  .intro-panel,
  .modal-box {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .intro-panel { background: #151a21; }
  .browser-frame { background: #f7f8fa; }
}

/* Content surfaces: mailbox, documents, announcements and shared reader. */
.email-list,
.announcement-list {
  display: grid;
  gap: 10px;
}

.email-item,
.announcement-item {
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.email-item {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-columns: minmax(112px, 150px) 1fr auto;
  gap: 14px;
}

.email-item:hover,
.announcement-item:hover,
.doc-card:hover,
.archive-folder:hover {
  background: #fff;
  border-color: rgba(47, 125, 217, 0.32);
  box-shadow: 0 12px 30px rgba(47, 125, 217, 0.12);
}

.email-item.unread {
  background: linear-gradient(90deg, rgba(47,125,217,0.12), rgba(255,255,255,0.92));
  border-color: rgba(47, 125, 217, 0.26);
  font-weight: 650;
}

.email-item .sender {
  width: auto;
  color: #1f2933;
  font-weight: 650;
}

.email-item .subject {
  color: #354252;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-item .time {
  color: #7a8491;
  align-self: center;
}

.email-detail,
.doc-viewer {
  padding: 0;
}

.email-detail {
  max-width: 820px;
}

.email-detail .back-btn,
.doc-viewer .back-btn {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid rgba(47, 125, 217, 0.18);
  background: rgba(47, 125, 217, 0.08);
  color: #236ab8;
  font-weight: 650;
}

.email-detail .back-btn:hover,
.doc-viewer .back-btn:hover {
  background: rgba(47, 125, 217, 0.14);
}

.email-meta,
.email-body,
.viewer-content {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.email-detail .email-meta {
  margin-bottom: 0;
  padding: 16px 18px;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.email-detail .email-meta div {
  color: #526170;
  line-height: 1.7;
}

.email-detail .email-body {
  padding: 22px 24px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  line-height: 1.9;
  color: #26313d;
}

.doc-viewer {
  max-width: 900px;
  width: min(900px, calc(100% - 56px));
  margin: 0 auto;
}

.doc-viewer .viewer-title {
  margin: 0 0 12px;
  color: #1f2933;
  font-size: 22px;
  line-height: 1.3;
}

.doc-viewer .viewer-content {
  padding: 26px 30px;
  border-radius: 8px;
  color: #293545;
  font-size: 14px;
  line-height: 2;
}

.announcement-item .an-title {
  color: #1f2933;
}

.announcement-item .an-meta {
  color: #74808d;
}

.announcement-item .an-preview {
  color: #566473;
}

.archive-folder {
  border-radius: 8px;
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.88);
}

.address-bar input {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
  color: #344054;
}

.access-panel {
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.access-card {
  margin-bottom: 0;
  overflow: hidden;
}

.access-visual {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin: -20px -20px 16px;
  width: calc(100% + 40px);
  max-width: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

/* Polished workbench editor. */
.workbench-editor {
  max-width: 980px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  background: #f8fafc;
}

.workbench-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.workbench-editor .doc-title {
  margin-bottom: 4px;
  font-size: 18px;
  color: #1f2933;
}

.doc-subtitle {
  font-size: 12px;
  color: #7a8491;
}

.workbench-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workbench-actions span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 125, 217, 0.08);
  color: #2f6fb2;
  font-size: 12px;
  font-weight: 650;
}

.workbench-ribbon {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(246, 248, 251, 0.94);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.workbench-ribbon button {
  min-width: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 7px;
  background: #fff;
  color: #526170;
  font-size: 12px;
}

.workbench-editor .doc-body {
  width: min(720px, calc(100% - 48px));
  min-height: 460px;
  margin: 28px auto 34px;
  padding: 42px 48px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(47,125,217,0.08) 0 3px, transparent 3px),
    #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  color: #26313d;
  line-height: 2;
  white-space: pre-wrap;
}

.handwritten-note-image {
  display: block;
  width: min(100%, 760px);
  margin: 26px auto 4px;
  filter: drop-shadow(0 10px 18px rgba(88, 45, 24, 0.18));
}

.monitor-modal-box {
  width: min(980px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  padding: 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(10, 13, 17, 0.92);
  color: #eef3f6;
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  box-shadow: 0 24px 70px rgba(0,0,0,0.46);
}

.monitor-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.monitor-modal-title {
  font-size: 18px;
  font-weight: 750;
}

.monitor-modal-subtitle {
  margin-top: 3px;
  color: rgba(238,243,246,0.56);
  font-size: 12px;
}

.monitor-close {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.10);
  color: #eef3f6;
  padding: 8px 12px;
}

.monitor-modal-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  border: 1px solid rgba(255,255,255,0.10);
}

.monitor-modal-frame img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  image-rendering: auto;
}

.monitor-modal-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.16) 0,
    rgba(0,0,0,0.16) 1px,
    transparent 1px,
    transparent 4px
  );
}
