* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1020;
  color: #f5f5f5;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

header {
  padding: 10px 16px;
  background: #111727;
  border-bottom: 1px solid #1f2a3f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

header .status { font-size: 12px; opacity: 0.8; }

header button {
  background: #2563eb;
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}

#desktop {
  position: relative;
  flex: 1;
  overflow: hidden;
  background-color: #020617;
  background-image:
    linear-gradient(#1f2937 1px, transparent 1px),
    linear-gradient(90deg, #1f2937 1px, transparent 1px);
  background-size: 80px 80px;
}

.file {
  position: absolute;
  width: 120px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.8);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  background: #020617;
  display: flex;
  flex-direction: column;
  cursor: grab;
  transition: box-shadow 0.1s ease, transform 0.1s ease;
}

.file.active {
  box-shadow: 0 0 0 2px #2563eb, 0 10px 25px rgba(37, 99, 235, 0.6);
  cursor: grabbing;
}

.file img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex: 1;
}

.file-label {
  padding: 4px 6px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(30, 64, 175, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

#webcam { display: none; }

#debug {
  font-size: 11px;
  padding: 6px 10px;
  background: #020617;
  border-top: 1px solid #1f2937;
}

#logs {
  width: 100%;
  height: 100px;
  border: none;
  padding: 4px 6px;
  resize: none;
  background: #020617;
  color: #e5e7eb;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
}
