* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d1117;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
}

#container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#container img,
#container video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#message {
  color: #8b949e;
  padding: 2rem;
  text-align: center;
  font-size: clamp(1.2rem, 2.2vw, 2rem);
}

#message.error {
  color: #f85149;
}

#override {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #3d1f1f;
  color: #fff;
  padding: 2rem;
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 3rem);
}

#override img {
  max-width: 100%;
  max-height: 50%;
  object-fit: contain;
  margin-bottom: 1rem;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(13, 17, 23, 0.9);
  border: 1px solid #30363d;
  color: #e6edf3;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  max-width: min(960px, 92vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.err {
  border-color: #f85149;
  color: #f85149;
}

.setup {
  position: fixed;
  inset: 0;
  background: rgba(13, 17, 23, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.setup-card {
  width: min(920px, 95vw);
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 24px;
}

.setup-title {
  color: #e6edf3;
  font-size: 28px;
  font-weight: 700;
}

.setup-subtitle {
  color: #8b949e;
  margin-top: 8px;
  margin-bottom: 18px;
  font-size: 16px;
}

.setup-label {
  color: #c9d1d9;
  display: block;
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 14px;
}

.setup-input {
  width: 100%;
  font-size: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e6edf3;
  outline: none;
}

.setup-input:focus {
  border-color: #2f81f7;
  box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.25);
}

.setup-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e6edf3;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 16px;
}

.btn.primary {
  background: #1f6feb;
  border-color: #2f81f7;
}

.btn.danger {
  background: #3d1f1f;
  border-color: #f85149;
}

.setup-hint {
  margin-top: 14px;
  color: #8b949e;
  font-size: 14px;
}

.kbd {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e6edf3;
}

.setup-status {
  margin-top: 12px;
  min-height: 24px;
  font-size: 14px;
  color: #8b949e;
  white-space: pre-wrap;
}

.setup-status.ok {
  color: #3fb950;
}

.setup-status.err {
  color: #f85149;
}

