:root {
  --glass: rgba(246, 249, 255, 0.76);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --ink: #15191f;
  --muted: #59616f;
  --line: rgba(20, 32, 48, 0.16);
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --green: #13a069;
  --danger: #b91c1c;
  --shadow: 0 24px 80px rgba(12, 24, 48, 0.26);
}

body {
  overflow: hidden;
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  background: #0b1220;
}

.desktop-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(178, 220, 255, 0.95), transparent 28%),
    radial-gradient(circle at 82% 15%, rgba(213, 244, 255, 0.86), transparent 26%),
    linear-gradient(135deg, #d7ecff 0%, #eef7ff 37%, #d9f0f5 62%, #eef4fb 100%);
}

.wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255, 255, 255, 0.45) 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, rgba(255, 255, 255, 0.32) 50%, transparent 50.2%);
  background-size: 92px 92px;
  opacity: 0.23;
}

.desktop {
  position: absolute;
  inset: 20px 0 58px 0;
  display: grid;
  grid-template-columns: repeat(2, 96px);
  grid-auto-rows: 94px;
  align-content: start;
  gap: 10px 2px;
  padding: 8px 14px;
}

.desktop-icon {
  width: 88px;
  min-height: 86px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #111827;
  background: transparent;
  text-align: center;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(255, 255, 255, 0.38);
  outline: none;
}

.icon-glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 6px auto 5px;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 21px;
  background: linear-gradient(145deg, #1677ff, #48b5ff);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}

.icon-glyph.wechat { background: linear-gradient(145deg, #12b76a, #30d158); }
.icon-glyph.edge { background: linear-gradient(145deg, #0078d4, #00b7c3); }
.icon-glyph.folder { background: linear-gradient(145deg, #f9c74f, #f59e0b); }
.icon-glyph.terminal { background: linear-gradient(145deg, #111827, #374151); }
.icon-glyph.note { background: linear-gradient(145deg, #facc15, #fb923c); }
.icon-glyph.mail { background: linear-gradient(145deg, #2563eb, #7c3aed); }
.icon-glyph.test { background: linear-gradient(145deg, #0f766e, #14b8a6); }
.icon-glyph.bin { background: linear-gradient(145deg, #64748b, #94a3b8); }
.icon-glyph.calendar { background: linear-gradient(145deg, #0ea5e9, #2563eb); }
.icon-glyph.taskmgr { background: linear-gradient(145deg, #16a34a, #15803d); }
.icon-glyph.settings { background: linear-gradient(145deg, #475569, #0f172a); }
.icon-glyph.small {
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 6px;
  font-size: 11px;
  box-shadow: none;
}

.icon-label {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.25;
}

.windows {
  position: absolute;
  inset: 0 0 48px 0;
  pointer-events: none;
}

.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 360px;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.25);
  pointer-events: auto;
}

.window.focused {
  border-color: rgba(37, 99, 235, 0.5);
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  flex: 0 0 38px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  user-select: none;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  font-size: 13px;
  font-weight: 600;
}

.window-controls {
  display: flex;
  height: 100%;
}

.win-control {
  width: 46px;
  border: 0;
  background: transparent;
  color: #111827;
}

.win-control:hover {
  background: rgba(15, 23, 42, 0.08);
}

.win-control.close:hover {
  color: white;
  background: #d92d20;
}

.window-content {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  background: rgba(255, 255, 255, 0.48);
}

.taskbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(244, 248, 255, 0.78);
  backdrop-filter: blur(24px) saturate(1.3);
}

.start-button {
  justify-self: end;
  width: 38px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--blue);
  font-size: 21px;
}

.start-button:hover {
  background: rgba(37, 99, 235, 0.12);
}

.taskbar-apps {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 0 10px;
}

.taskbar-app {
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: rgba(37, 99, 235, 0.8);
}

.taskbar-app.active {
  outline: 2px solid rgba(255, 255, 255, 0.85);
}

.taskbar-app.minimized {
  opacity: 0.62;
}

.tray {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  padding-right: 16px;
  color: #111827;
  font-size: 12px;
}

.sync-chip {
  border: 1px solid rgba(19, 160, 105, 0.3);
  border-radius: 999px;
  padding: 4px 9px;
  color: #064e3b;
  background: rgba(209, 250, 229, 0.82);
}

.tray-button {
  position: relative;
  border: 0;
  border-radius: 7px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.45);
  color: #111827;
  font-size: 12px;
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  color: white;
  background: #dc2626;
  font-size: 10px;
}

.hidden {
  display: none !important;
}

.toasts {
  position: absolute;
  right: 18px;
  bottom: 62px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
}

.toast.clue {
  border-color: rgba(19, 160, 105, 0.38);
  background: rgba(236, 253, 245, 0.94);
}

.start-menu {
  position: absolute;
  bottom: 58px;
  left: 50%;
  z-index: 900;
  width: min(620px, calc(100vw - 28px));
  min-height: 440px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  padding: 18px;
  background: rgba(246, 249, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.25);
}

.start-search input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  padding: 10px 14px;
}

.start-section-title {
  margin: 16px 2px 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.start-grid button,
.start-recommendation {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
}

.start-grid .icon-glyph {
  margin: 0 0 6px;
}

.start-recommendation {
  width: 100%;
}

.notification-center {
  position: absolute;
  right: 14px;
  bottom: 58px;
  z-index: 900;
  width: min(390px, calc(100vw - 28px));
  max-height: calc(100vh - 86px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  padding: 14px;
  background: rgba(246, 249, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.notification-center header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.notification-center header button {
  border: 0;
  background: transparent;
  color: #2563eb;
}

.notice-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  max-height: 64vh;
}

.notice {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  background: white;
}

.notice div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notice p {
  margin: 6px 0 0;
  color: #475569;
  line-height: 1.45;
}

.notice time {
  color: #64748b;
  font-size: 11px;
}

.context-menu {
  position: absolute;
  z-index: 950;
  min-width: 180px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.context-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  background: transparent;
  text-align: left;
}

.context-menu button:hover {
  background: #eff6ff;
}

.toast-title {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
}

.toast-body {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.app-pane {
  height: 100%;
  min-height: 100%;
}

.wechat {
  display: grid;
  grid-template-columns: 210px 1fr;
  height: 100%;
}

.chat-list {
  border-right: 1px solid var(--line);
  background: rgba(247, 249, 252, 0.84);
}

.profile-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  background: #2563eb;
}

.chat-thread {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 9px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 11px;
  background: transparent;
  text-align: left;
}

.chat-thread:hover,
.chat-thread.active {
  background: rgba(37, 99, 235, 0.1);
}

.thread-name {
  font-size: 13px;
  font-weight: 700;
}

.thread-preview {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(239, 242, 247, 0.82);
}

.chat-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.chat-header small {
  color: #64748b;
  font-weight: 400;
}

.messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 18px;
}

.message {
  max-width: 78%;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.55;
  background: white;
}

.message.me {
  align-self: flex-end;
  color: white;
  background: #10b981;
}

.message.system {
  align-self: center;
  max-width: 88%;
  color: #475569;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.btn {
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  padding: 8px 12px;
  color: #173b86;
  background: rgba(219, 234, 254, 0.74);
  font-size: 13px;
}

.btn:hover {
  background: rgba(191, 219, 254, 0.92);
}

.btn.danger {
  border-color: rgba(185, 28, 28, 0.3);
  color: #7f1d1d;
  background: #fee2e2;
}

.btn.success {
  border-color: rgba(5, 150, 105, 0.25);
  color: #064e3b;
  background: #d1fae5;
}

.browser {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
}

.browser-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.82);
}

.input {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  outline: none;
  background: white;
}

.browser-page {
  overflow: auto;
  padding: 24px;
  background: white;
}

.hero-title {
  margin: 0 0 10px;
  font-size: 28px;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  color: #475569;
  line-height: 1.7;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.info-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.info-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.clue {
  border-bottom: 1px dashed #0f766e;
  color: #0f766e;
  cursor: pointer;
}

.test-screen {
  max-width: 680px;
  margin: 0 auto;
}

.question {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 18px;
  background: #f8fbff;
}

.question h3 {
  margin: 0 0 12px;
}

.option {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 10px;
  background: white;
  text-align: left;
}

.option:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.explorer {
  display: grid;
  grid-template-columns: 205px 220px 1fr;
  height: 100%;
}

.tree {
  padding: 10px;
  border-right: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.82);
}

.tree button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 8px;
  background: transparent;
  text-align: left;
}

.file-search {
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px;
}

.file-list {
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.file-list button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 8px;
  background: transparent;
  text-align: left;
}

.file-list button:hover,
.file-list button.active {
  background: rgba(37, 99, 235, 0.1);
}

.tree button:hover,
.tree button.active {
  background: rgba(37, 99, 235, 0.1);
}

.file-view {
  overflow: auto;
  padding: 18px;
  background: white;
}

.file-title {
  margin: 0 0 12px;
  font-size: 18px;
}

.mono,
.terminal-output,
.file-body {
  font-family: Consolas, "Courier New", monospace;
}

.file-body {
  white-space: pre-wrap;
  line-height: 1.58;
}

.terminal-app {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  color: #d1fae5;
  background: #07110d;
}

.terminal-output {
  overflow: auto;
  padding: 15px;
  white-space: pre-wrap;
  line-height: 1.45;
}

.terminal-input-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(16, 185, 129, 0.24);
}

.terminal-input {
  border: 0;
  color: #d1fae5;
  outline: none;
  background: transparent;
}

.terminal-run {
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  color: #bbf7d0;
  background: rgba(5, 46, 22, 0.92);
}

.note-page,
.mail-page {
  padding: 20px;
  line-height: 1.65;
}

.sticky {
  max-width: 440px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 16px;
  background: #fef3c7;
  box-shadow: 0 16px 38px rgba(180, 83, 9, 0.12);
}

.mail-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 0;
}

.mail-app {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100%;
}

.mail-list {
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.82);
}

.mail-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px;
  background: transparent;
  text-align: left;
}

.mail-list button.active,
.mail-list button:hover {
  background: rgba(37, 99, 235, 0.1);
}

.mail-list small,
.muted {
  color: #64748b;
}

.mail-read {
  overflow: auto;
  padding: 20px;
  background: white;
}

.unlock-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.calendar-page,
.task-manager,
.settings-page {
  height: 100%;
  overflow: auto;
  padding: 20px;
  background: white;
}

.timeline {
  display: grid;
  gap: 10px;
}

.calendar-event {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.calendar-event time {
  color: #2563eb;
  font-weight: 700;
}

.calendar-event p {
  margin: 4px 0 0;
  color: #475569;
}

.task-manager header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-manager table {
  width: 100%;
  border-collapse: collapse;
}

.task-manager th,
.task-manager td {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px;
  text-align: left;
}

.process-danger {
  background: #fff7ed;
}

.process-note {
  color: #b45309;
}

.settings-page {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
}

.settings-page aside {
  display: grid;
  align-content: start;
  gap: 6px;
}

.settings-page aside button {
  border: 0;
  border-radius: 8px;
  padding: 10px;
  background: transparent;
  text-align: left;
}

.settings-page aside button.active,
.settings-page aside button:hover {
  background: #eff6ff;
}

.permission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 0;
}

.permission-row p {
  margin: 4px 0 0;
  color: #475569;
}

.toggle {
  border-radius: 999px;
  padding: 5px 11px;
  color: white;
  background: #94a3b8;
}

.toggle.on {
  background: #2563eb;
}

.empty {
  color: #64748b;
}

.ending {
  position: absolute;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #e5e7eb;
  background: rgba(2, 6, 23, 0.94);
}

.ending-panel {
  max-width: 720px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  padding: 34px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.55);
}

.ending h1 {
  margin: 0 0 14px;
  font-size: 30px;
}

.ending p {
  color: #cbd5e1;
  line-height: 1.8;
}

.ending .mono {
  color: #86efac;
}

@media (max-width: 760px) {
  .window {
    left: 10px !important;
    top: 10px !important;
    width: calc(100vw - 20px) !important;
    height: calc(100vh - 70px) !important;
  }

  .wechat,
  .explorer {
    grid-template-columns: 150px 1fr;
  }

  .file-list,
  .settings-page aside {
    display: none;
  }

  .mail-app,
  .settings-page {
    grid-template-columns: 1fr;
  }
}
