:root {
  --blue: #0f6cbd;
  --blue-hover: #115ea3;
  --text: #1f1f1f;
  --muted: #616161;
  --border: #d6d6d6;
  --soft-border: #e7e7e7;
  --surface: #f5f5f5;
  --panel: #ffffff;
  --danger: #c42b1c;
  --success: #107c10;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  min-width: 1100px;
  margin: 0;
  overflow: hidden;
}

body {
  background: #f3f3f3;
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }

.page {
  display: grid;
  grid-template-rows: 104px minmax(390px, 1fr) 108px 64px 18px;
  width: 100%;
  height: 100vh;
  background: #fff;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--soft-border);
  background: #fff;
}

.header-brand {
  position: absolute;
  left: 3.2vw;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: #303030;
}

.product-logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
}

.brand-mark,
.windows-icon {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 2px;
}

.brand-mark i,
.windows-icon i {
  width: 8px;
  height: 8px;
  background: var(--blue);
}

.headline { text-align: center; }
.headline-title { display: flex; align-items: center; justify-content: center; gap: 11px; }
.headline-title img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; }
.headline h1 { margin: 0 0 7px; font-size: 30px; font-weight: 650; letter-spacing: -.6px; }
.headline-title h1 { margin-bottom: 0; }
.headline p { margin: 0; color: var(--muted); font-size: 15px; }

.header-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 3.2vw;
  min-width: 104px;
  height: 36px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  color: #fff;
  background: var(--blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.header-download:hover { background: var(--blue-hover); }
.header-download:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

.main-content {
  display: grid;
  grid-template-columns: minmax(430px, 1fr) 72px minmax(500px, 1.08fr);
  align-items: stretch;
  gap: 0;
  width: min(1240px, calc(100% - 6vw));
  min-height: 0;
  margin: 22px auto 18px;
}

.scene-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 19px 20px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 13px;
}

.panel-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.panel-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.state-badge {
  padding: 5px 9px;
  border-radius: 3px;
  font-size: 11px;
}

.state-error { color: var(--danger); background: #fde7e5; }
.state-safe { color: var(--success); background: #dff6dd; }

.desktop-preview,
.repair-window {
  min-height: 0;
  flex: 1;
  overflow: hidden;
  border: 1px solid #9e9e9e;
  border-radius: 5px;
  background: #eaf3f8;
}

.desktop-preview {
  position: relative;
  display: grid;
  place-items: center;
  padding-bottom: 28px;
  background: linear-gradient(135deg, #d9edf7, #edf5f9 52%, #cfe8f5);
}

.desktop-preview::before {
  content: "";
  position: absolute;
  width: 46%;
  height: 100%;
  left: 25%;
  background: linear-gradient(145deg, transparent 48%, rgba(255,255,255,.55) 49% 70%, transparent 71%);
}

.desktop-icons {
  position: absolute;
  top: 13px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.desktop-icons span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #333;
  font-size: 8px;
}

.desktop-icons b {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 3px;
  color: #fff;
  background: #2b78c5;
  font-size: 11px;
}

.system-dialog {
  position: relative;
  z-index: 2;
  width: min(390px, 82%);
  border: 1px solid #8d8d8d;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 35px;
  padding-left: 12px;
  border-bottom: 1px solid var(--soft-border);
  background: #f7f7f7;
  font-size: 11px;
}

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

.window-controls i {
  display: grid;
  place-items: center;
  width: 38px;
  color: #333;
  font-style: normal;
}

.window-controls i:last-child:hover { color: #fff; background: #c42b1c; }

.dialog-content {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: start;
  padding: 24px 24px 18px;
}

.dialog-content p {
  margin: 2px 0;
  color: #333;
  font-size: 12px;
  line-height: 1.65;
}

.dialog-content strong { font-weight: 600; }

.error-symbol {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 25px;
  font-weight: 300;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  padding: 9px 17px;
  border-top: 1px solid var(--soft-border);
  background: #f7f7f7;
}

.dialog-actions button {
  width: 80px;
  height: 27px;
  border: 1px solid #8a8a8a;
  border-radius: 2px;
  background: #fff;
  font-size: 11px;
}

.taskbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border-top: 1px solid rgba(255,255,255,.7);
  background: rgba(245,250,252,.88);
}

.taskbar .windows-icon {
  grid-template-columns: repeat(2, 5px);
  gap: 1px;
}

.taskbar .windows-icon i { width: 5px; height: 5px; }

.task-search {
  width: 90px;
  margin-left: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.8);
  color: #777;
  font-size: 8px;
}

.task-time {
  position: absolute;
  right: 10px;
  color: #444;
  text-align: right;
  font-size: 7px;
  line-height: 1.2;
}

.task-time small { font-size: 7px; }

.issue-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: #505050;
  font-size: 11px;
}

.issue-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.issue-list i {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: var(--danger);
  background: #fde7e5;
  font-style: normal;
  font-weight: 700;
  font-size: 10px;
}

.flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #767676;
  font-size: 11px;
}

.flow-arrow i {
  color: var(--blue);
  font-style: normal;
  font-size: 31px;
  font-weight: 300;
}

.repair-window {
  display: flex;
  flex-direction: column;
  background: #fff;
}

.app-titlebar { flex: 0 0 35px; background: #f3f3f3; }
.app-title { display: flex; align-items: center; gap: 7px; }

.app-title img {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
}

.app-layout {
  display: grid;
  grid-template-columns: 132px 1fr;
  min-height: 0;
  flex: 1;
}

aside {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 7px;
  border-right: 1px solid var(--soft-border);
  background: #f7f7f7;
}

aside span {
  display: flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 6px;
  border-radius: 3px;
  color: #555;
  font-size: 10px;
}

aside span.active { color: var(--blue); background: #e5f1fb; }
aside span i {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  color: #858585;
  font-style: normal;
  font-size: 8px;
  font-weight: 600;
}
aside span.active i { color: #fff; background: var(--blue); border-radius: 2px; }
aside span b {
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 8px;
  color: #fff;
  background: #f7630c;
  font-size: 8px;
  font-weight: 600;
}

.scan-area {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 12px;
}

.scan-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid #d3d3d3;
  background: #fafafa;
}

.scan-summary h3 { margin: 0 0 6px; color: #164a73; font-size: 12px; font-weight: 500; }
.scan-summary h3 strong { color: #0f6cbd; font-weight: 600; }
.scan-summary p { margin: 0; color: #686868; font-size: 9px; }
.scan-actions { display: flex; flex-direction: column; gap: 2px; }
.scan-actions button {
  width: 90px;
  height: 25px;
  border: 1px solid var(--blue);
  background: #fff;
  color: #111;
  font-size: 10px;
  cursor: pointer;
}
.scan-actions button + button { border-color: transparent; background: transparent; }
.scan-actions button:hover { background: #e5f1fb; }

.scan-results {
  flex: 1;
  margin: 9px 0 0;
  overflow: hidden;
  border: 1px solid #b7b7b7;
  border-radius: 0;
}

.scan-results > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 37px;
  padding: 0 12px;
  border-top: 1px solid #ededed;
  font-size: 9px;
}

.scan-results > div:first-child { border-top: 0; }
.scan-results span { display: flex; align-items: center; gap: 7px; color: #17456e; }
.scan-results input { width: 11px; height: 11px; margin: 0; accent-color: var(--blue); }
.scan-results b { display: flex; align-items: center; gap: 6px; color: #17456e; font-weight: 400; }
.scan-results b i {
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #f34f56;
  color: #fff;
  font-style: normal;
  font-size: 8px;
}

.repair-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid #0f6cbd;
  border-radius: 3px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.repair-button:hover,
.download-button:hover { background: var(--blue-hover); }
.repair-button:focus-visible,
.download-button:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.repair-button span { margin-right: 5px; }

.repair-note {
  margin: 7px 0 0;
  color: #777;
  text-align: center;
  font-size: 9px;
}

.advantages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1180px, calc(100% - 6vw));
  margin: 0 auto;
  border-top: 1px solid var(--soft-border);
  border-bottom: 1px solid var(--soft-border);
}

.advantages article {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  padding: 0 18px;
}

.advantages article + article { border-left: 1px solid var(--soft-border); }

.advantages article > img { width: 36px; height: 36px; flex: 0 0 36px; }

.advantages h3 { margin: 0 0 3px; font-size: 13px; font-weight: 600; }
.advantages p { margin: 0; color: #777; font-size: 10px; line-height: 1.35; }
.advantages p.single-line { white-space: nowrap; }

.download-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  text-align: center;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 360px;
  height: 52px;
  border: 1px solid var(--blue);
  border-radius: 3px;
  background: var(--blue);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  text-decoration: none;
}

.download-button span { margin-right: 8px; font-size: 19px; }
.download-bar p { margin: 7px 0 8px; color: #666; font-size: 10px; }
.company-name {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 10px;
  line-height: 1;
  text-align: center;
  background: #fafafa;
}

.notice {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  padding: 11px 18px;
  border-radius: 3px;
  background: #242424;
  color: #fff;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: .18s ease;
  font-size: 12px;
}

.notice.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-height: 820px) {
  .page { grid-template-rows: 90px minmax(360px, 1fr) 92px 58px 16px; }
  .main-content { margin-top: 14px; margin-bottom: 12px; }
  .scene-panel { padding-top: 13px; padding-bottom: 11px; }
  .panel-heading { margin-bottom: 9px; }
  .download-bar p { margin-bottom: 5px; }
}

@media (max-height: 700px) {
  .page { grid-template-rows: 78px minmax(340px, 1fr) 78px 52px 14px; }
  .headline h1 { font-size: 25px; margin-bottom: 4px; }
  .headline p { font-size: 13px; }
  .main-content { margin-top: 9px; margin-bottom: 8px; }
  .scene-panel { padding: 10px 14px 8px; }
  .panel-heading { min-height: 38px; margin-bottom: 7px; }
  .panel-heading h2 { font-size: 15px; }
  .issue-list { margin-top: 7px; }
  .download-button { height: 46px; }
}
