:root {
  --bg: #eceef2;
  --card: #ffffff;
  --ink: #2c2c31;
  --muted: #6e6e76;
  --line: rgba(20, 20, 24, 0.08);
  --shadow: 0 18px 50px rgba(28, 32, 40, 0.12), 0 2px 8px rgba(28, 32, 40, 0.06);
  --screen: #111318;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

body {
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
}

.computer {
  width: min(880px, 100%);
  padding: 0;
  border: 0;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.computer:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 56px rgba(28, 32, 40, 0.16), 0 2px 8px rgba(28, 32, 40, 0.06);
}

.computer:focus-visible {
  outline: 3px solid rgba(80, 120, 255, 0.45);
  outline-offset: 4px;
}

.titlebar {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f8fa;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
  background: #d8dbe2;
}

.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }

.title {
  justify-self: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status {
  font-size: 12px;
  color: var(--muted);
}

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--screen);
  overflow: hidden;
}

.screen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--screen);
  pointer-events: none;
}

.veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(17, 19, 24, 0.55);
  color: #f4f5f7;
  font-size: 14px;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.veil.hidden {
  opacity: 0;
}

.veil.error {
  background: rgba(17, 19, 24, 0.78);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.veil.error .spinner { display: none; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hint {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

body.is-fullscreen {
  background: #000;
}

body.is-fullscreen .page {
  padding: 0;
  min-height: 100%;
}

body.is-fullscreen .computer {
  width: 100%;
  height: 100vh;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  cursor: default;
}

body.is-fullscreen .titlebar,
body.is-fullscreen .hint {
  display: none;
}

body.is-fullscreen .screen {
  aspect-ratio: auto;
  height: 100vh;
}

body.is-fullscreen .screen iframe {
  pointer-events: auto;
}

body.is-fullscreen .veil {
  display: none;
}
