* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "微软雅黑", "SimSun", sans-serif;
  background: #000;
  color: #ddd;
  overflow: hidden;
  height: 100vh;
  user-select: none;
}

/* ========== 启动界面 ========== */
#boot-screen {
  position: fixed; inset: 0; background: #000; z-index: 9999;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  font-family: "Consolas", "Courier New", monospace;
  transition: opacity 1.5s;
}
.boot-text { color: #ccc; font-size: 14px; line-height: 2; white-space: pre; text-align: left;}
.boot-cursor { display:inline-block; width:8px; height:14px; background:#ccc; animation: blink 1s infinite;}
@keyframes blink { 50% { opacity:0; } }

/* ========== 旧电脑桌面 ========== */
#desktop {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, #2a3a5a 0%, #1a2030 70%, #0d1018 100%);
  background-size: cover;
  overflow: hidden;
}
.desktop-folder {
  position: absolute;
  width: 72px;
  text-align: center;
  cursor: pointer;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,.8);
  font-size: 12px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.desktop-folder:hover, .desktop-folder.selected {
  background: rgba(100,150,255,.25);
  border-color: rgba(150,200,255,.5);
}
.folder-icon {
  width: 48px; height: 48px; margin: 0 auto 4px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.icon-notebook { 
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><rect x='8' y='4' width='32' height='40' rx='2' fill='%23d9c9a3' stroke='%238b7355' stroke-width='2'/><line x1='8' y1='14' x2='40' y2='14' stroke='%238b7355' stroke-width='1'/><line x1='14' y1='4' x2='14' y2='44' stroke='%238b7355' stroke-width='1'/><line x1='14' y1='20' x2='36' y2='20' stroke='%23a89575' stroke-width='0.5'/><line x1='14' y1='24' x2='36' y2='24' stroke='%23a89575' stroke-width='0.5'/><line x1='14' y1='28' x2='36' y2='28' stroke='%23a89575' stroke-width='0.5'/><line x1='14' y1='32' x2='30' y2='32' stroke='%23a89575' stroke-width='0.5'/></svg>");
}
.icon-browser {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><circle cx='24' cy='24' r='20' fill='%234a90e2'/><circle cx='24' cy='24' r='16' fill='%23fff'/><circle cx='24' cy='24' r='12' fill='none' stroke='%234a90e2' stroke-width='2'/><circle cx='24' cy='24' r='4' fill='%23e24a4a'/><ellipse cx='24' cy='16' rx='10' ry='3' fill='none' stroke='%234a90e2' stroke-width='1.5'/><ellipse cx='24' cy='32' rx='10' ry='3' fill='none' stroke='%234a90e2' stroke-width='1.5' transform='rotate(60 24 24)'/><ellipse cx='24' cy='32' rx='10' ry='3' fill='none' stroke='%234a90e2' stroke-width='1.5' transform='rotate(-60 24 24)'/></svg>");
}
.icon-folder {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><path d='M4 12 L4 40 L44 40 L44 16 L22 16 L18 12 Z' fill='%23f4c542' stroke='%23b8860b' stroke-width='2'/></svg>");
}

.taskbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 36px;
  background: linear-gradient(180deg, #3c4a60 0%, #222c3c 100%);
  border-top: 1px solid #5a6a80;
  display: flex; align-items: center;
  z-index: 500;
  padding: 0 8px;
}
.start-btn {
  width: 36px; height: 30px;
  background: linear-gradient(180deg, #4a7ab8, #2a5080);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: bold; font-style: italic; cursor: pointer;
  margin-right: 8px;
}
.task-item {
  padding: 4px 12px;
  background: rgba(80,120,180,.5);
  border: 1px solid rgba(150,180,230,.5);
  border-radius: 3px;
  color: #fff; font-size: 12px;
  margin-right: 4px; cursor: pointer;
  display: none;
}
.task-item.active { background: rgba(100,150,220,.9); }
.task-clock { margin-left: auto; color: #fff; font-size: 12px; padding: 0 12px; }

/* ========== 窗口 ========== */
.window {
  position: absolute;
  background: #f0f0f0;
  color: #222;
  border: 1px solid #555;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,.6);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}
.window.active { display: flex; }
.window-title {
  background: linear-gradient(180deg, #4a6aa0, #2d4870);
  color: #fff; padding: 6px 10px;
  display: flex; align-items: center;
  font-size: 13px;
  cursor: move;
}
.window-title-text { flex: 1; }
.window-controls button {
  width: 22px; height: 20px; margin-left: 2px;
  border: 1px solid rgba(255,255,255,.3);
  background: linear-gradient(180deg, #7a9ac0, #5078a0);
  color: #fff; font-size: 11px; cursor: pointer; border-radius: 2px;
}
.window-controls button.close:hover { background: #c04040; }
.window-body { flex: 1; overflow: auto; }

/* ========== 日记 ========== */
#notebook-window { width: 520px; height: 600px; top: 40px; left: 80px; }
.notebook {
  background: #f5ecd2;
  padding: 40px 50px;
  min-height: 100%;
  font-family: "楷体", "KaiTi", "STKaiti", serif;
  color: #222;
  position: relative;
  background-image: repeating-linear-gradient(transparent, transparent 27px, #c9b99a 28px);
}
.notebook h3 {
  text-align: center;
  margin-bottom: 20px;
  font-family: "楷体", "KaiTi", serif;
  color: #443322;
  border-bottom: 2px solid #8b7355;
  padding-bottom: 8px;
}
.notebook .digit-line {
  font-size: 28px;
  letter-spacing: 6px;
  text-align: center;
  margin: 30px 0;
  font-weight: bold;
  color: #333;
  font-family: "Consolas", "Courier New", monospace;
}
.notebook .time-line {
  font-size: 22px;
  letter-spacing: 3px;
  text-align: center;
  margin: 24px 0;
  color: #554433;
  font-family: "Consolas", monospace;
}
.notebook .msg-line {
  margin: 24px 0;
  font-size: 15px;
  line-height: 2;
  color: #443322;
  text-indent: 2em;
}
.notebook .final-msg {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px dashed #8b7355;
  font-size: 14px;
  color: #663322;
  text-align: center;
  font-style: italic;
}
.page-turner {
  position: absolute;
  bottom: 10px; right: 20px;
  display: flex; gap: 8px;
}
.page-turner button {
  padding: 4px 12px;
  background: #d9c9a3;
  border: 1px solid #8b7355;
  color: #443322;
  font-family: "楷体", serif;
  cursor: pointer;
  border-radius: 2px;
}
.page-turner button:hover { background: #c9b99a; }
.page-turner button:disabled { opacity: .4; cursor: default; }

/* ========== 浏览器 ========== */
#browser-window { width: 900px; height: 620px; top: 30px; left: 160px; }
.browser-toolbar {
  background: #e8e8e8;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid #bbb;
}
.nav-btn {
  width: 28px; height: 26px;
  border: 1px solid #bbb;
  background: #f8f8f8;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  color: #555;
}
.nav-btn:hover { background: #e0e8f0; color: #224488; }
.nav-btn:disabled { opacity: .3; cursor: default; }
.address-bar {
  flex: 1;
  display: flex;
  align-items: center;
  border: 1px solid #aaa;
  background: #fff;
  border-radius: 3px;
  padding: 0 8px;
  height: 26px;
}
.address-bar .proto { color: #4a7a4a; font-size: 12px; margin-right: 4px; }
.address-bar input {
  flex: 1; border: none; outline: none; font-size: 13px;
  background: transparent; height: 100%;
  color: #222;
}
.address-bar .go-btn {
  width: 28px; height: 22px;
  border: 1px solid #bbb;
  background: #f0f0f0;
  border-radius: 2px;
  cursor: pointer;
  margin-left: 4px;
}
.browser-tabs {
  display: flex; background: #d8d8d8; padding: 4px 4px 0;
  gap: 2px;
}
.tab {
  padding: 4px 14px;
  background: #bbb;
  color: #444;
  font-size: 12px;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #999;
  border-bottom: none;
}
.tab.active { background: #fff; color: #222; font-weight: bold; }
.tab .close-tab {
  margin-left: 6px;
  font-size: 14px;
  color: #888;
}
.browser-content {
  flex: 1;
  background: #fff;
  color: #222;
  overflow: auto;
  position: relative;
}

/* ========== 通用网站样式 ========== */
.site-container { min-height: 100%; }
.site-header {
  padding: 20px 40px;
  background: linear-gradient(180deg, #2c5aa0, #1a3a60);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.site-header h1 { font-size: 22px; font-weight: normal; }
.site-nav {
  background: #1a3a60;
  padding: 0 30px;
  display: flex; gap: 0;
}
.site-nav a {
  padding: 10px 20px;
  color: #cfd8e8;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  border-right: 1px solid rgba(255,255,255,.1);
}
.site-nav a:hover, .site-nav a.active {
  background: #2c5aa0; color: #fff;
}
.site-main { padding: 30px 40px; min-height: 380px; }
.site-footer {
  background: #2a3544;
  color: #8898a8;
  padding: 20px 40px;
  font-size: 12px;
  text-align: center;
}
.page-title {
  font-size: 20px;
  color: #1a3a60;
  border-bottom: 2px solid #2c5aa0;
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.news-list { list-style: none; }
.news-list li {
  padding: 10px 0;
  border-bottom: 1px dashed #ccc;
  display: flex; justify-content: space-between;
  align-items: center;
}
.news-list a {
  color: #224477;
  text-decoration: none;
  cursor: pointer;
}
.news-list a:hover { color: #c03030; text-decoration: underline; }
.news-date { color: #888; font-size: 12px; }

.btn {
  display: inline-block;
  padding: 6px 18px;
  background: #2c5aa0;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
}
.btn:hover { background: #1a3a60; }
.btn-secondary { background: #777; }
.btn-secondary:hover { background: #555; }
.btn-danger { background: #a02c2c; }
.btn-danger:hover { background: #701010; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data-table th, table.data-table td {
  padding: 8px 12px;
  border: 1px solid #ccc;
  text-align: left;
}
table.data-table th {
  background: #e8eef8;
  color: #1a3a60;
}
table.data-table tr.odd { background: #fafafa; }

.notice-box {
  background: #f5f5f5;
  border-left: 4px solid #aaa;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #444;
}
.error-box {
  background: #f5f5f5;
  border-left: 4px solid #999;
  padding: 10px 16px;
  color: #444;
  font-size: 13px;
  margin: 10px 0;
}
.info-box {
  background: #f5f5f5;
  border-left: 4px solid #aaa;
  padding: 14px 18px;
  margin: 14px 0;
  font-size: 13px;
}

.form-row {
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-row label {
  width: 100px;
  text-align: right;
  color: #333;
  font-size: 13px;
}
.form-row input[type=text], .form-row input[type=password], .form-row select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #aaa;
  border-radius: 3px;
  font-size: 13px;
  max-width: 320px;
}

/* ========== 学校官网 ========== */
.site-school .hero {
  background: linear-gradient(135deg, #1a3a60, #2c5aa0, #4a80c0);
  color: #fff;
  padding: 40px;
  margin: -30px -40px 30px;
  text-align: center;
}
.site-school .hero h2 { font-size: 28px; margin-bottom: 10px; }
.site-school .hero p { opacity: .85; }
.site-school .news-section { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.section-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}
.section-card h3 {
  background: #f0f4f8;
  padding: 10px 16px;
  font-size: 15px;
  color: #1a3a60;
  border-bottom: 1px solid #ddd;
}
.section-card .card-body { padding: 10px 16px; }

.cache-search {
  padding: 14px;
  background: #f8f8f0;
  border: 1px dashed #aaa;
  border-radius: 4px;
  margin-top: 20px;
  font-size: 12px;
  color: #555;
}
.cache-search input {
  padding: 4px 8px;
  border: 1px solid #aaa;
  font-size: 12px;
  margin-right: 6px;
}

/* ========== 内网登录 ========== */
.login-box {
  width: 360px;
  margin: 60px auto;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  border-radius: 6px;
  overflow: hidden;
}
.login-header {
  background: linear-gradient(180deg, #3a5080, #1e2e50);
  color: #fff;
  padding: 20px;
  text-align: center;
}
.login-header h3 { font-size: 16px; font-weight: normal; }
.login-body { padding: 28px 24px; }
.login-body .form-row input { max-width: none; flex: 1; }
.login-body .form-row label { width: 80px; }
.login-tip {
  font-size: 11px; color: #888;
  margin-top: 10px; text-align: center;
  font-style: italic;
}

.intranet-dash {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  min-height: 400px;
}
.intranet-menu {
  background: #2a3548;
  color: #cfd8e8;
  padding: 14px 0;
}
.intranet-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.intranet-menu a:hover {
  background: #3a4a65;
  color: #fff;
}
.intranet-menu a.active {
  background: #3a4a65;
  color: #fff;
  border-left-color: #4a90e2;
}
.intranet-content {
  padding: 20px 28px;
  background: #fafafa;
}

/* ========== 启明星计划 ========== */
.site-qx18 .site-header {
  background: linear-gradient(180deg, #0a2a50, #001030);
}
.site-qx18 .star-bg {
  background:
    radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 40px 70px, #8888ff, transparent),
    radial-gradient(1px 1px at 90px 40px, #fff, transparent),
    radial-gradient(2px 2px at 130px 80px, #aaccff, transparent),
    radial-gradient(1px 1px at 160px 20px, #fff, transparent),
    #000820;
  color: #aaccff;
  padding: 50px 40px;
  margin: -30px -40px 30px;
  text-align: center;
}
.site-qx18 .star-bg h2 { font-size: 32px; color: #fff; letter-spacing: 3px; }
.site-qx18 .star-bg p { margin-top: 10px; opacity: .7; }
.project-info {
  line-height: 1.9;
  font-size: 14px;
  color: #333;
}
.project-info p { margin-bottom: 12px; }
.access-panel {
  margin-top: 30px;
  padding: 20px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.file-reader {
  background: #1a1a1a;
  color: #30ff80;
  font-family: "Consolas", monospace;
  padding: 20px;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 20px;
  border-radius: 4px;
  white-space: pre-wrap;
}
.file-reader .red { color: inherit; }
.file-reader .yellow { color: inherit; }
.file-reader .cyan { color: inherit; }

/* ========== 企业网站 ========== */
.site-enterprise .site-header {
  background: linear-gradient(180deg, #404050, #202030);
}
.site-enterprise .hero-banner {
  background: linear-gradient(135deg, #303050, #50507a, #7070a0);
  color: #fff;
  padding: 50px 40px;
  margin: -30px -40px 30px;
}
.site-enterprise .hero-banner h2 { font-size: 28px; margin-bottom: 10px; }
.site-enterprise .hero-banner p { opacity: .85; }
.enterprise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}
.enterprise-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 16px;
  background: #fafafa;
}
.enterprise-card h4 {
  color: #30405a;
  font-size: 15px;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}
.enterprise-card p {
  font-size: 12px;
  color: #666;
  line-height: 1.7;
}
.client-list {
  list-style: none;
  padding: 10px 0;
}
.client-list li {
  padding: 8px 12px;
  border-bottom: 1px dashed #ddd;
  font-size: 13px;
  display: flex; justify-content: space-between;
}
.client-list li span.client-tag {
  background: #e8eef8;
  color: #2c5aa0;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
}
.enterprise-login {
  margin-top: 30px;
  padding: 20px;
  background: #303045;
  color: #ccc;
  border-radius: 4px;
}
.enterprise-login h4 { color: #fff; margin-bottom: 14px; }
.enterprise-login .form-row label { color: #bbb; }
.internal-doc {
  background: #fff5f5;
  border: 1px solid #e0c0c0;
  padding: 20px 28px;
  margin-top: 20px;
  line-height: 2;
  font-size: 13px;
}
.internal-doc h5 {
  color: #701010;
  font-size: 15px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0a0a0;
}

/* ========== 时间线工具 ========== */
.timeline-tool {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin-top: 20px;
}
.timeline-pool, .timeline-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  padding: 14px;
  min-height: 60px;
  border-radius: 3px;
}
.timeline-pool {
  background: #fff;
  border: 1px dashed #bbb;
}
.timeline-slots {
  background: #e8eef8;
  border: 2px solid #2c5aa0;
}
.time-chip {
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #888;
  border-radius: 16px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: all .15s;
}
.time-chip:hover { background: #2c5aa0; color: #fff; border-color: #2c5aa0; }
.time-chip.used { opacity: .25; cursor: default; }
.timeline-slots .time-chip { background: #2c5aa0; color: #fff; border-color: #1a3a60; }
.timeline-slots .time-chip:hover { background: #c03030; border-color: #701010; }
.timeline-result {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 3px;
  font-size: 13px;
  display: none;
}
.timeline-result.success { background: #e0f5e0; border: 1px solid #4a9c4a; color: #206020; display: block; }
.timeline-result.failed { background: #ffe0e0; border: 1px solid #c04a4a; color: #602020; display: block; }

/* ========== 结局 ========== */
#ending-screen {
  position: fixed; inset: 0;
  background: #000;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 60px;
  color: #ddd;
  overflow: auto;
}
#ending-screen.active { display: flex; }
.ending-title {
  font-size: 28px;
  color: #fff;
  letter-spacing: 6px;
  margin-bottom: 40px;
  border-bottom: 1px solid #555;
  padding-bottom: 16px;
}
.ending-text {
  max-width: 640px;
  line-height: 2.2;
  font-size: 15px;
  white-space: pre-line;
  margin-bottom: 40px;
}
.ending-text .highlight { color: inherit; }
.ending-photo {
  width: 420px;
  height: 280px;
  background: linear-gradient(135deg, #333, #1a1a1a);
  border: 8px solid #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  margin: 20px auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #888;
  flex-direction: column;
  gap: 8px;
}
.ending-photo .photo-line {
  display: flex; gap: 20px;
}
.ending-photo .person {
  width: 40px; height: 60px;
  background: #555;
  border-radius: 20px 20px 4px 4px;
  position: relative;
}
.ending-photo .person::before {
  content: '';
  width: 18px; height: 18px;
  background: #ddbb99;
  border-radius: 50%;
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
}
.ending-photo .person.special { background: #aa6666; }
.ending-photo .person.special::before { background: #ffddbb; }
.ending-photo .person.future { 
  background: #446688; 
  box-shadow: 0 0 12px rgba(100,150,255,.5);
  opacity: .7;
}
.ending-photo-back {
  margin-top: 10px;
  padding: 16px 24px;
  background: #f5e8c8;
  color: #442200;
  font-family: "楷体", serif;
  width: 420px;
  margin-left: auto; margin-right: auto;
  text-align: center;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  transform: rotate(-1deg);
}
.ending-final {
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid #333;
  max-width: 640px;
  color: #88aacc;
  font-size: 14px;
  line-height: 2;
}

.site-404 {
  padding: 100px 40px;
  text-align: center;
  color: #666;
}
.site-404 h2 { font-size: 72px; color: #aaa; margin-bottom: 20px; }

/* ========== 游戏内模态框 ========== */
.game-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}
.game-modal-overlay.active { display: flex; }
@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }
@keyframes slideIn { from {transform:translateY(-20px); opacity:0;} to {transform:translateY(0); opacity:1;} }

.game-modal {
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  min-width: 320px;
  max-width: 520px;
  animation: slideIn 0.25s;
  overflow: hidden;
}
.game-modal-header {
  background: linear-gradient(180deg, #4a6aa0, #2d4870);
  color: #fff;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: bold;
}
.game-modal-body {
  padding: 24px 28px;
  font-size: 14px;
  line-height: 1.9;
  color: #333;
  white-space: pre-line;
  max-height: 400px;
  overflow-y: auto;
}
.game-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: #f8f8f8;
}
.game-modal-btn {
  padding: 6px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  background: #2c5aa0;
  color: #fff;
}
.game-modal-btn:hover { background: #1a3a60; }
.game-modal-btn.secondary { background: #888; }
.game-modal-btn.secondary:hover { background: #666; }
.game-modal-btn.danger { background: #a02c2c; }
.game-modal-btn.danger:hover { background: #701010; }

/* ========== 前言介绍页 ========== */
#prologue-screen {
  position: fixed; inset: 0;
  background: #000;
  z-index: 9998;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: auto;
}
#prologue-screen.active { display: flex; }
.prologue-title {
  font-size: 42px;
  color: #c8d8f0;
  letter-spacing: 16px;
  margin-bottom: 40px;
  text-shadow: 0 0 30px rgba(100,150,255,.3);
  font-weight: 300;
}
.prologue-text {
  max-width: 640px;
  font-size: 16px;
  line-height: 2.2;
  color: #aaa;
  white-space: pre-line;
  text-align: center;
}
.prologue-text .highlight { color: inherit; font-weight: inherit; }
.prologue-text .dim { color: #666; font-size: 14px; }
.prologue-text .question { color: inherit; font-style: italic; }
.prologue-cursor { display: inline-block; width: 12px; height: 20px; background: #ffcc88; animation: blink 0.8s infinite; margin-left: 4px; vertical-align: middle; }
.prologue-start-btn {
  margin-top: 40px;
  padding: 12px 36px;
  background: transparent;
  border: 1px solid #4a6aa0;
  color: #c8d8f0;
  font-size: 14px;
  letter-spacing: 4px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s;
  display: none;
}
.prologue-start-btn:hover {
  background: #4a6aa0;
  color: #fff;
  box-shadow: 0 0 20px rgba(74,106,160,.5);
}
.prologue-start-btn.show { display: block; }
.prologue-hint {
  margin-top: 20px;
  font-size: 12px;
  color: #555;
  font-style: italic;
}

/* ========== 开始菜单 ========== */
#start-menu {
  position: fixed;
  bottom: 36px; left: 0;
  width: 220px;
  background: linear-gradient(180deg, #3c4a60, #2a3448);
  border: 1px solid #5a6a80;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  display: none;
  z-index: 600;
  box-shadow: 0 -4px 20px rgba(0,0,0,.5);
  overflow: hidden;
}
#start-menu.active { display: block; }
.start-menu-header {
  background: linear-gradient(180deg, #4a6aa0, #2d4870);
  padding: 12px;
  color: #fff;
  font-size: 14px;
  border-bottom: 1px solid #5a6a80;
  display: flex; align-items: center; gap: 8px;
}
.start-menu-avatar {
  width: 32px; height: 32px;
  background: #8aa;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
}
.start-menu-list { padding: 6px 0; }

/* ========== 游戏内自定义右键菜单（Windows 98/XP 经典风格） ========== */
.ctx-menu {
  position: fixed;
  z-index: 9999;
  min-width: 220px;
  background: linear-gradient(180deg, #f5f5f5 0%, #ecebe5 100%);
  border: 1px solid #7e7e81;
  box-shadow:
    0 0 0 1px #fff inset,
    2px 3px 10px rgba(0,0,0,0.45);
  padding: 2px;
  margin: 0;
  list-style: none;
  display: none;
  font-size: 12px;
  font-family: "Microsoft YaHei", "宋体", Tahoma, sans-serif;
  color: #222;
  user-select: none;
  border-radius: 2px;
}
.ctx-menu.active { display: block; animation: ctxFadeIn .09s ease-out; }
@keyframes ctxFadeIn {
  from { opacity: 0; transform: translateY(-4px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ctx-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 28px 5px 8px;
  margin: 1px 0;
  cursor: pointer;
  border-radius: 1px;
  line-height: 1.3;
}
.ctx-item:hover:not(.disabled):not(.checked-hover) {
  background: linear-gradient(180deg, #316ac5, #24519c);
  color: #fff;
}
.ctx-item.disabled {
  color: #9d9d9d;
  cursor: default;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}
.ctx-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  font-size: 13px;
}
.ctx-label {
  flex: 1;
  white-space: nowrap;
}
.ctx-short {
  color: #777;
  font-size: 11px;
  padding-left: 18px;
}
.ctx-item:hover:not(.disabled) .ctx-short { color: #cfe0ff; }
.ctx-arrow {
  font-size: 9px;
  color: #555;
  padding-left: 8px;
}
.ctx-item:hover:not(.disabled) .ctx-arrow { color: #fff; }
.ctx-sep {
  height: 1px;
  background: #d4d0c8;
  border-bottom: 1px solid #fff;
  margin: 3px 2px;
}
.ctx-item.checked::before {
  content: "✓";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: bold;
  color: #222;
}
.ctx-item.checked { padding-left: 24px; }
.ctx-item.checked:hover::before { color: #fff; }

/* 子菜单 */
.ctx-submenu {
  position: absolute;
  top: -3px;
  left: 100%;
  min-width: 180px;
  background: linear-gradient(180deg, #f5f5f5 0%, #ecebe5 100%);
  border: 1px solid #7e7e81;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.45), 0 0 0 1px #fff inset;
  padding: 2px;
  margin: 0;
  list-style: none;
  display: none;
  border-radius: 2px;
}
.ctx-item.has-sub:hover > .ctx-submenu { display: block; }

/* 刷新时图标抖动动画 */
@keyframes desktopRefreshShake {
  0%   { transform: translate(0,0); opacity: .8; }
  20%  { transform: translate(-1px, 1px) scale(0.99); }
  40%  { transform: translate(1px, -1px); }
  60%  { transform: translate(-1px, -1px) scale(1.01); opacity: 1; }
  80%  { transform: translate(1px, 1px); }
  100% { transform: translate(0,0) scale(1); }
}
.desktop-refresh-anim {
  animation: desktopRefreshShake .45s ease-in-out 2;
}
.sm-item {
  padding: 8px 14px;
  color: #dde;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(90,106,128,.3);
}
.sm-item:last-child { border-bottom: none; }
.sm-item:hover {
  background: rgba(100,150,220,.3);
  color: #fff;
}
.sm-item .icon { font-size: 18px; width: 24px; text-align: center; }

/* ========== 新桌面图标 ========== */
.icon-qq {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><circle cx='24' cy='22' r='18' fill='%233aa6ff'/><ellipse cx='20' cy='20' rx='3' ry='4' fill='%23fff'/><ellipse cx='28' cy='20' rx='3' ry='4' fill='%23fff'/><circle cx='20' cy='21' r='1.5' fill='%23222'/><circle cx='28' cy='21' r='1.5' fill='%23222'/><ellipse cx='24' cy='28' rx='6' ry='3' fill='%23e88'/><path d='M12 38 Q24 46 36 38' fill='%233aa6ff' stroke='%23fff' stroke-width='1'/><circle cx='36' cy='36' r='4' fill='%23e80'/><text x='36' y='40' font-size='8' fill='%23fff' text-anchor='middle'>Q</text></svg>");
}
.icon-diary {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><rect x='10' y='4' width='28' height='40' rx='2' fill='%23c94a5a' stroke='%238b2233' stroke-width='2'/><rect x='10' y='4' width='28' height='8' fill='%238b2233'/><circle cx='24' cy='24' r='8' fill='none' stroke='%23ffd' stroke-width='1.5'/><line x1='24' y1='18' x2='24' y2='30' stroke='%23ffd' stroke-width='1'/><line x1='18' y1='24' x2='30' y2='24' stroke='%23ffd' stroke-width='1'/><rect x='14' y='36' width='20' height='4' rx='1' fill='%23ffd'/><line x1='18' y1='38' x2='30' y2='38' stroke='%238b2233' stroke-width='0.5'/></svg>");
}
.icon-clock {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><circle cx='24' cy='24' r='20' fill='%23f0e8d8' stroke='%23888' stroke-width='2'/><line x1='24' y1='24' x2='24' y2='10' stroke='%23333' stroke-width='2'/><line x1='24' y1='24' x2='34' y2='24' stroke='%23333' stroke-width='1.5'/><circle cx='24' cy='24' r='2' fill='%23c00'/><line x1='24' y1='8' x2='24' y2='12' stroke='%23333' stroke-width='2'/><line x1='24' y1='36' x2='24' y2='40' stroke='%23333' stroke-width='2'/><line x1='8' y1='24' x2='12' y2='24' stroke='%23333' stroke-width='2'/><line x1='36' y1='24' x2='40' y2='24' stroke='%23333' stroke-width='2'/></svg>");
}
.icon-thispc {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><rect x='6' y='10' width='36' height='24' rx='2' fill='%23e0e3e8' stroke='%23506070' stroke-width='2'/><rect x='9' y='13' width='30' height='18' fill='%23303840' stroke='%23202830'/><rect x='9' y='13' width='30' height='18' fill='url(%23scrn)'/><defs><linearGradient id='scrn' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%237fc2ff'/><stop offset='1' stop-color='%233860a0'/></linearGradient></defs><rect x='18' y='36' width='12' height='3' fill='%23506070'/><rect x='12' y='38' width='24' height='3' rx='1' fill='%23607080'/><circle cx='33' cy='22' r='4' fill='none' stroke='%23fff' stroke-width='1.5' opacity='.6'/><rect x='14' y='18' width='14' height='2' rx='1' fill='%23fff' opacity='.6'/><rect x='14' y='23' width='10' height='1.5' rx='.5' fill='%23fff' opacity='.4'/></svg>");
}
.icon-recycle {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><rect x='10' y='14' width='28' height='26' rx='1' fill='%23d8dde4' stroke='%23333' stroke-width='2'/><path d='M8 14 L40 14' stroke='%23333' stroke-width='2'/><rect x='18' y='10' width='12' height='4' fill='%23d8dde4' stroke='%23333' stroke-width='2'/><path d='M18 20 L20 38 M24 20 L24 38 M30 20 L28 38' stroke='%23333' stroke-width='1.5'/><path d='M14 14 Q14 8 20 8' fill='none' stroke='%23333' stroke-width='1.5'/><path d='M34 14 Q34 8 28 8' fill='none' stroke='%23333' stroke-width='1.5'/></svg>");
}

/* ========== 资源管理器（此电脑 + 回收站 共用） ========== */
#thispc-window, #recyclebin-window { width: 680px; height: 520px; top: 70px; left: 220px; }
.explorer { display: flex; flex-direction: column; height: 100%; background: #fff; font-family: "Microsoft YaHei", Tahoma, sans-serif; font-size: 12px; }
.explorer-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #f0f2f5, #e1e5ea);
  border-bottom: 1px solid #c8ccd1;
}
.exp-btn {
  padding: 4px 10px; border: 1px solid #aab; border-radius: 3px;
  background: linear-gradient(180deg, #fff, #e5e8ec);
  cursor: pointer;
  font-size: 12px;
}
.exp-btn:hover { background: linear-gradient(180deg, #fff, #cfd8ef); border-color: #6080c0; }
.exp-btn.primary { background: linear-gradient(180deg, #e8ecf5, #c9d2ee); border-color: #6080c0; }
.exp-btn:disabled { opacity: .5; cursor: default; background: #eee; border-color: #ccc; }
.exp-addressbar {
  flex: 1;
  display: flex; align-items: center;
  border: 1px solid #aab;
  background: #fff;
  padding: 3px 8px;
  border-radius: 2px;
  gap: 6px;
  min-width: 0;
}
.exp-addressbar .sep { color: #999; }
.exp-addressbar .seg { padding: 2px 4px; border-radius: 2px; cursor: pointer; }
.exp-addressbar .seg:hover { background: #dde8ff; }

.explorer-body { flex: 1; display: flex; min-height: 0; }
.explorer-side {
  width: 170px;
  background: linear-gradient(180deg, #edf2fa, #dde5f2);
  border-right: 1px solid #c8ccd1;
  padding: 10px 6px;
  overflow-y: auto;
}
.exp-side-title { font-size: 11px; color: #5a6d88; font-weight: bold; padding: 6px 4px; }
.exp-side-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px; border-radius: 2px; cursor: pointer;
}
.exp-side-item:hover { background: #cfe0ff; }
.exp-side-item.active { background: #a9c5ee; font-weight: bold; }
.exp-side-item .ico { font-size: 14px; }

.explorer-content {
  flex: 1;
  padding: 14px;
  overflow: auto;
  background:
    linear-gradient(180deg, transparent, rgba(120,160,220,0.04)),
    #fff;
}
.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 12px 6px;
}
.exp-file {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
}
.exp-file:hover { background: #e8f0ff; border-color: #80a8e0; }
.exp-file.selected { background: #d0e0ff; border-color: #4080d0; }
.exp-file .fi {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.exp-file .fn { font-size: 11px; line-height: 1.3; color: #222; word-break: break-all; }
.exp-file.danger .fn { color: #b01020; font-weight: bold; }

.exp-empty {
  text-align: center; padding: 40px 20px; color: #888;
}
.exp-empty .big { font-size: 48px; margin-bottom: 10px; opacity: .5; }

/* 回收站列表模式 */
.exp-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.exp-list-table th {
  text-align: left; padding: 6px 8px;
  background: linear-gradient(180deg, #eff2f6, #e1e6ec);
  border-bottom: 1px solid #c0c6ce;
  font-weight: normal; color: #404850;
}
.exp-list-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #ececec;
}
.exp-list-table tr.selected td { background: #d0e0ff; }
.exp-list-table tr:hover td { background: #e8f0ff; }

/* 状态栏 */
.explorer-status {
  border-top: 1px solid #d0d4d8;
  padding: 4px 12px;
  background: linear-gradient(180deg, #f2f4f7, #e6e8ec);
  font-size: 11px;
  color: #556;
  display: flex; justify-content: space-between;
}

/* 内网通低权限主题（灰蓝色，按钮锁） */
.im-container.lowperm .im-left-panel {
  background: linear-gradient(180deg, #3a4758, #5a6472 100%);
}
.im-container.lowperm .im-avatar-bar { background: rgba(0,0,0,0.18); }
.im-container.lowperm .im-contact.active { background: rgba(170,180,200,0.22); border-color: rgba(200,210,230,0.6); }
.im-container.lowperm .im-right-panel { background: linear-gradient(180deg, #2f3845 0%, #1f2630 100%); }
.im-container.lowperm .im-chat-title { background: linear-gradient(180deg, #3a4758, #2a333e); }
.lowperm-banner {
  background: linear-gradient(90deg, #8a4028, #a05a38);
  color: #fff0d0;
  padding: 6px 12px;
  font-size: 11px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.2);
}
.lowperm-banner b { color: #ffe0a0; }

/* ========== QQ聊天窗口 ========== */
#qq-window { width: 620px; height: 560px; top: 60px; left: 200px; }
.qq-container { display: flex; flex-direction: row; height: 100%; background: linear-gradient(180deg, #e8f0fa 0%, #d0e0f0 100%); }
.qq-left-panel {
  width: 180px;
  background: #fafafa;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
}
.qq-avatar-bar {
  padding: 12px;
  background: linear-gradient(180deg, #4a6aa0, #2d4870);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.qq-contact-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}
.qq-contact {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 6px; cursor: pointer;
  border-radius: 4px;
  margin-bottom: 2px;
  border: 1px solid transparent;
}
.qq-contact:hover { background: #f0f8ff; }
.qq-contact.active { background: #e0f0ff; border-color: #88bbee; }
.qq-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  flex-shrink: 0;
}
.qq-avatar-xuyan { background: linear-gradient(135deg, #f09090, #d06080); }
.qq-avatar-me { background: linear-gradient(135deg, #70a0e0, #4070c0); }
.qq-contact-info { flex: 1; min-width: 0; }
.qq-contact-name { font-size: 12px; font-weight: bold; color: #333; }
.qq-contact-msg { font-size: 10px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qq-contact-time { font-size: 10px; color: #aaa; }

.qq-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.qq-chat-title {
  font-size: 13px;
  font-weight: bold;
  padding: 8px 12px;
  background: linear-gradient(180deg, #4a6aa0, #2d4870);
  color: #fff;
  text-align: center;
  border-bottom: 1px solid #bbb;
}

.qq-chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f4f8fc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qq-msg {
  display: flex;
  gap: 6px;
  max-width: 85%;
}
.qq-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.qq-msg.other { align-self: flex-start; }
.qq-msg-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
  flex-shrink: 0;
}
.qq-msg-bubble {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  position: relative;
  white-space: pre-wrap;
  word-break: break-word;
}
.qq-msg.other .qq-msg-bubble { background: #fff; border: 1px solid #ddd; border-top-left-radius: 10px; border-bottom-left-radius: 2px; }
.qq-msg.me .qq-msg-bubble { background: #95ec69; border: 1px solid #7cc05a; border-top-right-radius: 10px; border-bottom-right-radius: 2px; }
.qq-msg-time {
  font-size: 10px;
  color: #999;
  text-align: center;
  margin: 4px 0;
}
.qq-day-divider {
  text-align: center;
  color: #999;
  font-size: 11px;
  margin: 10px 0;
}

/* ========== 启明内网通（校长/导师专用加密通讯） ========== */
#im-window { width: 640px; height: 560px; top: 70px; left: 200px; }
.im-container { display: flex; flex-direction: row; height: 100%; }
.im-left-panel {
  width: 200px;
  background: linear-gradient(180deg, #0f2742 0%, #1a3d6e 100%);
  color: #e8f0ff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #0c2040;
}
.im-avatar-bar {
  padding: 12px;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.im-avatar {
  width: 40px; height: 40px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  flex-shrink: 0;
  font-weight: bold;
  border: 1px solid rgba(255,255,255,0.2);
}
.im-avatar.principal { background: linear-gradient(135deg, #c0504e, #7a1a18); }
.im-avatar.mentor { background: linear-gradient(135deg, #724fbf, #3b1f7a); }
.im-user-meta { flex:1; min-width: 0; }
.im-user-name { font-size: 13px; font-weight: bold; }
.im-user-role { font-size: 10px; opacity: 0.7; margin-top: 2px; }
.im-user-status {
  width: 8px; height: 8px; border-radius: 50%;
  background: #36d18a;
  box-shadow: 0 0 6px rgba(54,209,138,0.7);
  margin-left: 4px;
}
.im-enc-banner {
  padding: 6px 10px;
  font-size: 10px;
  background: rgba(120, 60, 20, 0.55);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #ffe0a8;
  letter-spacing: 0.3px;
}
.im-contact-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.im-contact {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 6px; cursor: pointer;
  border-radius: 5px;
  margin-bottom: 3px;
  border: 1px solid transparent;
  position: relative;
}
.im-contact:hover { background: rgba(255,255,255,0.08); }
.im-contact.active { background: rgba(90,160,255,0.22); border-color: rgba(110,180,255,0.6); }
.im-contact-avatar {
  width: 36px; height: 36px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
  background: linear-gradient(135deg, #385580, #1c2f4f);
}
.im-contact-avatar.level-a { background: linear-gradient(135deg, #d04538, #7a1818); }
.im-contact-avatar.level-b { background: linear-gradient(135deg, #7a4fc0, #3b1f7a); }
.im-contact-avatar.level-c { background: linear-gradient(135deg, #c08a2e, #6b4710); }
.im-contact-info { flex:1; min-width:0; }
.im-contact-name { font-size: 12px; font-weight: bold; }
.im-contact-msg { font-size: 10px; opacity: 0.65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-contact-badge {
  position: absolute;
  top: 6px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #e54a43;
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold;
}

.im-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(180deg, #142238 0%, #0c1727 100%);
}
.im-chat-title {
  padding: 10px 14px;
  background: linear-gradient(180deg, #1a3154, #0f2238);
  color: #e8f0ff;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(100,150,220,0.2);
}
.im-chat-title .sec { font-size: 10px; color: #7cf; font-weight: normal; letter-spacing: 0.5px; }

.im-chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(circle at 20% 10%, rgba(80,150,255,0.08), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(140,90,255,0.08), transparent 50%),
    #0b1424;
}
.im-day-divider {
  text-align: center;
  color: #5d7fa8;
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  align-self: center;
}
.im-msg { display: flex; gap: 8px; max-width: 85%; }
.im-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.im-msg.other { align-self: flex-start; }
.im-msg-avatar {
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
  background: linear-gradient(135deg, #385580, #1c2f4f);
}
.im-msg-bubble {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  position: relative;
  white-space: pre-wrap;
  word-break: break-word;
}
.im-msg.other .im-msg-bubble {
  background: linear-gradient(180deg, #1d2e4b, #15253e);
  border: 1px solid #2a4268;
  color: #dbe8ff;
}
.im-msg.me .im-msg-bubble {
  background: linear-gradient(180deg, #284e7e, #1a395f);
  border: 1px solid #3962a0;
  color: #fff;
}
.im-msg-time {
  font-size: 10px;
  color: #5c7ca6;
  text-align: center;
  margin: 2px 0;
}
.im-input-area {
  border-top: 1px solid rgba(100,150,220,0.2);
  background: #0c1828;
  padding: 8px;
}
.im-input-box {
  width: 100%;
  min-height: 50px;
  background: #0a1422;
  border: 1px solid #233958;
  color: #cfe0ff;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 12px;
  resize: none;
}
.im-tip-bar {
  font-size: 10px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.03);
  color: #6a8db8;
  border-top: 1px solid rgba(100,150,220,0.1);
  display: flex;
  justify-content: space-between;
}
.im-tip-bar .warn { color: inherit; }

.qq-input-area {
  border-top: 1px solid #bbb;
  background: #fff;
  padding: 8px;
}
.qq-input-box {
  width: 100%;
  min-height: 60px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 13px;
  resize: none;
  outline: none;
  font-family: inherit;
}
.qq-input-box:focus { border-color: #6699cc; }
.qq-send-btn {
  margin-top: 6px;
  padding: 4px 16px;
  background: #4a7ab8;
  border: none;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}
.qq-send-btn:hover { background: #3a6a98; }

/* ========== 日记窗口 ========== */
#diary-window { width: 520px; height: 600px; top: 40px; left: 80px; }
.diary-container {
  background: linear-gradient(180deg, #f5ecd2 0%, #ede0c0 100%);
  min-height: 100%;
  font-family: "楷体", "KaiTi", "STKaiti", serif;
  color: #333;
  position: relative;
  background-image: repeating-linear-gradient(transparent, transparent 31px, rgba(139,115,85,.15) 32px);
}
.diary-entry {
  padding: 30px 40px;
  border-bottom: 1px dashed rgba(139,115,85,.3);
  min-height: 100%;
  position: relative;
}
.diary-date {
  font-size: 14px;
  color: #665544;
  text-align: right;
  margin-bottom: 16px;
  font-family: "Consolas", monospace;
}
.diary-weather {
  text-align: right;
  font-size: 12px;
  color: #887766;
  margin-bottom: 20px;
}
.diary-content {
  font-size: 15px;
  line-height: 2.2;
  color: #3a2a1a;
  text-indent: 2em;
}
.diary-content strong { color: inherit; }
.diary-content .highlight-red { color: inherit; font-weight: inherit; }
.diary-content .hidden { color: transparent; text-shadow: 0 0 8px rgba(139,115,85,.6); }
.diary-content .hidden:hover { color: inherit; text-shadow: none; }
.diary-illustration {
  margin: 20px 0;
  padding: 14px;
  background: rgba(255,255,255,.4);
  border: 1px dashed rgba(139,115,85,.4);
  border-radius: 4px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #554433;
  white-space: pre;
  text-align: center;
  overflow-x: auto;
}
.diary-illustration-label {
  font-size: 11px;
  color: #887766;
  margin-bottom: 6px;
  font-family: "楷体", serif;
  text-align: center;
  font-style: italic;
}
.diary-nav {
  position: absolute;
  bottom: 10px; right: 20px;
  display: flex; gap: 8px;
}
.diary-nav button {
  padding: 4px 12px;
  background: #d9c9a3;
  border: 1px solid #8b7355;
  color: #443322;
  font-family: "楷体", serif;
  cursor: pointer;
  border-radius: 2px;
}
.diary-nav button:hover { background: #c9b993; }
.diary-nav button:disabled { opacity: .4; cursor: default; }
.diary-entry-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(200,80,80,.2);
  color: #8b2233;
  border-radius: 3px;
  font-size: 11px;
  margin-bottom: 12px;
  font-family: "楷体", serif;
}

/* ========== 时钟/控制面板 ========== */
#clock-window { width: 380px; height: 320px; top: 100px; left: 100px; }
.clock-container {
  background: linear-gradient(180deg, #f8f8f8, #e8e8e8);
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.clock-face {
  width: 140px; height: 140px;
  border: 3px solid #444;
  border-radius: 50%;
  position: relative;
  background: #fff;
  box-shadow: inset 0 0 10px rgba(0,0,0,.1);
}
.clock-hand {
  position: absolute;
  bottom: 50%; left: 50%;
  transform-origin: bottom center;
  background: #333;
  border-radius: 1px;
}
.clock-hand.hour { width: 3px; height: 36px; margin-left: -1.5px; }
.clock-hand.minute { width: 2px; height: 48px; margin-left: -1px; }
.clock-hand.second { width: 1px; height: 52px; background: #c00; margin-left: -0.5px; }
.clock-center {
  position: absolute; top: 50%; left: 50%;
  width: 8px; height: 8px; background: #333;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.clock-digital {
  font-family: "Consolas", monospace;
  font-size: 18px;
  color: #333;
  background: #fff;
  padding: 6px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.clock-set-panel {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  justify-content: center;
}
.clock-set-panel input {
  width: 52px;
  padding: 4px;
  border: 1px solid #aaa;
  border-radius: 3px;
  font-family: "Consolas", monospace;
  font-size: 13px;
  text-align: center;
}
.clock-set-panel .label { font-size: 12px; color: #666; }
.clock-apply-btn {
  padding: 6px 16px;
  background: #4a6aa0;
  border: none;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}
.clock-apply-btn:hover { background: #2d4870; }
.clock-note {
  font-size: 11px;
  color: #999;
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}
.clock-hint-wrong { color: #888; }
.clock-hint-correct { color: #888; }

/* ========== 锁屏/登录界面 ========== */
#lock-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #1a2340 0%, #0a0f20 100%);
  z-index: 7000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
}
#lock-screen.active { display: flex; }
.lock-time {
  font-size: 72px;
  font-family: "Segoe UI Light", "Microsoft YaHei", sans-serif;
  font-weight: 100;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
  margin-bottom: 6px;
}
.lock-date {
  font-size: 18px;
  color: #aac;
  margin-bottom: 60px;
}
.lock-title {
  font-size: 20px;
  margin-bottom: 30px;
  color: #ccd;
  letter-spacing: 4px;
}
.lock-user-list {
  display: flex;
  gap: 24px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 720px;
}
.lock-user {
  width: 100px;
  text-align: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 6px;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.lock-user:hover { background: rgba(255,255,255,.08); border-color: rgba(150,200,255,.3); }
.lock-user.selected { background: rgba(100,150,220,.25); border-color: rgba(150,200,255,.6); }
.lock-user-avatar {
  width: 70px; height: 70px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  border: 2px solid rgba(255,255,255,.3);
}
.avatar-me { background: linear-gradient(135deg, #5080c0, #205080); }
.avatar-xuyan { background: linear-gradient(135deg, #e88080, #a04060); }
.avatar-principal { background: linear-gradient(135deg, #80a080, #406050); }
.avatar-mentor { background: linear-gradient(135deg, #a090d0, #605090); }
.lock-user-name {
  font-size: 13px;
  color: #dde;
  margin-bottom: 3px;
}
.lock-user-role {
  font-size: 10px;
  color: #889;
}
.lock-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  width: 360px;
}
.lock-password-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(150,200,255,.4);
  background: rgba(255,255,255,.05);
  color: #fff;
  border-radius: 3px;
  font-size: 13px;
  outline: none;
}
.lock-password-input:focus { border-color: #6699ff; background: rgba(255,255,255,.1); }
.lock-login-btn {
  padding: 8px 20px;
  background: linear-gradient(180deg, #4a7ab8, #2a5080);
  border: 1px solid rgba(150,200,255,.3);
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
}
.lock-login-btn:hover { background: linear-gradient(180deg, #5a8ac8, #3a6090); }
.lock-login-btn:disabled { opacity: .5; cursor: default; }
.lock-err {
  margin-top: 16px;
  min-height: 18px;
  color: #ff8888;
  font-size: 12px;
}
.lock-switch-back {
  position: absolute;
  bottom: 24px;
  left: 24px;
  font-size: 12px;
  color: #889;
  cursor: pointer;
}
.lock-switch-back:hover { color: #aac; }
.lock-current-user {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: #889;
}
.lock-current-user .dot {
  width: 10px; height: 10px; border-radius: 50%; background: #4a4;
}

/* ========== 管理员专属文件窗口 ========== */
#file-viewer-window { width: 560px; height: 440px; top: 80px; left: 240px; }
.file-viewer {
  height: 100%;
  background: #fff8e8;
  font-family: "宋体", "SimSun", serif;
  padding: 30px 40px;
  overflow-y: auto;
  color: #222;
  line-height: 1.9;
  position: relative;
}
.file-viewer .doc-head {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #c00;
  color: #c00;
}
.file-viewer .doc-secret {
  text-align: center;
  font-size: 12px;
  color: #c00;
  letter-spacing: 8px;
  margin-bottom: 16px;
  border: 1px dashed #c00;
  padding: 3px;
}
.file-viewer .doc-meta {
  text-align: right;
  font-size: 12px;
  color: #666;
  margin-bottom: 20px;
}
.file-viewer .doc-stamp {
  position: absolute;
  right: 50px;
  bottom: 60px;
  width: 120px; height: 120px;
  border: 3px solid #c00;
  border-radius: 50%;
  transform: rotate(-10deg);
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c00;
  font-size: 14px;
  text-align: center;
  line-height: 1.3;
  font-weight: bold;
  padding: 8px;
}

/* ========== 学习管理系统（LMS） ========== */
#lms-window { width: 720px; height: 560px; top: 50px; left: 160px; }
.lms-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f0f4f8;
  font-size: 13px;
}
.lms-topbar {
  background: linear-gradient(180deg, #2d5a8a, #1a3a60);
  color: #fff;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.lms-topbar .lms-user {
  display: flex; align-items: center; gap: 8px;
}
.lms-topbar .lms-user .lms-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: #f0c060; color: #333;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: bold;
}
.lms-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.lms-sidebar {
  width: 160px;
  background: #e4ecf4;
  border-right: 1px solid #c0d0e0;
  padding: 8px 0;
}
.lms-nav-item {
  padding: 10px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  font-size: 13px;
  color: #2a4870;
}
.lms-nav-item:hover { background: #d0e0f0; }
.lms-nav-item.active {
  background: #fff;
  border-left-color: #2d5a8a;
  font-weight: bold;
  color: #1a3a60;
}
.lms-nav-item .icon { margin-right: 6px; }
.lms-content {
  flex: 1;
  background: #fff;
  padding: 18px 24px;
  overflow-y: auto;
}
.lms-content h3 {
  color: #1a3a60;
  border-bottom: 2px solid #2d5a8a;
  padding-bottom: 8px;
  margin-bottom: 16px;
  font-size: 16px;
}
.lms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 16px;
}
.lms-table th, .lms-table td {
  border: 1px solid #d0d8e0;
  padding: 6px 10px;
  text-align: left;
}
.lms-table th {
  background: #e4ecf4;
  color: #1a3a60;
  font-weight: bold;
}
.lms-table tr:nth-child(even) td { background: #f8fbff; }
.lms-table .deleted-row td {
  color: #333;
  background: transparent !important;
}
.lms-table .highlight-row td {
  background: transparent !important;
  color: #333;
}
.lms-table .status-active { color: #333; }
.lms-table .status-deleted { color: #333; }
.lms-table .status-transfer { color: #333; }
.lms-filter-bar {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 14px;
  font-size: 12px;
}
.lms-filter-bar input, .lms-filter-bar select {
  padding: 4px 8px;
  border: 1px solid #c0d0e0;
  font-size: 12px;
  border-radius: 3px;
}
.lms-filter-bar button {
  padding: 4px 12px;
  background: #2d5a8a;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}
.lms-filter-bar button:hover { background: #1a3a60; }
.lms-info-card {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-left: 4px solid #999;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 12px;
  line-height: 1.8;
  color: #444;
}
.lms-info-card.warn {
  background: #f8f8f8;
  border-left-color: #999;
  color: #444;
}
.lms-info-card.danger {
  background: #f8f8f8;
  border-left-color: #999;
  color: #444;
}
.lms-log-entry {
  padding: 8px 12px;
  border-bottom: 1px dashed #e0e0e0;
  font-size: 12px;
  line-height: 1.6;
}
.lms-log-entry .log-time { color: #888; font-size: 11px; }
.lms-log-entry .log-action { color: #2d5a8a; font-weight: bold; }
.lms-log-entry .log-target { color: #c04040; }
.lms-log-entry.warn .log-action { color: #c08020; }
.lms-log-entry.danger .log-action { color: #c00; }
.lms-tabs {
  display: flex;
  border-bottom: 1px solid #d0d8e0;
  margin-bottom: 16px;
}
.lms-tab {
  padding: 6px 16px;
  cursor: pointer;
  font-size: 12px;
  color: #555;
  border-bottom: 2px solid transparent;
}
.lms-tab.active {
  color: #1a3a60;
  border-bottom-color: #2d5a8a;
  font-weight: bold;
}

/* ========== 通用软件窗口大小 ========== */
#b317form-window, #mail-window, #exam-window, #schooladmin-window, #accesscontrol-window, #qx18console-window, #dataview-window {
  width: 680px; height: 520px; top: 60px; left: 180px;
}

/* ========== B-317申请单 ========== */
.b317-form {
  height:100%; background:#fff; padding:24px 36px; overflow-y:auto; font-size:13px; line-height:1.9;
}
.b317-form h3 { text-align:center; color:#1a3a60; border-bottom:2px double #2d5a8a; padding-bottom:10px; }
.b317-form .form-line { display:flex; padding:4px 0; }
.b317-form .form-line .label { width:100px; color:#555; }
.b317-form .form-line .val { flex:1; border-bottom:1px solid #888; }
.b317-form .form-section { margin-top:14px; }
.b317-form .form-section h5 { margin:8px 0; color:#1a3a60; }
.b317-form .signature { margin-top:24px; display:flex; justify-content:space-between; }
.b317-form .sign-block { border:1px solid #888; padding:16px 20px; width:28%; text-align:center; color:#555; }
.b317-form .sign-block .signed { color:#1a3a60; font-weight:bold; }
.b317-form .stamp {
  color:#c00; border:3px double #c00; border-radius:50%; width:120px; height:120px;
  display:flex; align-items:center; justify-content:center;
  position:absolute; right:80px; top:180px; transform:rotate(-15deg);
  font-size:12px; font-weight:bold; text-align:center; opacity:.7;
}

/* ========== 邮件系统 ========== */
.mail-app { height:100%; display:flex; flex-direction:column; background:#f8f8f8; font-size:13px; }
.mail-toolbar { background:#e8ecef; padding:8px 14px; border-bottom:1px solid #ccc; display:flex; gap:8px; align-items:center; }
.mail-toolbar button { padding:4px 10px; border:1px solid #aaa; background:#fff; cursor:pointer; font-size:12px; }
.mail-toolbar button:hover { background:#e8f0ff; }
.mail-body { flex:1; display:flex; overflow:hidden; }
.mail-folders { width:140px; background:#f0f2f5; border-right:1px solid #e0e0e0; padding:8px 0; }
.mail-folder { padding:7px 14px; cursor:pointer; font-size:12px; color:#333; }
.mail-folder:hover { background:#e8ecf0; }
.mail-folder.active { background:#2a4870; color:#fff; }
.mail-list { width:220px; background:#fff; border-right:1px solid #e0e0e0; overflow-y:auto; }
.mail-item { padding:8px 10px; border-bottom:1px solid #f0f0f0; cursor:pointer; font-size:12px; }
.mail-item:hover { background:#f8faff; }
.mail-item.active { background:#e6f0ff; border-left:3px solid #2a4870; }
.mail-item.unread { font-weight:bold; }
.mail-item .from { color:#1a3a60; }
.mail-item .subject { color:#333; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mail-item .time { color:#888; font-size:11px; }
.mail-content { flex:1; background:#fff; padding:16px 22px; overflow-y:auto; }
.mail-content .mail-header { border-bottom:1px solid #eee; padding-bottom:10px; margin-bottom:14px; }
.mail-content .mail-header h4 { margin:0 0 6px; color:#1a3a60; font-size:15px; }
.mail-content .mail-header .meta { font-size:12px; color:#666; line-height:1.8; }
.mail-content .mail-body-text { line-height:1.9; color:#222; white-space:pre-wrap; }

/* ========== 三模卷宗 ========== */
.exam-scan {
  height:100%;
  background: repeating-linear-gradient(0deg, #f5f5f0, #f5f5f0 24px, #e8e8d8 25px);
  padding: 24px 32px; overflow-y:auto; font-family:"楷体","KaiTi",serif; color:#2a2020; line-height:1.8;
}
.exam-scan .stamp-top {
  text-align:center; color:#a00; font-weight:bold; letter-spacing:4px;
  padding:4px 0; border-top:3px double #a00; border-bottom:3px double #a00;
  margin-bottom:16px;
}
.exam-scan .score-mark {
  position:relative; float:right; width:90px; height:70px; border:4px double #c00;
  border-radius:6px; color:#c00; display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-family:"黑体"; margin:0 0 12px 16px;
}
.exam-scan .score-mark .n { font-size:28px; font-weight:bold; }
.exam-scan .score-mark .l { font-size:11px; }
.exam-scan .row { display:flex; padding:4px 0; font-size:14px; border-bottom:1px dashed #c0b090; }
.exam-scan .row .l { width:80px; color:#806040; }
.exam-scan .row .v { flex:1; }
.exam-scan .handwrite {
  font-family:"华文行楷","STXingkai",cursive; color:#302060; font-size:16px;
}
.exam-scan .scribble {
  border:2px solid #c00; padding:10px 14px; margin:12px 0; background:#fff8f0; border-radius:4px;
  transform:rotate(-1deg); color:#602020;
}
.exam-scan .scribble .title { font-family:"黑体"; color:#c00; font-size:12px; margin-bottom:4px; }
.exam-scan .teacher-sign {
  margin-top:20px; text-align:right; font-family:"楷体"; color:#2040a0; font-size:18px;
}

/* ========== 校务管理 ========== */
.school-admin { height:100%; display:flex; flex-direction:column; background:#fdf8ed; font-size:13px; }
.sa-top { background:linear-gradient(180deg,#8a4020,#6a2810); color:#fff; padding:10px 18px; font-size:13px; display:flex; justify-content:space-between; align-items:center; }
.sa-body { flex:1; display:flex; overflow:hidden; }
.sa-side { width:160px; background:#f0e0c0; border-right:1px solid #c09060; padding:8px 0; }
.sa-nav { padding:8px 16px; color:#5a3010; cursor:pointer; font-size:13px; border-left:3px solid transparent; }
.sa-nav:hover { background:#e6d0a0; }
.sa-nav.active { background:#fff; border-left-color:#8a4020; font-weight:bold; color:#6a2810; }
.sa-content { flex:1; padding:18px 24px; overflow-y:auto; }
.sa-content h3 { color:#6a2810; border-bottom:2px solid #8a4020; padding-bottom:6px; margin-bottom:14px; font-size:16px; }
.sa-card { background:#fff; border:1px solid #d8c8a8; padding:14px 18px; margin-bottom:14px; line-height:1.8; }
.sa-card.warn { border-left:4px solid #999; background:#f8f8f8; }
.sa-card.danger { border-left:4px solid #999; background:#f8f8f8; }
.sa-table { width:100%; border-collapse:collapse; font-size:12px; }
.sa-table th, .sa-table td { border:1px solid #d0c090; padding:6px 10px; }
.sa-table th { background:#f0e0c0; color:#5a3010; }

/* ========== 门禁总控 ========== */
.access-ctrl { height:100%; background:#0a1520; color:#60e0ff; font-family:"Consolas","Courier New",monospace; font-size:12px; display:flex; flex-direction:column; }
.ac-header { background:#102030; padding:10px 18px; color:#60e0ff; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #204060; }
.ac-header .status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#40e0a0; margin-right:6px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity:.3; } }
.ac-body { flex:1; display:flex; overflow:hidden; }
.ac-gates { width:180px; background:#0f1a28; border-right:1px solid #204060; overflow-y:auto; }
.ac-gate { padding:8px 14px; cursor:pointer; color:#80b0d0; border-left:3px solid transparent; }
.ac-gate:hover { background:#152538; }
.ac-gate.active { background:#1a3050; border-left-color:#60e0ff; color:#fff; }
.ac-gate .gate-name { display:block; }
.ac-gate .gate-time { font-size:10px; color:#608090; }
.ac-log { flex:1; padding:10px 16px; overflow-y:auto; line-height:1.7; }
.ac-log-entry { border-bottom:1px dashed #204060; padding:4px 0; }
.ac-log-entry .tag { display:inline-block; padding:1px 6px; margin-right:8px; border-radius:2px; font-size:11px; }
.ac-log-entry .tag.enter { background:#0a4020; color:#60e080; }
.ac-log-entry .tag.exit { background:#204020; color:#80e0a0; }
.ac-log-entry .tag.alert { background:#401010; color:#ff6060; }
.ac-log-entry .tag.edit { background:#403010; color:#ffc040; }

/* ========== QX18控制台 ========== */
.qx18-console { height:100%; background:#0a0018; color:#c0a0ff; font-family:"Consolas",monospace; font-size:12px; display:flex; flex-direction:column; }
.qx-header { background:linear-gradient(90deg,#200040,#400080); padding:10px 18px; color:#fff; display:flex; justify-content:space-between; align-items:center; }
.qx-header .qx-project { font-weight:bold; letter-spacing:2px; }
.qx-header .qx-ver { color:#c080ff; }
.qx-body { flex:1; display:flex; overflow:hidden; }
.qx-panels { flex:1; padding:14px; overflow-y:auto; display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.qx-panel { background:#150028; border:1px solid #402080; padding:12px; border-radius:4px; }
.qx-panel h5 { color:#c080ff; margin:0 0 8px; padding-bottom:4px; border-bottom:1px dashed #402080; font-size:12px; letter-spacing:1px; }
.qx-panel .metric { display:flex; justify-content:space-between; padding:4px 0; }
.qx-panel .metric .k { color:#8060c0; }
.qx-panel .metric .v { color:#e0c0ff; font-weight:bold; }
.qx-panel .metric .v.danger { color: inherit; }
.qx-panel .metric .v.warn { color: inherit; }
.qx-panel .bar-outer { background:#180030; height:8px; border-radius:2px; overflow:hidden; margin:2px 0 10px; }
.qx-panel .bar-inner { height:100%; background:linear-gradient(90deg,#4080ff,#c040ff); }
.qx-panel .bar-inner.danger { background:linear-gradient(90deg,#4080ff,#c040ff); }
.qx-side { width:220px; background:#150028; border-left:1px solid #402080; padding:12px; overflow-y:auto; }
.qx-side h5 { color:#c080ff; margin:0 0 8px; padding-bottom:4px; border-bottom:1px dashed #402080; }
.qx-subject { padding:8px; margin-bottom:6px; background:#1a0030; border:1px solid #402080; border-radius:3px; cursor:pointer; }
.qx-subject.active { border-color:#a060ff; box-shadow:0 0 8px #8040ff; }
.qx-subject .id { color:#c080ff; font-weight:bold; }
.qx-subject .name { color:#fff; margin-left:6px; }
.qx-subject .status { font-size:11px; color:#8060c0; margin-top:4px; }
.qx-subject .status.s { color:#40e0a0; }
.qx-subject .status.a { color:#ff6060; }
.qx-subject .status.e { color:#ffc040; }

/* ========== 数据分析面板 ========== */
.data-view { height:100%; display:flex; flex-direction:column; background:#fff; font-size:13px; }
.dv-top { background:#f0f4f8; padding:10px 16px; border-bottom:1px solid #c0d0e0; display:flex; gap:10px; align-items:center; }
.dv-top select, .dv-top input { padding:4px 8px; font-size:12px; border:1px solid #a0b0c0; }
.dv-body { flex:1; padding:18px; overflow-y:auto; display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.dv-chart { background:#fff; border:1px solid #c0d0e0; padding:14px; border-radius:4px; }
.dv-chart.full { grid-column: span 2; }
.dv-chart h4 { margin:0 0 10px; color:#1a3a60; font-size:14px; border-bottom:1px solid #e0e8f0; padding-bottom:6px; }
.dv-chart svg { width:100%; height:180px; }
.dv-chart .caption { font-size:11px; color:#888; margin-top:6px; }
.dv-table { width:100%; border-collapse:collapse; font-size:12px; }
.dv-table th, .dv-table td { border:1px solid #d0d8e0; padding:6px 10px; text-align:center; }
.dv-table th { background:#e4ecf4; color:#1a3a60; }
.dv-table tr.special td { background:#fff0f0; color:#c00; font-weight:bold; }

/* ========================================================================== */
/*           移动端 / 触屏设备适配（mode-mobile / mode-touch）                 */
/* ========================================================================== */

/* ---- 触屏基础优化（含平板） ---- */
html.mode-touch, html.mode-mobile {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}
html.mode-touch .desktop-folder,
html.mode-mobile .desktop-folder {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ---- 手机端：桌面图标自动网格化布局，防止超出屏幕 ---- */
html.mode-mobile #desktop {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 4px 80px 4px;
}
html.mode-mobile .desktop-folder {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  display: none;
  width: 72px;
  height: 84px;
  margin: 4px;
  padding: 6px 2px;
}
html.mode-mobile .desktop-folder[style*="display:none"] { display:none !important; }
html.mode-mobile .desktop-folder[style*="display:block"],
html.mode-mobile .desktop-folder[style*="display: block"] { display:inline-block !important; }

/* 桌面图标自适应换行（每行4个） */
html.mode-mobile #desktop {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  justify-content: flex-start;
}

/* 手机端图标更大、更易点击 */
html.mode-mobile .folder-icon {
  width: 48px; height: 48px;
}
html.mode-mobile .desktop-folder > div:last-child {
  font-size: 11px;
  line-height: 1.3;
  max-width: 72px;
  word-break: break-all;
}

/* ---- 手机端窗口：全屏化 ---- */
html.mode-mobile .window {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0;
}
html.mode-mobile .window-body {
  padding: 8px;
  font-size: 13px;
}

/* ---- 手机端任务栏自适应 ---- */
html.mode-mobile .taskbar {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0 4px;
  scrollbar-width: none;
}
html.mode-mobile .taskbar::-webkit-scrollbar { display:none; }
html.mode-mobile .task-item {
  padding: 4px 8px;
  font-size: 11px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.mode-mobile .task-clock {
  font-size: 10px;
  padding: 0 6px;
}

/* ---- 手机端开始菜单：底部弹出 ---- */
html.mode-mobile #start-menu {
  top: auto;
  bottom: 32px;
  left: 0;
  right: 0;
  max-height: 70vh;
  overflow-y: auto;
}
html.mode-mobile .start-menu-list {
  max-height: 60vh;
  overflow-y: auto;
}
html.mode-mobile .sm-item {
  padding: 12px 16px;
  font-size: 14px;
}

/* ---- 手机端窗口标题栏按钮变大 ---- */
html.mode-mobile .window-title {
  height: 36px;
  padding: 0 4px;
}
html.mode-mobile .window-controls button {
  min-width: 36px;
  min-height: 28px;
  font-size: 14px;
  margin-left: 4px;
}

/* ---- 手机端 QQ / 启明内网通：纵向布局 ---- */
html.mode-mobile .qq-container,
html.mode-mobile .im-container {
  flex-direction: column;
}
html.mode-mobile .qq-left-panel,
html.mode-mobile .im-left-panel {
  width: 100%;
  max-height: 30vh;
  border-right: none;
  border-bottom: 1px solid #888;
}
html.mode-mobile .qq-right-panel,
html.mode-mobile .im-right-panel {
  flex: 1;
  min-height: 0;
}

/* ---- 手机端资源管理器：纵向布局 ---- */
html.mode-mobile .explorer-body {
  flex-direction: column;
}
html.mode-mobile .exp-side-nav {
  width: 100%;
  max-height: 120px;
  border-right: none;
  border-bottom: 1px solid #c8ccd1;
  overflow-x: auto;
  display: flex;
  padding: 4px;
  gap: 4px;
}
html.mode-mobile .exp-side-item {
  white-space: nowrap;
  flex-shrink: 0;
}
html.mode-mobile .exp-side-title { display:none; }

/* ---- 手机端邮件应用：纵向布局 ---- */
html.mode-mobile .mail-body {
  flex-direction: column;
}
html.mode-mobile .mail-folders,
html.mode-mobile .mail-list {
  width: 100%;
  max-height: 100px;
  border-right: none;
  border-bottom: 1px solid #ddd;
}
html.mode-mobile .mail-folders { display:flex; overflow-x:auto; }
html.mode-mobile .mail-folder { white-space:nowrap; padding:8px 12px; }

/* ---- 手机端LMS：纵向布局 ---- */
html.mode-mobile .lms-app {
  flex-direction: column;
}
html.mode-mobile .lms-sidebar {
  width: 100%;
  max-height: 100px;
  border-right: none;
  border-bottom: 1px solid #c8d0e0;
  display: flex;
  overflow-x: auto;
}
html.mode-mobile .lms-nav-item {
  white-space: nowrap;
  flex-shrink: 0;
  border-left: none;
  border-bottom: 3px solid transparent;
}
html.mode-mobile .lms-nav-item.active {
  border-bottom-color: #1a3a60;
}

/* ---- 手机端校务管理：纵向布局 ---- */
html.mode-mobile .sa-body {
  flex-direction: column;
}
html.mode-mobile .sa-side {
  width: 100%;
  max-height: 100px;
  border-right: none;
  border-bottom: 1px solid #c09060;
  display: flex;
  overflow-x: auto;
}
html.mode-mobile .sa-nav {
  white-space: nowrap;
  flex-shrink: 0;
  border-left: none;
  border-bottom: 3px solid transparent;
}
html.mode-mobile .sa-nav.active { border-bottom-color: #8a4020; }

/* ---- 手机端门禁总控：纵向布局 ---- */
html.mode-mobile .ac-body {
  flex-direction: column;
}
html.mode-mobile .ac-gates {
  width: 100%;
  max-height: 100px;
  border-right: none;
  border-bottom: 1px solid #204060;
  display: flex;
  overflow-x: auto;
}
html.mode-mobile .ac-gate {
  white-space: nowrap;
  flex-shrink: 0;
  border-left: none;
  border-bottom: 3px solid transparent;
}
html.mode-mobile .ac-gate.active { border-bottom-color: #60e0ff; }

/* ---- 手机端QX18控制台：纵向布局 ---- */
html.mode-mobile .qx-body {
  flex-direction: column;
}
html.mode-mobile .qx-side {
  width: 100%;
  max-height: 120px;
  border-left: none;
  border-top: 1px solid #402080;
  overflow-x: auto;
  display: flex;
  gap: 6px;
  padding: 6px;
}
html.mode-mobile .qx-subject {
  flex-shrink: 0;
  min-width: 130px;
}
html.mode-mobile .qx-panels {
  grid-template-columns: 1fr;
}

/* ---- 手机端数据分析：纵向布局 ---- */
html.mode-mobile .dv-body {
  grid-template-columns: 1fr;
}
html.mode-mobile .dv-chart.full {
  grid-column: span 1;
}

/* ---- 手机端浏览器：紧凑化 ---- */
html.mode-mobile #browser-window .browser-toolbar {
  flex-wrap: wrap;
  padding: 4px;
}
html.mode-mobile .address-bar {
  flex: 1 1 100%;
  min-width: 0;
  margin-top: 4px;
}
html.mode-mobile .address-bar input {
  min-width: 0;
  width: 100%;
}

/* ---- 手机端时钟：紧凑化 ---- */
html.mode-mobile #clock-window {
  padding: 12px;
}
html.mode-mobile .clock-set-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
html.mode-mobile .clock-set-panel .label {
  width: auto;
}

/* ---- 手机端锁屏：紧凑化 ---- */
html.mode-mobile #lock-screen {
  padding: 20px 12px;
}
html.mode-mobile .lock-user-list {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-width: 100%;
}
html.mode-mobile .lock-user-avatar {
  width: 56px; height: 56px;
  font-size: 20px;
}
html.mode-mobile .lock-input-row {
  flex-wrap: wrap;
}

/* ---- 手机端前言 / 结局：紧凑化 ---- */
html.mode-mobile #prologue-screen,
html.mode-mobile #ending-screen {
  padding: 20px 12px;
}
html.mode-mobile .prologue-title,
html.mode-mobile .ending-title {
  font-size: 28px;
  letter-spacing: 6px;
}
html.mode-mobile .prologue-text,
html.mode-mobile .ending-text {
  font-size: 13px;
  max-width: 100%;
  padding: 0 8px;
}
html.mode-mobile .prologue-start-btn {
  padding: 10px 28px;
  font-size: 15px;
}

/* ---- 手机端模态框：紧凑化 ---- */
html.mode-mobile .game-modal {
  width: 92vw;
  max-width: 92vw;
  max-height: 80vh;
}
html.mode-mobile .game-modal-body {
  font-size: 13px;
  max-height: 60vh;
  overflow-y: auto;
}
html.mode-mobile .game-modal-btn {
  padding: 10px 16px;
  font-size: 14px;
  min-height: 40px;
}

/* ---- 手机端：禁用拖拽（窗口已全屏化） ---- */
html.mode-mobile .window-title {
  cursor: default;
}
html.mode-mobile .window-title:active {
  cursor: default;
}

/* ---- 手机端：图标选中时的高亮更明显 ---- */
html.mode-mobile .desktop-folder.selected {
  background: rgba(100,180,255,0.25);
  border-radius: 4px;
  outline: 2px solid rgba(150,200,255,0.6);
}

/* ---- 触屏平板端：保留双击，但增大点击区域 ---- */
html.mode-touch .desktop-folder {
  padding: 6px 4px;
}
html.mode-touch .folder-icon {
  width: 44px; height: 44px;
}

/* ========================================================================== */
/*                屏幕旋转 / 超窄屏幕紧急适配                                  */
/* ========================================================================== */
@media screen and (max-width: 380px) {
  html.mode-mobile .desktop-folder {
    width: 64px;
    margin: 2px;
  }
  html.mode-mobile .folder-icon {
    width: 40px; height: 40px;
  }
  html.mode-mobile .desktop-folder > div:last-child {
    font-size: 10px;
  }
}

/* 横屏时窗口高度限制 */
@media screen and (orientation: landscape) and (max-height: 500px) {
  html.mode-mobile .window {
    height: 100vh !important;
    max-height: 100vh !important;
  }
  html.mode-mobile .start-menu-list {
    max-height: 50vh;
  }
}

/* ---- 防止 iOS Safari 地址栏遮挡 ---- */
html.mode-mobile body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}
html.mode-mobile #desktop {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

/* ========================================================================== */
/*           前言页 · 在线人数 / 累计访问 显示                                  */
/* ========================================================================== */
.prologue-stats {
  margin-top: 28px;
  padding: 10px 16px;
  font-size: 12px;
  color: rgba(220, 230, 255, 0.7);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  animation: fadeInStats 1.2s ease-out 0.5s forwards;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}
@keyframes fadeInStats {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.prologue-stats strong {
  color: #6fc0ff;
  font-weight: 600;
  margin: 0 4px;
  font-variant-numeric: tabular-nums;
}
.prologue-stats .stat-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.prologue-stats .stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: pulseOnline 1.5s ease-in-out infinite;
}
@keyframes pulseOnline {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}
.prologue-stats .stat-divider {
  color: rgba(220, 230, 255, 0.3);
}
.prologue-stats .stat-total strong {
  color: #c0c8e0;
}

/* 移动端前言统计样式 */
html.mode-mobile .prologue-stats {
  font-size: 11px;
  margin-top: 20px;
  padding: 8px 12px;
  flex-wrap: wrap;
  gap: 6px;
}

/* ========================================================================== */
/*           锁屏 · 记住密码 + 快速登录区                                       */
/* ========================================================================== */
.lock-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  user-select: none;
}
.lock-remember input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #4a8aff;
  cursor: pointer;
}

.lock-saved-accounts {
  margin: 12px auto 8px;
  max-width: 420px;
  width: 90%;
  background: rgba(40, 60, 110, 0.4);
  border: 1px solid rgba(100, 150, 220, 0.35);
  border-radius: 6px;
  padding: 10px;
}
.lock-saved-title {
  font-size: 11px;
  color: rgba(200, 220, 255, 0.7);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.lock-saved-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lock-saved-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(60, 90, 150, 0.35);
  border: 1px solid rgba(120, 170, 230, 0.25);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}
.lock-saved-item:hover {
  background: rgba(80, 120, 200, 0.5);
  border-color: rgba(150, 200, 255, 0.6);
  transform: translateX(2px);
}
.lock-saved-item:active {
  transform: translateX(2px) scale(0.99);
}
.lock-saved-item .lock-user-avatar {
  width: 36px;
  height: 36px;
  font-size: 14px;
  flex-shrink: 0;
}
.lock-saved-info {
  flex: 1;
  min-width: 0;
}
.lock-saved-name {
  font-size: 13px;
  color: #fff;
  font-weight: 500;
}
.lock-saved-role {
  font-size: 11px;
  color: rgba(200, 220, 255, 0.65);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lock-saved-badge {
  font-size: 10px;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
.lock-saved-forget {
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255, 80, 80, 0.25);
  color: #ff8080;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.18s ease;
}
.lock-saved-forget:hover {
  background: rgba(255, 80, 80, 0.5);
  color: #fff;
  transform: rotate(90deg);
}

/* 移动端锁屏快速登录样式 */
html.mode-mobile .lock-saved-accounts {
  max-width: 100%;
  width: 100%;
}
html.mode-mobile .lock-saved-item .lock-user-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
