* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, "Segoe UI", "Microsoft JhengHei", "PingFang TC",
               Roboto, sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.55;
}

main {
  max-width: 760px;
  margin: 40px auto;
  padding: 0 20px 80px;
}

header h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
}

header .subtitle {
  margin: 0 0 24px;
  color: #6e6e73;
  font-size: 14px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04),
              0 4px 12px rgba(0, 0, 0, 0.04);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
}

#status-banner {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  background: #e5f3ff;
  color: #003f80;
  font-size: 14px;
  margin-bottom: 16px;
}

#status-banner.warning {
  background: #fff5e5;
  color: #7a4400;
}

#status-banner.error {
  background: #ffeaea;
  color: #8a0000;
}

#status-banner.success {
  background: #e8f7eb;
  color: #1a5e2e;
}

#info-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
}

#info-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f0f0f3;
  vertical-align: top;
}

#info-table td:first-child {
  color: #6e6e73;
  width: 140px;
  white-space: nowrap;
}

#info-table td:last-child {
  color: #1d1d1f;
  word-break: break-all;
}

#info-table.empty {
  color: #a0a0a5;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
  display: block;
}

#actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  font-family: inherit;
}

button.primary {
  background: #0071e3;
  color: #fff;
}

button.primary:hover:not(:disabled) {
  background: #0077ed;
}

button.secondary {
  background: #f0f0f3;
  color: #1d1d1f;
}

button.secondary:hover:not(:disabled) {
  background: #e5e5ea;
}

button.danger {
  background: #ff3b30;
  color: #fff;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#progress-wrap {
  display: none;
  margin-top: 16px;
}

#progress-wrap.active {
  display: block;
}

progress {
  width: 100%;
  height: 10px;
  border: none;
  border-radius: 5px;
  background: #e5e5ea;
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: #e5e5ea;
  border-radius: 5px;
}

progress::-webkit-progress-value {
  background: #34c759;
  border-radius: 5px;
}

#progress-text {
  margin-top: 6px;
  font-size: 13px;
  color: #6e6e73;
  font-family: "SFMono-Regular", Consolas, monospace;
}

#log-card {
  background: #1d1d1f;
  color: #f5f5f7;
}

#log-card h2 {
  color: #f5f5f7;
}

#log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

#log {
  background: #000;
  color: #d2d2d7;
  border-radius: 8px;
  padding: 14px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

#log-empty {
  color: #6e6e73;
  font-style: italic;
}

.unsupported {
  background: #ffeaea;
  color: #8a0000;
  padding: 14px;
  border-radius: 8px;
  margin: 16px 0;
}

code, kbd {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.muted { color: #6e6e73; font-size: 13px; }

.row-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
