.wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.title {
  font-size: 14px;
  font-weight: 600;
}

.startBtn {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  background: var(--color-success);
  color: white;
  font-size: 13px;
  font-weight: 500;
}

.startBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stopBtn {
  padding: 6px 16px;
  border: 1px solid var(--color-error);
  border-radius: 6px;
  background: white;
  color: var(--color-error);
  font-size: 13px;
}

.hint {
  font-size: 13px;
  color: var(--color-text-secondary);
  text-align: center;
  padding: 16px;
}

.error {
  font-size: 13px;
  color: var(--color-error);
}

.loadingBox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  font-size: 13px;
  color: var(--color-text-secondary);
  background: #fafafa;
  border-radius: 8px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.frameWrap {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  /* 9:16 portrait aspect ratio typical for mobile ads */
  aspect-ratio: 9 / 16;
  max-height: 640px;
  margin: 0 auto;
}

.frame {
  width: 100%;
  height: 100%;
  border: none;
}
